Richard Hart

Something @ Somewhere
Kent, UK

My Music
My Photos

LinkedIn
Mastodon

  • For whatever reason I’ve been made my gym’s “Member of the Month”. I had to write a short paragraph which I include below.

    Last year I dedicated myself to strength training and managed to smash all my previous personal bests on all my lifts. Now this year I switched my focus towards Brazilian Jiu-Jitsu with the aim of losing weight and improving my conditioning ahead of this year’s competitions. Looking back on all the years I’ve spent in the gym, I wasted so much time not pushing myself as far as I was truly capable of, and only recently have I found the ability to really dig deep and to be relentless in my training. This year has been as much a mental progression as it has a physical one.

    A lot of this wouldn’t have been possible without the great support and encouragement of all the staff in the gym. With such a great fitness team around, I’m never short of ideas for my own workouts. It’s a real inspiration to see how hard both they and their clients work, as well as motivating me to also do the same.


  • I’ve written before about the notion of developers going stale. Day in day out I see examples of ydiw, but not of the “You’ve made a mistake, let me fix that for you” nature, but more of the “The 80’s called, they want their program back” type. I can forgive bugs and mistakes, but I just find it very hard to not get annoyed with antiquated and long-winded ways of doing things, especially when there are far better/easier/quicker ways of achieving the same goals with other tools.

    Burying your head in the sand about different techniques and technologies does no one any favours, especially yourself. You don’t need to learn each new shiny language in depth or even at all, but just reading a bit about it or even trying it out will propel your game so far ahead of the pack that you’d be foolish not to do it. Now maybe you don’t care, maybe you’re just not interested and that’s fine, it’s not for everyone, but then don’t make others suffer because of your laziness/lack of enthusiasm. I don’t come over to your house and shit in your living room, so please don’t do it in mine.

    It just pains me so much when I see things being done wrong. You can call me a fanboi if you want, but I don’t simply bang the drum of the technology I use because I’ve been brainwashed, but because I’ve been where you are now and discovered something better. Now you can always ignore my advice, after you’ve investigated it yourself, but don’t just dismiss it out of hand. So many people make out like it’s such a great sacrifice to try other technologies. But how long would it really take to try something? Not even a few hours. You’re not willing to give up a couple of hours for potentially days and days of re-couped time? Get out of here!

    Finally, if not for yourself, do it for your clients. Would you trust a doctor who used methods from the 15th century? No? Then why should your clients trust you if you’re still using crazy old ways to get stuff done.

    So let’s make the world a better place and make my life easier at the same time. Right, I’m off to play with HTML5 and CSS3.


  • Recently I’ve been spending a lot of time contemplating what I need to do to become better in certain areas of my life. Namely work, the gym, BJJ and Japanese. Do the answers lie in books? In videos? In talking about it with people? No, the only way to become better at these things is to do more of the thing itself. Nothing counts more than experience does. Whether that’s time in-front of a keyboard, time spent with a barbell, using the language, or rolling on the mats. The auxiliary actions of reading books and watching videos will propel you onwards faster, but they are in no way a substitute for actually doing.


  • After spending a few hours in Photoshop trying to get some buttons to just look “right”, I started to think about how I seem to spend the majority of my time adding “polish” to applications. Getting features in is easy, getting them working nicely and looking great is hard. It’s the 80/20 principle, it’s that final 20% that makes the difference between good and great. Apple is the obvious choice of reference here when it comes to polish. Their products are polished to such a high degree, that can’t help but I wonder what percentage of time they spend getting it right over getting it done.


  • I had the worst tooth ache last Thursday so couldn’t sleep. So while being up for most of the night I thought I’d whip up a small app to track my Facebook friends using the new Facebook Graph API. I’m always curious to see who has removed me on Facebook, and now I can finally see who has. Check it out here http://who.removed.me


  • Recently I switched from Evernote to Notational Velocity. I was so sick of the Evernote iPhone app and saw that Notational Velocity synced with Simplenote. Since trying them both out I haven’t looked back. Now, Notational Velocity supports tagging but Simplenote doesn’t, and as I like to search by tag, this was a bit of a problem. So taking the Twitter approach, I simply hashtag my notes, which makes them incredibly easy to find in both Notational Velocity and Simplenote. I don’t put the hashtag in the name of the note but just as the first line. I found that putting the tag in the name looked a bit untidy in SimpleNote. A nice side effect is that in Simplenote, the tags appear as the preview line. Problem solved. #notationalvelocity #simplenote


  • There’s always that storyline in films and TV shows. Parents despair as they become more and more distant from their angst ridden teenage son/daughter who complains of just being mis-understood. There all the signs of neglect on the parents side, by not spending enough time/showing enough love, then there’s normally some sort of event that brings them all together again to be one big happy family. Think John McClane in Die Hard and his daughter Lucy, or Sean Archer in Face/Off and his daughter Jamie. The parents and the teenager are living separate lives and there’s a clash when they come together, because neither understands where the other is coming from.
    As a developer one of the ways this problems often occurs is when working with people not from a technology background. Warren Buffett’s famous advice is to simply “Invest in what you understand.”. Many people take the time to understand their market, but do not take the time to understand the technology/process. It’s no surprise to me that the only company that I’ve worked for that’s actually achieved a measure of success is run by people who not only have a very clear understanding of their market, but also have a very clear understanding of the technology they provide. And what of the others that are no longer around? It’s no surprise I spent a lot of time at those places trying to explain how things worked and why things couldn’t be done. Yes, and while some businesses needs to be about pushing the boundaries and innovation, to do so also requires a knowledge of the limitations of what currently exists.
    I have been as guilty of this sin as everyone else. As a developer it’s very easy to take no interest in the customer side of things and care only about the technology, and perhaps to a degree this is an even worse situation to be in over having management that don’t understand technology. When this happens solutions that are unusable by anyone can end up being delivered. I know for a fact I have delivered plenty of products without ever asking myself who the product is actually aimed at, all the while being feature focused. Where as now, rather then only caring if something can be done or not, I try and ask myself who will be trying to achieve a task and what is the best way for them to go about doing so. As with anything, there is a balance that needs to be found.
    Managers, understand the technology. Developers, understand the market.

    There’s always that storyline in films and TV shows. Parents despair as they become more and more distant from their angst ridden teenage son/daughter who complains of just being mis-understood. There all the signs of neglect on the parents side, not spending time with them or not showing enough love. Then there’s normally some sort of horrible event that brings them all together again to be one big happy family and they all live happily ever after. Think John McClane in Die Hard and his daughter Lucy, or Sean Archer in Face/Off and his daughter Jamie. The parents and the teenager are living separate lives and there’s a clash when they come together because neither understands where the other is coming from.

    As a developer this problems often occurs when working with people not from a technology background. Warren Buffett’s famous advice is to “Invest in what you understand.” and while many managers take the time to understand their market, they don’t take the time to understand the technology/processes of their business. It’s no surprise to me that the only company that I’ve worked for that’s actually achieved a measure of success is run by people who not only have a very clear understanding of their market, but who also have a very clear understanding of the technology they provide. What of the others that are no longer around? It’s no surprise I spent a lot of time at those places trying to explain how things worked and why things couldn’t be done. And while some businesses are about pushing the boundaries and innovating, to do so requires a knowledge of the limitations of what currently exists.

    As a developer I have been as guilty of this sin as everyone else. It’s very easy to take no interest in the customer and to care only about the technology. Perhaps to a degree this is an even worse situation to be in over having management that don’t understand technology, as when this happens, solutions that are unusable by anyone are usually delivered. I know for a fact I have delivered plenty of products without ever asking myself who the product is actually aimed at, all the while being completely feature focused. When I think back to those products, it’s a wonder they survived any sort of usage at all. Now, rather then only caring if something can be done or not, I try and ask myself who will be trying to achieve a task and what is the best way for them to go about doing so. As with anything, there is a balance that needs to be found.

    Managers, understand the technology. Developers, understand the market.


  • Former U.S. President Bill Clinton, who started his autobiography, My Life, with a reference to the book: When I was a young man just out of law school and eager to get on with my life, on a whim I briefly put aside my reading preference for fiction and history and bought one of those how-to books: How to Get Control of Your Time and Your Life, by Alan Lakein. The book’s main point was the necessity of listing short-, medium-, and long-term life goals, then categorizing them in order of their importance, with the A group being the most important, the B group next, and the C the last, then listing under each goal specific activities designed to achieve them.

    The message is simple. List what you need to do and prioritise it. While that is the core message of the book, it also covers what to do in various situations. What to do when you perhaps feel like you don’t have enough time to complete an A task, or find yourself procrastinating but always doing B or C tasks instead of the more important A ones. The main thing I took away from the book though was to always ask yourself, “What is the most important thing I could be doing right now?”. It’s surprising how asking such a simple question of yourself can have such a huge impact on what it is you actually spend your time doing.


  • Having a play with mongomapper and wanted to get Clearance working with it. Seemed to just be a simple case of doing the following in my user model.

      def self.attr_accessible(*args)end
      include Clearance::User

    My full user model ended up looking like this:

      class User
    
        include MongoMapper::Document
    
        def self.attr_accessible(*args)end
        include Clearance::User
    
        key :email, String
        key :encrypted_password, String
        key :salt, String
        key :confirmation_token, String
        key :remember_token, String
        key :firstname, String
        key :email_confirmed, Boolean
        key :lastname, String
    
        timestamps!
    
      end

    Perhaps if I have time, I will look into adding attr_accessible support to mongomapper myself.

    Update 13/03/2010: I believe the dependency on attr_accessible in clearance has since been removed. So this small hack is most probably defunct.


  • I just can’t get out of bed in the morning. I hate it. I’ve tried having two alarms, tried putting my alarm on the other side of the room (I just end up getting back into bed) and setting my alarm an hour early and constantly hitting the snooze button until the last moment, but nothing has ever worked. Recently though I’ve found a simple way of getting myself into a state where jumping out of bed is easy: I eat an apple while in bed.

    I had been feeling a bit sluggish in my morning workouts so wanted to increase my pre-workout carbs, but as I live close to the gym I wanted to ingest them as early as possible so as to not upset my stomach too much while exercising. I decided that an apple first thing suited the bill perfectly in terms of carbs and placed one on my alarm clock that evening so that I could just pick it up at the same time as turning off the alarm. Eating one in the darkness and while lying down was strange at first, but I found that afterwards getting out of bed was incredibly easy. And it’s been that way ever since. I’ve been doing this now for a few weeks and it has made such a difference compared to days where I don’t have to get up particularly early.

    I think I may have found a new habit for life.


  • There comes a point in every software projects life where everything just feels wrong. No one wants to touch the code as it stinks and everyone working on the project just feels demotivated and would rather just go home then have to do anything more on it. On projects like this, when it comes to adding new features or bits of code, because everything else is such a mess, the changes are just hacked in rather than being properly thought out and coded up well.

    We’ve all been there and the frustrating thing is that our opinion of the project, from good to bad, seems to happens over night. If you sit down and think back, you can probably pick out all the things that were just shoved in that eventually led to the project becoming a mess, but at the time we never chose to do anything about. It’s almost always a case of deferring better solutions or a round of refactoring to some point in the future. “I’ll knock this up now and come back to it later.”. The problem is that later never comes. This is the essence of technical debt. You may only go into debt by a fraction, but do it a few times and eventually all those fractions add up. Until one day when you go to check your balance, you find yourself swimming in the middle of the ocean with no land in sight.

    Implementing a broken window policy can go a huge way towards keeping a project healthy. If there is a broken window (bad code) fix it as-soon-as-possible. It doesn’t have to be that instant (although if you can, you should), but fix it. Part of the policy also means trying not to break windows yourself. Write the best code you can, as often as you can. Set the benchmark of quality for the rest of the team, even if they don’t follow suit. The danger is that many people are very “me too” about things. “Well if such-and-such can do it like this, then so can I *hack* *hack* *hack*”.

    Of course we all write crap from time to time. TBH most of the stuff I write is crap. But I honestly feel more motivated to work on code that’s been loved and looked after, rather than something that’s hanging together by a thread.


  • Whenever I hear the quote “Beggars can’t be choosers”, I take it to mean that those of us in a poor position can’t always choose what we want. This is probably what the quote literally means and what is meant when someone says it. I know that when I’ve said it, this is the meaning I want to convey. We can’t all be masters of our own destiny.

    But what if the true meaning is that if we choose the role of beggar, then we can never assume the role of chooser. That the choice to become a chooser is for us to make. Being the beggar is not a position we’ve been put in, but a position we’ve either consciously or unconsciously chosen to take. We all take many of our day to day situations as being out of our control, but really how many of them really are? We all have the ability to choose, we just may not all have the capacity to do it.

    I choose to be a chooser, not a beggar!


  • Here are my most important extracts from Jakob Nielsen’s “Prioritizing Web Usability”. I have all my notes typed up. Just drop me a line if you want them all.

    Users spend 25-35s on a homepage. Even with an avarage reading speed of 200-300 WPM, this only leaves enough time for about twenty words to be read.

    Five biggest causes of user failure:
    1. Searching
    2. Information Architecture
    3. Content
    4. Production Information
    5. Workflow.

    Page design is more of an annoyance then a direct cause of failure for sites.

    Don’t defend your interface, fix it!

    Before adding design elements, ask yourself:
    1. Does this element simplify the user’s task?
    2. Does this element add value to the user?

    Design for your users. Not for what you or your manager likes. The key to creating a good experience for your user is creating something with them in mind.


  • A whole load of menubar icons disappeared after installing 10.6.2. Seems it’s a problem related to me doing a small hack in the past to disable Spotlight. Steven Seeger’s fix restored the menubar to it’s full glory.

      sudo mv /System/Library/CoreServices/Search.{bundle,bak}
      killall SystemUIServer

  • I’ve been meaning to write up a list of what books I think every developer, aspiring or seasoned should read. So let’s cut to the chase, and in no particular order:

    Code Complete
    If there was ever a bible for coding, this is it. It’s even Bible sized. A nice size to chuck at those annoying developers who just have no clue.

    Clean Code
    I would consider this book the “Ten Commandments” of coding and compliments Code Complete very very very well. If Code Complete teaches you how to be a Christian, then Clean Code teaches you how to be Jesus.

    Refactoring to Patterns
    What I love about this book is that it you learn the fundamentals of refactoring at the same time as design patterns. The GoF Design Patterns book is quite heavy going. The examples aren’t well laid out and can be confusing especially if you’re not familiar with SmallTalk The examples in refactoring to patterns all take pretty familiar real world bits of code and walk you through the process of refactoring them into sensible patterns.

    Three books? Is that it? Yup. In my mind those are the only three books that are essential reading, no matter what form of development you do. If you even remotely care about coding, then go to Amazon now and buy these books. Read them and take a good long hard look at your own code. If on the other hand you feel “You can’t be bothered” to read, learn and improve, then why are you doing something you don’t love or care about? You’re in the wrong industry if you’re not prepared to take time, all the time, to learn new things. Once you’ve read those, then you’re ready to move onto more specialised books. Here are some of my other favourite development books from over the years:

    The Productive Programmer
    The Art of Agile Development
    Practices of an Agile Developer
    Joel on Software
    Unix Power Tools
    Programming Perl
    Essential Java
    Well Grounded Rubyist
    Design Patterns in Ruby
    CSS Mastery
    Prioritizing Web Usability