PowerShell Koans

This topic contains 2 replies, has 3 voices, and was last updated by

 
Moderator
4 weeks ago.

  • Author
    Posts
  • #121584

    Participant
    Points: 292
    Helping Hand
    Rank: Contributor

    ko·an
    /ˈkōän/
    noun

    1. a paradoxical anecdote or riddle, used in Zen Buddhism to demonstrate the inadequacy of logical reasoning and to provoke enlightenment.

    Okay, history lesson out of the way (the concept is ancient, it seems, literally)...

    In programming, the term koan has been co-opted by some to refer to a library of code that is designed to fail, typically through either a pre-existing testing framework or custom assert functions. There are a bunch of other programming languages that have one or more libraries of koans that can be used as a guided learning experience, most commonly to assist with learning the language itself.

    After having learned a decent bit of F# with some koans, I decided to see if there were any PowerShell koans. There were, but they covered only the basic language features, didn't really mention cmdlets, and hadn't been worked on in quite some time.

    So... I took a stab at it myself!

    https://github.com/vexx32/PSKoans

    Thus far, I've not had the opportunity to teach a class or anything grand with them, but from the lovely folks in the PS Slack I've had pretty much nothing but positive words for what I've put together so far. Naturally I've not managed to cover everything (yet...) but it's a pretty solid start, and covers all the language basics as well as your standard complement of basic cmdlets, how to work with custom objects, and the available tools for working with unfamiliar territory (aka Get-Help, Get-Member, and Get-Command, among others).

    Figured I'd post it here and see what y'all think. Enjoy! 🙂

    (And of course, if you feel so inclined, I'm more than happy to accept help on it; the final scope of it isn't really complete yet, and there's always room for area-specific koans for things like DSC and classes, Exchange, etc., etc.)

  • #121614

    Participant
    Points: 884
    Helping Hand
    Rank: Major Contributor

    This is cool 👍

  • #125438

    Moderator
    Points: 174
    Team MemberHelping Hand
    Rank: Participant

    Perfect way to increase my Pester understanding! This is really cool!

You must be logged in to reply to this topic.