OS Pricing:
- Mac OS X Leopard: $129 (apple.com)
- Windows Vista Home Basic: $155 (amazon.com)
- Windows XP Home: $191 (amazon.com)
… and it only goes up from there… The hilarity of the fact that XP is actually valued more than Vista aside, I think it’s great that Microsoft is charging more than Apple for the stripped down version of their abortion of a new OS. After actually having to use Vista while helping a friend setup his new laptop, I am horrified. I know people said it was a step backwards, but GOOD LORD! If you ever wonder what way too much abstraction looks like, go try and use Vista. Makes XP seem like the masterpiece that it isn’t.
In this context, I am happy about two things: that I have recently put Ubuntu on my work laptop and that I am purchasing a MacBook Pro whenever the next big update comes out.
Refactoring
During my internship, I wrote a lot of bad code. Part of it was the lack of experience, part of it was the lack of time to A. truly design a right solution and B. implement whatever solution was chosen well.
I recently decided to refactor the Javascript for my main project because it was starting to impede the development of new features… and it was ugly. But I’m not talking about renaming some variable. I’m talking about changing the way data is passed from PHP to Javascript. This was a big undertaking. The end result is incredibly rewarding. Not only did I shave off 20Kb (no joke) off the app’s sheer code footprint, it is noticeably faster, the code is much more neat looking, easy to read, and semantic, and the best part: I got to close a bunch of bugs that were related to the old code – because the new code wasn’t even remotely susceptible to those bugs – or any bugs at all so far! (knock on wood) Though I still have to keep things vague due to all sorts of scary papers I signed at work, I’ll make a more detailed post about what this refactoring involved and what I learned from it.
One thing is for sure, though: initially daunting, a thorough refactoring of the logic in your application is in many cases a worthwhile undertaking. From a man who has just completed this long journey, here are some tips:
- Avoid Denial: It’s easy to make up reasons to not do it, but if there’s a flaw in your app’s logic, eventually you just have to fess up.
- Start Slow: Once you’ve realized that you had made a mistake in your design, figure out a better way to do it and start converting over. The best way to start is to initiate the refactoring while developing new features.
- Though it’s a royal pain in the ass, if you’re in an “agile-ey” environment, where pushes are frequent, you’re going to have to maintain both the old and the new logic for a while. Otherwise, you might find yourself having to rush through the refactor to push out a new feature or bugfix. It’s important to take the time to get at least a vague idea of how the two systems will co-exist and how the transition will eventually be made.
- Find The Turning Point: a time will come when you have converted enough of the functionality to the new way of doing things, that it starts to conflict with the old way (I realize this is vague). In any case, keep a look out for the moment where it becomes easier to just finish converting to the new logic completely than dragging both along.
- Take The Time: The final push will be time consuming, but it is probably best to just get it over with in one or two sessions (of course, it could be more depending on your app). Dragging it on will lead to two things: your development will lag and you will end up never finishing the refactor, leading to more broke ass code.
Indian Food
… is delicious. That is all.