This has been a personally hard week for The Project. Iin moving the data structures to MySQL as a database I had to also start developing Java servlet code. The reason for this is that it creates both the ability to have a Web-API for any number of clients: iOS, Android, Win, Mac, etc… while at the same time affording more ease for Web functions.
Unfortunately my Java and Servlet knowledge were (and likely are) still lacking. The problem is that when you start a new programming environment you basically create sample code to test what you are trying to write and then adjust that code as you see success. Then you build on top of that. This sounds like a good idea at first and then you realise, that you are in fact building an upside down pyramid.
You learn one thing and you carefully build on top of it. This lets you learn a few more things so you balance them on top of the one thing you started with. At some point you have to realise that you can’t build any higher because it’s all balancing act. This is where architecture comes in. Architecture takes the tools and designs a strong foundation. It designs a good skeleton and lets you put things where they best fit in.
All this CS theory sounds great in general; but at the same time you are trying to get a product done. This past Tuesday I hit a roadblock. The way I had put my Java class together, there was no easy way to add the next function. For those with understanding; I was dumping EVERYTHING into one class. I’ve been doing Object Oriented Code for a VERY long time. I knew how wrong my code was (in design) but it worked and got what I needed done.
So I was left with the very hard process of:
“Do I keep shoe horning in, to get a working version OR do I use what I have to build into something designed from scratch and put me back about a week?” This is the ‘Ooh, Shiny’ that as an engineer it’s very easy to get blown away by.
- The project started with a client and hand build data. (Working on the client)
- Then the data moved to a database. (Drop client work on MySQL)
- Need to add data remotely to database (Lock in database, make data client)
- Now a connector was needed between the clients and the database. (Web service, go to Tomcat, Java, Eclipse, learn new tech)
Of course the actual product client hasn’t moved in two weeks as far as code. The data entry client ramped up last week, but the connectors aren’t there. So, the fear is not putting so much into one that we don’t move forward with the actual Gem of the lot. This week I had to decide… how do I proceed and will the decision be right or wrong.
On the one hand it was ‘keep pushing forward and working around the problems being created.’ On the other it was ‘Stop, learn, regroup, rewrite, take the hit.’ And this decision was going to leave me unhappy due to the cons on both sides.
After two days of being in really crappy head-space over this, I realise that this is my product and unlike many of the companies I have coded for: I want it RIGHT. I do NOT want it RIGHT NOW. The dates I set for release are still somewhat arbitrary. Better I be happy with what is under the hood.
Digression. When I was 21 years old my father bought me a 1970’s red MGB convertible (Similar picture above). This thing was beautiful. It was missing some mirrors and had no seat belts (some did.) My father managed to snag this beauty for $800. My dad also never actually looked at the condition of the car. When we opened the hood we saw the electrical had been ripped out and replaced with speaker wire. Half the gauges didn’t work on the dashboard (including Oil, temp, and Fuel) The car also didn’t have a starter button. I could ramble on telling stories about this car that I eventually named Truddi due to the car’s penchant for having multiple personalities. The point is that the car looked beautiful, but it had horrible guts. There is the right way to wire a car and a wrong way.
While you may think, “Well, aren’t you just ripping out the wiring and redoing it?” The metaphor here is that I am making sure that what I put in there from the start is correct, and not just a pretty outside with horrid innards that don’t belong. And you can believe me that I’ve been asking myself these questions and fighting both sides of the battle.
(long sigh) Well, enough procrastination. Time to design and write some Java from scratch. (But profit from a distributable JAR)