Search This Blog

Tuesday, March 23, 2021

Finding the Purpose

This is a great reminder! 

First, read what Jason Cannon <support@linuxtrainingacademy.com> wrote in his email with the subject "The biggest mistake shell scripters make." to whom I am giving every speck of credit to for his words (of course!) Then, read what I wrote back to him. Here's his email:


Hello,

From time to time one of my students will ask me to take a look at one of their shell scripts that they are having trouble with.

If you know anything about me at all, you know that I love three things. Linux, troubleshooting, and shell scripting. (Make that four things... teaching my love of Linux, troubleshooting and shell scripting!)

The offer to review a shell script is almost irresistible to me, so I'll say "Sure, I'll look at it."

Reviewing scripts gives me the chance to see many common mistakes. And the number one biggest mistake of all is:

Not defining exactly what the shell script is supposed to do!

What is supposed to happen when I run this shell script?

Why does this script exist?

Can I at least get a simple comment at the top of the script justifying its existence?!? (Um, no.)

By the way, I'm not judging or blaming. Again, this is a very common mistake... a mistake I used to make when I first started scripting, too. This is coming from a place of caring. I *want* people to write awesome shell scripts and I *love* helping them do so!

So, here's my first piece of advice to any (new) shell scripter:

START with the END in mind!

Why?

