rm -rf /opt

I’m a heavy macports user. I’ve installed tons of ports and for a while now, I was under the impression that macports matured enough to stop worrying about potential dependency nightmares. Basically macports already felt like the FreeBSD ports collection. Sure, there are b0rken portfiles now and then but thats ok. As I said – I already had a huge collection of ports installed and updated and everything was fine.

Until yesterday. When you have that many ports installed, the command line interface can get a little messy which is why I thought:

» Hmm, aren’t there any good GUI tools out there for managing macports? «

The only thing I found was Porticus (no, I won’t link to it – for your own safety). It basically promised nothing more than a decent GUI. Well in a way it even did but as you might know, there is this (unwritten?) law: » Thou shall not use a GUI wrapper for a command line tool «

So I broke this law. I used Porticus to update some ports, I clicked some options which seemed right at the moment and only one hour later I found my whole macports installation disrupted.

It started out real simple. All I wanted was to install apache2 which needed the port uuid. Now I already had that, but in the wrong version. Now macports wouldn’t let me update that port that easily but instead of reading the macports help, I fired up Porticus and said: » Well, just update what you need to update, so I can have apache2 in the end hmmkay? «

What porticus did was upgrading _all_ ports because in a way, every port can be linked to some other port. » You want apache2? You need uuid, but then you’ll have to update postgres as well and uhm yeah somehow openssl and gnome. You said I should update what I need to update. «

Now this would be fine, in a way, but all the updates failed for some reason. Porticus didn’t stop though and went through the whole dependency chain do break all the other ports as well.

Now there might be even an explanation for all this. Maybe its not Porticus’es fault at all. The thing is though, when you use a GUI tool which doesn’t give you _all_ the options of the command line tool it is wrapping, nor does it give you proper explanation of the options it exposes, you end up clicking on checkboxes you shouldn’t have clicked.

If I had uesed the commandline tool, I would’ve read the man page, I would’ve read all the explanations for the various options and I could’ve picked even the right ones, based on this information.

So in the end, I rm -rf’ed the whole ports directory and started over. I already got half of my work related ports installed. Hoorray!

» THOU SHALL NOT USE GUI WRAPPERS FOR COMMAND LINE TOOLS «

If you do it anyway – there is no point of being angry if something went wrong. You should be prepared for this moment and take it with dignity. Your co-workers and friends will thank you.

My new Textmate Bundle

Pops up a dialog asking for a search query, then runs grep on the selected dir in the project drawer and shows the results in a HTML output window with the search query highlighted.

Just have a project with 8000 files in it and TextMates » Find in Project « command is just too slow and I’d have to clear the logfiles before that.

With this bundle I can use grep which seems a lot faster and I can ignore logfiles and svn meta data files.
Have to make this bundle a little more customizable and prettier but for now it does the job.

The command line equivalent would be:
grep -r "query" -n --exclude=\*.svn\* --exclude=\*.log\* /your/path/

Credits go to: Andreas Marr for giving me the grep command as it is used in this bundle.

Screenshots

Dialog

Results

Bogosort in ruby

Yesterday, I stumbled across the Bogosort sorting algorithm. The example implementations looked horrible so I tried to implement it in a short and readable way, in Ruby of course.

Here is my first and only attempt of a Ruby Bogosort.

# Use: ruby bogosort.rb a b c

def sorted
  for i in (0..$array.length-2)
    return false if $array[i] > $array[i+1]
  end
  return true
end

$array = ARGV
$array = $array.sort_by {rand} while not sorted
puts ">>>>>>>>>>>>>>>> #{$array}"

You can find the Java implementation on the wikipedia page:Bogosort

Here are other C, Java and Python implementations: http://www.algorithm-code.com/wiki/Bogosort

I wonder if the C and Java examples really have to be that long.

Web Applications

After being in a radio show (german) about web browsers recently and reading all that hype about client side web applications, I got more and more thinking. I can’t see really the use case now and I wonder if I’m that alone with this opinion. But let me explain my thoughts on it.

