Reinventing The (Root:)Wheel
by Nick on Feb.08, 2009, under Geeky, Personal
Alright, so that title has a largely-unrelated UNIX joke in it. Take out the joke, and it’s pretty accurate to this post, though highly geeky. Please continue only if you are prepared to be bored.
One of the computer science classes I’m taking this semester entails a lot of coding in C as we explore lower-level interactions with operating systems. The first coding assignment we were handed was nothing more than a group of menial tasks, something that just about everyone in the class did in a day or two with little to no trouble whatsoever.
Our second assignment, however, is more interesting, if not infinitely redundant. As I stated in my previous post, I’ve spent my spare time this weekend working on writing a simple shell according to the specification they gave us. (In between helping all those iPhone-toting people do their thing yesterday, of course.)
Among other things, the requirements include:
- A rather crappy infinitely-recording session history system that keeps track of the commands you’ve run and allows you to list and/or re-execute them as you wish by simply referring to them with a number. While this might be useful, there is a point where this becomes excessive for an assignment like this.
- A 256-character command limit. I hate to say it, but plenty of commands I use on a regular basis are way over this character limit. Looks like I’m better off sticking with something that isn’t this project, eh?
- Keeping track of the number of successful commands entered. Alright, so this behavior can be found elsewhere. It’s not really all that interesting, though.
- …and more! (Sorry, I had to. Well, maybe it’s true, though. There are other requirements for this assignment.)
Typically, I wouldn’t have a problem with an assignment, but there’s something so wrong about reinventing the wheel, especially when a simple search on Google turns up more examples of the exact same thing than is necessary. (There are so many usable results that I’m wondering if people are just going to try and claim a result as their work and check that in.)
I understand the idea behind the assignment, and it makes sense to an extent to be doing some of the work as it serves as a demonstration of where the concept could be useful, but there’s no reason to be re-coding the same applications countless others have done. The possibilities for implementation may be endless, but limit that list to the number of practical possibilities and you’ll find that the number shrinks quite nicely to two or three, at most.
Stick a fork() in me (oh great, another joke); I’m going to stop ranting before I turn this into a week’s worth of posts. Back to coding…