Archive for the ‘Computer Science’ Category

APT, the app store for geeks

Wednesday, February 3rd, 2010

Whether they loved it or hated it, all reviewers of the iPad agreed that usability of “normal” PCs for average users is atrocious. And I have to agree: whenever I take a look at the PC of a friend or relative who is not a “computer freak”, they are always riddled with spyware and malware or at least ladden with useless software that draws away time and energy of the user (examples are “Toolbars” like the Google Toolbar or the Yahoo Toolbar). This is not only because they might have downloaded or installed bad software from questionable sources, but because even vendors or seemingly trustworthy businesses have no qualms to sell their customers. Usually a new PC is already messed up by the software the vendor has preinstalled. If not that, then the new gadget (camera, navigation system, whatever) might come with crappy software.

But I don’t want to rant about the various ways today’s PC software and hardware vendors mess up the PC experience. The point is, by many reviewers the iPad has been hailed as the savior from this hell of malware and overly complicated software. What I want to mention is that the “geeks” (computer savvy people) have actually been aware of this problem for a long time, and they have invented a solution long before Apple’s App Store. It is called APT.

APT is a front end to the package managers of some Linux distributions, most notably Debian and it’s derivative Ubuntu. By using it you can install software from a trusted repository of open source applications (trusted because it is open to peer review). It is not the only way to install software on these Linux systems, but usually if you opt to install software from another source, you end up feeling slightly icky and dirty, as you should.

To avoid icky spyware, malware and so on, just stick to the official repositories of your Linux distribution. It is as simple as that - no debilitating iPad required.

Now I have to go ahead and admit that I am not even that well versed with Linux and apt. I know how to find, install and remove programs, and some other internals that are not really important. But isn’t that kind of the point: you can use Linux and apt even if you are NOT a “computer freak”. There are simple front ends that enable you to use it without using the command line. The main difference to Apple’s App Store is that it is still open - using apt is entirely optional, but recommended.

Of course, things on Linux don’t always run as smoothly as with a Mac (although I have whole lot of things to complain about with Macs, too). Not all the software in the repositories is very polished or even bug free. But neither is software in the app store.

As for stability, it helps to look at the hardware Apple has on offer: presumably they only actually sell three or four different kinds of computers (a laptop, which includes the iMac and the Mac Mini which are also based on laptop internals, the Mac Pro, and the iPhone/iPad). Most Linux distributions try to support a far wider range of hardware and therefore are less optimized for any specific piece of hardware. But it would be possible even today to launch computers with a Linux distribution optimized just for these computers. They should have no troubles achieving adequate stability.

Anyway, maybe you get the idea, maybe you don’t, all I want to say is this: the App store model is NOT our only salvation.

The Architecture Analogy For Programming Is Wrong

Monday, August 31st, 2009

Software Development has taken a lot of inspiration from architecture. Seems to build stable buildings, you have to plan as much as possible beforehand. Once things are put in concrete, it is too late or very expensive to fix mistakes and bugs. In analogy most IT companies try to do a lot of planning before sitting down to code.

I believe they might have drawn the wrong analogy, though: the final piece of software is not like the building. The proper analogy for the software is the final plan the architect emits. Building the building is more like then running the completed software on the computer, it happens when the work of the architect is already done. To be sure, while building buildings or running software, you’ll still notice the one or other flaw that you have to fix “on the fly”. But that doesn’t contradict the general notion.

Why does it matter? Because this misguided paradigm is stifling software development and turning it into an expensive and arduous chore. It is very difficult and therefore expensive to plan everything in software development beforehand.

Unfortunately I don’t know much about how architects really go about drawing their plans. There might be some interesting lessons there. To be sure there has to be some structure (a building needs windows, doors, stairs, toilets, …), but I suspect overall it is much more free form and creative than misguided software development. For now I just felt like throwing that thought snippet out there… Please comment.

Creating “Twitter This” Links

Friday, June 5th, 2009

To jump to the link generator directly, scroll down or click here. Note that the form only works on my blog, on blog aggregators the JavaScript will probably be missing.

