Waiting for… Android wishlist

Welcome in the middle of my night, I’m currently spending my days working, my evenings eating ( barbecue, it’s gettin’ hot in here.. ) and my nights either trying to watch my favorite TV-shows or sleeping. And if none of those shows is on, my head notices me of several thoughts, most of the time presented at a rather disturbing concurrency level, related to … android.

I’m still exploring the API, and Android as a complete product, and the more I learn, the more I’m getting caught by it. And I’m sure that a few years from now, many people now using costly, unhandy notebooks will be using devices based on something like Android.

But let’s try to stick to the title of this post. First of all, I’m really looking forward to Google I/O. I booked a flight, it’s my 2nd time in San Francisco ( I don’t know where to sleep yet, but there’s some time left to figure it out, hints welcome ), excited. And I’m working towards finishing my own keyboard implementation to show it off. I’m not going to talk about it in detail as long as there is no working demo available, and it will take some time, trust me.

I’m also waiting for Cupcake. Cupcake, for the ones of you who are not familiar with Android, is a read-only development branch, meant to publish non open-source development efforts. These efforts also include the creation of an Interface to implement custom Input Methods, be it a Keyboard or anything else that allows for input of textual data. One could very well think of a Morse-to-Text button ( idea for a tutorial ), a rotate-to-write or an application using an artificial neural network to do some lip-reading using the phones camera. Though the last one will be quite resource-consuming, the point is, anything can be done using the very generic API.

Once again, if you want to use it, get yourself the Cupcake Sources. It’s well explained at source.android.com. I somehow made it, without spending more than about 30 minutes, to build emulator images and the rest i needed to get going. And although the Eclipse plugin reports an error, it’s working even for cupcake.

Luckily, when building the stuff you need the docs are also being created, explaining what you need. I especially recommend to take a look at the built-in keyboard’s implementation, as it’s very readable and self-explaining.

I’m really hoping to find some time to publish a tutorial on this topic, but I’m not able to promise anything.

Implementing a Ruby-Based LDAP-Server

Oh yes. Good question. Why would anyone want to implement a LDAP Server? Besides the fact the OpenLDAP is a pain to set up and isn’t really rewarding in terms of perfomance, there are situations demanding LDAP Access to data residing in some kind of RDBMS. And that’s my motivation.

After seriously thinking about doing it all by myself, I plugged in Google to get some answers. And there is ruby-ldapserver, hosted at rubyforge. Unfortunately. the project seems pretty dead, nevertheless the Alpha 0.3.1 Version released there works fine, although without SASL support, only simple ( plain bind ) works. 

How to use it? It’s very straightforward. Download the package, see that it’s in your path, and ready to rock. The package includes a few examples, showing off the beauty of the lib and ruby. That is how you implement a fully working LDAP Server ( okay, doing nothing, but works. )

class MyLdapOperations < LDAP::Server::Operation

  def search(basedn, scope, deref, filter)
    puts scope
    puts basedn
    puts deref
    puts filter[1]
  end

  def simple_bind(version,dn,password)
    puts "Auth: #{dn} + #{password}"
    puts version
  end

end
s = LDAP::Server.new(
	:port			=> 1234,
	:nodelay		=> true,
	:listen			=> 10,
#	:ssl_key_file		=> "key.pem",
#	:ssl_cert_file		=> "cert.pem",
#	:ssl_on_connect		=> true,
 :o peration_class	=> MyLDAPOperations
)
s.run_tcpserver
s.join

You launch it, and it works. Certainly worth giving it a try, and a good piece to start if you want to get involved in the OS community.

Rails Development: Comparing platforms

And I know what I’m talking about! I’ve been doing heavy rails development lately, on all three major platforms. Start with OS X.

It seems every serious Screencast for Rails was recorded using the famous Textmate Editor on OS X. At first sight, Textmate may seem to be a pretty ordinary Text Editor. Well, it isn’t. It’s very powerful and highly customisable. It’s one of the products I’d buy always again, simply because it’s worth it’s price. Development is rather flawless, not only because of Textmate, but also because OS X is based on a Unix System, giving one the ability to run all utilities natively, avoiding perfomance issues. It’s absolutely my favorite.

After my MacBook commited suicide, I was forced to use XP. I wasn’t happy. There are good code editors for sure ( I used vim nevertheless ) but the overall speed of testing tasks and so on is .. poor. Very poor. Those perfomance problems are well-known, though no one knows the exact reason ( at least I wasn’t able to figure it out ). I don’t want to flame here, but Windows is just not suitable for serious Rails development.

After deciding that the above mentioned system was a pain in the ass rather than a solid solution, I switched to Ubuntu. And I’m amazed, really. Gedit with a few plugins seems to be a good alternative compared to TextMate, and all the packages run like a charm. And it’s free and runs everywhere. It’s my recommendation for every Windows+Rails developer. Install VMWare or VirtualBox and develop there, it’s faster. Trust me.

Tomorrow ( assuming UPS isn’t lying ) my new iMac will arrive, and I’m so looking forward to it. What is your prefered platform for developing with rails?

Still alive and well

But just busy doing _work_. It’s fun, but it’s keeping me from blogging the way I’d like to. What happened in the meantime? First of all my MacBook pretended to die, as I wrote here. I figured out yesterday that it was only the new harddisk refusing the work. So now I got a new iMac on the way and a functioning MacBook at home. Luxury is here.

