DataMapper vs. ActiveRecord, a discussion

5 Reasons DataMapper Will Deprecate ActiveRecord is a well pointed out list of reasons why DataMapper will in the author’s opinion overtake ActiveRecord. And there is nothing left to do but to agree.

I started a project a while ago, 1topf.net, which unfortunately died because of a massive lack of time here, but I started building it using Merb and DataMapper. Although the Merb version at that time was something like 0.9 and had some bugs and flaws, in combination with DataMapper it was a convincing team. 

In my opinion, the Wedding of Rails and Merb will be a very exciting step in the Web-Framework universe. Let’s see what happens, but the freedom to choose an alternative ORM is quite promising.

Antiusability at its best: Language Documentation

Whether you’re an active developer busy doing some Java, Ruby, Perl or ( fill in your language here ) based projects, you’ll most likely have some kind of browser windows opened sometimes providing you with the necessary documentation for libraries or ( but hopefully not ) language basics. 

Because I’m not in love with one language and used to switching back and forth between several of them, I tend to forget some details about built-in classes etc.. It’s certainly o.k. to have the documentation for such features available somewhere on the web, but I’d love to be able to simply download bundles for a language in a “documentation reader”. Open format ( there are lots of them that would suit this application ), simple to transform anything to it via xsl or something comparable, and it would just work ( even offline ). 

I won’t claim to start a new project here as I’m already quite busy doing the rest, and celebrating new years eve, but if somebody is looking for a challenge, here it is. 

This subject shows another important aspect of usability. Usability shouldn’t stop at the Users place. Developers are users, too. And happy users tend to be more loyal and happy, a goal certainly worth achieving.

Edit: Now the night has finally arrived, and I think the following tasks should be completed before any such project can be forged. 

  1. Define an open format for efficiently saving Language Documentation. Keep in mind that language documentation differs in structure depending on what kind of language is documented. Object oriented languages need other formats or present other structures than procedural or functional ones. 
  2. Create scripts that convert existing documentation into that new format. XSL is a powerful friend here. No one will ever take care about a cool project without a funky demo.
  3. Build clients that are eaasssyy to use for all major platforms. I’m talking about smooth integration ( e.g. a spotlight plugin for OS X ), not some dirty hack.
  4. Tell all your programmer friends.

Thats it. But I’m still not ( yet ) interested in doing it by myself, but if anybody wants to do it, don’t bother contacting me. Sleep well.

Edit: found this link, like it.

C++ Pitfall prevention Cheatsheet

I posted this also on my “old” blog. Please be good in judging it, I did it for a C++ course in Espoo. C++ Cheatsheet

Edit: One thing not discussed in the cheatsheet, but at least from my point of view a error-prone area is the const-modifier. I found a good explanation about it and its various uses and meanings here.

Facebook Programming Challenge

I just read some very interesting programming challenges located at facebook. Though time is certainly a precious resource, I consider it crucial for a programmer, especially if the claim is to be a good one, to take some challenges from time to time, be it implementing a complex algorithm or solve puzzles like the facebook ones. 

Time is a limited resource. So I’ll better hurry in doing something, otherwise I’ll be forever stuck in the 80% completion state with too many projects around here. 

By the way, I’m totally unsure whether to choose git or svn for my next project. Any tips?

Rails and Merb to merge and form Rails 3

Just read that article. Interesting, i worked with both of them and was equally impressed, so I definitely encourage this evolution. 

Jumblesale, the project discussed a few posts earlier, is also based on Rails2, and it just works.

Jumblesale: A better platform for selling your stuff

Selling your private stuff has become quite tricky lately, in contrary to ( fill in any web-related stuff here ). It was always my intention to sell things i don’t need any more in a simple way somewhere. In a simple way. I just can’t consider eBay simple. I don’t want to create fancy custom-layouts. I neither want to read through one’s comments to find out whether he or she is a black sheep or not. 

Well, long story short, I had an idea ( once again ). I want to build a simple platform that supports especially the blogging people in selling stuff. Why blogging people? Because a modern system would best integrate there, i guess. 

I named it jumblesale, and I’m going to specify what it’s good for. The intended audience is people who occasionally find stuff they don’t have use for anymore and want to sell it, e.g. a TV-Set or an old iPod: Non-Commercial and for private use only. This is to ensure that the focus is not on competition but on selling. This is also emphasised by choosing NOT to allow auctions. I just don’t want to place my 3g-iPod on eBay for a starting bid of 1€. I want to sell it for 120€, and whoever wants to get it for that money, simply can. 

