Archive for December, 2005

A look back at 2005

Saturday, December 31st, 2005

As the end of the year comes closer, it’s time to reminisce. A lot of stuff happened over the last twelve months, both personally and in the glamourous world of software development.

**Personal**

* The most important thing certainly was the 6 week long trip to New Zealand with my girlfriend. What an amazing and beautiful country. They might not know how to make good bread and good cheese, but damnit, if that isn’t one of nature’s wonders, then I don’t know what is. I’ll be back Kiwis!
* We also moved to a new place, which was no big deal, because it’s only about 100m air-line distance from old to new flat. But the place is bigger, better, has just been renovated, and what have you. After 5 years it was time for something new. Also, we lived right on a place called “Boxhagener Platz” which was quite noisy all week long, even on the weekends with a farmer’s market and a flea-market.
* Got my hands on a lot of great tools for the Mac. VoodooPad, MarsEdit, TextMate, OmniGraffle and OmniOutliner (my favourite project management tool), to name a few. This year I actually started buying shareware again. The vibe of the Mac community where people appreciate and pay for great software, finally caught me.
* Went to a lot of great shows, including Silverstein, Alexisonfire, Alkaline Trio, Rise Against, Boysetsfire, and Turbonegro. If you didn’t already know: that’s my way to blow off some steam after a hard day’s work.
* Got to ride my longboard through the whole summer.

**Professional**

* Finished my first big project in my company. A lot of effort went into it, gallons of sweat and tears (and blood?) have been spilled, but it was worth it.
* Made the very unexpected transition from developer to project manager, something I wouldn’t have ever imagined. But that’s the way life is. Unexpected things wait right around the corner. I don’t regret it though. It taught me a lot of things, especially concerning the social aspects of work life. And I’m still learning.
* Got to work with Hibernate which has its joyous and dark sides. The later in the project it was the more the dark side lead the way we used it. Maybe more on that later. While it’s a great tool it certainly has some weird issues and problems with error messages. We also tapped right into the performance issues. 10000 objects in a single session, and you can get a coffee when flushing it.
* Ah Oracle, how I love thee. Hibernate brought the unavoidable relational database with it, and Oracle it was. Has some weird issues (e.g. handling timestamps, not to mention clobs), but it’s still top-notch and incredibly fast.
* Got to love (or hate? or love? or hate?) InstallShield Universal Installer. Spending time with this tool comes close to torturing yourself with a needle, but a really big one.
* Switched from Eclipse to IDEA. Boy what a great IDE.
* Learned so much new stuff that I can’t remember it all.
* Worked a lot of overtime. I’m still not sure if it was really worth it, but I’m leaning towards yes, although it brought me a herniated disk.

**Software development**

* Ruby on Rails rose from the ashes of bureaucratic and overly complicated Java web development
* No sentence could have said, no new web page launched, and no new framework created without mentioning Web 2.0 or AJAX. Time will tell, if both are to stay. If Hani is right, then maybe not. At least not the word Web 2.0.
* Java went lost a lot of heavy weight over the last year nonetheless. Leight-weight is the new EJB. The Spring Framework and Hibernate gained a lot of momentum and made Java enterprise development (one of those words that everyone uses, but no-one has a good explanation for) some kind of fun again.
* A lot of endless, useless and far too emotion-filled discussion about languages, frameworks and tools.
* Much, much more, but I’m sure you all read about it ;)

**Books**

I read a lot last year, and now I can’t wait to get my eyes on something novel-ish.

