Archive for Januar, 2009

You are currently browsing the Martin en Neukoelln archives for Januar, 2009.


New York, New York

Vielleicht ein kleines Video zum Anfang, so zum Einstimmen vielleicht.

Auch wenn wir hier eingentlich staendig unter Strom wegen unseres Projektes stehen, muss man ja auch mal ein wenig Pause machen und die Gegend hier genießen, wenn man schonmal hier ist. Und so haben wir uns entschlossen fuer ein Wochenende nach New York zu fahren. Der Begriff Wochenende ist vielleicht auch ein wenig übertrieben, da wir nur 1,5 Tage da waren, aber es hat trotzdem gereicht um zu sagen, da würde ich gerne wieder hin.

Pretty sure, I can!

Als wir am Sonnabend ankamen haben wir direkt mit dem vollen Touristenprogramm begonnen, als erstes im kalten Morgenwind mit der Fähre nach Liberty Island und dann vom Battery Park zur Wall Street und Ground Zero hochgelaufen. Schon in diesen wenigen Stunden hat New York echt Eindruck auf mich gemacht. Was mir als erstes aufgefallen ist, sind die vielen gelben Taxis, die wirklich überall durch die Gegend fahren, man könnte schon sagen, dass ca. 20% wirklich Autos sind, der Rest der Fahrzeuge sind alles Taxis.

New York

Der nächste beeindruckende Punkt, ist die Art und Weise wie in New York geheizt wird nicht mit heißem Wasser, sondern mit Dampf (leider nur in Englisch, in Deutsch von Google übersetzt). Dies führt auch zu den ganzen bekannten Bildern von New York mit dem Dampf der überall aufsteigt, und ich muss sagen, es ist wirklich so. Zurueck im Parkhaus, ging es von dort aus weiter zum Hotel nach upper Manhattan. Leider gab es dort auch schon ein größeres Problem. Die beiden Zimmer die wir gebucht hatten, wurden uns zwar bestätigt, aber im Hotel sind sie wohl nie angekommen. Da das Hotel dann auch noch ausgebucht war, war das ein mittelschweres Problem. Zum Glück wurden wir dann an ein Schwesterhotel verwiesen, dass uns anbot für den ursprünglichen Preis von einem Zimmer in einer Suite zu übernachten, mit zwei Schlafzimmern, Wohnzimmer und einem Whirlpool. Der Whirlpool muss zwar direkt aus den 70er kommen, aber egal – für den Preis von 130$ in New York ein Doppelzimmer zu finden, ist schon echt super.

From Empire State Building

Nachdem wir eingecheckt hatten, sind wir sofort nochmal los, mit dem Taxi runter zum Empire State Building um einen Blick auf die Stadt erhaschen zu können, solange es noch hell war. Mit dem Fahrstuhl ging es die ersten 80 Stockwerke hoch und dann nocheinmal 20 Stockwerke mit dem zweiten Fahrstuhl. Das Beste an der Aussicht ist, dass man nicht in einem verglasten Kasten steht, sondern wirklich auf einer Platform – natürlich gesichert von einem hohen Zaun, aber trotzdem draußen.

Night Shot from the Hotel Wndow

Zurück auf dem Boden der Tatsachen, sind wir die 5th Avenue hochgelaufen, immer vorbei an der Grand Central Station, dem Rockefeller Center und dem Trump Tower, ganz hoch bis zum Central Park. Am Central Park angekommen waren wir so hungrig und müde, dass wir beschlossen schnellstmöglichst irgendwo essen zu gehen, sind dann aber doch noch bis zum Times Square runtergelaufen um dort bei einem Standard TGI Fridays viel zu viel zu bezahlen. Zurück im Hotel haben wir beide erstmal geschlafen, der Tag war doch zu anstrengend mit um 5 aufstehen, nach NY fahren und dem ganzen herumlaufen. Nachdem ich etwas im Whirlpool entspannt habe und geschlafen, sind wir noch in einen Club gegange – das Cielo feierte Geburtstag und wir feierten mit. War OK, 1 Stunden anstehen, 25$ Eintritt und eine relativ gute Party. Um halb 5 sind wir mit dem Taxi nach Hause und haben dann erstmal bis um 10 geschlafen.

Flatiron Building