By building the system in a way that supports RESTful access, it can be easily used from outside systems and integrated into blogs, widgets and more useful places. 

I also decided that the eBay of rating sellers isn’t the best, at least not for a small marketplace. I always liked the idea of having a circle of trust, members that guarantee for each other. So each new member requires to have an invitation to sign-up, and a higher count of “friends” at jumblesale will increase ( hopefully ) the trust buyers have in a seller. There is no plan to combine it with other features of a social network, such as messaging and so on, but the friend feature is very useful in this context. Maybe conflicts may be easier resolved by a social pressure forcing a seller to act properly.

Right now I’m exchanging my thoughts on this topic with a friend of mine, Sven Pfleiderer, and we’ll maybe handle this as a project for our studies. You can read his blog here 

Merry christmas once again!

Pass-by-reference workaround in Java

As anybody knows, java passes variables by value. and i haven’t found the magic compiler switch to change that. of course, there are problems caused by this restriction, but in most cases, pass-by-value works just fine. 

If you end up in a situation where it’d come in handy to have a pass-by-reference facility, think about the way java is storing objects, and how these objects are then passed-by-value. 

First of all, an object variable contains only a ( typed ) memory address. Thus, comparing e.g. two strings for equality will yield only true if they are in fact the same strings, same applies for all other types. And this is the value. So in fact you pass a ( kind of ) pointer to a function, enabling to manipulate the original object, as the object is not cloned or something else.

Its also common to encapsulate basic types like int into a object just for the sake of manipulating it in some methods.

So let’s break it down to a simple example:

class MInt {
	int x;
}

public void inc(MInt what){
	what.x++;
}

This will result in the int x of a MInt object being indeed incremented. Let’s imagine calling a increase method with a plain integer. This will change just nothing, at least not outside the methods scope.

Zeroconf made easy: using Bonjour for Java, Part 1

It’s really easy. If you have some clue about network programming and Java, this shouldn’t be extra hard to understand. It’s about zero-configuration, the ability of devices to e.g. discover them independently of any server. There are several implementations, I choose to use Bonjour, which is provided and developed by Apple. The Java-Bindings are available for Windows and, of course, Mac. Continue reading

Whats next – Sharer: Better File Sharing.

Good morning. It seems I have to stay wake so i don’t oversleep. Oversleeping would mean something like missing a flight, not really desirable. 

Staying wake always makes me do weird stuff in the middle of the night. That is, reading all feeds I recently ignored, taking care of stuff that has to be taken care of ( that is university ) and scheduling my activities for the upcoming, lets say, 3 weeks. 

Blogging is definitely a part of it, as I’m not exactly happy with the posts here. I’m working on it, to be more sepcific: I’m planning to do an article series on a .. secret topic. You’ll see, but I still have to finish work on Sharer, my LAN-Filesharing utility. I’ll tell you something about it. 

Sharer is at the moment simply a damn simple binary protocol and a Application implementing it. The protocol structure is quiet simple. A connection between two clients is initiated by establishing a control-connection. Thats the one used to retrieve metadata like file information etc.. If a client wants to get a specific file, it requests a transfer connection. File is being sent over it. I’m still working on it, as it appears to be more work than I initially planned. 

This whole project is based on the idea that simple file sharing that is decentralised and restricted ( or at least primarily designed ) for use in local networks is pretty much a lame topic. Every major company is proud to have some own protocol there, them being not compatible bla bla bla. So i decided to waste some time on this proof of concept. To make it really useful and simple to use ( remember \mycomputer or \192.168.0.12 ? that is _not_ user friendly! ), Sharer uses the Bonjour for Java Bindings provided by Apple. The Usage is quite straightforward, and it works well. I haven’t checked out yet if these Bindings are also available for Linux, but I hope so. At least for Windows and Mac(!) they are. 

I think I’ll try to online check-in now. Window seat.

OS-Developing Challenge

A good friend of mine, Max, studying computer science in Karlsruhe and I decided yesterday that all currently existing and established Operating Systems suck. This is nothing new. Really not, there are some million users knowing what I’m talking about.
So our goal is to develop an Operating System without any legacy stuff ( No, no serial port support.. ) that is easily extendable and based on some kind of microkernel yet to be developed. And no, we don’t have too much time, just too less fun. Anyway, I’ll keep you updated here. I’ve gotta go back to reading Tanenbaum, great book.