Tuesday 27 September 2011

20 hours a week?

In The Clean Coder Uncle Bob postulates that you need to spend 20 hours each week honing your skills - 20 hours apart from work - in order to become a professional programmer. He reasons that it takes 10000 hours of training to become a professional - and if you ever want to get there, he says, you need to take measures.
Back at SoCraTes 2011, we spoke about getting there. Here's what came from that session.
The points are taken from my session notes and loosely reflect the order they came up in the discussion.
  1. Write a blog, Write a book, Do Katas
    In short: Practice. While this seems self-explanatory at first, it serves to illustrate that there is more than coding to coding.
  2. Reflection about daily work
    We could not agree on this one. While it's not work per se, it's still related. Does it count? I guess it depends on what you reflect on and what questions you ask yourself.
  3. Becoming, being and staying a professional is an effort
    These days, everyone with two bits of Java can call himself a coder. But calling yourself a professional is more. It takes painful effort to get there, and more of it to stay there.
    To me, this is the essence of Uncle Bobs message.
  4. Schedule for self-education
    Uri Lavi suggested to schedule your self-education just like you schedule sports or a beer with your friends. It's nothing that just happens.
  5. Pick goals
    Having a goal clearly ahead of you is the best way to notice when you stray from the path and the best tool to measure your achievement.
  6. Read
    Find out what other's do to stay in the game. Apart from Uncle Bob, Chad Fowler's The Passionate Programmer and Andy Hunt's Refactor your Wetware appear to be hot contenders. I just got Chad's book, maybe I'll post about it later.
  7. Have a buddy or mentor to commit to and reflect with
    Making a commitment to someone makes it much harder to quit. Inspect afterwards: Why didn't you reach your goal in time? Why did you enjoy this week, but not the last?
  8. Dedication and
  9. Set priorities and
  10. Cut down on other hobbies
    Without Dedication, nothing. If you constantly feel that you are not up to it, that you have to force yourself, you'd better quit striving and look for another field to apply yourself in.
    There will be a time when you have to choose whether you truly want to invest all this into coding, or whether you would rather do other things with your spare time. To me, this is really hard. I look at my schedule, and I love every filled hour in there.
    Without sports, without languages, without games, would I still be me?
  11. Should not be an obligation and
  12. Enjoy yourself
    Markus Gärtner suggested that if it feels like work, you're doing it wrong - himself, he doesn't even notice all the hours that go into this, because it's that much fun to do it. Lucky him!
  13. Don't go on if it becomes work - move on!
    Your dear pet project might become a chore at some point. If it does, don't force it - just let it go and move on. Both you and the project will benefit.

    And finally, Enyo Markovski asked us to always the remember
  14. Can I? (Constant And Never-ending Improvement)
It was a really helpful session (at a great conference), that moved me to start writing here, to get into one more open-source project, and to not think of the 20-hours-issue as a lost cause.
What do you do to stay sharp? What did you try and couldn't keep up?
P.S. to all attending: Thanks for sharing your thoughts. Is there anything I missed or misattributed?

Friday 23 September 2011

Uncle Bob refactors with IntelliJ IDEA

Over on the Jetbrains blog, there's a video in which Uncle Bob refactors a piece of fitnesse code.
It's entertaining to watch - I'd not have thought that. Maybe his Clean Coders videos are worth watching after all?
It was really cool to see that he ran his tests after every single step. Also, I was surprised by him removing the braces on ifs and elses. He says it helps him keeping his ifs in a single line. I think I'll give it a try.
However, he does some things manually. IDEA should have shortcuts for some of his operations - given that it's featured as a promotional video and that he plugs the IDE twice in just 20 minutes, I would have liked to see some more advanced stuff. Stuff that only IDEA can do as elegantly.
Be that as it may: To me it was twenty minutes well spent.
Did you like it? And why do you think he didn't return the 'child' in the end, and prepared for the next tag outside, in the for loop?

Tuesday 6 September 2011

Converting hg to git on Windows

Converting from hg/mercurial to git is really straightforward.
To start with, all I had was this instructional post. Sounds really easy and would not merit a post of it's own, if it wasn't for a bug in MSysGit.
Here's what I did to work around:
  1. Download the latest version of Ubuntu.
  2. Burn it on a CD.
  3. Reboot from the CD, using "Live CD" mode.
  4. Install git via the "Synaptic Package Manager"
  5. Still in the "Synaptic Package Manager", activate the "universe"-repository and install mercurial.
  6. Mount my hard drive so I have access to the hg's working copy.
  7. Follow the instructions from the post - but do everything in the user home.
  8. Finally, copy the resulting repository onto my harddrive
  9. Reboot into Windows.
The converted result looks like this.
Edit: Rob Rutherford suggests using Virtual Box and your personal flavor of Linux for a more persistent solution.
Edit: Or just boot Virtual Box with the ISO image I linked to above.