Nachdem wir das Hotel bezahlt hatten, sind wir mit einem Cafe Latte von Starbucks in der Hand zum Central Park gelaufen und sind dort ein wenig langspaziert. Wenn nun noch alles grün gewesen wäre, wäre es ganz schön krass gewesen, dieser riesen Park in der Mitte von Manhatten. Danach haben wir das Auto abgeholt und sind zum Schicki-Micki Bezirk Soho gefahren, wo wir das Auto für sagenhafte 45$ für zwei Stunden geparkt haben um uns ein wenig in den Modeläden, China Town und Little Italy umzuschauen. Beschlossen wurde der Tag von einer China Pfanne aus einem original chinesischen Restaurant, gegessen im Auto. Danach noch rasch zum Flughafen, den Jens dort abgeliefert und ich bin danach alleine zurück nach Boston gefahren. Und das war es dann auch – unser Trip nach New York. Ein tolles Erlebnis, kann ich nur empfehlen.

Alle Fotos gibt es hier!

Seven Things

I got … seven-thinged.

I’m not sure If you can call it like this, but no other name came to my mind right now. But I got seven things tagged by the Upstream Guys / Girls. The rule for this little game are pretty straight forward:

  • Link your original tagger(s), and list these rules on your blog.
  • Share seven facts about yourself in the post — some random, some weird.
  • Tag seven people at the end of your post by leaving their names and the links to their blogs.
  • Let them know they’ve been tagged by leaving a comment on their blogs and/or Twitter.

So during the next seven bullet points you will get to know things you never thought about before about me … or so!
Let’s go:

  • My blog is called “Martin en Neukoelln”, but I dont live in Neukoelln anymore, I’m just too lazy to change the title!
  • I love kicking peoples asses on the phone when I’m complaining about something!
  • My research topic is main memory databases, but I would really need a database to remember anything – what did I just say?
  • Right now, I really hate the frickin Safari ‘I-always-forget-about-cookies’ Bug!
  • Sometimes I am jealous of all those people working at startups or being a freelancer!
  • During high school, I was selected as the teachers most annoying pupil!
  • I do love hacking and programming languages!

To carry on the chain I would love to tag – Andre, Matthieu, Christian, Katharina, Palo Alto, Martin and I ran out of names and people that still write blogs (instead of only using Twitter).

Debugging in the terminal! or A short introduction into GDB

Almost everybody of us already wrote at least a small C or C++ program and struggled with different problems along the way of completion of the program.

Since C or C++ is mostly written in plain text editors fancy features like typically available from Java (debugging, IDE support etc) are not available. Of course one can argue there is Eclipse CDT or NetBeans or even Windows, but all these programs have a huge drawback when it comes to custom maintained makefiles etc. But back to the topic. What happens if we see that errors occur during program execution. Typically the easiest solution is to write simple debug output statements issuing text that helps to understand what is wrong. Of course again writing tests would make everything easier, but again I must contradict (at least in the beginning) – writing tests in C or C++ is pain in the … and for exploring features or the languages it’s simply not useful.

The more complex the program structure get, the more complex it becomes to create useful debug statements that help to understand what is going on and very easily you come to a point where you say:

Damn, I missed to add this and this statement here and there and now I have to compile everything again…

This should not be. Even for people that are typically used of graphical development environments it is not to hard to understand how GDB works and how to became in a short time capable of mastering the most important tasks.

The big question is: Where to start? Let’s assume we have a program that crashes and now we want to debug it. I prepared a very easy program that crashes soon after starting the program.

#include <stdlib .h>
#include <stdio .h>

void test(int a)
{
	int b = 10;

	float c = b + 100;

	printf("%f", c);
}

int main(int argc, char** argv)
{
	int a = 10;
	float f = 10.2;

	test(10);

	int *e = NULL;

	int b = *(e + 10);

	return 0;
}

This program as is will fail because of a simple reason: there is an assignment of a variable with not assigned value to another variable. The question is now how to start debugging if the program once compile (don’t forget the -g flag) and dumped with a segmentation fault etc.

The first step is to start GDB using the simple gdb command from your favorite terminal. Once it is open it will look like the following:

GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26 08:14:40 UTC 2008)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin".
(gdb)

This screen tells you that GDB is ready and waiting for your input. Right from here you can start build, run, debug etc using the interactive GDB console. The biggest problem I see right here is, that there is no nice screen that tells you how to start debugging and so you are left alone a little bit. To overcome these initial problems I will explain you the most important commands for GDB and show you how to use them later on in a small screen cast.

So here is the list, sorted from most important to least important:

  • file – specifies which executable to load. Once specified this will be used through the rest of the session.
  • run arg1…argn – this will run the given program and break if it reaches a breakpoint or an abnormal program state
  • break < em >location – set a breakpoint at the given location. This can be a symbol, a filename or an address.
  • print symbol – prints the value of the symbol. Can be used as a plain debug output statement
  • step | next | continue – they do what they look like. Step steps into the next available source position, while next proceeds to the next position in the same function and continue continues until the next program stop via a breakpoint, exception or program termination.
  • bt – prints a backtrace for the current position. This can be used to examine the current position in the stack
  • frame number – used to navigate to the given frame and show frame info.
  • list {+ | – | location} – display the corresponding source code for the given position or location. + and – navigate up and down the source file.
  • info scope function name – displays all local variables of the given scope. This can be use to check which variables are defined.
  • whatis symbol – prints the type of the symbol