For now there are several kinds of client side web applications. There are text processors, photo managing tools, presentation slides editors, spreadsheets etc etc. But is there a real use for them. Personally I’d rather have my text processor on my hard disk, I’m also not processing my camera RAW pictures in a web browser and so on. For all of these serious tasks there is already software exactly suited for the job. Its hard to imagine that one day an online text processor would outperform Word, Pages or even editors like Textmate or Eclipse.

There is also no real advantage to do these kind of tasks within the browser. Even the software, although it is distributed directly through the net, is practically on your hard disk and the whole purpose and the recent efforts are about making these web applications run in your browser even when you’re offline.

So your work is kind of stored on your machine within the browser context, the software you’re using is on your machine and you don’t even have to be online to work with it. It just doesn’t sound like a web application.

The whole point of doing something in the web is to connect people and information. There were plenty of implementations of Hypertext prior to its premiere in the world wide web. Bringing this concept to the web also brought a very useful extension. Rather than creating local hyperlinks only you could set hyperlinks to completely different servers across the whole planet. You could connect information that was impossible to connect before. The web is also a lot about communication these days. Look at these endless lists of online communities or projects like twitter. Its about connecting people, sharing and distributing information.

A word processor simply doesn’t make sense within the web context without making explicitly use of these features of the web which I just mentioned. Now managing my photos online only makes sense if I want to share them. Flickr is the perfect example for that. You have a very good chance improving flickrs user experience by using frameworks like the recently hyped sproutcore to make everything look like serious application environment but it is only an enhancement to a service that had no desktop equivalent before.

Webmail is kind of the same story, told from a different angle. There are a lot of desktop mail client applications. Still there are also a lot of webmail interfaces out there. GMail is probably one of the most famous ones as its making heavy use of client side javascript to make the whole interface feel like an application rather than like a website. Webmail has several reasons why it exists. You need webmail when you travel without your own computer and you want to check mails. But that is only because your mails are online. You have to go online to work with the medium mail.

So when there is a web application that is more or less cloning an existing desktop application without adding capabilities that are unique to the web environment, it is completely useless. Why I create my presentation with a 10 times slower version of keynote online? Why would I edit my photos online where I have limited tools and therefor limited possibilities? Why would anyone re-implement the Desktop itself in a web application when it has no features could really need?

Check the EyeOS Website. I mean hello? When I read about it I imagined a person who doesn’t have a graphical operating system but wants to have a desktop like look and feel on the screen. This person than decides to install a browser in order to use EyeOS’s web based desktop. Thats the only use case I can come up with. They’ve entirely forgotten what the web is and what it is good for.

In the end your favorite web application is currently not available due some stability or scaling issues or maybe both. Now you’re sitting there, can’t edit your documents, can’t manage your mails, can’t work with your photos, can’t access your bookmarks etc etc. In this scenario you got one new major dependency to able to work. It isn’t enough that your computer works and that you have the proper software installed, you must also hope to get a decent internet connection without people in the same cloud sucking all the precious bandwidth with their heavy downloads etc.

I know I’m exaggerating here quite a bit. Apologies.

My point is that I’m not against the idea of client side web application. Not at all – the recent developments and achievements are truly awesome. in fact, before writing this post I played around with sproutcore. I’m just against this whole hype of cloning the desktop experience into the web without any sense for the web itself. I think we should rather focus on enhancing and developing present and new concepts which progressively explore the possibilities the web offers for us. Think Wikipedia not Word. Think flickr not iPhoto. Sync, aggregate, share and communicate over the web rather than building self contained and therefor boring and uninteresting islands.

I mean sure, Keynote or iPhoto in the web browser is impressive but – yeah – thats basically it. Wikipedia is a lot more impressive, even with a old school interface.

But we’ll see how far everything goes, with client side storage and all that. In my opinion though the whole “software distributed through the browser” thing is as visionary or useful as the 3D desktop.

Wettermanipulation am 30.05.2008 um 6:00 ?

Irgendwie gab es heute morgen um 6:00 Uhr auf sämtlichen Regenradarbildern eine Anomalie.

WetterOnline

Wetter.com

unknown

Wikipedia: Wettermanipulation

strange.

Wüsste gern was da passiert ist.