I’ve grown up reading Tom Clancy and probably most of you have at least seen Red October, so this book caught my eye when browsing used books for a recent trip. It’s a fairly human look at what’s involved in sailing on a Trident missile submarine…
Back in July we had Chad Miller visit oPASS to do a presentation on Powershell. It was well received and kudos to Chad for a nice presentation and taking the time to drive up from Tampa. Going in to the presentation I would say my view of Powershell was interesting, but over hyped, but then again, I’m typically not a bleeding edge adopter of technology either.
Chad made some interesting remarks during the presentation (and apologies if I put words in his mouth by accident):
- SQL Server people “get” scripting faster than others do in his experience. He attributes that to the fact that so much of we do are scripts already. Syntax is different, usefulness of the concept is already engrained
- Believed that Powershell was powerful because it took relatively few lines of code to do complex tasks
- Ease of discovery of properties/methods makes it easier to learn
- He’s looking forward to the day when presentations are less about the basics and more about solving real problems with it
The first one sounds plausible. The second – I think – is over stated. I’m sure there is a limit, but verbosity of code has never struck me as a major impediment to getting things done. Of course, that assumes more than passing comfort with the syntax. I’m probably also biased, as many C# people consider VB.Net to be verbose, but I find VB.Net to be reasonable. In both cases it’s the difference between code you really write and pre-packaged/reusable code that impacts productivity. On the third one I agree about 50% – PS does make it easy to discover, but so does the Visual Studiio IDE, either via the object browser or via the immediate window. Calling it 50% is probably unfair, because I think easy of discovery is critical to learning any new product. The last point was really great, until we build that shared knowledge it’s hard for anyone to move into deeper areas. Interesting to see how (if) this moves forward in the next couple years.
I’ve done my fair of scripting and batch files over the years, ranging from almost vanilla batch files to more advanced ones using things like PC Magazine Batchman (best link I could find), VBScript, and just a small amount of PS work so far. Scripting is a useful technique, but once I moved into “real” programming environments I found that going back was hard. Even VBScript scripts I’d write in VB6 for the intellisense, debugging, etc, and then as a final step make it a true VBScript file. I’d say in many ways that a very nice IDE trumps all, for learning and pure efficiency. The Powershell IDE seems like a useful step in that direction, but note quite all the way there.
Some of us will need PS at work, others may never need it. As SQL professionals I think we need to know the basics; what is Powershell, how to load and run a script, the basics of variables and comments. After that you make the decision about where to spend your very limited professional development time – do you learn more PS, Analysis Services, or even something else? No wrong answer.
For those that really enjoy Powershell, I’d suggest taking one more step and trying a “real” language, something that has a first class IDE, supports all the concepts that go into programs today. A good way to do this is with SMO (SQL Management Objects) to build a first class UI around some solution you need. You can call SMO from PS of course, but if you want something really sophisticated, use Visual Studio or similar. Make sure you learn how to use source control either way, and to put good comments in – because even something as small as a batch file can end up being a key part of the enterprise strategy.
It proved to me (again) that I’ll always enjoy hearing about a topic from someone who is both passionate and knowledgeable, someone that has put some effort into making it do tricks.