Blog

  • Bad Developers Should NOT Use Frameworks

    The sad part about this article is that the people that actually need to read this won’t.  Why; because they simply don’t care about what they do.  It really is the honest truth.  Nonetheless, I will courageously continue writing in hopes that the good developers will magically convey this message to the people who need to learn it!

    When you consciously pick a framework, you’ve made a decision, a decision that this existing code (black box as some call it) will help me accomplish what I’m trying to do better and faster than without it.

    However, there is a catch!  As you learn from a young age, nothing is free and this includes using a framework.  It takes work and effort to learn how to use the framework.  It’s not some magic tool that you wave your wand at and magically the work is done.  It can be!  Believe me it certainly can be, but only after you’ve spent the necessary time to understand and use the framework!

    (more…)

  • Implementing the Repository Pattern with CakePHP

    I must admit, my recent articles are becoming a bit obsessed around the repository pattern.  What can I say, I like it, it’s useful, and it’s not restrictive based on a language or a framework.

    I’ve long professed how I dislike convoluted controllers.  CakePHP’s find method almost immediately causes this when used inside a controller.  More importantly, the code inside the find method is extremely unreadable.  This is almost more important than a large controller function!

    This is where the repository pattern comes in.  At its most basic example (which some will consider overkill – you know who you are), I still think the repository pattern is clearer.

    Here is an example using the regular find approach:

    [code]
    $user = $this->User->find('first', array('conditions' => array('id' => $id)));
    [/code]

    Compared to a repository example:

    [code]
    $user = $this->UserRepository->GetById($id);
    [/code]

    The code is almost identically; however, in the second example, it’s clear that if I were to “read” the code I am retrieving a user by id opposed to I’m finding the first user with the conditions of id being equal to the variable $id.

    So if you are sold, let’s continue with a full suite example…

    (more…)

  • My Epic Farewell Poem

    I blogged recently about how I had to decide to leave my job and I tweeted about how I was Googling funny farewell letters.  I found some pretty funny stuff, but definitely nothing appropriate to write before I left.

    Instead I wrote the following poem in a parody of “Twas the night before Christmas”.  P.S. I think this is probably the greatest thing I’ve ever written.

    Twas the night before my last day at XYZ, when all through the pit
    All the XYZian’s were stirring creating a hit.
    The build system is hung on the VMs with care,
    In hopes that Jarret soon would be there.

    The server team were nestled writing their code,
    While visions of a platform began to decode.
    And Mike out in Vancouver, and I with my cap,
    Had just received a deadline that was due in a snap.

    When up in the Danger Room I could hear quite the clatter,
    I sprang from my office to see what was the matter.
    Up to the Danger Room to see what was adrift
    But it was just Pascal playing a great riff!

    With a little PSD file, all layered and in black and white,
    I knew in a moment I was in for a late night.
    The master of delegation was on his game,
    And I Skyped, emailed, and paged them by name.

    Now Brian, now Bill, now Peter, Martin and Robb!
    On Pat, on Matt, on Ingrid, Daniel, Dayna, Don and Chris.
    To your laptop, to Visual Studio
    Code away, code away, code away all!

    And then, in a twinkling, I saw Braden get on a chair,
    Singing something about putting his arms up in the air.
    A bundle of toys that he was about to reveal
    All packed up nice – like it was a Happy Meal.

    I sprang to my keyboard where I always do strive
    And away I coded in HTML5.
    But before I take flight,
    Good luck to you all, and to all I’ll build you a great web site!

  • Slowing Down Before You Speed Up

    No this isn’t a typo, nor is it an oxymoron – I consider this a fact.  If you find yourself feeling like you have to much to do and not enough time to do it, you’ll probably be really stressed.

    When you’re this stressed it’s most likely that your mind won’t actually let you focus on the task at hand.  Instead, the only thing your mind will be focusing on is how you have to get “this” done now while not thinking about how you are going to get it done.

    Circle back to the title of this article and this is where slowing down comes into place.

    (more…)

  • My Favorite Thing About Coldfusion

    I’ll be honest; I have not written a line of Coldfusion in over 5 years.  It was one of the first languages I used professionally, I must emphasize that it wasn’t personally!

    But when I was regularly using it there was one function that I miss and wish was in other languages.  That function is cfchart!

    P.S. yes this is really off topic, but after I got a LinkedIn message about a Coldfusion developer, it made me think back to my beginning days of development.

    (more…)