Archive for November, 2008

Impressions from the iPhone Tech Talk in Berlin (kind of)

Tuesday, November 11th, 2008

The bad news is, Apple needlessly slapped a “confidential” sign across the tech talk today, so nobody is allowed to write anything about it or post any pictures.

I think I can nevertheless write some thoughts I took away, without giving away anything about the content of the sessions. So what I write might have been inspired by the lectures, or by something completely unrelated, like surfing a web site or talking to people.

Some things to know first: I left early because I got bored, so I missed roughly the last two lectures. Also, I don’t have an iPhone myself yet, and my friends would perhaps even describe me as an Apple hater. I really don’t like Apple’s restrictive policies, and I don’t even like OS X, but that is a story for another post. The iPhone is nice enough to make me overlook the general flaws of Apple. For one thing, I gave up on mobile games development with Java because it became too tedious to support all the available devices. The iPhone is one device (OK, strictly speaking three: old iPhone, iPhone 3G and iPod touch) that has sold several million times, making it possible to develop useful applications targeted at one device only. And Apple really got a lot of things right, I don’t think any other phone comes close in usability.

If I don’t have an iPhone yet, it is because I don’t like the conditions of the T-Mobile Germany contracts. Specifically the UMTS bandwidth limitation seems silly, since the iPhone makes it possible to surf normal web sites. So I would expect the T-Mobile bandwidth to be consumed rather quickly.

Without a doubt, a lot of fun can be had with the iPhone, and a lot of fun applications already exist.

What follows is mostly me venting my frustration about having to use Objective-C. I had to say it somewhere… It is not the only thing I took away from the tech talk, but it was a tech talk after all, so you can guess about the main topics. I had a nice idea for a possible iPhone app while dozing in the lecture, and I also met some nice people, so going there was not all in vain. Oh, and I got a T-Shirt, too.

Objective-C, the strange beast

My main gripe, however, is the programming language. Most people I talked to say that it is not so bad, but my programmer instincts make me shy away from Objective C for several reasons. Granted, most of them probably sound like nitpicking and my objections might make me seem petty. But I have become a programmer out of laziness, and so I absolutely can’t stand it if a programming language is making me do stuff that isn’t necessary.

Header files (Shudder!!!)

Objective-C seems to be a strange beast: on the one hand it apparently is “fully dynamic” (Apple speech), meaning among other things that methods are not statically linked at compile time. On the other hand it borrows from C and C++, with ugly pointers cluttering the code, but much, much worse, forcing you to write header files for your classes.

I am not a language designer, but for the life of me, I can not get these two aspects combined in my head (dynamic linking and header files) – either one feature seems to make the other one pointless. Dynamic means you can modify classes at runtime, so what is the point of the header files?

I have programmed in languages without header files for 10 years now, so I can confidently say that there is no excuse for header files. I think they only exists because of the laziness of the developer of the compiler. But then again, those guys had several years to improve their compiler. What is up with that?

For the non-programmers: a header file basically means that I have to program every object and method in my program twice. Once to tell the compiler that it exists, and once to actually implement it.

It is certainly not difficult, but just as certainly it is not fun. For someone with my condition it becomes very difficult to do because I generally have a very hard time doing things that I see no point in doing.

No garbage collection

Another gripe is that Objective-C for the iPhone does not have garbage collection, so the developer has to take care of erasing objects by himself. Curiously, many people I talked to seemed to agree that this makes sense for a mobile device, because resources are so limited. Well, it seems the recommended maximum memory consumption for an iPhone app is 25MB. I have developed games for mobile phones in Java that had only 800KB available as runtime memory, with garbage collection. No problem whatsoever. A slightly more plausible explanation: garbage collection usually runs in a background thread, and having that thread constantly running might consume more energy. But honestly, I don’t believe it, that is just a weak excuse.

Also, you don’t even manage memory directly in Objective-C, but you have to manually take care of the reference counters. This makes even less sense to me, because I don’t think that is what makes garbage collection difficult. Rather, I would expect counting the references to be compiled into the executable. There might even be garbage collection going on in Objective-C, something still has to free the memory when the reference count has reached zero, after all. Again, this just reeks of laziness on behalf of the developers of the compiler.

Maybe inserting the reference counting into the executable would inflate the memory footprint marginally, but honestly, these days the size of the code is never the problem. Most memory is consumed by the data, for instance images that are being loaded by the application.

