Brian Lee wrote:

Nope, this guy was from San Diego. He had many other pearls of wisdom. My favorite was when he designed a system that would dynamically load an EJB bean implementation at run-time. He wasn't using delegates or proxies or anything coded, he wanted to use deployment descriptors. That was a fun one to peer review.

*shudder* Here's my current horror story.

Here, programmers (who shall remain nameless) implemented "custom tags" in Java on their own: a text file is parsed looking for a single tag prefix and appropriate code is run.

Of course, the file is parsed every time its accessed (at least the file content is cached), generally by the "controller" JSP. At least it's a general-purpose templating mechanism. Oh, no, it's tied to web apps only, never mind. Oh, and you can't nest iteration or logic tags inside each other.

The controller JSP is a 400-line if/then/else state machine that has, at a minimum, five ways to direct itself to the next state, and methods to implement the state. But at least those methods are JavaDocced. Oh, no, those methods are in included JSP files, so I can't trivially run JavaDoc on them. Dang.

Well, at least the fake custom tags can be replaced by JSTL, because the database classes (also hand-rolled) implement some sort of Map interface. Oh, no, they just provide a getString method. Some of them. Others only provide indexed access, so you have to get the index corresponding to the keyword first.

At least I can trivially separate logic from view. Oh, no, essentially every single method wants access to the request and the Writer. Oh, and template files get their data from a Map context, not a normally-scoped variable, so I have to re-do all that, too.

Well, at least it's implementing a small, relatively low-traffic site, and there isn't a whole wad of stuff I have to look at to bring it up to today's standards. Oh, no, it's a pretty gigantic site, fairly heavy traffic, and there's about 5-10K lines of nearly undocumented code and template files. Plus all the back-end libraries, for another 30K lines of cramp-inducing code.

But at least I have complete control over where the project goes now, so I'm free to use something like Struts, Spring, etc. Oh, no, the client "doesn't like frameworks."

At least in my hiring interview they said I'd get to innovate, so I have the time to explore new technologies. Oh, you mean AFTER work hours.

I _wish_ I could get my hands on the original developer for a peer review, but I can't, because he's getting his doctorate at CMU, and I'm told he was a brilliant programmer, so it must be true. (He also decided to do a large project in ASP.NET (not using C#, mind you, but VB.NET) because it would "save round-trips to the server", and every time something needs to be changed I have to track down the SQL embedded in the code-behind pages.)

Last I heard he wants to use the source for this... thing for "educational purposes," to which I replied "Hey! Big Win! A great example of how not to do stuff, and if anybody else steals the code and uses it we'll have an automagic competitive advantage."

Oh goddess, somebody save me.

Hurry.

Dave "Dammit Jim, I'm a Lisp and SmallTalk programmer, not a... whatever low-life I've sunk to" Newton



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to