Diaspora social fu, why it’s too early to be enthusiastic

Hey. It has been some time, but let’s blog again.

Diaspora, the self-claimed privacy aware, personally controlled, do-it-all, open source social network. let’s examine each of those ambitious claims one by one.

Privacy aware. The question here is really: can a network be privacy aware? Is an infrastructure even able to make such promises? As long as this promise is just written, it makes only little sense to me, as privacy is most often not a question of the protocol or idea running a service, but rather of it’s implementation and mostly dependent on its users.

Personally controlled? Facebook is also controlled by it’s users. The problem is actually not control in the net itself, but control towards additional use of your data, e.g. for advertising or some other third party stuff. Again, a protocol or idea won’t be able to change that problem. Just by allowing a net to be just that, there is still a considerable chance of data being accumulated by one provider, like facebook, again. And, as long there is some data concerning you on a database server that is not exclusively administrated by you, your data is not personally controlled.

Do-it-all. I’d rather not comment on that one. But that’s what it is about here. Do-it-all. If it sounds too good to be true, it’s not. Doubtlessly, those smart guys are ambitious and gifted ( at least concerning PR ), but do-it-all is a bit.. over the top. Small steps. Just develop one application, show it, next one. It’s okay and cool and I really appreciate that the protocol can be used for anything, but that also implies complexity. And time.

Open-source. That’s just fine, but at the moment, it’s not. Neither the sources they’re working on, nor the protocol, which is, of course, the more interesting part, are available anywhere. Being a programmer myself, I really understand why the project source is not available at such an early development stage, but it’s crucial for this protocol to become published, even in an early version, as soon as possible.

The protocol, the heart of diaspora, is what invites other people to read and study it. Which may have some desirable consequences: I’d like to build a diaspora node, for example. And I’m pretty sure some other people like to as well. But even more interesting are the ones analyzing it from e.g. a security perspective, commenting on it’s scaling ability or just throwing in new ideas?

Diaspora is fine. I really respect the guys running this project, they are doing a great job, right idea, right time, nothing more powerful. But still, they should really take their time to consider changing some things. Let’s create a google group, let’s share some technical details with the ( really interested ) mass, let’s communicate.

Google Docs Privacy, Latex knowledge, project update

Hey! I haven’t been writing here in a while, so let’s have some updates.

First of all, I noticed something Techcrunch was also writing about some time ago, that google doesn’t protect embedded images in private documents in _any_ way. So basically, everything you upload there can be treated as public.

Next thing, latex, the typesetting system, seems to be stuck in a time where character encodings where something rather bizarre, and for that reason has it’s share of problems with it. There are packages, like utf8 and utf8x to work around this issue, but it’s not perfect. What I’ve experienced, a strange error message telling me that

Package inputenc Error: Unicode char u8:  not set up for use with LaTeX.

And my way to get around it was to simply add the packages ucs besides utf8 to the preamble..

usepackage{ucs}
usepackage[utf8]{inputenc}

and everything is working fine now. great.

Last topic today is a project update. What’s going on?

  • A virtual keyboard for android with some nice effects, I’m doing this one together with Marc Seeger.
  • I just participated in the foundation of the Google Technology Usergroup Neckar-Alb ( A region in southern germany around Stuttgart ), and we hope to be able to provide the community here with some cool events in the future! If you want to participate or are just curious, be sure to check out our twitter.
  • I’m currently also writing a paper on distributed contact management, a really interesting field, stay tuned on that one.
  • Some hacking involved, but nothing releasable actually.

If you want some nice reading, I can really recommend two papers: the first one is on API design, and some kind of a .NET-rant, it’s called “API Design Matters” and is written by Michi Henning. The other one was written by Marc Seeger and is a practical overview of available Key-Value stores ( applause for NoSQL ). Get it on his blog.

The next weekend I’m going to spend in Hamburg, really looking forward!

La Fonera 2n – Hands on, darling