Hungarian Notation (Shudder!!!)

One more unbearable thing I have seen in code snippets from Apple: it seems it is customary in Objective-C to use the useless kind of hungarian notation. That means it is customary to call a widget UIWidget instead of Widget, because it belongs to the UI. Joel On Software has the ultimate essay on hungarian notation and how it should be done, mandatory reading for every programmer in my opinion.

Again, this might sound like a non-issue, but it makes me feel almost like the heroine of William Gibson’s “Pattern Recognition” upon seeing the Michelin Man: it is almost as if I am psychologically allergic to this ugliness and extremely bad taste. It sounds innocent if you see just one line, but imagine thousands of lines of code littered with hungarian notation. It is unreadable, unless you train your brain to just not notice it. But why should I have to do this to my brain?

More ugliness

I have mentioned the pointers, something I also haven’t seen in years. Going back to using pointers makes me feel like coding in the stoneage, and they also look ugly. In the same category as the header files fall the interfaces (forgot their real name, but they work exactly like the interfaces in Java). I see no need for them in a dynamic language, so please don’t make me use them. At least possibly one really can get away with not using them, I don’t know for sure.

Hope in the form of alternative programming languages?

Which brings me back to my original gripes with Apple. Is there hope of relief in the form of alternative programming languages coming to the iPhone eventually? Apple certainly hasn’t leaked any plans, and worse, they officially outlaw interpreters of programming languages. The reason is clear: with an interpreter of another programming language (for example a Java virtual machine), people could circumvent the Apple AppStore and get applications from other sources.

This alone does not prevent other languages, though, at least I don’t think it does. I think it would still be legal to use an interpreter just for one’s own application, without exposing it to other applications. Or one could use another language that compiles to Objective-C. One such language seems to be Objective-J. Still, I think the rule against interpreted languages at least slowed development efforts for alternative programming languages for the iPhone.

There are rumors that there will be an adapted (=restricted) version of Flash eventually, but it is not yet clear if it will be possible to write iPhone applications with it, or if it will just enable web sites.

I have found a Lua bridge to Objective-C, but it doesn’t sound as if the iPhone is supported so far.

Personally I still have some hopes for Javascript. There already is a Javascript interpreter in the iPhone, coming with Safari, that can also be instantiated from within an iPhone application. I don’t know yet how much one can interface with the usual iPhone features from Javascript, and if it is possible to run Javascript without actually displaying the WebView (Safari/WebKit). Most people I talk to about this are of the opinion that one should write iPhone Apps in Objective-C to get to use all the fancy features, but I am not fully convinced yet. I hope at least for some apps on can get away with Javascript (obviously not if you are writing a 3d game), so it might be sufficient to get one’s feet wet in iPhone development. Even just to be able to write some parts of the application in JavaScript would be a relief.

Meanwhile, I keep hopes for finding alternative languages for iPhone development. Please let me know if you find any. I probably won’t use Objective-J, though, because it seems too proprietary for my taste. If I learn a new programming language, I want it to be as universally useful as possible.

Ultimately it is the end product that matters, of course. I have programmed in the Linden Scripting Language for Second Life before, which is the crappiest language I have ever seen. Nevertheless it was fun, because the things you could achieve with it were so much fun. Probably it will be the same with iPhone development. Once I really get started and get to see results on the phone, Objective-C won’t feel so painful anymore. Still, I wish there were other options. Options makes me remember: I have also heard people say that XCode is not all that great either, and apparently it is not so easy to use alternatives. Too bad.

Community Camp 2008 in Berlin

Sunday, November 2nd, 2008

Thanks to the Deutsche Bahn, who cancelled my trains to Munich that I wanted to take this weekend, I got to attend the community camp 2008 in Berlin instead. Basically, the community camp was like a Barcamp, but with a special focus on (online) communities. (Of course I also got to attend it thanks to the organizers who made it happen in the first place – a big thanks in their direction, it was great!).

It has been over for almost five hours now, but somehow I feel like I can’t think clearly at the moment. Since I can’t do any other work, I’ll try to gather some impressions from my notes and jot them down for the blog. Andreas has also written about the last session we attended, mobile communities.

I’ll try to be briefer than with my Barcamp Leipzig recollections. The main effect of barcamps on me is to fill me with all sorts of ideas, that might not even be directly related to the sessions I attended.

A/B testing for websites

