The Ruby Craftsman

Posts

  • Freeze Ruby Constants [Video]

    An intro video to Ruby constants their enforcement pitfalls and how to fix them and why you should care in your code.

    Read more

  • Refactoring with Hash Defaults

    I’m going to give you a primer on how to set default values when accessing non-existing keys. Then I’ll give you some advice on how this could improve your code.

    Read more

  • Postgres Regex Parsing

    For some reason a Ruby array of BigDecimals was being inserted into a String column in our Portgres DB. With a lot of trying out different things and some help from another software developer and DBA we came up with a solution to parse out the numbers. The goal was to convert a string of ["83000.0", "119000.0"] to an PG array {83000.0, 119000.0}. It Take some regex, but it’s doable.

    Read more

  • Why use ActiveMocker?

    959 Tests in 4.9 Seconds

    Read more

  • Growing Up With Football

    Somewhere in between middle school and my freshman year of high school my Dad came into my room to try to convince me to play football. He had tried before and I always said no, but this time he a pitch that was much more up my alley.

    Read more

subscribe via RSS

Subscribe to my mailing list

* indicates required