Viewing 2 reply threads
  • Author
    • #121584
      Topics: 2
      Replies: 512
      Points: 1,309
      Helping Hand
      Rank: Community Hero


      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!

      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
      Senior Moderator
      Topics: 8
      Replies: 1159
      Points: 4,050
      Helping Hand
      Rank: Community Hero

      This is cool 👍

    • #125438
      Topics: 2
      Replies: 50
      Points: 385
      Team MemberHelping Hand
      Rank: Contributor

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

Viewing 2 reply threads
  • The topic ‘PowerShell Koans’ is closed to new replies.