I’m in the software field both because I want to learn how computers work and because I want to make something great. For a long while I thought that I should focus on making something great, and in the process I would learn how computers work.

The problem was that without knowing how things work (beyond my Computer Science cirriculum), my project goals were almost always poorly defined and I would end up scrapping my work and starting another project every time. So my only successful projects that took more than a couple hours to complete were student projects, some work projects, and a Tetris clone I made on a whim during the summer between my 4th and 5th year of college.

The Tetris game in Java Swing is the most exhilarating project I have ever completed. I didn’t follow a tutorial. I just thought things out, avoided letting special cases take over my mind, and made sure I followed an important rule behind GUI programming:

GUI methods should only be called inside the event-dispatching thread.

The code worked beautifully. I came up with clever hacks for rotating the blocks and scoring. The project had hack value. In the next month I showed it off to some friends and family, who were impressed.

After that, I started a zillion projects. One thing I really wanted to build was a compiler. I wanted to create something original. One day I would start on a ruby-like language, the next time I would want to do scheme, the next time C, and after that scheme again. Or maybe it was a new lisp dialect I wanted to work on. And then there was a question of the language I write the compiler in. It seemed I could never make up my mind. It was just like before my Tetris project – failure due to being in over my head.

I came up with another idea just a couple of months ago. I would create an RSS news aggregator that would work the way I preferred. This task is actually feasible. It’s really just a user interface idea, and I have plenty of experience with usability.

I’ve done some of the work. The problem is, right now my passion is in creating a compiler. A true software hacker needs to understand compilers and operating systems, and as I see it there’s no better way to understand compilers than to build one from the ground up. I took a compiler class but due to capstone I didn’t have time to build the compiler from front to back. Also, I did not like the assignment: create a MiniJava compiler in Java (I simply don’t enjoy Java. An article that confirmed my distaste.).

Last night I was torn between continuing work on my news aggregator and doing a compiler. I was thinking I ought to do the news aggregator because it might help me to land a job. But as I was reorganizing my directories, I created a fresh Projects directory I could use to focus in on the projects I was actually working on (as opposed to the three hundred I started and quit). Inside my Projects directory, without really thinking, I created a “Scheme Compiler” directory. I changed it to “NewsAggregator” and then back to “Scheme Compiler” again. Then, fearing people might think I was creating a Code Generator (see Larry Wall’s Programming Perl) I renamed it Scheme Interpreter.

I decided to write it in modern C. And I’m going to try to get it working as quickly as possible, and won’t deviate from my original goal until it’s more or less working. I’m naming it IAASSI (IASSIA Ain’t A Serious Scheme Interpreter).

This got me thinking. I’d just read a quote from Stephen King in On Writing:

If you don’t have the time to read, you don’t have the time or the tools to write.

I think this statement applies not just to writing, but to all artistic endeavors, including hacking. In order to become a true hacker, I need to appreciate the work of another hacker. This work may be books, source code, or even specifications. By doing something they’ve done, or thinking what they’ve thought, I can see things from their perspective and build on their work.

So I’m going to think like the great lisp hackers, and the great c hackers. I’m not even going to worry about what’s next. I’m going to do R5RS (well, maybe not the super-difficult parts) in ANSI C. Once I understand how they thought, I will be able to truly appreciate their work.

Back to the original paragraph. I want both to learn how computers work and make something great. I used to think that I should focus on making something great. Now I can see that both goals should be given individual attention. I have some good ideas for news aggregating user interfaces, and I ought to implement them. But time should also be spent thinking about how computers work and why they work the way they do, independent of any new ideas I have. This healthy mix of reading and writing will prevent boredom. And fighting boredom is key to success in almost any endeavor.

3 thoughts on “ramblings about personal projects…

  1. Are you nuts! You sound too scatterbrained to complete anything! But I do wish you the best, as RSS News Reader and compiler are interests of mine too. Actually I have written both. I have a free News Reader available and a JIT compiler engine plus syntax language interpreter that I have used internally for 5 years now. The beauty of my compiler is that it is one single C++ class including the syntax interpreter, compiler, and byte code execution and stack all in one simple .cpp/.h pair with no 3rd party components or parsers. Most of the stuff out there is ridiculously complicated and it doesn’t need to be that way. Best wishes!

  2. Ben Bryant,

    Yeah. Scatterbrained describes it.

    I think part of the problem is how I go about writing software. I find that when I’m working on a project, I have too many things on my mind at once. For example, in my compiler, I tried writing completely top-down, doing all of the tokenizing (I’m doing it by hand for practice) at once and then trying to compile it. Now I have a goal of compiling and running my code after every few lines. I set things up so this can be done quickly (with unit tests). So far it’s been going much better.

    I wrote something in Perl last night that cracks an Excel file open using the same ideas. But instead of unit tests, since it is a simple script I just had debugging messages for the latest things (in the order in which the script runs). I didn’t feel even a little bit confused about how the library worked as I was using it, even though the documentation wasn’t very straightforward.

    Thank you for the words of encouragement. Your JIT Compiler seems interesting, especially the fact that you’re using it for real work. And the fact you’ve got it done :)

Comments are closed.