Bad Developer! No Refactoring Yet!
Developer’s journal, September 21, 2007. First urge to refactor. Dammit.
The Brain prototype isn’t even complete yet, and that developers’ eternal nemesis, the desire to change how it works, has already reared its ugly head. We’re not a NIH-obsessed shop here, but we make a conscious effort to keep unnecessary dependencies down, both to reduce risk and — in the case of dependencies on commercial products — hold down the cost-per-CPU, as we’ll be throwing a lot of CPUs at this thing, so they gotta be cheap. So — for a variety of reasons, most of which were simply expediency-related — we’re using Java servlets and have rolled-our-own dead-simple REST functionality based on simple regex pattern matching (one of the times we’ve really wished we were using Ruby). Not rocket science — REST is simple, that’s one of its biggest virtues. Nevertheless, we just looked a bit more into JSR-311 and Jersey, and realized that despite their youth, those APIs were actually thought through rather well and could’ve saved us some minor headaches, and resulted in that part of the codebase being significantl cleaner.
But… we really can’t justify switching our code already, given that the REST frontend is already done and there are miles yet to go. Right? Discipline. Curses.