I think it’s a bit nasty that Apple enrolls the AppleCare subscription just after completing the order process, without being able to use this machine. This means I’m paying for 5 days more than I can actually use this service. Sucks.

Next I’m quite impressed by Rails ( again ). It just works like a charm, really, although I couldn’t get passenger on Debian etch to work, but I think that’s something quite fixable. We’ll see.

Unfortunately I can’t tell you anything about the project I’m working on, but I’m very excited to be part of it and hopefully I’ll show you what I’m doing here. I also wrote an acts_as_localized plugin, enabling localized database models that are used just as normal models. The code is not the best, but if someone wants to have it, just ask.

So long :-)

A real open-source, usable, photoshop replacement?

Good morning, folks! Now I’m back in germany, still busy getting used to all this luxury again, including my Ubuntu-desktop. I also have Windows installed, but for some reason i prefer Ubuntu. Anyway, I’m really missing a real, free and usable Photoshop replacement here. For me, GIMP is just a nice little tool enabling one of small edits, but not as sophisticated and well-designed as Photoshop. This is sad because it’s still a big point for many web-doing people not to switch to an open system. And there are plenty of examples where open software can beat the original, look at Open Office.

I’m convinced that there are enough people to start up a project dedicated to building a graphics suite, open, based on already existing tools. Have you heard of Scribus, a great publishing tool for Linux, free? Amazin software, and I dare to speculate that GIMPs codebase isn’t bad, it’s just some frontend stuff that is. By creating a cool team and spending some time on unifying the user interfaces among these, a great step towards permanent switching would be made.

Still, what are you’re experiences with GIMP or do you know any other, comparable tools?

Character Encoding for the rest of us: UTF-8

I spent a fair part of my past life not understanding character encodings in its entirety. While this was totally unimportant in past times, when e.g. a dataformat or file was written or created by the same program reading it, most likely not crossing country or language borders, nowadays it is. Very. So what is this all about? Continue reading

Still no Java 6 for Intel 32 bit and PowerPC based Macs

Running Mac OS X, i forgot to mention that in the headline. Why? Apple is most likely busy updating it’s own stuff, promoting it’s platform, and since the iPhone came up, many people started learning Cocoa, so the developer base there has grown, too. Additionally, the general user base is also growing, making it a more interesting target for Software Companies. And there are not many basic rules, valid everywhere, but one is for sure that Java Desktop applications just don’t integrate well. There is maybe an exception for programs using SWT, but still, the native look and feel is something different.

So the question I’m asking is whether it’s that bad that there is no Java support? Yes! Absolutely! At least if you either use programs or build programs depending on it. Of course, most programs just work fine with Java 5, but there are some that just don’t. And so one of the main reasons for Java is obsolete: write once, run everywhere. And while Sun, the company behind Java, is providing Runtime Environments for Windows and Linux, it’s not for Mac. So it’s not Apples fault alone. But careless of who’s fault it is, it just sucks, clearly spoken.

The top 25 programming errors: Watch and avoid

Security is always a big issue, whether you are writing for a big company or just for fun. But many people, especially beginners, tend to underestimate the importance of securing their applications dramaticially. While stuff like a well-designed interface and the proper function of the application is directly visible, security works the other way round: it’s presence ( or a lack thereof ) are only visible when it’s in most cases too late. So, as for testing, security is a important quality attribute of your software, and you should care, and if you don’t know where to start, the SANS-institute released a very comprehensive list of the most wanted programming errors.

The list was created in collaboration with major actors, like Microsoft, Cisco and other popular names. While not all of them are applicable to all kinds of applications, you will certainly find some that do, and this list is certainly a very good source to start reading on that topic.

Enough written, the document can be found here: Top 25 programming errors.

Still include IE6 support when creating a Web Application?

I really don’t know if i shall. And this time I’m really asking for your opinion on that, just leave a comment. A Pro is that many users in corporate environments are still forced to use our favourite old-school browsing grandpa. And excluding a mentionable amount of users just for the sake of less work? 

On the other hand, I guess that most people using really modern WebApps are nevertheless forced to use modern browsers. I don’t know, really not. A short yet true list of cons is presented here as well, and a rather radical point of view presented by nick cowie.

What my fellows are doing: Study projects

A lot of stuff. Mostly, their blogs and documentation of their study-related projects is in german ( which is not a big deal if you’re german .. haha ), but I think that it’s interesting to take a look at what they are doing.

Tommy was or is ( he claims to be at 90% ) busy coding some kind of document managing system in Java, you can read all about it in his blog. He seems to be a bit focused on glass effects, though. And his blog is in english, so good for you. 

Good boy Johannes, who is just like me, long-haired and changing his blog URL quite frequently, is very ambitious: he’s doing a game engine in C++. He points out what he’s doing very detailed in his new blog at mumpitz.p-shuttle.de. Unfortunately, it’s in german.. 

Käse ( best nickname ever, means just “cheese” ), who just got married, congratulations, creates some musical visualisation using Process. Read about it here. He’s not updating it too frequently, but the stuff present, especially the preview movie are quite amazing.

These are only the projects of the three guys I’m talking to frequently. I don’t have one so far, but I’m on it, trust me!