What would Nansen do?
June 18th, 2008 in Uncategorized by admin
I am currently reading one of Fridthjof Nansen’s books. The book starts with a speech he gave as an honorary rector at a Scottish university. He describes how he conquered the inland ice of Greenland by not having a line of retreat, but instead by burning his bridges and to only have the goal at mind.
Some people had tried to cross Greenland before him, but they started from the civilization on the west coast and headed for the void of the east coast, where they planned to be retrieved by boat. As they ventured far into the ice, they were increasingly tempted by the prospect of returning to the civilized west coast.
If you, on the other hand, begin at the east coast, dropped by a ship that has already left you, all the temptations are on the west side. There is no line of retreat to fall back to. There is nothing tempting you to look back.
How does this apply to coding? Maybe source control isn’t such a hot idea? Maybe it’s easier to rewrite than to dig into old code. I have found that sometimes its easier to understand a problem and thus formulate this problem in code than it is to understand buggy code that should solve the problem.
Let’s say you have a 1000 lines of code supposed to solve a given problem, but it doesn’t work. It seems to be almost there, but it still doesnt work. You understand the problem, but the code is broken so the code can’t really be understood. Somewhere in the process of coding, the coder (maybe even you) took a wrong turn and got lost. What is easiest? Turn back to that place and try to find the way from there, or start all over and head for the goal?
The temptation is that maybe you can change only one line or two and then get it to work. The trouble is that you have to understand all the other lines. I’d rather write 1000 lines fresh than to try to understand why 1000 lines are broken and then fix them.
I’m sure Nansen would agree.
This entry was posted on Wednesday, June 18th, 2008 at 9:41 pm and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.