Any sufficiently complicated C or Fortran program contains an ad hoc informally-specified bug-ridden slow implementation of half of Common Lisp.
New Jersey is the only state where all of its counties are classified as metropolitan areas
Well, my foray into Ruby territory has led to a complete re-write of this PHP based site (this marks the first post under the new publishing system.) As I've posted here before, I'm quite impressed with the Rails framework and it's ability to lessen the development of web applications down to implementing what the application actually does, instead of wasting time implementing system-level details. These details are not trivial - mapping relational database tables to objects and creating an MVC environment for your code to operate in is a significant undertaking, as most developers would agree (If you disagree, I'd love to chat.)
But wait! Rails isn't the first framework to offer these conveniences. What about Struts, Hibernate, blah, blah, blah. I've used them. I even like them. But seriously, configuring these frameworks to work with one another can be mind numbing. Let's not even go into the initial steps involving the inclusion of 8,369 jar files into your project - can you say 'ClassNotFoundException'? The fact that Rails includes an ORM implementation AND an MVC implementation, both under the SAME project, is something very special. Let's look at some pitfalls that Rails makes a thing of the past.
Plain vanilla Java beans are a great way to store, access, and transfer data in the object domain. This is not rocket science and has been well known for a long time. The problem is that everyone wants their own slice of the pie. Both Hibernate and Struts want to use their own set of java beans, even though they both describe exactly the same data. What's even more annoying is that Struts requires its java beans to ride the short bus to school: they can only store String objects (Okay, and Boolean, but that doesn't really help.) This means that your data needs to be continually shuffled between the Struts beans, your business objects, and the beans used in your persistence layer.
Many developers, including myself, feel that multiple sets of java beans are a redundant waste of time, code, and money. This is the topic of many flame wars, and can be compared to the Eagles playing the Giants. The bottom line is that I don't want to write any java beans. getThis(), setThat(), how about forgetItAllAndUseRails().
I've been writing J2EE applications long enough that editing XML configuration files has become second nature to me. If someone is touting that their jar file will make your life easier, you can expect that it needs at least one XML file. This isn't exactly a bad idea, its just that it may be an unnecessary step and can lead to lots of headaches during maintenance.
Okay, now its time for another flame war: Rails circumvents XML files by having the developer follow naming conventions. Yes, this means that you must name things in certain ways if you want them to work properly. This rates right up there with Emacs vs. Vi. I can't count the number of times I've gotten into an argument over the naming of different things:
It turns out that there are no absolute rules when it comes to naming these types of things, and I might not agree with all of the naming conventions chosen for Rails, but at the end of the day I really don't care. Those conventions make sense to some people (very smart people actually,) and I can live with them if it means that I don't have to waste any more time editing XML files. I think in most cases (not all cases,) XML is an application band-aid, especially when the XML is being used for configuration. The only problem is that the application never heals, so the band-aid is never removed.
I'm not convinced 100% that Rails will take over the world. But I am convinced that ORM and MVC should be available in a single framework (Not to mention the other great features of Rails like the testing module.)
<action path = "convert"
type = "com.joestelmach.actions.StrutsToRubyConverter"
input = "struts.jsp">
<forward name="rubyConversionSuccess" path="theJoysOfRuby.jsp" >
</action>
I love when this happens...You're wandering along mindlessly listening to your iPod on random play, and you realize, "I haven't heard this song in the longest time." Then it all comes pouring back. The posters that were hanging on the wall in your old bedroom. The 'best friend' that you haven't spoken with in years. The girl that broke your heart. Everything. These memories come streaming from this song. This music. This chaos of analog waves bouncing around in your head. The feeling really is amazing.
So if you haven't guessed it, I was fortunate enough to have this experience the other day. The song was Hurt by Nine Inch Nails, which was released on The Downward Spiral album back in 1994. It's probably been about 6 years since I last heard this song, so I was content with the fact that my iPod chose to play it out of the thousands of choices it had. But when it rains it pours, right? A couple days later, I learned while reading Spin Magazine that Johnny Cash did a cover of the song in 2002 on his American IV: The Man Comes Around album.
I'm here to say that the Johnny Cash version is amazing. I love how a song can lead multiple lives between artists. The emotional differences between Trent Reznor in his 20's and Johnny Cash in his 70's is a lot of fun to compare and pick apart. Download both versions - you won't be dissapointed.
Friday, December 23, 2005 10:46 PM ESTWhen people get depressed, it sometimes helps to remind them of certain situations that are worse than the one they are currently in. If I'm saddened by the fact that I got sick and had to miss the Dave Matthews concert, its easy for me to come to grips with reality when I'm reminded of the fact that some people are sick all of the time, not just for a few days.
The same concept is certainly valid in the jungle of software maintenance. If your buddy is given the task of adding some functionality to a piece of obfuscated code, it might help to remind him of some code that has much more serious problems. This easy to do, given the large collection of nauseating code samples available at The Daily WTF. A simple click of this link, and I assure you that your buddy will be feeling better in no time.
I will leave you with the sole inspiration of this post. An error message that I hope to never see again during the rest of my career: