Philosophy of Automation


 In my previous post about Boolean Values And Operators I made the following point: “PowerShell has a rich notion of TRUE/FALSE because it dramatically reduces the overhead and junk that you need to deal with when doing your work.”  This philosophy flows from Whitehead’s observation:
 


Civilization advances by extending the number of important operations which we can perform without thinking about them.
Alfred North Whitehead, Introduction to Mathematics (1911)
English mathematician & philosopher (1861 – 1947)

Whitehead’s point was really driven home to me recently.  Last week we lost power in my area for 6 days.  During this time, we were without the benefits of most of the things I take for granted.  I was struck by how much time it took to do things that previously I had not thought about.  For instance, washing the dishes in the sink and then drying them by hand takes a lot more time then sticking them in the dish washer and hitting the START button.  There were dozens of things that just took a lot more thinking and effort than before (reheating my tea in a pot of hot water vs zapping it in the microwave, getting in and out of my car to open/close the garage door vs clicking a button, etc. etc.).  I didn’t terribly mind doing things this way (though I didn’t appreciate the cold [it got into the 20s one night]) but the thing I found myself resenting was that I didn’t have time to do as much reading as I usually do. 


Whitehead’s point is NOT that civilization advances by us becoming non-thinking idiots.  Rather by increasing the number of things that we don’t have to think about, we can spend our thinking on NEW things and solving NEW problems and then transforming those things into things that we no longer have to think about.  And so on and so on.  Because I spent time doing dishes means that I didn’t have time to read which means that I didn’t get more educated which would have made it easier to move the ball forward. 


This is the essense of PowerShell and the heart of automation.  In our world, there is no end of interesting and hard problems to think about and to the degree that our tools continue to make us think about the low level junk is the degree to which we reduce the time that we have to think about those interesting problems.  The ball gets moved forward as we adopt better and better tools that do what we want them to do without us having to tell them and by getting in the habit of automation repeativing operations and sharing that automation with others. 


Huge advances come from the accumulation of small deltas.  In David Copperfield, Charles Dickens wrote, “Annual income twenty pounds, annual expenditure nineteen pounds six, result happiness.  Annual income twenty pounds, annual expenditure twenty ought and size, result misery.”  Einstein said it this way, “The most powerful force in the universe is compound interest.”   So the next you find youself thinking about how do do something that you’ve done before, you should take it as an opportunity to invest a little bit and automation the activity so that you don’t have to think about it again.  Give the function a good long name so that you can remember it, find it, recognize it when yhou see it and then give it an alias so that you can minimize your typing (e.g. Get-FileVersionInfo and gfvi ). 


Last but not least, SHARE.  Put your script out on a blog or newsgroup or website so that others can benefit from your thinking.  Newton may have figured out gravity but if he didn’t share his thoughts with others, he would not have moved the ball forward.  Ok – so your script is not in the same league as “f=ma” but share it anyway because “huge advances come from the accumulation of small deltas” (hmmm, that is the essense of Newton’s calculus, seems like I’ve got a little conceptual fugue going on here 🙂 ) 


Enjoy!


Jeffrey Snover [MSFT]
Windows PowerShell/MMC Architect
Visit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShell
Visit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx