Thursday, October 13, 2011

Dennis Ritchie R.I.P.

Some perspective by Rob Pike on Ritchie's passing.

Sunday, July 3, 2011

Managing Jar Hell

When I moved from Netbeans to Eclipse, I couldn't understand why the Eclipse library support was so bad. By bad, I mean it doesn't support relative paths in its user libraries feature. You can see the bug report here. It was reported in July of 2004. Why is it that?

Well, it turns out, it's because the people at Eclipse know that you can handle this just fine now, probably not in 2004 though, using a dependency manager and it will do a much better job of it. Ultimately, the problem with the Netbeans approach, and to be fair, we'll see that Netbeans does support the alternatives suggested here, is that it requires you to check in library modules, the jar files, into source control or some kind of shared resources.

Enter Ivy... and moving on to Maven. Ultimately, these two systems work with Maven central do automatically grab all your jars for you. Not only, but they will also grab javadoc and source jars for you at the same time.

If you're struggling with this, give Ivy and Maven a look. I started using Ivy a little while ago and it worked like advertised but hit some limitations with the AppEngine SDK and native libraries (OpenGL and OpenCL bindings).

Ultimately, I moved our builds to Maven. Not only does Maven manage jar dependencies, including native libraries and big and complex SDKs like AppEngine and GWT, it also allows you to generate your IDE projects.

Having the maven project file be the authoritative source means we can generate projects for Eclipse or IntelliJ and Netbeans can read maven pom files directly. On many tasks, we can move away from Eclipse but still get access to all its plugins when we need it.

There are other up and coming systems like Buildr which uses Ruby instead of XML and Gradle that uses Groovy but for now, my build and dependencies are driven by Maven. Upgrading jars to never versions is changing one digit in an XML file. New team members just need to have a maven aware IDE and everything just starts. No setup time, no nothing.

Wednesday, May 11, 2011

One More

Also top pick is the new svg renderer library for Android. This is the same library that Androinify uses.

Google I/O 2011 Top Picks

Yes, the Android keynote was very interesting and all. Here are my picks for this year's "best of show":

  1. ForPlay. Liked the Angry Birds in Chrome demo? I did too but for technical reasons. I immediately wanted to know what they used to port the game. They obviously have a Java version of the game and the physics are powered by Box2d which has a Java port. Angry Birds for the web is built around GWT and this new library. I'm a big fan of GWT and their new release schedule since version 2.1 is really making it easier to use the library for real work. It will be interesting to see what kind of uptake this has with casual game developers.
  2. Android tools. Hopefully, soon, we will finally get relief here. The current emulator isn't good and really hampers progress. The current visual designers are also horrible.

Monday, March 28, 2011

Some Hope for the Android Emulator

Google has publicly stated that they're working on making the Android emulator faster and that they feel our pain.

I'm all for statements to such effects and all, but nothing says we're doing it like some cold hard commits:


This adds hardware (GPU) acceleration to the emulator.

Friday, March 11, 2011

NoSQL != No SQL

Time and time again, I'm reminded that the NoSQL abbreviation is probably the worst coined term ever.

NoSQL doesn't mean "no SQL", as in there is no SQL here. It means "Not Only SQL". Granted, the two biggest heavyweights in the NoSQL space, Apache's HBase and Cassandra, don't support SQL. However, it doesn't mean you can't use a domain specific query language on them.

Cassandra has CQL which means exactly what you think, i.e., Cassandra Query Language. This is very close in syntax to SQL but adapted to work with Cassandra.

Now, I encourage users of both systems to discover the power of Pig. Pig works works with both HBase and Cassandra. Personally, I find Pig much easier to use than SQL. The key to its simplicity is that it has a concept that represents the current row. If you've ever had to deal with non trivial SQL before, you know all too well the evils of sub-selects that could be easily avoided if you just had a way to refer to the current item when you needed to.


Wednesday, January 26, 2011

Android Emulator Slow?

I have an 8 core Core i7 processor and the emulator was really slow for me. I'm not talking it's slow to start and then it runs fine. I'm saying it takes a long time to start and it's always slow.

The trick it seems, at least for me, is to disable the loading animation, in Eclipse, you can so do in: Debug Configurations > Your Debug Configuration Name > "Target" tab