Using these commands you have a suitable knowledge about how to work with GDB. Now using a screencast I will show you how to use these shortcuts in action.


GDB Introduction from Martin on Vimeo.

Re: Edward Sciore – Database Design and Implementation

A review for Edward Sciores book on Database Design and Implementation.

It took me some time to get through the book but finally I read it ( well the most interesting parts of it). In general the book can be recommended to anyone who is interested in databases and has not too much knowledge in this topic. The first part of the book focusses on database design in terms of how to structure a database correctly and how to model relationships between objects. I was a little bit disappointed because I thought that database design focusses more on how to design the implementation.

Database Design and Implementation

The second part of the book is about implementing an actual database and which concepts are used. The implementation used here is based on the source code of SimpleDB that was developed for coursework and is featured in the book and can be freely downloaded. Anyhow again the technical foundation that is used here is good explained and easy to understand. Depending on the knowledge level of the reader this book is either a very good addition to the general coursework around database technology or not too deep enough. For me it was the latter one.

In any case the writing style of the book was very nice and very good to understand. I can recommend this book to anyone how is interested in database technology and is just about to start deep diving into this area. Additionally I think I can recommend this book to my students ( first part to the bachelor students, second part to the master students). But for clearly technical solutions on a deeper level I would go for other literature.

Colored output for gcc and friends

Tired of using search to find the errors in your GCC output?

Hunting down errors in C and C++ is hard enough and so is hunting down the error message in the compiler output. A few years ago (actually more than ten) Jamie Moyer sat down and wrote a nice Perl script that parses the output so that it creates colored output on a colored terminal.

Unfortunately the only location where to get this script right now is from Johannes Schlüter’s website.

Terminal with colored gcc output

And what should I say more – this looks very pretty. By the way the nice Terminal theme came from InfiniteRed – readable black theme, nice.

Schnee in Boston

Ein Sturm zieht auf…

Schon seit Freitag abend wurde angekündigt, dass ein Tief von Nordwesten richtung Ostküste zieht und sich dort mit zwei Gewitterfronten treffen wird. Dies führte dazu, dass allerorts von “Storm” und Schnee die Rede war. Und so beann es dann auch in der Nacht von Samstag auf Sonntag zu schneien und zu winden, aber dass das nun ein richtig ausgewachsener Sturm war, davon habe ich hier nichts mitbekommen.

IMG_4531

Der Unterschied zum Vortag war jedoch in der Hinsicht dramatisch, dass nun alles weiss war. In der Nacht müssen ca. 20cm Schnee gefallen sein, so dass alles bedeckt war. Da hier Salz streuen noch zu den normalen Dingen gehört waren zwar die Straßen frei, am Straßenrand türmten sich aber dann doch die Schneemassen.

So war, als wir heute im Büro ankamen am Straßenrand garantiert ein fast mannshoher Berg Schnee, der aber bis zum Abend geräumt wurde. Das man hier auch mal LKWs begegnet, deren Ladung aus Schnee besteht ist auch keine Seltenheit. Zum Abschluss gibt es noch ein paar Bilder aus dem Büro geschossen mit guter Schneeaussicht.

Snow in CambridgeView over CambridgeSnow in CambridgeView over CambridgeView over CambridgeView over Cambridge

Einen Monat unterwegs

Nach vielen Mühen hat es doch endlich geklappt und ein Arbeitskollege und ich sind nun für einen Monat in Cambridge um hier gemeinsam mit Forschern vom MIT genauer der Database Group zusammen an einem Projekt zu arbeiten.

Nachdem wir am Dienstag spät abends im Hotel angekommen sind haben wir den Mittwoch erstmal ruhig angehen lassen und haben uns hier im Büro heimisch gemacht. Ich habe mal auf einer Google Maps Karte die entpsrechend wichtigen Orte markiert.

Unsere Hotelzimmer sind super, ich habe ein Schlafzimmer und ein Wohnzimmer, so dass mir die Decke nicht auf den Kopf fällt wenn ich die ganze Zeit im Hotel bin (es sei denn ich bin unterwegs – für viel mehr ist es auch echt zu kalt).

Und nun noch ein paar Bilder, damit ihr wisst, wie es hier aussieht:

WohnzimmerSchlafzimmerCambridgeCambridge