When To Quit

28 Jun 2014

And right now, frankly, there’s a lot of grunt work to do up front. I probably could avoid this by not manually writing a parser in C, but I knew that going in.

The quote is from my last status update on ZLisp. About two weeks ago, I gave in to temptation, and started over in OCaml. Since then. I’ve reproduced all of what took me close to a month of work to generate in C, and then some. The resulting code is less than one fifth the size. This is despite not working on it as frequently, and having to fight with the toolchain a lot more due to the fact that I don’t know OCaml nearly as well as I know C. In hindsight, it’s hard to argue that this was a bad idea.

The problem is, I do this too much. I see some shiny tool, and throw out a bunch of work to go use it. In this case, it was a big win - OCaml is just that much better suited to language implementation than C. In other cases, it’s cost me a huge amount of time. I’ve also historically had problems with just never finishing things like this, because I jump ship repeatedly and then having gotten nothing running after a stupidly long time, get bored and do something else.

I don’t know of any way to know when (or when not) to do this sort of thing, other than just experience. Unfortunately, this is an area of my field that has seen very little rigorous study – but that’s a topic which deserves a whole blog post (at least) on its own.