Uncategorized


3
Nov 11

Sugar my Droid

Before I started developing on Android in early 2009, I had very much enjoyed the blessings of Ruby’s ActiveRecord object-relational adapter which makes development very easy and fast compared to such heavyweight und – for my taste – cumbersome approaches as the DAO/JPA-Template/Hibernate layer cake that is commonly found in the Spring-dominated world of Java server development. But what I encountered when I first used Android’s way of creating and accessing SQLite databases was even worse than that. You get the least thinkable amount of support from the system and have to write your mapping and persistence logic (table creation, finders, etc.) as a thin layer directly on top of the SQL query interface.

Hurz.

As a remedy, I used and still use SQLiteGen in some of my projects, which generates a glue layer in the form of Java beans, as directed by the developer through Java annotations. It works, but project development seems to have run dry and the current version could use several improvements.

That’s why I started to look for something new and, a few weeks ago, stumbled across Sugar, a simple but effective object-relational mapper that imitates the behavior of ActiveRecord, mainly by using reflection to inspect the data structures that are mapped to database tables. I liked its general approach and forked Sugar on GitHub to convert it into an Android library project, fix some issues and inject new features, such as support for Enum-typed fields. If you are a an Android developer looking for an alternative way of mapping between your application model and your database, maybe you should give Sugar a spin.


7
Oct 10

Amazonization

The art of generating code that is just barely correct enough that most of your customers won’t notice problems.

Steve Yegge (former big shot developer at Amazon)


4
May 10

Trees and Roots

A friend on Facebook mentioned a nice little naming problem I had not been aware of in years of computer science:

We are always drawing tree structures with the root on top, sometimes with the root on the left, but almost never with the root where it belongs (according to biologists) in a tree: at the bottom.

In a comment, a kind soul suggested viewing the usual top-down trees as Christmas trees, and thus naming the root “star“. Should I ever teach data structures again, I will use this one.

And the start of a tree drawn from left to right could be … the source (of a creek, a river).


29
Apr 10

Javagötterdämmerung

James Gosling has left Sun.

And I hadn’t heard of it until now. Looks like I’m not such a geek after all.

But it shocked me just as much as when I heard that J.D. Salinger had died – it actually made my eyes well up – so I guess I am quite a geek.

When I wrote about the departure of other Java Gods, I thought I was making a joke when I wondered how long James Gosling would remain at Sun. Now Guy Steele is the last man standing… but for how long?

Ever since the takeover by Oracle, I haven’t had a good feeling about the future of Java. IBM would have been a much better match. Oy vey…


22
Feb 10

Ruby Version Reminder

rvm is great, but I still sometimes lose track of which Ruby version I’m currently using. As a little reminder, I put the Ruby version in my shell prompt, like this:

PS1="\u `ruby -v | grep -e "[0-9]\.[0-9]\.[0-9]" -o` \w"

Works nicely.


3
Sep 09

Hoccer

I use this posting for blatantly advertising one of the development projects I was recently involved in – an Android application called Hoccer. It was released by ART+COM Technologies as a free app on the Android Market and as entry for the 2nd Android Developer Challenge.

The aim of Hoccer is to simplify the process of sharing data (currently pictures and contacts) between devices – you use certain gestures for one-to-one (tap) or one-to-many (throw/catch) to determine sender and receiver(s) and the data is transferred over the internet subsequently, so no other mechanism of pairing etc. is needed.

An iPhone version is currently under development, and there’s a web client to hoc data from a desktop computer to a mobile device, so no one’s left out.


13
Mar 07

The Departed

Back in July 2004, I was shocked to hear that Josh Bloch and Neal Gafter had left Sun. A few months ago, in October 2006, another shock came – Gilad Bracha has left Sun as well.

Not many big names are left at the home of Java. Bill Joy already went away in September 2003. How long will James Gosling and Guy Steele stick around? Makes me wonder what the future will bring for Sun and Java. Especially considering Bracha’s ominous farewell Good luck to you all – you’ll need it. Am I just being paranoid, or do these words and these events forecast a gloomy future for Sun, Java, and everyone involved, that is, me and you, my fellow programmers?

(In case you don’t know, Gilad, Josh, and Neal are Java Gods. Josh wrote the Java Collections Framework and Effective Java, one of the best books about Java. Neal Gafter was in charge of Sun’s Java compiler. Together they wrote Java Puzzlers, another great book. Gilad Bracha was heavily involved in the specification of Java itself, the JVM, Generics… you name it.)


Better Tag Cloud