The first session I attended was about the site relaunch of friendscout24 and how the used A/B testing to increase their conversion rate of new users by 10%. It was interesting to see an example of applied A/B testing. They used a tool called “Optimus” (apparently not exactly cheap) to automatically test variations of images, texts and structure of their start page. Optimus automatically finds the best combination. For example, allegedly the image on the start page did not make much of a different (variations like blond woman, dark haired woman, couples, romance, etc.) in Germany, but a huge difference in Italy.

It got me thinking about ways to integrate A/B testing into existing web frameworks like Ruby On Rails. It is a bit of a pity to have to resort to an external tool, if you know in advance that you’ll need it anyway. Maybe a lot of time and effort could be saved by integrating the possibility of A/B-Testing from the beginning.

Tchibo Ideas

The next session I attended was a presentation by the Tchibo Ideas page, an attempt at crowdsourcing ideas for new products that Tchibo could produce and sell. This interests me greatly, because there is hardly a product that I am fully satisfied with. I constantly wonder about processes that would enable “common people” to affect the products they can buy. I find it very frustrating to own a faulty product and not be able to do anything about it (sadly, the odds that the producer will listen to my complaints are very slim).

Personally, I have great hopes for Rapid Prototyping in the future, which means that hopefully people can produce the things they want in the form of Open Source Hardware. Open Source Hardware means that everybody can change the things they annoy him. It already works for Software – personally I am a Linux user because in many ways it supersedes other operating systems. But for non-programmers, it is still too difficult to change anything about Linux, so it is more tailored towards geeks (oversimplified – actually Linux is already very good for non-geeks, too). So it is very interesting how to make it easier for everybody to improve the products they use by themselves.

But I disgress – to my disappointment (but also relief, because it means I can still become a pioneer in that area), Tchibo doesn’t offer any special tools for ideas shaping. They offer the basic features you would expect: people can propose “problems” and “solutions”, that can be rated by the community. Similiar things were already seen at Cambrian House among others (famous examples include Dell’s ideastorm or Ubuntu brainstorm).

Usually I am very wary concerning creativity competitions where you might end up giving away your idea for a couple of hundred € (I think the most you can win at Tchibo is 10000€), because I fear the other party might make a whole lot more money from my idea. However, Tchibo seemed surprisingly fair – I am not sure if the option still exists if you submit an idea the normal way, but you can also opt to submit your idea to Tchibo privately first, in which case they evaluate it and secure all kinds of rights for you. They might end up producing your idea and giving you a share, which is the way it should be.

Also, it might be worth considering that even if your idea is potentially worth a lot of money, if you were never going to realise the idea, a couple of hundred bucks might still be better than nothing.

Also Tchibo wants to include the designers in their marketing campaign, that is, their picture might be on the final products and so on. Of course I can’t vouch for them (check out their terms for yourself), but it really sounded as if they were genuinely trying to be fair. I signed up for their service, even though reception in bloggerland was mostly bad – I think a lot of prejudice against Tchibo, but who knows.

A bit disappointing: most “problems” and “inventions” on Tchibo Ideas so far are really unattractive, for example when I checked yesterday somebody proposed a device for cutting spaghetti. For me, such a device is an abomination. There is already so much useless crap in our world, that I think we are doing a better deed by reducing the clutter in our households than by adding to it with luxury junk. On the other hand, maybe I should really get some of those clips for washing socks, because I truly hate sorting socks. (I plan to build a Lego Robot for doing that one of these days, but who knows when I’ll find the time – the clips are an easier solution).

I had to leave early on Saturday, so I missed out on a couple of sessions and the party. Although that reminds me, one big inspiration from the community camp and also the recent Barcamp Berlin: BEAN BAGS! They had bean bags (provided by CrownCrow), and it was a good reminder about how comfortable they are. I must get one eventually (Andreas recommends checking out the bean bags from Muji).

Support for communities, example “wer-weiss-was.de”

Impressive track record, apparently wer-weiss-was.de have been operating for 12 years now. To put that into perspective, according to Wikipedia the Mosaik browser by Netscape was released on October 13, 1994, marking the beginnings of the usable internet.