Nicole Simon has brought to my attention that creating “Twitter This” links is not as trivial as it might seem. I hope to remedy the situation by providing a simple tool for creating such links.

What is a “Twitter This” link? Simply, a link that brings the user to the Twitter page with a prepared status text field. All the user has to do to tweet your prepared text is to click the “Update” button. For example, if you click this link, you should be transferred to Twitter with the prepared status message

A handy form for generating “Twitter This” links, created by @Fractality : http://bit.ly/twitterthislinks

(Following this link does NOT tweet the text, you still have to press “Update”. Why don’t you go ahead and just tweet it - thanks! :-)). It even works if you are not currently logged in to Twitter. After you login, you should also see the prepared status update form. Alas, it does not (yet) work if the user has no Twitter account yet and decides to sign up on the spot. After the signup process, the text is lost (but if the user clicks on your link again, it will then work).

In my opinion, this is the preferred way to encourage users to tweet about you. Many Twitter applications ask for the user’s login credentials instead and then proceed to post in the user’s name. Admittedly, sometimes that might seem more effective because users might not even realize it is happening at first - so they will tweet about you even if they never intended to do so. But I consider it a slightly dirty trick, which might alienate users in the long run. Also, personally I have never given my login credentials to a Twitter app (OK, maybe once or twice, but I regret that now), and many users might feel the same.

How does one create such links? It is rather simple: add a parameter named “status” to the Twitter URL, like this: http://twitter.com?status=your_message, where your_message is your message. The minor issue is that your_message has to be URL encoded. That means certain characters in the message have to be escaped, for example “<” becomes “%3C”. Most programming languages have utility methods to do this. For example you could simple paste the following snippet into your browser’s URL field and press return:

javascript: encodeURIComponent('a text that needs encoding');

(except you have to be careful about ‘ and “, so that approach is not 100% failsafe).

To make it easier for you, I have created a simple form for creating such URLs. Enter the text you want to be tweeted in the “Text To Tweet” field. In “Link Text” you can enter a text that should appear as the name of the link. If you then press “Create Links”, the “Twitter This URL” field should contain the “Tweet This” link. For your convenience the “HTML Link Code” field contains a full HTML link element you can Copy+Paste into your web site (make sure you copy all of it, I recommend right clicking into the field and choosing “select all”). “Link Preview” shows you how the link should look on your web site.

Finally, if you liked this post and/or find the link generator useful, please twitter this. Also follow me on Twitter @Fractality.



“Twitter This” Link Generator

Link Preview:  


A big problem with OpenID: phishing

Friday, January 9th, 2009

Hopefully I won’t embarrass myself too much with this post, because I haven’t really researched the ins and outs of OpenID. From using it a couple of times I got the impression that the concept has a big flaw, though.

Usually what happens when I try to sign up to a site with OpenID is that the site forwards me to my OpenID provider. Then I have to login to that OpenID provider’s site and confirm to the OpenID provider that I want to login to the original site.

And that is the problem right there: some random site of the internet forwards me to my OpenID provider, where I proceed to enter my login credentials. That is a classic phishing scenario.

How can I be sure that the site I am being forwarded to is really the site of my OpenID provider? Phishers are experts at mimicking other sites. They could forward me to another site that looks almost the same as the site of my OpenID provider. Often this is done by slightly misspelling the name of the site, in some cases the name even looks the same because there are different letters in other languages that look the same, so it is impossible to spot the difference.

There are some mechanisms that try to prevent site spooking, such as HTTPS, but I think the reality is that none of them really are good enough. The only way to make sure you are on the site you want to be is to type in it’s url by hand, without making any spelling mistakes (even then it is probably not 100% sure, because the domain name resolution system could also be tampered with - but that is another topic altogether, and I don’t know much about it). For the same reason one shouldn’t click on links in emails, for example if you get a link by (supposedly) ebay to check your auction, that email could be from a fake ebay linking to a spooked ebay that will phish your ebay login.