* J2EE Development without EJB - The sequel to Expert One-on-One J2EE Design and Development. Good stuff, gets boring over the chapters introducing all those mighty and numerous Spring features, but the first chapters are very good and informative, and give quite some insights in how to develop better code, even without Spring. Applying the principles of Inversion of Control to your code already improves it in my experience.
* Cryptonomicon - Read that one on my trip to New Zealand. Good stuff. Weird plot at first, because the setting takes place in different places and times. But gets more and more tensing. While the ending was a little bit disappointing and fast-coming, a great read nonetheless.
* The Penguin History of New Zealand - We brought it with us from NZ, where it’s a best-seller, so it was a good read to complete that great trip.
* Getting Things Done - Well, you’re not a real (Mac-)geek, if you haven’t read it. Getting Things Done was also a huge thing in 2005. Pages like 43 Folders and tools like the Hipster PDA or Kinkless GTD did a lot to help spread the word about it. I’m not religious about GTD, but I’m pretty convinced that it did and will help me a lot as a project manager.
* Hibernate in Action - Well we started working with Hibernate around April, so this one was a must-read.
* Data Crunching - Already wrote a review about it.
* The Art of Project Management - An outstanding book. I picked up some great advice helping me to make the transition from developer to project manager, which is, of course, far from being complete, but I’m working on it ;). I’m definitely gonna read this again next year.
* Ship It! - Wrote a review about it as well
* Agile Web Development with Rails - The Book about The Framework. Great book that is. Fun to read and fun to work with.
* Pragmatic Version Control with Subversion - A slick and easy read about a great improvement over CVS.
* Secure Coding - Dry stuff at first, but makes you think while you’re reading it. The authors provide a lot of practical advice on how to tackle security with your application.
* Beyond Java - This book got a lot of attention over the last few weeks. It has some good points, but I think I’m not the only one when I say that it could have needed a few more eyeballs and maybe some more detail.
* Peopleware - Now those guys are managers everyone wants to work for.
* Refactoring - Was about time to read that. Interesting to see what progress has been made with IDEs and refactoring compared to how it’s done in the book.

Although the real-life work is very important for learning, in my opinion you just can’t read enough. It helps a lot to get different insights and to build an own opinion from it over time.

**Something left for next year?**

Why certainly, me and my team have been working under a lot of pressure for the last 5 months. Now I need to get some more quiet time in my life. And some more time to work out. Coming home after ten to twelve hours of work isn’t really a good motivation to go jogging afterwards, especially if you have a comfortable couch waiting.

My last vacation being that infamous trip to New Zealand some months back, the next stop is Australia. Can’t wait to get back there. Just like New Zealand a huge cultural difference compared to Germany, when it comes to the way of life. With it now being winter in Germany a great place to go. And besides all that, learning, learning, learning.

Technorati Tags:
, ,

On The Perils of JavaSchools

Friday, December 30th, 2005

Now if that’s not a nice treat at the end of 2005. Joel Spolsky has problems separating great from mediocre programmers, because those lazy kids nowadays all learn boring and not-hard-enough Java in school. What a pity. Ten years ago everybody used pointers and they loved it. And now what gives? No pointers, less recursion, no coolness, no being a hard-ass anymore. No-one can crank out a linked-list algorithm during a coffee break anymore.

What happened to the days when students gave up studying computer science, because their brain exploded when they typed in those punch cards over and over again?

Okay, enough with sarcasm.

Is it really a hard programming language that makes for good programmers? As much as I admire C and C++ for what they are and for what they did for the software development world, I’ll also have to say that “hard” languages like them not the basis for great programmers. Sure you need people how know the “bad” (i.e. hard) stuff and how to handle complex algorithms, but you’ll also need people who can think on different levels like user interfaces and, most importantly, communication. In my experience a programmer doesn’t spend the day cranking out fancy algorithms with recursions and whatnot, he works in a social environment. He can be as great as it gets, if he’s not able to be a part of a social group, then he’s of no real value for a company.

Probably most engineers, as Chad Fowler (who has something to say on the topic as well) calls them, aren’t able to create great user interfaces. I’ll include myself here. People and companies like The Omni Group, Brent Simmons, the Jetbrains and Gus Mueller are certainly exceptions here.

As much as I agree that some great software needs complex thinking and the usage of C, and that it’s an advantage to know at least the basics of procedural programming and dealing with pointers, I certainly prefer working in a group with on-their-way-to-being-great programmers who are willing to evolve into something great over time, than work with a bunch of technicians who always dwell in times when linked-lists were something everyone programmed once in while, and prefer writing all code for themselves instead of using code someone else wrote. As long as they’re able to pick the right tool for the job (even if it’s easy Java), then I’m in. Even if they’re mediocre, if they have the right motivation and skills, they can always create something great.

