Limegarden.net Personal site of Wouter Lindenhof

18Sep/080

Re-re-re-re-writing code

You should never rewrite code. Rewriting code is bad, instead you should improve your old code. The only time you should rewrite code is when it's such a mess you have difficutly making out what it was suppose to do. If you know what the code does and how it works but don't feel comfortable you should rewrite it as soon as you can.

The reason why I state the obvious (well, I hope it's obvious) is because I have a habbit of rewriting my own code. It's less severe as two years ago as I know have my own library which contains a majority of the functions I will ever need, but yesterday I caught myself wanting to rewrite my own code. Granted the new code had another purpose, namely be all purpose and extremly flexible (mete template programming) where my old code was inflexible, however I think I will abandon this code and instead shall be rewriting small part (which we should see as correcting) of my old library. I'm going to split that library in a section that has general functionaltiy (math and templates) and a section that is specific to an OS or API (DirectX or OpenGL). The specefic section should be made as abstract but not pure virtual so that I can easily port it to other systems (think game consoles).

I think I will recreate my project and then start copying everything to it. Doing so will give me that feeling of rewriting while I'm not actually doing it.

Filed under: Uncategorized No Comments
2Sep/080

Health packs are licensed

I was reading the rescuetime blog and I came across an article about their new logo. Ok, that is not the interesting part, but their old logo was a red cross. Apparently this is licensed by the Red Cross health organization. If you read through the article you will see that they also make a reference to the logo on health packs in games and wonder why that is allowed.

It sounds just as stupid as that T-Mobile said that the color magenta is theirs alone and nobody else can use it.

I might be wrong here, but I don't think that this is the idea behind copyright and licenses.

Filed under: Uncategorized No Comments