Sometimes in life, even when events start at different times and build at different rates, they still seem to all reach their inflection points together. As if they were the components of a carefully prepared feast, all orchestrated for consumption together.
I’m talking about a pragmatic shift in my view of programming. Let me start by giving you some history. I started professional Java programming back when java 1.2 just came out and I worked for SAIC as a Java programmer doing CORBA work (basically a precursor to SOAP, which was a precursor to REST). Java was a good evolution for me, as my background was in C/C++. I appreciated how programming in Java was faster, yet still had the clean, logical, syntax and expressiveness of C++.
I programmed in other languages since then, but usually came back to Java. Of the others, I found one in particular quite interesting, Ruby with the Rails framework. I learned it while working on AIM Photos with Kevin Lawver at AOL a few years ago. He was very attracted to the rapid, convention-over-configuration, nature of Ruby development. At the time, I did appreciate it, though ended up still preferring to understanding everything that was happening under the covers as well as having more control over defining an elegant, even artistic, custom architecture and format for my code.
Shortly afterward, I got my wish, and Java was back in full swing after transferring to San Francisco and working with Bebo. I admit, I was a bit rusty, and my eagerness to crank out code did cause a few co-workers grief when my code was introduced into their delicate system which pushed code to production daily and whose QA team was a third the ratio to programmers that it was at AOL back in Dulles, VA. Looking back I wrote custom cache objects, even drafted caching expiration mechanisms for certain types of objects, things that were quite enjoyable to craft, yet looking back were a poor use of time. Infact you can see an example on the right of this page “memcache optimization.” In a nutshell, I realized that often, I was programming for the sake of programming, rather then for the sake of actually fulfilling a direct benefit producing feature to users.
(That last part if the crux of my discovery, which will change how I now approach development. Feel free to stop here, what remains is an explanation of the events and discovery process I went through.)
What sequence of parallel events brought on this paradigm shift in how I view development? Well some of the events started long ago, for example my C++ work at Univ of Maryland, to the Java I mentioned for SAIC. Most recently it came in the form of my excitement for the Google App Engine, which I recently found out supported Java in addition to their initial Python support.
Finally, here was the opportunity for me to program in the same language at work, as for my personal projects. Before I was limited to programming in Java at work, and php or ruby at home. Now I could do Java for both, since I could host my Java with Google, and it was free!
So I ported the Google Gadget I wrote for photo sharing to support both Bebo and Facebook, and I changed my thin middleware layer to Java, from PHP. Things progressed very quickly, the client side work in javascript took me about a day to port to support both services and I spend another day re-factoring for efficiency. The middleware code took me about 2 days to convert, and support multiple service providers (initially Bebo and Facebook). About a week later, and all I had left was to make file uploading work. Save the best for last right?
Well here is where the problems started, I switched all the API calls from GET’s to POST’s and while doing that, I looked at the server logs. Wow, there were a ton of errors there, mainly around “Security” concerns, rather threading that the one of the web service libraries I was using invoked. I realized how constrained running apps in the Google App Engine were, and spent about two days trying to hack my code to get it to work. Many revisions later, I still didn’t have it completely working.
Last week, I had told fellow programmers about how great it was that I was able to have Java code hosted for free. They responding with their own setups, one used a VPS, Virtual Private Server, on Dreamhost, the other a VPS on Slicehost. Better then my shared hosting, and not much more money. But at the time, having the VPS didn’t matter to me, since I had GAE separately for my Java.
Then the other day my GAE troubles started. Tinkering with it a bit this morning, I get an email from a collegue asking to pick up some Ruby work that another former team member was handing off. After looking at Ruby again, I realized how quickly I could develop yet I didn’t really feel as if the code was completely owned by me, since so much was done for me. Long story short, that triggered me to switch my shared hosting to a VPS, and again port my middleware, this time to Ruby. Rather then having to know everything under the covers, I instead trust that Rails is doing the right thing, and have enough experience to understand how it’s probably happening.
Later in the evening I stopped by work to pick something up, and talked with a colleague who was part of our QA team. We began talking about Java and Ruby, and in the course of the discussion, I laid out my reasons for now switching back to Ruby, it was at that moment were I fully realized the change in my thinking.
My colleague brought up the common concerns of development speed vs application performance. I tried to explain that it was more then that. That is was also about the time spent vs consumer benefit. I explained that anything which took away from me directly benefiting the customer should be eliminated, regardless of how good it feels to me. Any time spend hacking something to work, or away from some important program algorithm was a waste. Any language or environment that causes this type of waste should be eliminated. I compared it to giving a speech or reporting a news story. You can spend half of your time researching for the story, then another half of your time refining the delivery. Making sure your grammer is 100%, that your speech is articulate, that your tone is provocative, etc. In the end however, the only thing the audience is going to remember is the point you were trying to make, whether or not you spent the extra time on a carefully crafted/edited delivery.
In programming it is the same, the more removed you are from directly effecting the user, the less effective you are spending your time. Java is a great language, for sure, however it can to be perfect to a fault. Everything is reviewed by so many people, groups, committees, it is slow to develop as a language, and made to be generic/clean ad nauseum. It often promotes “textbook” style structure/syntax/abstraction. I am not saying java does not have its place, every application has a tool best suited for it, only that developers should be conscious of spending their time doing the right things, rather then being sidetracked with lower-value distractions.
I am reminded of others who have come to similar conclusions, people who felt the “cruft” of needless distraction taking time away from their true development work. People like Rod Johnson, a knowledgeable java developer to lashed out at the staple java EJB’s, or Dave Thomas, a Ruby advocate and author of several good development books.
Comments
Leave a comment Trackback