Anyway, they told some stories about their experiences with maintaining and supporting a community. I took away the recommendation of a tool called “OTRS” as an open source ticketing system, and got the idea to use Amazon’s Mechanical Turk for some moderation task (for example checking the safety of uploaded images). A lot of discussion was about the volunteering moderators. A recommendation for reading was A Group Is It’s Own Worst Enemy, but I haven’t read it myself yet. Another thing that might be worth considering is Slashdot’s fully automated moderating system, that assigns moderator powers and meta-moderator powers semi-randomly to it’s users. It might be too complicated for non-geeks, though.

Weltverbesserer-Communities (safe-the-world communities)

Next up was a session about communities that want to help making the world a better place. Again I have a special interest in that, not only because I would like to help make the world a better place, but also because I have proposed such a project at the StartupWeekend Hamburg last year: Debug The World. I would still be interested in doing that one of these days…

Unfortunately the session left me a bit unsatisfied. I jotted down a lot of links to existing “save the world” communities, but learned little about their inner workings. Ideology was a topic, but again little was learned on how to keep the ideologies on a site in check.

I felt reminded of a recent sociological experiment that showed how it was completely random what piece of music would become a hit, if users get to see other users preferences (Update: found article describing it, among other things, search for Salganik). The same could happen with a newly launched “save the world” site: the ideology of the first users might repel other users, so you are stuck with the ideology of the first users.

Ultimately I guess if you launch such a site, you have your own ideals, and will try to steer your community into that direction. I would not want fascists to use my tools to plan for their own idea of a better world, for example.

I am currently too lazy to copy all the links that came up in the session, so I can only hope sombody will eventually update the Community Camp Wiki. The speaker was working for Utopia.de, and I think two founders of Weltretter.org were in the audience sharing some interesting experiences. I wish them luck with their efforts…

Managing friends in social networks

PaulinePauline hosted a session about managing one’s friends in social communities. From the subject, I was hoping for something else: how to find new friends in social networks. Sometimes there are interesting web projects that I can not use for lack of participating friends. I have written about Twitter, another example would be Google Reader. I am curious about the sharing of blog articles among friends that Google Reader provides, but I can not benefit from it because I don’t know anybody else who uses it.

Pauline was talking about another problem, though: how to maintain your friends lists across social networks, and do’s and don’ts of the friend search in such networks. A major gripe is seeing immediately who you are already friends with in search results, but also being able to check out somebody’s profile from within the search results without having to leave the results list.

A nice touch is to use special information, for example “people that have many friends in common with you” or “people who have attended the same events as you”.

Discussion also touched possible solutions to the multi-account problem. Some networks already offer to import your friends from other networks. It seems quite feasible to attempt to copy someone’s friends from Twitter, for example, as many people show their real name in their Twitter profile. Another nice touch is to just assume a user is using the same username everywhere.

On the other hand, admitting to knowing too much about a user might creep them out. For example, it is possible to discover a users rough location by analyzing their IP address, but showing a user “people online near you”, many might be shocked that their location is known.

Another nice touch: Facebook for example tells you to connect a new user with some friends, if you invited them to the network. That way, the new users have an easier start.

I also had the idea for a service that registers your username on all new social networks. A problem could be that people could use the service to squat on usernames (like domain name squatting).

Mobile Communities

The last session I attended was the second part of a session that started the day before (which I had missed) about mobile internet and mobile communities.

Some tidbits: automatically logging one’s status might lead to a couple of problems. For one thing, if you suddenly stop logging (for example your location), it might arouse suspicion (jealous spouse). But even though, for example I would be a bit confused if I saw a friend was visiting my city and didn’t even call me. Or somebody is online at ICQ and doesn’t chat with you. Another interesting aspect: people like to start conversations from trivial things (like bad weather). If you already automatically log all trivial things automatically, you might take away some possible conversation starters. For example, you might not call a friend to say “hi, I am in Berlin” if your phone has already automatically logged the fact.

Qype was mentioned as a solution for discovering cafes nearby while on the road, but I am not sure if it can also filter for individual taste, which would be more community like.

I am interested in seeing product ratings on the go (for example by photographing a barcode of the product with my phone), and Kooaba was mentioned as an image recognition technology that might even make barcodes unnecessary. I was also shown BdSave$, which is apparently a product ratings app for the iPhone.

Talking about “augmented reality” was also interesting, Google Earth already recognises if you hold your iPhone vertically and switches to a horizontal viel of the location around you. So in the mountains, it might really be possible to see names above the summits of the mountains around you. And presumably, soon this technology combined with Google Street View will allow for advertising in the augmented real world.

That’s it for now…