Well... sometimes people make assumptions about HOW to accomplish their larger goal. You may think you need to do A, B, C, D, E, F, G, and so on to get to Z, but in reality there may be a shortcut that takes you straight from A TO Z. (Shortcuts like bash builtins, predefined shell variables, Linux commands that you didn't even know existed, etc.)

It's the age-old case of not being able to see the forest for the trees and getting lost in the weeds. :-)

You could easily end up with this:

Image

When all you needed was this:

Image

(Shameless plug: If want to learn all the best scripting "shortcuts," check out my latest project-based shell scripting class here.)

Another trap you can fall into is biting off more than you can chew.  Once you have a goal in mind for your script, keep it focused on the essentials.

·         What MUST this script do?

·         If this script could only do one thing, what would that be?

·         What will get me 90% of the way to my goal with the least amount of effort?

Start there. Implement that first, then circle back around to the "nice-to-haves" or bigger goals for your script.

It's way easier to light a room in your house than it is to illuminate the entire neighborhood.

Image

Now you know where to start. In the next email, you'll learn how to write a shell script.

All the best,

Jason

P.S. Want to vastly improve your shell scripting skills quickly? Want help from me personally? Then click here.


Unsubscribe | 400 Locust Street, Suite 400. Des Moines, IA 50309
 


And this is what I wrote back to him:

I don't know squat about Linux. I read your emails because I want to learn more.

That said, your email below is spot-on. I see an easy transition from "Define the requirements for your Linux shell script" to "Define the requirements for your MS Word macros."

For example, I have a MS Word macro that will set the Subject and Title file properties to the file name. If the MS Word file is called "Access-UIHC-Network-from-Home.docx", the Subject and Title fields are both set to " Access-UIHC-Network-from-Home" – the macro has saved me a lot of manual work over the last few years. Last week, though, there arose a new requirement. The Access-UIHC-Network-from-Home.docx file actually has a 5 character Knowledge Article ID and when I looked in a folder of 60ish Word files, there was no easy way to identify that Access-UIHC-Network-from-Home.docx is actually the content for KA ID 10455. So, I renamed those 60ish Word files to have the KA ID as the prefix, meaning Access-UIHC-Network-from-Home.docx is now 10455- Access-UIHC-Network-from-Home.docx. However, the way I have the Word files set up is that all Heading 2s in the Word file has the "Subject" field as a prefix, which now means I have something like the following:

Note: the following is off the top of my head and not reflective of an actual document

<begin Document>

<h1>10455-Access-UIHC-Network-from-Home </h1>

<h2>10455-Access-UIHC-Network-from-Home – Overview</h2>

If you are working remotely, you can access the UIHC network from your laptop as if you were on campus.

<h2>10455-Access-UIHC-Network-from-Home – Prerequisites</h2>

To set up access, verify that you meet the following requirements.

Requirement 1

Requirement 2

Requirement 3

<h2>10455-Access-UIHC-Network-from-Home – Set Up Firewall</h2>

You must set up your firewall to allow access to the network. To do this, follow these steps:

1.Step 1

2.Step 2

3.Step 3

<h2>10455-Access-UIHC-Network-from-Home – Set Up Device</h2>

You must set up your device with required anti-virus software. To do this, follow these steps:

1.Step 1

2.Step 2

3.Step 3

<end document>

If the document has a TOC, the KA ID is repeated in each line of the TOC. I think it looks like a mess.

So now, how do I fix it? Well, I probably need to figure out how to truncate the first 6 characters of the file name and set that value to the Subject field.

My point is that I now have a new requirement and a specific purpose for creating it and your email reminded me it's crucial for me to take the time to figure out what I need before I actually try to solve the problem! Thanks for the reminder!


Speculating in March 2020 about March 2021

Editor's Note: The Iowa Hawkeyes were a #2 seed in the 2021 NCAA March Madness tournament and, sadly, on Monday, March 22, 2021, the Iowa Hawkeyes were defeated by  Oregon (Ducks) by a score of 90-85. The score was tied at 46 in the first half. Then Oregon went on a 10-0 run that caused the Iowa team to be in a hole too deep to climb out of prior to the end of the game. Luka Garza will go down in history as one of the greatest Iowa Hawkeyes ever and his jersey number (55) will be retired in the not-so-distant future. It will be interesting how the team rebounds for the 2021-2022 season which is approximately 33 weeks away! Good luck to Luka Garza! Go Hawks!

This is from an article that made predictions in March 2020 about what teams would be ranked in the Top 25 for the NCAA. As you can see, the article predicted Iowa would be ranked number 7. By this time in 2021, the NCAA's March Madness should be in full swing after missing the 2020 March Madness tournament due to COVID-19. Knock on wood, there is a vaccine for COVID-19 on March 23, 2021 and, also knocking on wood, hopefully the 2020-2021 Iowa Hawkeyes are still in the hunt for a national championship which, I am guessing, will be played on Monday, April 5, 2021 - that's a guess I'm making 54 weeks ago or 378 days ago or 1 year, 1 week, 6 days ago, which was Monday, March 23, 2020.


Friday, March 19, 2021

Digging Todd La Torre

I used to be a fairly decent Queensryche fan. I remember reading about the band in Circus magazine. They were starting to make a name for themselves at the same time as Ratt, Poison, and other mid-1980s bands. However, they didn't have the same type of acknowledgement from me. While Ratt and Poison were singing about girls and life in the fast lane, Queensryche were definitely not. Sure, they had a song called "The Lady Wore Black" but it was an apples v. oranges comparison.

Fast forward to fall of 1987. As a senior in high school, I was enrolled in a class called Media as Literature. We had a student teacher for that class and I really wish I could remember his name. Anyways, he assigned a group project and, somehow, I ended up in a group with Serbi and Chad Elick and two others. Serbi and I were best friends, but that was not the same relationship I had with Chad Elick.

I think we were in the same kindergarten class, meaning that we had known each other from 1976 to 1987 - over a decade. Whereas I was tall, he was short. Whereas we knew each other, Chad and I had never really been friends. We knew each other, but didn't run around with the same people. I don't recall being in any of the same classes in junior high or high school so, to put it bluntly, we didn't know each other.

In fact, I didn't know until fall of 1987 that his house was, literally, across the street from our high school. I don't remember the details, but somehow, our group agreed to work on our project at Chad's house. I still remember the first time I was in his house as though it was yesterday. He put in a tape of Queensyryce's Operation: Mindcrime and to say that I was blown away would be an understatement. I remember that he dubbed a copy of the album for me on a 90 minute cassette tape.

Chad Elick's introduction to Queensryche began a relationship with the band. For several of the next 6 or so years, I listened to Queensyryce's Operation: Mindcrime frequently. I studied the intricate snare drum pattern in the opening tune and appreciated Scott Rockenfield's drumming. The band went out on tour with Metallica in the late 1980s, but when Metallica came to Cedar Rapids, the opening band was The Cult, not Queensryche. In 1991, the band released their Empire album and I liked it. I found the lyrics to be appealing and despite the pseudo-ballad "Silent Lucidity" getting tons of airplay, I was drawn, instead, to "One and Only" and "Della Brown" as well as the motivational "Best I Can" which opened the album. However, for unknown reasons, after the release of Empire and their next album, I unintentionally shifted to listening to other bands not named Queensryce. 

On occasion, I revisited them with their Q2K album as well as 4 other albums for Dailyvault.com.

In 2012, vocalist Geoff Tate had a public falling out with the band and Todd La Torre replaced Tate. I have never listened to a single Queensryche tune since Tate left. However, my friend Kevin Herren introduced me to La Torre's solo album. This is a tune from that album that was released today. Queensryche is touring in 2021 and currently scheduled to play at the Dubuque County Fair on the last Friday of July. Tentatively, Kevin and I are going to go see Queensryche, who I have never seen in concert, despite listening to them for, roughly, three decades.


Tuesday, March 16, 2021

Bayside to WWE

Bayside

  1. Bayside
  2. Bayside - Big Cheese
  3. Bayside - July 29, 2003
  4. Bayside in the Red Bull Recording Studio SHUDDER NEW SONGS
  5. Bayside Live in Sydney

Beato

  1. Rick Beato Reaction 1
  2. Rick Beato Reaction 2

Drums

  1. An Introduction to 7/4 Time - Chad Wackerman
  2. Glen Thomas Drums Moondance Dec31 2014
  3. Why You Shouldn't (Always) Copy Your Drum Heroes

Funny

  1. Jeff Allen Volume 1: Best Jokes and Moments Parts 1, 2 & 3
  2. Junk- Cars And Valet Parking. Chad Thornsberry - Full Special

Hawkeyes

  1. WI Coach
  2. The Iowa AD has no intention of reversing his decision to axe four sports, although he conceded a court case may force him to keep women's swimming
  3. Bohannon forces his way to line for 5 key points; Murray gets rebound that make 3 of them possible; Garza finds out after he's due for a big honor.
  4. Thursday will mark the 93rd and final college game played by a Bohannon in Wisconsin's basketball arena.
  5. Hawkeyes retiring Garza's #55
  6. There were 18 lead changes in the first 36 minutes, but Iowa hit a scoring drought late and Ohio State took advantage to earn win in top-10 matchup.

Misc

  1. Age Calculator
  2. DIY Cassette Deck Drive Belts : 3 Steps - Instructables
  3. Handwriting - Analysis and Graphology - Good Housekeeping
  4. Handwriting - Analysis and Graphology - handwriting-grphology.comy
  5. how does a LP album get made - Google Search
  6. M-19
  7. remaster
  8. THE HISTORY OF CASSETTE
  9. Too heavy

Movies

  1. Zack Snyder's Justice League HBO Max Release Date Confirmed – IGN
  2. Avengers Assemble Scene | AVENGERS 4 ENDGAME
  3. Avengers: Endgame" Is Coming Back To Theaters With New Footage And A Post-Credits Scene, So Take My Money Now with 6 new minutes
  4. drax not having social skills for ten minutes
  5. Justice League Snyder Cut Trailer and Early Review Breakdown
  6. Obi-Wan Kenobi & Darth Vader's Rematch Will Break A Star Wars Record
  7. The COMPLETE MCU Recap - CRAM IT - Avengers-Endgame Edition
  8. Use The Force Luke...

Music

  1. Best Metal Albums of 1991
  2. Metallica - The New Song (Live in Berlin, Germany - June 6, 2006)
  3. The Early 2018 Metallica Round Table Chat by Steffan Chirazi - Full Interview
  4. Rockers React to Quick Eddie Van Halen 'In Memoriam' at Grammys
  5. Company Of Wolves - The Distance
  6. AFTER THE BURIAL – Behold
  7. 10 Reasons Why I DON'T Miss Playing Live
  8. A Day To Remember: Live at The Audio Compound
  9. Missing Persons - Walking In L.A.
  10. Anthony Raneri - Rainbow Connection [Kermit The Frog cover acoustic] (Live in San Diego 8-6-15)
  11. Backtrack - FULL SET - Slambfest - Kingston, Pa - 7.6.08
  12. Bring Me The Horizon - "Shadow Moses" (Full Album)
  13. Company Of Wolves - Everybody's Baby
  14. Company of Wolves @ Club 66 06/03/17 The Distance
  15. Demos - Soundjack
  16. Dokken 01
  17. Dokken 02
  18. Early Birds - FULL SET - Slambfest - Kingston, Pa - 7.6.08
  19. Everyone Dies In Utah
  20. Fame On Fire - Now and Forever Ft. Trevor Wentworth
  21. If Atlas, Rise! was on ...And Justice For All
  22. KISS 01
  23. KISS 02
  24. Megadeth Live in Toronto October 22nd 1990
  25. Metallica - All Nightmare Long (Remixed and Remastered)" THE JUDAS KISS
  26. Paul Stanley singing SHANDI with Joey Anderson on Backing Vocals
  27. Scrid - CBGB 1997
  28. Shinedown Live at Wells Fargo Arena 7/29/18–PART 1
  29. Steve Vai, Nuno Bettencourt, Zakk Wylde, Yngwie Malmsteen, Tosin Abasi and Brian May VideoCollab HD
  30. The Beatles: Get Back - A Sneak Peek from Peter Jackson
  31. War Pigs - FULL SET - Slambfest - Kingston, Pa - 7.6.08

RPM

  1. RPM - Look Around You

TV

  1. 5 Pitches That Left The Sharks TOTALLY Confused
  2. Actress Julia Garner on 'Ozark,' 'The Assistant,' and 'Inventing Anna' – Rolling Stone
  3. Asian Jim - The Office
  4. Bar Rescue Updates: Bar Rescue's Metal & Lace (Headhunters) Has Closed
  5. Beavis & Butthead 1
  6. Beavis & Butthead 2
  7. Cobra Kai' Season 3 ruins 'Karate Kid 2' for the worst possible reason
  8. Every Walking Dead Villain Ranked From Worst To Best
  9. Screech made Dustin Diamond famous. He could never leave the character behind.
  10. Sheldon & Penny - The BBT
  11. The End of One More Explained
  12. The Walking Dead - Who is this? Season 1 Purple Shirt Walker Guy
  13. The Walking Dead COMPLETE Timeline: Season 1-11 (UPDATED)
  14. WHAT UP MOON PIE?

Work

  1. Beginners Guide: How to become an efficient technical writer? – Metapercept
  2. Business Continuity Management Institute (BCM Institute) - BCMpedia. A Wiki Glossary for Business Continuity Management (BCM) and Disaster Recovery (DR).
  3. Snippets
  4. Hacking ITIL Knowledge Management
  5. How to use Microsoft Power Automate Desktop - Full tutorial

WWE

  1. WWE Hot Take: Stay Home Part-Timers, WrestleMania 37 Is for Building New Talent
  2. Throwback Thursday: Looking Back at WWE's No Way out 2001 PPV
  3. Power Ranking Ric Flair's Greatest WWE Moments on 72nd Birthday
  4. R-truth being a national treasure for 8 minutes and 43 seconds straight
  5. Big E talks tough with Samoa Joe - WWE Grit & Glory
  6. Paul Heyman's greatest mic drop moments: WWE Playlist
  7. R-Truth takes a hilarious trip to Suplex City!! (RAW 1-13-20)