O'Reilly logo

Learn PowerShell Scripting in a Month of Lunches by Don Jones and Jeffery Hicks

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Always design first

Before you sit down and start coding up a function or a class, you need to do some thinking about its design. We almost constantly see toolmaking newcomers start charging into their code, and before long they’ve made some monstrosity that’s harder to work with than it should be. In this chapter, we’re going to lay out some of the core PowerShell tool design principles, to help you stay on the path of Toolmaking Righteousness. To be clear, all we’re doing here is building on what we laid out in part 1 of this book. Now we’re ready to provide some more concrete examples.

8.1. Tools do one thing

As we’ve mentioned before, the Prime Directive for a PowerShell tool is that it does one thing. You can see this in almost ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required