Wednesday, February 5, 2014

What I learned at the Winter Scripting Games - Part 3 - The Importance of Help

That’s what we learnt in event 1 of the scripting games. Our team of enthusiastic novices threw together a script that we thought met most of the requirements. It wasn't pretty and didn't include any comments or help.

Once the scoring was done we came out a -4. MINUS FOUR! Ouch.

Looking at the scoring criteria it became clear why. Much of the scoring seems to be around building the right kinds of good practice into your script.
We lost points on;
  • Appropriate use of Try/Catch
  • Appropriate use of verbose output including -Verbose support
  • Correct management of pipeline input
  • Appropriate use of parameter validation attributes
  • Comment- or file-based help
  • File names include date of production
  • Code shared between solutions
This is all pretty simple stuff that could almost be built into a script “template”. We’ll be working on that for future Events.

 So what we've learned is that the logic in your script isn't the best way to score points. I was pretty happy with our solution, give that it was produced by 3 novice scripters. OK 2 novices and me… A ‘Senior Novice’.


It was a great learning experience and the emotional kick of scoring NEGATIVE points made it clear how valuable it is to build this good practice stuff into our scripts.  

No comments:

Post a Comment