Scripts in the PowerShell Cookbook?

The third edition of the PowerShell Cookbook is getting close! We should have an online preview ready for your perusal in the near future – stay tuned for an update.

One “problem” we’re running into is its size. This is where we’d love some feedback.

We could make it thinner and cheaper by not printing the scripts, but instead hosting them online. That would mean, of course, that you can’t just sit back and read through the sample code.

So a question, dear reader.

If you own a copy of either the first or second edition of the PowerShell Cookbook, did you find value with having them included in the book itself? Or would a download provide just as much benefit?

12 Responses to “Scripts in the PowerShell Cookbook?”

  1. Greg Wojan writes:

    I prefer to have the scripts to read in the text. If a script has a lot of boilerplate code or scaffolding you could eliminate that to save space…

  2. Jay Bazuzi writes:

    I read the book on a Kindle. That tiny screen was horrible for the code samples. That’s more an issue with the device, than the book.

  3. Robert Robelo writes:

    I prefer to have the code included in the book. Maybe you guys can include the code in the electronic version of the book and offer a thinned version of the print book with an eBook companion. One can always print the code from the eBook 🙂

  4. Mike Shepard writes:

    I’m not sure how much value there would be in a cookbook that didn’t include the scripts. Discussion of what cmdlets to use are helpful, but seeing the cmdlets used in context are (to me) the point.

  5. Francois-Xavier Cat writes:

    I prefer to have the scripts in the text/book, except for long scripts that can be be posted online only.

  6. Will Steele writes:

    I am a book person too. I like to think of them as self-contained references. To have to grab a download for scripts would take something away from the essence. If it were a C# book it might be a different story. Perhaps you could just highlight key code segments of the scripts instead of putting the whole thing in to focus on critical parts of each recipe.

  7. Zdzislaw Twardy writes:

    I prefer to have the scripts in the book. The long scripts (taks many pages) should be in the Appendices.

  8. Jay Bazuzi writes:

    This is such an interesting problem. We’re at a point of convergence of developing technologies. The printed page is still the nicest place to read text; the Kindle is pretty close behind, but only for prose (no tables, diagrams, code samples). Computers are the best place for code. Typing code samples out of a book sucks. I’m hopeful that developments like Kindle Paperwhite and Retina display (and their successors) will make this annoying problem trivial

  9. Karl Mitschke writes:

    I think you absolutely have to include the scripts.
    If needed, leave out comments and comment based help, and provide an expanded script online with the comments and help that you were forced to leave off.


  10. Johannes Rössel writes:

    While I do not have a copy of either 1st or 2nd ed. I was a technical reviewer of the second one and I have to say that reading the scripts in context of the text (and vice-versa) makes much more sense. The scripts aren’t that self-contained. The text around it explains what is done and why. So if you have to download them you always have to switch between book (and thus the description) and the screen (where the code is). This is much more a hassle than simply flipping pages.

    Of course, that is not to say that the scripts *shouldn’t* be available online. I agree with Karl that things that make a script overly long, e.g. comment-based help and maybe other things such as nice-to-have but not essential parameters and their handling can be left out of the book for brevity’s sake but then appear in the online version.

  11. Shay Levy writes:

    No question for me, scripts should be inside the book. Appendixes can go online. I don’t want to carry a bunch of printed pages (scripts), or a digital device, when I carry the book with me when I’m not reading it at home.

  12. David Cook writes:

    Lee, I’m another vote for including the scripts in the book, as I agree with the other opinions that it becomes a self-contained reference.

    Of course they should also be available online for easy access!

Leave a Reply