La Fonera 2n – Hands on, darling
Since saturday, I’m sick lying in bed and keep trying not to annoy my girlfriend too much ( well, not that successfully i suppose ). Anyhow, I ordered a Fonera 2n last week, and it happened to arrive today. So after some unboxing ( UPS packaging materials can be so turbo-time-consuming ) and several cups of tea, I swapped the old and the new fonera, expecting everything to work.
It didn’t. I took a while to figure out that the F2N is a bit picky when it comes to connecting to the router that provides it with a vital ip-address and connectivity. But after some tries, it worked, and it’s really working well.
The first convinience is that you can instantly connect to your new Fonera through cable or WiFi using an actual domain name ( fonera.lan ), not some ugly ip. This feature is, of course, nothing substantially new, but it’s cool.
Next thing: Coooool web-interface. Just the way I want a web-interface to be, clean, well-structured, decent color-scheme ( see the screenshots ) and speedy. The navigation is simple: The so-called dashboard serves as an entry-point, and on top you can find a listing of all applications currently installed on the tinytinytiny internal flash memory. Below that, there is a seperate box featuring built-in features like Settings, File Manager ( later.. ) and UMTS/3G connectivity.
Of course, there are more applications that can be installed easily, also through the web-interface, like a printer-sharing extension, that let’s you use a printer that is connected to the external USB-port. Nice!

Since saturday, I’m sick lying in bed and keep trying not to annoy my girlfriend too much ( well, not that successfully i suppose ). Anyhow, I ordered a Fonera 2n last week, and it happened to arrive today. So after some unboxing ( UPS packaging materials can be so turbo-time-consuming ) and several cups of tea, I swapped the old and the new fonera, expecting everything to work.

It didn’t. I took a while to figure out that the F2N is a bit picky when it comes to connecting to the router that provides it with a vital ip-address and connectivity. But after some tries, it worked, and it’s really working well.

The first convinience is that you can instantly connect to your new Fonera through cable or WiFi using an actual domain name ( fonera.lan ), not some ugly ip. This feature is, of course, nothing substantially new, but it’s nice to have.

Next thing: Coooool web-interface. Just the way I want a web-interface to be, clean, well-structured, decent color-scheme ( see the screenshots ) and speedy. The navigation is simple: The so-called dashboard serves as an entry-point, and on top you can find a listing of all applications currently installed on the tinytinytiny internal flash memory. Below that, there is a seperate box featuring built-in features like Settings, File Manager ( later.. ) and UMTS/3G connectivity.

Of course, there are more applications that can be installed easily, also through the web-interface, like a printer-sharing extension, that let’s you use a printer that is connected to the external USB-port. Right, there is a USB-port, prominently featured on the front of the device, in fact the only port there. This indicates that USB is more seen as a end-user business rather than belonging to the admin’s ( or whoever is doing the job ) domain. This is an interesting point of view, and given the nice administration UI and the easy-to-use applications featured there, it is also reasonable.

But this USB-port is more than just a simple USB-port, because contrary to many other routers out there, the Fonera2n is sold with the remark that any number of USB devices can be connected ( of course via a hub ) to that port and serve you remotely. These devices include webcams, audio-interfaces ( I found a working one for 10€ in a local store ), printers and, of course, mass storage devices. So, if your ambitions are not too sophisticated, this tiny little box could be everything you need, with a power consumption that is assumable way below anything you might have.

It’s really simple, once your disks or flash sticks or whatever are connected, you are free to access them using the smb-protocol, a de-facto standard supported on most platforms. There are guides explaining how to use the Fonera as a budget Time Capsule replacement, which is also very handy, and using fast WiFi, chances are your Mac’s content will be backed up that century.

But the first impression also features some not-so-cool things, like the random connection losses I experienced over WiFi. This is especially nasty while running huge downloads over night. Of course, once reconnected the download continues, yet I’m not the one that gets up every two hours just to check the connection. Not yet.

Summary? The best you can get, in my opinion. It’s not only a full-fledged router, 4-port ethernet switch and 801.11b/g/n access point, it’s also perfectly capable of hosting tons of data and acting as a print server. It downloads your torrents and uploads your videos to youtube, so, what do you need more?

And oh yeah, the webcam module features motion detection, which is the most cool and unnecessary feature of all.

Business ideas: Which is the right one?

Honestly, I don’t know. But from what I can tell, the ones solving problems people have, even if they were not aware before, are the ones working. The other ideas usually don’t. What are problems worth solving?

I’d define a problem worth solving as something that has 3 attributes: It is persistent, in a sense that it reoccurs too many times, that it has an impact on some activity or workflow. That is something worth resolving. Another point is the “factor of annoyance”. Remember the  Microsoft’s Paperclip? High factor of annoyance. One dialog asking for a bit of love in the form of a ok-button? Not that annoying. But keep in mind, that’s all a very subjective rating. So if you find Dialog Boxes more annoying than speaking Paperclips, just change the order accordingly.

The third factor is the most important one: the Time spent working around. The attributes mentioned above may be pointless if it takes no time to work around the issue. If something takes a serious amount of time to be worked around, solved, corrected or understood, it’s time to do something. Recently, GMail and my Mac synced. The result was a Address Book disaster. Time to correct it: 3 hours. That’s a problem.