A school won’t be able to weed out great programmers only by their use of a harder language, the work in a team will. Joel, you should know that, considering Project Aardvark. Even if those guys were great geeks, they still had to work together as a team to produce something great. That’s something I (and probably most computer science graduates) didn’t get taught in the university. It’s a skill you’ll have to learn in a real working environment, even if you’re juggling with pointers all day long.

Maybe the real problem here is that, more often than not, you’re not taught 20% of the stuff in college or university that you’ll need 80% of the time. I know I didn’t. If you meant that Joel, you could’ve as well just said it. But well some people just need attention.

Now I’ll get back to that last segmentation fault that dumped me a nice 6 MB core for debugging.

Update: Wow, Joel even made on The Server Side and Javalobby. A lot of other fellas also have something to say about the issue.

A few new releases

Thursday, December 15th, 2005

In case you didn’t notice (which would mean you’re living somewhere in the rain forest), Rails 1.0 has been released. Their website also got a decent overhaul with some 37signals love. Does anyone notice some similarities? ;)
They also have some cool new screencasts about migration support in ActiveRecord, and about how to create an interface for Flickr in about 5 minutes.

Hibernate got bumped up to version 3.1. Spring 2.0 is still pending for this week

And my all-time-favorite tool VoodooPad got a nice upgrade to version 2.5 with some nice new features, like a cool web-export and support for multiple aliases per wiki page.

In other news, I gave IDEA a shot over the last weeks, and I’m hooked ;)
But more about that later.

Handling Unix Timestamps in Oracle and HSQLDB

Thursday, December 1st, 2005

While creating some SQL for reports for our database schema, I ran over some gross issues with Oracle handling Unix timestamps. Some timestamps are saved as milliseconds in the database, but must be usable for date comparisons. What a joy with Oracle. And with HSQLDB. The usual suspects `to_date` and `to_number` won’t work in a simple way. That’s not a new problem as it seems you’ll lose the millisecond fraction. But for reports calculating on daily data that’s something that can be disregarded. The Oracle way is many-fold (what a surprise ;).

I found some solutions here and here. To sum it up, it goes like this:

select TO_DATE(’1970-01-01′, ‘YYYY-MM-DD’) + NUMTODSINTERVAL(/1000,
‘SECOND’) from dual

Looks dirty, doesn’t it? It basically adds a time interval derived from the timestamp to the date 1970-01-01, the one date that Unix geeks love like nothing else (well, except sed & awk maybe ;). Notice the division by 1000 to convert the seconds to milliseconds, that’s the point where you’ll lose some precision. The other way around is quite similar. Here’s how to fetch the timestamp from an Oracle date type:

select (SYSDATE - TO_DATE(’19700101′, ‘YYYYMMDD’)) * 86400000 from dual

Now we’re subtracting the date 1970-01-01 from the current date and multiply it by the number of milliseconds that a long day at the office might have.

If that’s not awkward, then I don’t know what is.

But wait, it gets better. Now for HSQLDB. You think you’ve seen it all, but here it goes:

select “org.hsqldb.HsqlDateTime.getTimestamp”() from my_table

Yep, that’s the stuff. Thank god you can use static Java methods in HSQLDB, and thank god they’ve implemented some of the stuff in their own library methods. It might not be the most portable SQL, but it does work. If you want to get the current time as a timestamp, then you’ll simply use:

select “java.lang.System.currentTimeMillis”() from my_table

I have not yet found a way to convert a specific date (e.g. from a column) to a Unix timestamp with the simple tools (i.e. public and static methods available). An alternative would be something like a “stored” procedure, if it can be called that way in HSQLDB:

public class DateConverter {
public static long toUnixTimestamp(String s) {
java.sql.Date date = java.sql.Date.valueOf(s);
return date.getTime();
}
}

Since HSQLDB treats all date and time columns as strings within SQL, you’ll have to go with a string parameter. This methods will only work on date typed columns, for timestamps (the SQL ones) you’ll have to use `java.sql.Timestamp` instead. The rest is the same. Now you’ll have to put the class file into the classpath available to HSQLDB and you’re good to go. When used in SQL it will look like this:

select “DateConverter.toUnixTimestamp”(curdate()) from my_table

What a joy.

Technorati Tags: | | | | | |