But I don’t want to educate about phishing, there is enough information about it on the internet already. I just wanted to raise my concerns about this problem with OpenID.

Many might feel that the problem is not really severe, or maybe it is just a problem of the particular implementations of OpenID that I have used. My own feeling is that as web developers we have a responsibility to not encourage dangerous behaviour on the side of our users, therefore OpenID in it’s current form has lost a lot of appeal to me.

One possible way to deal with the problem would be to always stay logged in to one’s OpenID provider and never log in when being forwarded to it. Hopefully if you are already logged in, you don’t need to login when being forwarded, you only have to confirm the authentication request of the original site.

Please leave comments and correct me if I am wrong. Thanks!

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…

Throwaway idea with sinister aspects: SOS pics

Monday, July 21st, 2008

This idea sprang from my paranoia: sometimes I imagine walking down a lonely alley and being attacked by thugs. I wonder if I saw them from the distance and they looked suspicious, would I take some pictures of them? Would photographing them make them think twice about attacking me? On the other extreme, they might get angry and try to destroy the camera, not without hurting me beforehand.

It is probably not a good idea on relying on the ability to take a picture in an emergency situation like that. Nevertheless, since I just ordered a new mobile phone with GPS capabilities, I wonder about using it for a kind of emergency service. The idea is simple: in an emergency, take a picture and send it to a known address. A service at that address will notify emergency services. Since the picture has GPS information embedded, emergency services can find you easily. From the photo, they might get a good impression for the requirements of the situation.

Another possibility would be for existing photo sharing services like flickr to watch out for certain tags. That way the user would not have to remember an extra address for the emergency photos.

Thinking about it a bit more, some enhancements come to mind. Emergency operators could cooperate with phone network providers to call you back and determine your location even if you don’t have a GPS receiver (this could also work for calls and SMS - not sure if it is being done already). With modern mobile phones, it might be possible to make a life video connection to the scene of emergency and have somebody give you instructions through the phone (for example instruct you how to try to revive somebody). It might be useful to have a software and service that already integrates those features - in theory emergency services might be able to call you on your video phone just like that, but without a standardized way, it is probably too complicated in the actual emergency situation.

Sinister Aspects

While I am not sure how useful such a service could be in reality, some possible sinister aspects also come to mind:

  • What if the pictures were open to the public? Some weirdos might be hanging out on the site watching for pictures of bad accidents. Presumably the site would have to be accessible for emergency services only.
  • On the other hand, such a site would be a good source of pictures for newspapers and blogs. Maybe a healthy money could be made, which could be donated to a foundation to support victims that don’t have good health insurance.
  • The worst: what if the service took off and people would start to photograph everything that seems somewhat suspicious. In no time, we would have a very bad police state situation, worse than fascism, were any activity that is ever so slightly out of line gets reported immediately. Not something I would want to be responsible for.

Since it relies on cooperation with emergency service, this idea would probably not make a good startup. But it might be worthwhile to pitch it to the authorities. Working on a contract that goes back to an idea of my own would still be better than working on something that has nothing to do with my interests whatsoever. Also, contracting with the government is probably a very good deal - after all, they usually don’t care about money, as it is only the taxpayers money they are spending, not their own.

Because of the complications, this is another throwaway idea I probably won’t tackle. But I would be interested in your opinions. If you think it might have some merit, I might change my mind about it.

Exploring GeoTags

Tuesday, April 15th, 2008

One thought that excited me recently: the geographical information that is often saved in newer digital photographs via GPS, combined with photo tags on photosharing pages like flickr or just the context of photos, will lead to an implicit tagging of maps.
Probably the information will not be accurate enough to generate maps like “normal” maps from them (that show specific buildings and streets), but surely it will be possible to identify landmarks and other things that are not commonly marked on maps.

For example, I was never sure where or what exactly the “Cote D’Azure” is, so I searched for it on flickr maps, and it already gives me a rough idea of the area. Flickr maps was a bit unsatisfying, though. I suspect they show only a few photos, not all matches. Through the flickr forums I found another service, loc.alize.us that seems to rely on flickr data, but shows a few more hits. I am still not sure what exactly it shows. Anyway, for now there are usually just a few hundred hits, but soon it will be millions, which should provide pretty accurate information.