Anything that’s built to return money should solve a problem or improve something. Anything else? Naaa..That’s my point. What is yours?

Finally: ActiveResource with Service Discovery and Authentication

Yay. In case you’re looking for a release, there is none. Not yet, we are maybe going to release one, but it’s a question of time rather than a lack of good will.

Why. In my current position, I am building a set of applications ( most of them rails based ) communicating with each other in a RESTful manner. This is, well, just continue reading my ActiveResource rant here. It’s not really nice to use the official ActiveResource thing. It’s a lot of hardcoding ( e.g. you have to set the remote service’ URL in the model, not in some kind of configuration file, which makes switching from development to testing and production a pain ) and other shortcomings. It’s a good idea, yet far from being perfect. And the two things that bothered me most were service discovery, meaning, the easy ability to resolve a service by its name than by its url, and authentication. Both of them are crucial for a system exceeding the hello world boundaries. That is, what I’m doing. So, utilizing all of Ruby’s beauty, a) a Rails plugin was developed and b) a standalone Server acting as a Central Authentication Service and Service Discovery instance. And from what I can tell, it’s beautiful ( not the codebase, at the moment, but the functionality ).

What is this thing able to do? Well, for the simple parts, it handles all your authentication needs. No more password juggling, just do it in one place, and nowhere else. OpenID compatibility is on the way, both as consumer and provider. It’s nice to have this kind of functionality by only installing a plugin and create a before_filter.

The next big thing is the service discovery. ActiveResource wasn’t used as an entry point for customizations, it was HyperactiveResource. I extended it to provide the ability to connect to the above mentioned central instance ( the address of this instance is defined in a configuration file, by the way ) to retrieve a services’ address. A simple thing, yet it makes life so much easier.

Is there a clue? Yes. Bundling the two features above, you are able to allow and disallow communication between two services at your will. Bidirectional, so assuming you do have an E-Mail-service and an AddressBook-service, you now can allow the E-Mail to access your AddressBook, without allowing the other direction. Authentication is handled completely transparent to the developer, and the rest of the usage is like HyperactiveResource. Just a charm.

And for me? Fun is back :-)

Whihyhhaha: Android Native Development Kit released

As of yesterday, there is a Native Developer Kit for Android available. This came as a surprise for me, as there were not many rumors covering that topic, but regarding the broad coverage on the iphone 3gs lately, and most of all it’s amazing speed, Google certainly had to do something to keep Android in the game.

So this is, from my point of view, a very much strategic decision, placed just at the right time. Android’s finally deployed to a number of new devices, not only by HTC, but also Samsung and other vendors are now adopting it. So after this first hurdle being taken, Google realized that there is more to mobile devices than PIM functionality and a browser, plus some location based gimmicks. Games are a massively growing market inside the mobile universe. And they want to have a part of that cake, but without a Native Development Kit and the ability to interface graphics directly from real machine code, the speed impacts induced by using a Virtual Machine to execute code are still too high for big games. Can I prove it? Well, no need to, to cite google here:

In a future release we hope to support linking with OpenGL ES and audio libraries, which should enable high-performance games.

By releasing this kit, Google finally opens Android to all those people not willing to write Java Code that perfoms well ( which is not the way Java is handled anywhere else ) and let’s developers to the optimizing of raw code themselves. I’m really looking forward to seeing some of the results.

Using ActiveResource in the wild

My last posts haven’t been quite technical, and they haven’t been quite recent too- I’m sorry, yet I just don’t have time. As a brief follow-up: it has been overwhelming in San Francisco ( except for the 300$-dentist bill ), and I’m so looking forward to coming back.

And, tada, I’ve been spending the last few weeks just entering Rails ( a Ghetto? maybe ) a bit more than I did before. As always, there are cool things to tell. And not so cool things, too. Start with the good ones.

Rails has proven to work extremely well in pre-production mode. No framework-sourced flaws, bugs, whatever. Just nice, and with some caching-salt, speed hasn’t been an issue, in contrast, it has been amazing.

That’s the good part of it. The bad part is that Rails claims to be capable of working in a distributed environment, providing services ( they don’t call them Web Services anymore ) addressable via REST ( buzzzz ) over HTTP, of course. Well, that’s not quite true. If you stick with the example given in the docs, and are in fact happy with a remote object capable of experiencing an unauthenticated change of some first name, this is nothing but true. But when it comes to some other features, e.g. associations or caching, one question came up: are they serious?

