Posted on July 12, 2010
Sunday evening at my apartment. The air was thick after a sunny Juli day. I sat on my balcony totally engrossed by a book I was reading. At the time I’d forgot all about my plans of having a nice evening jog before watching the football World Cup final between Netherlands and Spain.
Suddenly I realized, that the time was 20:12 – 18 minutes to kickoff! Now, most sane people would probably have ditched or postponed the running plans, and instead getting ready for the match. After thinking about the problem for a few seconds, I found that I would not allow myself to do that. I planned a jog before watching the match, and that was what I was going to do.
This turned out to be one of my best runs in quite a while. I really wanted to get back in time for the kickoff, so I pressed myself harder than I’ve done for a long time. In just 20 minutes I managed to change clothes, lock up the apartment, and run 3,5 kms. At 20:32 (two minutes into the final) I was back at my couch planting my warm feet into an ice cold bowl of water, greeted by the world’s largest vuvuzela-orchestra as I turned on the TV to watch the match.
That day I coincidentally experienced first hand, how setting personal stakes pushes you to perform better. The reason I feel like mentioning this, is that to many people it sounds counter intuitive to intentionally setup personal risks. But the value of increasing your performance significantly, is most often worth putting on the extra risk.
Tagged with: motivation planning |
2 comments
Posted on May 09, 2010
If asked the question, “What is the difference between UTF-8 and Unicode?”, would you confidently reply with a short and precise answer? In these days of internationalization all developers should be able to do that. I suspect many of us do not understand these concepts as well as we should. If you feel you belong to this group, you should read this ultra short introduction to character sets and encodings.
Tagged with: encoding programming |
Posted on April 16, 2010
Most object oriented programming languages have built-in mechanisms specifically for declaring a member of a class private or public. Javascript doesn’t. Thus, most developers new to Javascript quickly concludes that Javascript do not support private members at all. While it is true that Javascript has no specific mechanism for this, it actually does support private members thanks to the nature of closures.
Posted on March 01, 2010
This week I successfully converted Virtual Managers mysql database from latin1 (aka. iso-8859-1) to UTF8. Since I guess I’m not the last person to do this, I’ll here share how I did it.
Tagged with: database encoding programming |
Posted on February 08, 2010
Human beings like to maintain a nice overview over things. Genetically that just makes us feel good. Yet sometimes when our inborn curiosity wanders just a little too close to the unknown, the nice mental overview turns into a blur of concepts and relations we no longer cannot map together. Our nice mental overview is replaced with unpleasant confusion.
We’re genetically programmed to feel unease when this feeling arises. I suspect many of us in situations like these, too often obey our native “stupid” mental reflexes that blindly steer our mind to the nearest safe harbor. Because of our intense confusion-phobia the value of understanding the actual cause of the confusion is totally neglected in the process.
Instead, what we should do, is take a deep breath and take advantage of the situation by embracing the confusion. Whenever confusion kicks in, see it as a free gift holding valuable information on where to improve.
To the determined learner, great confusing thus often leeds to great enlightenment.
Tagged with: learning |
Posted on January 18, 2010
I’ve been playing around with Rails 3 lately. Rails 3 uses Bundler which installs all your depending gems inside your app. This does not work very well with Textmate’s default behavior. Textmate will have to search through all gems each time you perform a “Find in project” (Command + Shift + F) or “Go to file” (Command + T) because the gems are inside your project. Due to the many files this is pretty slow, and makes it harder to find what you are looking for.
One simple way to solve this is, is to ask Textmate to exclude the vendor dir. You can do this in Preferences > Advanced. Here, just add ”|vendor” to “Folder pattern” and restart Textmate.
Textmate will now disregard the vendor directory entirely. Problem solved!
If you know a better way of doing this, please drop me a line :)
Tagged with: bundler programming rails ruby |
Posted on January 15, 2010
I’m a big fan of notebooks, schedules, dictaphones and the like. Anything that can be used to record your thoughts as they fly by.
The less thoughts you force your brain to manage, the less brain processing power will be left for whatever tasks that may pop up during your day. Therefore, the more information you can offload to “external storage devices” (notebooks, schedules). See and use these devices as external extensions of your brain!
Tagged with: learning planning |
Posted on November 30, 2009
Too many web developers decide CSS class names based on what style the class is representing. This is wrong, and should be avoided! Let me explain why.
Tagged with: css programming |
Posted on November 17, 2009
I am often asked what kinds of education I would recommend for young hopeful people who want to learn the art of building a successful web business. Unfortunately, I cannot come up with a good answer to that question. What I can do though, is sharing one of the key reasons for why I am where I am today.
Tagged with: game development learning motivation |
Posted on November 03, 2009
You may call me a nerd or anti-social all you want, but I just love spending an entire weekend coding away while immersing myself in my favorite technologies. The primary reason being, that it is one of the absolute best way to lure out my creativity!
Tagged with: learning programming |
Posted on October 19, 2009
The idea with unobtrusive Javascript in to separate markup (HTML) from behavior (Javascript), just as CSS help us separate styling from markup. By disallowing Javascript in your markup, you gain a better overview of where to find what in your code base. Behavior goes to static javascript files and markup goes to template files! There are several other benefits to this technique that I will not be covered here.
As you might have heard Rails 3 is actually adopting this idea, which will spare us for lots of ugly repeating Javascript code when using Rails form and link helpers. The release of Rails 3 is still far away, so in this article I’ll show you how to implement the technique in Rails 2.
Tagged with: javascript programming rails |
Posted on October 15, 2009
After working with Virtual Manager for more than 5 years, I last year decided to start up a new project on the side. Today, I very proud to present for you all, Fargonia:

Tagged with: fargonia game development |
Posted on September 23, 2009
While working on my new game I’ve been doing a lot of Javascript code. In my quest to keep everything modular and decoupled my javascript objects often delegates some kind of responsibility to child objects, which in turn might delegate the responsibility to their child objects forming a kind of tree structure. I’ve made sure that the child objects do not know anything about their parents to decouple even more. This is implemented via the observer/subscriber pattern. The child objects just send out a notification when a certain event happens and the parent receives this if they’ve subscribed to the sending child. This results in a very flexible decoupled design – yummy!
However, this design turned out to yield quite some code duplication which needed to be cleaned up.
Tagged with: javascript programming |
Posted on August 31, 2009
All Rails developers have used the ERB templating system. That is what enables us to mix html and ruby in our view files. But how does it actually work? I found out today, and thought I’d share my findings.
Tagged with: programming ruby |
Posted on August 25, 2009
I love to read and learn. Feeling better than yesterday is an incredibly satisfying feeling for me. However, there are some periods where my reading gets into slow motion. Days can go by, and suddenly I realize I haven’t touched my current book for a week. Sound familiar? I’d like to share a simple yet powerful idea on how to avoid this from happening.
Tagged with: learning motivation planning |