The Ruby Craftsman

Posts

  • 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

  • Early Memories With Technology

    My earliest memory of using a computer was a computer running DOS. To login my dad had made the password the numeric part of our address so I would memorize it. I remember one game that was side scrolling game where a kid was bouncing on a pogo stick.

    Read more

  • Managing Global State In The Context of a Web Request

    I’m going to be talking about the global state in the context of a web request. When a request comes in it will be running within a thread. That thread exists for the life of the request. If you want to store some state in the context of that thread you can use thread local variables.

    Read more

  • Loosely Coupled to ActiveRecord

    Rails ActiveRecord ORM is a great abstraction on top of SQL, but littering it throughout your code can lead to issues. The amount of methods from inheriting from AR is extensive and many of those are added at run time after a round trip to the database. So it is best not to add to this API with your own decorator methods or business logic. Anything you add to AR should follow it’s responsibility of querying the database. I would like focus on how to narrow the API, but also extend behavior.

    Read more

subscribe via RSS

Subscribe to my mailing list

* indicates required