Glenn Sizemore

Explore articles and content from this author

Glenn Sizemore

5 articles published

1 min read

Meet the Scripting Games Judges

I can honestly say that the interactions that I"™ve had with the PowerShell community over the past five years have been some of the most fulfilling. There is something to watching someone learn to script. Some plateau artificially mainly because they don"™t want to leave the GUI. Often they"™re forced into learning PowerShell and stubbornly go into trying to learn as little as possible. If you competed this year you do not fall into that category. You fall into the category that I love working with Talented Specialist that we watch graduate from good to great. I"™m happy to invite this year"™s class into “the club”.
For everyone else I have an invitation. If you would like to know what makes a good script great and will be in New Orleans next week for TechEd 2012 NA, then please join the judges of the Scripting Games as we do a public Code review. Simply put we"™ll take a script and as a group discuss what makes it good and bad. We"™re calling it best practices for the real word, but you"™ll see it listed in the directory under BOF-ITP23.

4 min read

Scripting Games Week 5

I loved this week"™s challenge as it had the right wiggle room to bring out the best in our participants.  Of course, this is also the point in the games when we start to get everyone"™s “A” game.  At this point even our new competitors are all warmed up and in the zone, and let me tell you the entries this week show it!   I want to start with the beginners as I actually ran almost every entry this week.  Honestly everyone fell into one of three buckets Select-string, Import-CSV or ,Foreach.  Let me explain there where three primary means to solve this problem.  Use Select-String and some basic text parsing to get the ip addresses, and then using Select-Object to filter.  Converting the logs to objects with Import-CSV and using Where-Object to filter.  Or using Foreach and a combination of if and where.
They are all three correct, so how does one judge one from another?  As this is a competition I used speed as the determining gauge.  For a long time I was convinced that the following was about perfect.  Quick simple and accurate.

3 min read

Scripting Games Week 4

Again if you"™re participating in the games this year you"™ve already won!  If you"™re not and you"™re reading this post what are you doing!  I"™ve watched authors step there game up over the past month, and I can tell you from personal experience the games will make you better at your real job.  It"™s like sharpening an axe, an axe made of super juice that can automate the world 🙂
**Well that’s clever!
** I came across this script this morning.

5 min read

Scripting Games Week 2: Formatting edition

This time of the year always feels like someone is holding down the fast forward button.  I blinked and here we are Friday morning another week of scripts in the rear view.  I spent most of my week in the beginner class this week, and was greeted by a combination of beginners and scripters who weren"™t quite ready to step up to advanced.  More of the latter if I"™m to be honest.  This was a pleasant surprise as it"™s another sign of the continuing growth of our community.  Now on to the scripts I knew when I signed up to do this, that at least one of these weeks I"™d talk about formatting.  It"™s one of those best practices that you don"™t appreciate until you"™re asked to review someone else"™s code.
Don"™t Crunch the Code, and for the love of all things, Hit Enter!
I did not deduct any points for readability, but you didn"™t make my good list either.  Personally I find it disrespectful to share an ungodly one-liner, but it"™s downright wrong if that single line has semicolons!  We"™re not printing these scripts the crunch gets us nothing. I"™m not going to call out the litany of scripts that were manually formatting the data directly which is even worse, but consider the following.

4 min read

OK i'm impressed: Scripting Games Week 1

Well guys, and gals another year has passed, and the annual scripting games are upon us again.  After a week of reviewing submissions for their technique and style I must say that I am truly impressed!  As a community the average ability seems to be growing by leaps and bounds.  That"™s not to say we"™re all Samurai just yet, but we"™re getting there!
Before I go off and nit-pick I want to congratulate you all on a small mountain of really well written scripts.  Some of the things that the community was preaching 5 years ago are now just standard.  Stuff like comment your code, format for readability, and Parameters.  At this point I"™m convinced those who still aren’t conforming are simply non-conformist and well that"™s a lost cause.  For the rest of us great work and keep it up!
**Where is the Help!
** What I  didn’t  see enough of in the advanced category is help.  Honestly if you"™re going to write a 200 line script fill out the help!  It"™s not that hard and it is THE difference between a good script and a great solution! It"™s also one of the fundamental differences between hacking and tool building, both are focused around automating a given problem set.  The hacker just gets it to work, the tool builder makes it usable by the masses.  If you haven"™t figured it out yet the real money is in tool building, I"™m just sayin!