Another thing I searched for is “Kungsleden”, the name of a trail in Sweden that I walked once upon a time. So far, there are not that many pictures, but you can already see where the path probably is, and I am sure soon it will be a very precise map. It also seems to work quite well for the Camino de Santiago (Jakobsweg in German), at least for the Spanish part.

Another idea to play around with would be the spreading of plants animals, or of fashion and architectural styles. And this article on the effect of names reminded me of a project a former colleague told me about, where he extracted addresses from the phone book to aid his father’s research in the etymology of names. Apparently a lot of interesting things can be derived from names, like how much people moved around in former times. With geotags, it might soon be rather easy to get that information (Facebooks photo service might be very interesting for this, because it encourages tagging pictures with the name of the people who are in it).

I know this thought is probably not very cutting edge. GeoTags have been around for a while, and people are already building services around it (like loc.alize.us). Still, I am intrigued, also because some nice mathematical problems might be involved (for example, determine the real location of something if pictures have been taken from different places. Discover what different tags mean the same thing). The current maps don’t really satisfy my curiosity, and they are probably geared towards different purposes.

I wonder how much data Flickr is giving away through it’s API? I already checked, and the API is not ideal: when you query for a photo, the response doesn’t seem to include the information that if is GeoTagged or not, and it is also not possible as a search parameter. So one has to make an extra check for every photo and get as a response the geotag if it exists, or the info that it doesn’t exist. Still, I didn’t find anything about traffic limits. I don’t know what other photo sharing sites are out there that could be interesting. Also, I wonder if online newspapers and blogs commonly include the geo information in the photos they display. (Another search idea: “accident” could reveal hotspots for accidents).

I’d love to play around with this. So many things to do… But we’ll see, perhaps I’ll actually get around to it eventually. In any case I am now more sure than ever that for my next camera (or camera enabled phone), I want to have that GPS tagging feature. Recommendations are welcome.

Solving the traveling salesman problem with genetic algorithms

Tuesday, April 15th, 2008

The Traveling Salesman Problem is one of the best known NP complete problems, and genetic algorithms are among the best known approaches for approximating solutions for hard problems that can’t be solved completely. Therefore it is a common question how to solve the Traveling Salesman Problem with Genetic Algorithms. However, the solution is not so straightforward, because any encoding of salesman routes in the form of digital genes has to make sure that no illegal routes are being created through the GA’s crossover and mutation operators. Often, new and slightly awkward crossover operators are being suggested, that somehow don’t break the route.

A while ago I had an idea for an encoding that seemed reasonably elegant to me: instead of encoding the routes directly, encode permutations of the route, and construct the ensuing route by applying the permutation. A long time passed, until about two years ago I finally set out to write a proof of concept program. Said program I rediscovered a few days a ago when I reinstalled my computer and went through my files and archives to create a backup.

Now that work is very much in it’s infancy. It seems to work, but I haven’t compared it to other approaches, I haven’t tweaked the genetic algorithm at all, and so on. It seems unlikely, after so much research that has been poured into the problem, that it is really a new or worthwhile idea. Nevertheless, to make sure that it won’t be lost (just in case), I have now created a google code project for it: genetic algorithm for traveling salesman.

It is also almost my first open sourced code, apart from two small Greasemonkey Scripts. I have to say, it is fun to open source: even though I don’t expect much interest in that particular code, just to publish it is a good motivation to keep working on it.

I chose Google Code because I thought it would have the best chances for showing up in the google code search there. However, I am a bit disappointed that Google does not seem to have any facility for ranking projects and finding projects by popularity. The only means to discover projects hosted there appears to be the search box. SourceForge.net (the pioneer of public open source repositories) seems to be much better in that respect, although I often found their pages a bit confusing. The latest fad of course is GitHub, perhaps I’ll try that for the next project. I’d like to open source my mobile games, if only I’ll find the time to polish them enough.