You are currently browsing the CodeBot @ Work weblog archives for January, 2008.
- 3D Stuff (6)
- BumpTop (5)
- C/C++ (12)
- GEL (5)
- Open Source (5)
- Seneca (4)
- Stuff (8)
- Uncategorized (14)
- win32 (7)
- July 31, 2008: Work++; // Again!
- June 8, 2008: Patterns And Such.
- June 4, 2008: Work++;
- May 20, 2008: SIMD And Randomness
- April 30, 2008: Coder Burn-Out
- March 26, 2008: Some GameDev Math Resources.
- March 24, 2008: Real-Time Collision Detection
- March 17, 2008: To OSG, or not to OSG.
- March 9, 2008: The Moz Cause
- February 12, 2008: Et Tu Singletone.
Archive for January 2008
Code Management — Refactor This!
January 20, 2008 by Mark.
During my studies, every assignment I have been handed (with the exception of one) has been started from the very beginning. I was asked to produce an end result by designing, implementing, and testing the software I have written. I have no problems with the Software Development Life Cycle, its actually logical and concise. What starts to bug me is being shoved into a very dirty, unorganized code base and then told that I am not allowed to clean up. Instinctively, my brain figures out more efficient ways of doing things with the code then what is presently in place. But what I’m told is that features have priorities. In the back of my head, I know this is a time-bomb waiting to go off.
So, I move on. Each task that needs to be done has to work with the dirty code, forcing me to jump through hoops. The new code may end up being buggy or having some undesired effect. Lets, for instance, say this new code causes a bug. A fix is issued and it takes 20 minutes to fix. In another portion of the code, something else breaks because it was hooked up wrong. Another 20 minute fix. And so on, and so on. All those 20 minute fixes add up and eventually take up more of my time then it would to refactor the old code into something that is easily extensible and understandable. At this point, the code is twice as big and refactoring would take 2 days. Also, each feature that would take 10 minutes to implement, takes more and more time to implement because the code is convoluted. 10 minutes turns into 15 minutes, 1 hour turns into 3 hours, and so on. Great waste of time, in my humble opinion.
So when is an optimal time to refactor? Would it be at the very beginning when the problem is initially found? Should we wait until the critical features are implemented? Should we just forget about it and keep adding patches until the code is a giant maze of unreadable spaghetti? Why should my job turn into a Dilbert comic?
I honestly don’t know. My first instinct is to give refactoring a try at the very first time I notice a problem. Fix it before it spreads, essentially. Some think otherwise.
Posted in C/C++, Seneca, BumpTop | No Comments »
Happy New Year!
January 2, 2008 by Mark.
Well, Happy New Year to all. I, for one, am relieved that this year has come to a close. December was by far, the worst - Exams, moving into a new apartment, Christmas with 3 families, and over $1000 spent on presents.
I gave Connie a Nintendo Wii for Christmas and so far I’ve been the one playing it the most. But for those of you that are looking to buy one, I say good luck. Walmat, Best Buy, etc. have them in stock, but only put one or two out on their shelves per day. They do this so that your forced to come into their store and “browse.” So unless your incredibly lucky, you will be greeted to empty shelves. But if you do get one, I suggest getting a game by the name of Rayman, Raving Rabbids. Its my newest addiction.
Posted in Uncategorized | No Comments »