• CI for a Coding Dojo

    Suppose you're hosting a coding dojo and want to do continuous integration; that is, you want to always show the state of the tests while editing code. Here's a pretty stable solution I came up with after a few tries.

  • Why I Left University

    Note that there's no "... and why you should too". This post is decidedly not doing a bunch of things:

    • It's not arguing for or against going to / finishing university
    • It's not calling for arguments on either side to help me make a decision (it's all done and in the past)
    • It's also not a general statement about anything at all.

    This post is instead the story of my very specific case. These are true for me, they may not be true for you. I share all details openly, recognizing that some of you don't agree with my decision. My goal is also not to convince you about anything; I'm explaining my thinking and feelings so you may better understand, and if needed, more easily accept my decision.

    Warning: it's a really, really, really long post. It gives all the exposition needed to understand me (in this regard). I don't mind if you don't read it, but if you want to understand, then please do. These are the arguments I considered, how I weighed them, and how I came to the final conclusion.

  • The Prototype with the Split Personality

    A tragedy in one act.
    Sub-title: the case-insensitive file system strikes again.
    Location: an OSX development machine.

  • Journaling for Geeks

    There's a whole lot of material on the 'net about why you should keep a diary, so I'm not writing about it. I'm writing about how I'm planning to do it, starting today. There are a few conditions the medium needs to satisfy:

    • Be software, obviously :)
    • Be plain-text
    • Have a nice-looking version I can read later
    • Be synchronized online
    • I want to have a lot of control over the data (no submitting entries in a web form)
    • Be encrypted
  • An Intro to Lens With No Theory

    Control.Lens is an awesome Haskell library by Edward Kmett that makes working with complex data-types a joy. That might sound boring, but consider updating a deeply nested value. Which of the following do you prefer?

    Motivation

    -- With pattern matching
    updateZ :: Alpha -> (Int -> Int) -> Alpha
    updateZ a@Alpha{beta=b@Beta{gamma=g@Gamma{z=old}}} f = a{beta=b{gamma=g{z=f old}}}
    
    -- With field accessors
    updateZ' :: Alpha -> (Int -> Int) -> Alpha
    updateZ' a f = a{beta=b{gamma=g{z=new}}}
                    where b = beta a
                          g = gamma b
                          new = f $ z $ gamma $ beta a
    
    -- With Control.Lens
    -- There's some cheating going on, this is just here to show the difference.
    -- See below for complete examples.
    updateZ'' :: Alpha -> (Int -> Int) -> Alpha
    updateZ'' a f = a&beta.gamma.z %~ f
    

    If you picked number three, read on. First, here are two programs for actually running the above examples, so you can poke at them. Then we'll examine parts of the tutorial at lens.github.io (which is totally great), look at some generalizations and finish with some extra coolness. You can also find some useful links at the bottom.