Let’s do some demos. In case you want to include objects of a has-many relationship, the way of choice is ( according to the ActiveRecord::Serialization docs ) either to call to_xml with really ugly parameters ( such as @ship.to_xml :include=>[:passengers, :sailors ] ) in a non-dry manner or to override to_xml, both not being exactly Rails-like, ugly, hard to maintain and only loosely coupled with real-world requirements.

The other part, the consuming part where ActiveResource is indeed responsible for handling everything, has been consequently kept free of useful stuff. This could on the one hand be a pro for people hating Rails’ magic, but it’s just quite far away from being usable. And it has nothing in common with the way ActiveRecord behaves. Any options? Sure.

At the moment, I’m sticking with HyperactiveResource, the funniest named plugin ever. It extends ActiveResource to play a bit more nice, yet it’s not the ultimate answer, but a great extension, still. If you’re into some serious Rails stuff with some distributed thingies, you should give it a try.

So what’s missing? The feeling to work with something that has been designed by someone who actually uses it doing more than changing first names. I’m really disappointed by having to deal with the framework, something I wasn’t used to with Rails before in that intensity. And while Java EE may be a pain, for distributed stuff, it’s still a very good way if you need reliable and consistent, proven-to-work solutions.

In my next post, I’ll talk about my android experiences so far. Love it :-)

Web Development and MVC: a pain somewhere, cont’d.

Our beloved model-view-controller pattern seems to act as an excuse for every damn web-framework out there. Yet there is one problem. From my point of view, no framework to date has ever managed to slice a web application in a useful way. Really. Why?

First of all, it should be clear that patterns just like MVC can’t be adapted without major changes from desktop environments to the web. Why? Well, desktops are a safe harbor compared to every browser. The Operating System provides resources, screen estate, some kind of event handling and the promise that once you build your app around a certain system, it will work there. Of course this is the major drawback of desktop applications.

Web Applications are not built for just one system, they are mostly built with the target of total platform-independence. Including that nothing can be taken for granted, just like screen estate, resolution, browser software etc.

And then there is this huge limiting factor called HTTP. HTTP is a simple, beautiful protocol that does a great job for what it was designed. That is, delivering web pages, stateless, happiness. Which introduces just a new detail that clearly seperates desktop from the web, the web just doesn’t know anything about state. Once a server delivered a page to you, he just doesn’t care. Really. We introduced sessions and stuff, yet, there is this design-based limitation, and for the time being, we’re just working around this limitation, whereas desktop applications are stateful: ever heard of RAM?

So the problem we are actually facing is that all the well-engineered patterns of the desktop world just can’t be adapted. Sorry. There maybe certain areas where the impression of adaptability may occur, yet these impressions vanished as AJAX appeared.

Why? The traditional web-application, let’s call it Web 1.0, was based on that well-known request-response-leavemyalone cycle. Maybe some session sugar enabled a stateful behaviour, whatever. And we had a way to adapt MVC: put everything that is persistent or part of the “business logic” in a Model-Class ( aka bean ). Go ahead and search for your embedded html. Try to put in a seperate file, and tell all your geek-friends that it’s the view. And finally, the glue was the controller. And yes, it worked out really well. That was then.

Since the unfortunate launch of GMail everything has changed. There is no longer anything like “impossible”, since someone clearly demonstrated that virtually no restrictions in terms of usability and functionality exist.

Again, from my point of view, Google just didn’t reinvent the wheel, they just used available techniques in a new way.

So, with all this “new” technology, web application creators were forced to adapt, which led to a wide variety of 1) AJAX-Frameworks like Prototype and JQuery 2) Smart helper functions for server-side components to hide away the fact that none of them is able to encapsulate that new technology beyond some well-designed layer of abstraction.

Welcome to my world. I’m doing web stuff daily. Someone even pays me for doing it. But I’m really, really frustrated. There is simply no single well-designed framework, enabling me to really focus on what I want to do, not on how.

Today, business logic isn’t the problem. There are some very good approaches making it a breeze to brew out even complex logic.

But there is still too much code here ( in my repositories, maybe I’m just doing wrong ) that’s just dealing with requests. But the amount wouldn’t be a big deal, since the average linecount already dropped massively over the years. The problem is that there is absolutely no beauty. Nada. No language can hide, not even Ruby, that it’s ugly to deal with requests on a per-request level.

I don’t have a solution, though I’m thinking about it a looottt. And that’s just my opinion, expressed in some kind of english. And I’d really appreciate any single comment.

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.