SQL on rails, XML and more


Today was a busy day fixing bugs and integrating changes in our app. I had lots of fun working around a “feature” in JDom that trims whitespace within elements. (I also had fun picking the shards of glass out of my forehead many years ago when I had a flipped my car two or three times in an event that by all means should have left me blind and/or dead.) Why is it that you only find out about these features after they have embedded themselves so deep in your architecture that you need scuba equipment to fish them out? Speaking of deep, have any of you heard about SqlOnRails? Is this the same Rails team that brings us RoR? The site uses the same theme. I love what Rails offers but I can’t imagine writing a complete web app using nothing more than SQL. (That’s not a bad thing, it’s just that I have a lack of imagination that leads to my stealing ideas and code from others and claiming it as mine.) That would be like driving from New York to LA making nothing but left turns. It would be like building a skyscraper using only a phillips head screw driver. It’s like learning to fly a 747 by watching an iteration of Airplane. I’m not good with analogies but I think you get the picture. When I saw SqlOnRails I was like, “Stop the madness!!!” It sounds cool but who am I to judge? I have neither the time nor the energy to investigate every cool thing I see on the web.

About my daily project drama: Anybody working on any type of enterprise system knows that you face your share of challkenges. What separates the fun challenges from the frustrating ones is the amount of sense each problem makes when you finally figure it out. Would you rather spend all day figuring out why a company heading doesn’t line up only to figure out your XML API doesn’t honor white space correctly or or spend a day deciphering how to get JMS to run over a firewall? Some people enjoy wasting time over meaningless configuration details. I preferr to work on code that adds value. That brings me to another point. I spend more time programming the command line than I do adding logic that means something in our project. What I’m saying is this. Our build system is configuration driven. In order to get anything built, packaged, or deployed you have to supply configuration… lot of configuration. What path is the build running from, parameters to generate a version stamp, optional additional deployment packaging, should the build run unit tests, should it stop on test failures where the hell is ANT_HOME, and other crazy options are all necessary. They are supplied in all different ways too. Some can be given on the command line, some are inferred based on the use of alternate build commands, most are in either XML or Java properties files. What’s missing is a simple “build it” command that just gets everything done. So building and deploying is a little like writing a mini program each time. The terrible thing is we use Ant and Ant is supposed to be excellent at hiding these conditional details. The problem is we haven’t traditionally used good development practices. I’m just as guilty in that area as everyone else on our team.

I feel comfortable admitting my stoopidity. It’s one of my better attributes. I think it is important to be able to tell others how stoopid you are on a daily basis because it re-enforces the point that you don’t or won’t ever know it all. It also prepares you for change. If you can’t find at least four things wrong with yourself each day then you’re doing yourself and your team a disservice. I should clarify further. If you can’t admit to at least three things wrong with yourself and five hundred things wrong with your code then you’re doing yourself and your team a disservice. Holding onto code you’ve written is the biggest sign that your code is ugly. Holding onto code someone else has written is the biggest sign that you didn’t understand the requirements. (I frequently find myself guilty of that second offense.) I’m not saying that you should throw away all code or rewrite everything from the ground up. Instead what I mean is basing your failure on the functionality of some pre-existing code and not wanting to do anything about it because, “I didn’t write the API”. Anyway, I’m just rambling on not sayig much. It’s Teusday but it feels like Friday for some strange reason. I’ll get up with ya…

(The concluding sentence is a friendly means of signing off. It by no means suggests the author will be found in bed next you the following morning in the process of “getting up”. Rather it suggests that the author will “catch up” or “establish contact” with you in the future. At any rate leave a comment if you are at all concerned that you will not be alive at such time that the author decides to “get up” with you.)

One thought on “SQL on rails, XML and more

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s