Wednesday, October 11, 2006

Hmm, apparently you can now use Google Docs (used to be Writely) to blog messages. If you can read this message it actually works.

But it seems using the document title as headline does not work yet. :-(

Sunday, September 24, 2006

Also switched to Beta Blogger

After Andreas' post about Beta Blogger I also tried the switch, just to see whether things are improving...

Monday, August 14, 2006

Blogging-Tool and activities in the meantime

Anyone with a good suggestion for a _usable_ blogging tool that also allows adding pictures without clicking hundreds of buttons for each?

This and the fact that some features of the crappy web frontend of Blogger did not work at all were the reasons I did not post recently and why I will make all this here less frequent and shorter.

In the meantime I had a meeting with a black bear in the wilderness. It seems the bear was at least as surprised meeting me there as I was meeting him. Thus we both just looked at each other and after some time of mutual inspection we just continued our way.

Yesterday I was hiking this mountain.

Friday, August 11, 2006

Mail data recovery successful

All mail data got now recovered successfully. So I am completely back again.

Mail System Failure

Due to a system failure of a central mail processing machine I currently don't have regular access to all mails sent to me via mailing lists or that were sent to me at 2006-08-10 from about 00:00 GMT to 04:11 GMT. All mails sent to my mail address after 04:11 GMT were handled correctly by an automatic service recovery system. A data recovery process will try to recover the data at 2006-08-11 03:45 GMT. If this fails I will read your mail not before 2006-08-21.

Thus if you have sent me an important mail just within the critical four hours please send it again.

Saturday, August 05, 2006

Grouse Mountain

Yesterday I decided to hike Grouse Mountain in the evening. I set up my GPS receiver to head to Grouse Mountain. To see what happens when you select a destination that is not reachable by car I selected the peak. This was not a wise idea because where a car navigation system would have just said that this is not reachable my system with a full topographic card loaded just said: Well, if we can't reach it on public roads then let's continue on some trails and thus wanted to send me up the Old Grouse Mountain Highway. Unfortunately I didn't inspect this any further and started to move the car with the intention just to drive as long as it is possible and allowed to use the car. The result was that I didn't reach the Grouse Grind hiking trail and had to drive around half of the mountain again.

Finally I reached the right place a short time before the trail closed and I can say that the navigation system is really helpful if you have no clue about the street system of an area. The first thing I saw was a number of warning signs about the trail being dangerous and about a black bear in the area. I started going upwards. The first part was stressful but comfortable to walk. After some time of sweating I reached a point that claimed itself as being the 1/4 mark and informed that nobody will take any responsibility if you continue. And it mentioned that it will become steep now and one might consider to return. I continued and found again a sign warning of the black bear. Actually this sign was customizable for various sorts of bears. I climbed and climbed and I found what they meant with steep. There were some areas where it was more comfortable to make use of your hands while climbing. After about 75 minutes and 800 meters in height I reached the platform of the Skyride mountain station. The people there are really funny: They have placed a sign that the ground might be wet. I suppose if you manage to slip on their wet ground you shouldn't have climbed the trail at all.

From this point I could see the peak:

You could also see Vancouver:

And I finally found the bear!

Then I decided to go down again here:

Actually I used a cabin like this:

"Und wer hat's erfunden?"

Reaching the base again I found that the bear didn't take my car and I could drive home again.

Thursday, August 03, 2006

SeaBus, North Vancouver, Lions' Gate Bridge, and Stanley Park

Yesterday evening I was using SeaBus to North Vancouver. Vancouver seen from there looks like this:

Having reached Lion's Gate Bridge after about 4km from the SeaBus terminal I was reaching Stanley Park:

Unfortunately I decided for the wrong side to walk on the bridge thus this picture has too much bridge included in the spectacular view to Vancouver Downtown:

In Stanley Park there was someone else inspecting the area. But most likely he just inspected whether there are tourists to feed him.

Finally a look back to the bridge

I was walking some dark paths through the park back to Vancouver. The wood is really making everything dark there. In the evening you feel that sun has already set because it is so dark but when reaching an area with less trees you find that this is definitely not true.

Tuesday, August 01, 2006

First Vancouver report

Ok, since the first complaints arrived that there is nothing to read here I will start now with a first report. At Frankfurt Airport I was waiting until this airplane arrived to bring me to Toronto:

In Toronto there was a similar Airplane to bring me to Vancouver. But since this is getting boring now and there was no good place to make a nice picture of it anyway (it was blocked by all sorts of loading ramps and stuff like that) I decided to fly with it without taking a photo.

In Vancouver I took the bus to the house I am living for the next three weeks. No pictures yet because there should be something left in case days are getting boring. ;-)

The first day I was mostly organizing stuff, buying essential things, fetching my car from the car rental company and so on. To see as many places of the city as possible, I decided to walk all the way (with the exception of the car obviously).

I have seen many famous tourist attractions on my way but did not take any photos that day. You may look up these things in any tourist guide book. I can confirm that pictures there are appropriate. When trying to buy some electronic map data for my GPS receiver I failed to do so in any job in Downtown (the staff in some Canadian computer shops is as clueless as in many German computer shops). Finally I found a great equipment store in an industrial area east of Chinatown that had everything in store you could dream of if you do outdoor activities. The guy at the shop was extremely confused about how someone that never was there could find his shop at all.

Since the way I walked that day summed up to about 40km and I was a bit tired because of changing the time zone I decided to call it a day.

Today I started with running along the shore line to the English Bay Park. You can track these activities here.

Then I found something familiar to German people:

Must have been a spy because he was parking near operations center of one of his competitors:

Currently I am sitting here at the Vancouver Public Library to write all these stupid things:

Now I have to do some useful stuff again. Have fun!

Sunday, July 30, 2006

Off to Vancouver

Ok, finally I am taking off from Frankfurt Airport to Vancouver, BC in a few hours.

Thursday, April 27, 2006

First Assignment for "Programmierkurs II für Bachelor SIT"

Ok, after a long time not writing a message here due to time constraints I am back writing something actually useful (at least for my students).

I have now put the first sheet with assignments online at pi3.informatik.uni-mannheim.de/~schiele/pk2/ .

If you can't reed German, already have some basic knowledge in C, or are occupied with something more important you might want to skip this one because this is really a beginner's course for the C programming language in German. Nothing advanced to be seen here. Otherwise if you find an error somewhere feel free to drop me a note.

Please do not post answers to the assignments here before the date when the students have to complete the assignments because you would take away their chance to learn something.

Wednesday, February 01, 2006

another unused keyword

Another keyword that is almost never used in C++ is "auto". Did you see it ever? Do you understand its meaning? Explain when it should be used.

Tuesday, January 31, 2006

exporting information to the public

After a discussion about open-sourcing a tool Szann recommended to make a puzzle about a topic that currently is irrelevant for software that relies on an open source tool chain.

C++ does provide a keyword "export". Most people don't even know about this keyword because unfortunately there currently is no open source compiler that does support it and commercial compilers that support it are quite rare as well. Instead of making use of the export keyword people are used to put all template code into header files that have to be included from every source file that creates concrete instances of the template code. This is a problem because it makes the compiler compiling the same code multiple times and it is a problem because commercial software vendors have to ship the full source code of template code of their libraries.

Explain how the export keyword can be used instead of including the full template code from each translation unit. Does this improve compilation time? Does this allow commercial software vendors to build a shared library of their template code instead of shipping the full code?

Monday, January 30, 2006

having a good friend

It is always important to have a good friend. C++ has a special keyword for this purpose. Thus you sometimes read code like this:

namespace n { template<typename T> void f(T o); }
class a { friend void n::f(a); };

Is this code correct? Do you have reasons for your opinion given you have an opinion at all? Ignoring the fact whether this code is correct or not, is it smart to write code like this or is something else to be preferred? Explain.

Sunday, January 29, 2006

exception party

Because I had no time to do a puzzle today myself and there was still one from my former colleague Thomas in the queue I will present this puzzle today.

The question is what the following application does produce when built with a standard compliant compiler.

#include <iostream>

struct A {};

void foo(bool t) {
    if (t)
        throw A();
}

void bar(bool t) {
    try {
        try {
            foo(t);
            throw;
        } catch (const A&) {
            std::cout << "catched const A&" << std::endl;
            throw;
        }
    } catch (...) {
        std::cout << "catched ..." << std::endl;
    }
}

int main() {
    bar(true);
    bar(false);
    std::cout << "done." << std::endl;
}

Saturday, January 28, 2006

template specialization

If you want to test whether someone has understood how template specialization works is the following which is derived from a famous example by Peter Dimov and Dave Abrahams. So let's test you!

What's the return value of the function g in the following code? Explain your opinion!

template<typename T> int f(T) { return 1; }
template<> int f<>(int*) { return 2; }
template<typename T> int f(T*) { return 3; }
int g(int* i) { return f(i); }

geeky Hello World application

Today's C++ puzzle was originally developed together with my student assistant Juergen as a geeky idea on how to write a full blown Java application without a main method. The same "technology" does work on C++ as well but you have to fake the linker with a symbol main to translate the program. You can do this by providing a global integer variable main instead of a main method.

Now for today's puzzle: Write a Hello World application without a function main. What is the drawback of this "technology" to write applications, apart from the obvious one that it is a ugly hack?

Friday, January 27, 2006

finally clause in C++

The following puzzle was suggested by my former colleague Thomas. Explain how to port a finally clause as used in Java to C++ without loosing its semantics.

Wednesday, January 25, 2006

travel, meeting, snow, and broken code

Today I finally booked my travel to Brussels next month. In the afternoon I had a refreshing meeting of the faculty council. In the evening it started snowing a bit and thus I designed the following broken code:

namespace n {
    class c;
    void f(c&);
};

void f(n::c& v) {
    f(v);
}

Explain why this is broken code in C++.

Tuesday, January 24, 2006

deducing types from code

One of the ugliest things in C++ is reading complex type names. It is even uglier to deduce types from ugly code. It gets worst if templates are involved as well. We skip templates here for a first shot. Watch the correct(!) C++ statement 0[new weird](1)()(3,"strange")((weird(*)())0,5); and try to understand the syntactic meaning. Next describe the signature of the class weird that contains one method only.

I hope you will never _write_ code like that but you most likely will _read_ similar code if you have to work with code from other people. --- This is not a joke but a horror!

Monday, January 23, 2006

deemed to fail

On Mondays people often write broken code. Actually they do it the other days as well but this leads to the following C++ puzzle for today.

The following code is broken and any instantiation of an object of a class derived from this abstract class is deemed to fail. Explain why this is the case. Note that your first thought might be wrong!

struct broken {
    virtual void v() = 0;
    void n() { v(); }
    broken() { n(); }
};

Sunday, January 22, 2006

casting from base classes

After visiting Schwetzingen I designed the following C++ question for today:

C++ has two reasonable options to cast from a base class to a sub class. These options are the static_cast operator and the dynamic_cast operator. Explain the differences between these two operators and compare their advantages and disadvantages.

Explain why one cannot use the dynamic_cast operator to cast from a base class that does not have a virtual function.

Explain why one cannot use the static_cast operator to cast from a virtual base class.

placement syntax

While having a funning day with friends Szann suggested the following topic for today's C++ puzzle:

Explain the placement syntax of the operator new(). What are possible uses of it? How is the operator coded with this syntax? How is it called?

Also explain what must be considered when destroying objects that were created using the placement syntax.

Friday, January 20, 2006

understanding C++

The problem with the C++ programming language is that it is a rather complicated language for the unexperienced programmer.

A colleague of mine decided that he wants to learn more C++ to really understand the software he is writing instead of writing code that the compiler just compiles by accident. He asked me to provide him with regular exercises to learn something about the language. Due to the fact that there might be some more people out there that want to learn additional stuff about the language I will do this within this Blog.

If you have an issue with the language you don't understand and you cannot find in the standard C++ books, feel free to suggest the issue for discussion here by sending me a mail. Given that the issue is really interesting, i.e. not a beginner's question, and I understand the issue myself I might add it here.

But now to the first exercise:

Consider the following application:

#include <iostream>

struct C {
    C& operator=(const C&) {
        std::cout << '=' << std::endl;
        return *this;
    }
};

int main() {
    C a;
    C b = a;   // (1)
    b = a;     // (2)
    return 0;
}

Explain why this application does print only one equal sign although the lines (1) and (2) are present.

Wednesday, January 18, 2006

refreshing weekend

Szann confirmed that she will leave San Bruno tomorrow after lunch to reach Frankfurt the day after tomorrow. There Joanna will fetch her to organize some stuff in Frankfurt before they will come to Ludwigshafen where we will have a refreshing weekend together.

Tuesday, January 17, 2006

upgrading subversion?

Maybe I should consider an upgrade of our Subversion server because the currently installed 1.1.x release seems to have problems handling the repository which has grown to 22 GB in the meantime. After some time of operation Apache processes grow and grow in size of memory and finally crash, leaving the Berkeley Database files in an inconsistent state. Maybe the most recent Subversion release does no longer have this problem.

Monday, January 16, 2006

teaching abilities to abstract

Today we agreed that I will tell our students something about functional programming language based on examples in Scheme. In my opinion it is important to teach people concepts like functional programming languages. Nowadays most universities (ours included) tend to teach only main stream languages like Java. People responsible for these decisions often argue that programming languages like Java are the languages that are actually used in industry where functional programming languages like Haskell, ML, or Lisp are used by academics only and are thus not relevant. Although the empiric observation about language usage is mostly true this seems to be a really strange argument.

My first argument is that it is not the primary job of the university to teach a programming language but to teach concepts. And in my opinion it is useful for a computer scientist to learn ability of functional programming abstraction because they learn to look at complex problems from a higher level of abstraction and thus solve problems with higher effectivity. Even in a project that does not make any use of a functional programming language at all you can make use of this ability to abstract to write less braindead code.

My second reason why this is a strange argument is that one reason why functional programming languages are used very seldom might be that almost nobody is capable to really use them --- I mean _use_ them in the sense of "think in them", not just hack some stupid Hello-World-program.

Obviously I will not manage to teach our students to become full-fledged functional programming language hackers within one lecture of 90 minutes but I hope at least some of them will find some interest to look themselves a bit deeper into that topic. I hope that this knowledge will not get lost within the next years because from my experience most people capable of imperative programming often have problems to understand a functional style. On the other hand side people with a deep knowledge in functional programming tend to write cleaner code even when they use imperative languages.

All time when I read Java code like "if (x == 42) return true; else return false;" I feel the immediate need to talk to the author of this code...

Sunday, January 15, 2006

wiring new telephone system controller

Today Joanna assisted me in wiring the new telephone system controller to the base telephone system at the Ludwigshafen building. Since all communication is transmitted by fiber optic cables you need more time to mount the box to the rack and installing the power supply than connecting the controller to the base system. But you have to be more careful not to bend the cables because this might break the fiber. Fortunately the high quality cables are coated so much that you needed relatively much force to destroy the cable. Now we have to wait until Szann is uploading the actual firmware.

To make waiting a bit more comfortable we had a nice evening there with Martin who is always a great help in making a boring weekend funny.

fixing various stuff

Today I was fixing various stuff. First I wanted a solution for my Firewire hard disk that was always inaccessible when the disk went to power-save mode because the driver did not manage to wake the disk up again. The solution was pretty easy because when I connected the disk by USB instead of Firewire everything was fine. Although the disk is a bit slower when connected by USB this is an acceptable solution until there is a fix for the sbp2 driver.

After I found that the current SUSE Linux Factory tree is completely broken I decided that I will at least update the kernel manually because I wanted to make use of the very rare opportunity that the main kernel package and the nongpl package were in sync. This fixed two problems on my laptop. The first one was the crashing ath_pci driver and the second one was the fglrx driver that did not work recently but does now again.

Then I provoked the situation too much by upgrading VMware to a newer update release which resulted in broken kernel drivers. I decided to fix this problem another day and instead meet with Martin and Joanna in the club to celebrate the success. Martin did a really strange drink. We will see whether Martin or my VMware kernel modules are more broken tomorrow...

Saturday, January 14, 2006

some nice graphics

I did a small script to do some statistics about the package repositories of our build servers. For an example you can see a graph containing all packages and other files of the current SUSE Linux Factory release by date and age here . It is interesting to see that there are files in the repository that are more than a decade old.

Thursday, January 12, 2006

rebuilding the build server

Yesterday my build server found that the disk holding the repository cache is defective. Because of that I installed a new disk and started the rebuild process. We decided to watch "Espion, lève-toi" on TV during the rebuild. Unfortunately the film was too short and the rebuild not yet complete after the film has ended. Actually it has only rebuilt 191GB of the 253GB repository up to now.

party

And now for today...

This evening I was invited to a small party at the center for academic didactics which was a very nice event. Met some new people there as well as some old friends and obviously I used this opportunity to exchange latest information about stuff happening at the various institutes of our university.

Wednesday, January 11, 2006

Mulholland Drive like conversations

The following was actually already posted yesterday but it seems that the Mail-to-Blogger service of Google seems to have some problems sometimes.

Yesterday Mulholland Drive was on TV here in Germany. Yesterday I thought that some of the conversations in this film are somehow mysterious. Today I had some conversations with some officials. Today I changed my mind that the conversations in Mulholland Drive are pretty real compared to conversations with officials.

Tuesday, January 10, 2006

improving an algorithm a bit

Today I decided to optimize a naive implementation of a solver algorithm a bit that took about 22 minutes to solve the problem. After only reordering some clauses an implementation resulted that did solve the problem in about 30 milliseconds which is about 50,000 times as fast. This is what I like with programming languages like Prolog. If you understand how they work you often can drastically improve your algorithms without much effort.

Sunday, January 08, 2006

survived another long weekend

I survived another long weekend by doing some pending office work, celebrating the new year (or whatever else was left to celebrate) with some friends, and by doing a running exercise to Heddesheim.

Saturday, January 07, 2006

stupid youth gangs

Today I met a gang of youth in the city that made me wonder whether humanity really managed in general to develop to a more intelligent species than gorillas. Some of them behave in a more stupid and annoying way, when appearing with their gang, than other people when their brain is already completely washed out by alcohol.

Friday, January 06, 2006

infrastructure library for logical equations

Today I hacked a small infrastructure library to solve logical equations in Java. I will use this for the next assignment for our students. Actually the library is quite stupid and not as generic as it should be but most likely it is not a really good idea to make the library more generic because this would just make usage more complicated for most students.

Thursday, January 05, 2006

machine crash

After coming back from the Club yesterday I wanted to upgrade on of my systems to the latest SUSE Factory packages. I did so and suffer now from the fact that the kernel does end his life in an oops message when setting up the WLAN network connection. It seems I have to do another bug report.

Monday, January 02, 2006

shortage

You might have read in the news that we currently suffer from gas shortage here in Germany because the Russians and the Ukrainians have some disagreements about the conditions of their gas supply contract. Fortunately we have some buffer of gas here in Germany to delay the resulting problems.

You most likely didn't read in the news that we have water shortage at our department. This is not because of some disagreements about the conditions of any contract of our supplier but because nobody ordered water the last days. Fortunately I have some buffer of water at home to delay the resulting problems.

Sunday, January 01, 2006

back in Mannheim

I am back in Mannheim again. Although some houses burned here because of firework hobbyists yesterday mine is still there. Will see what else has changed or not...

Happy New Year to everybody!

I wish everybody a Happy New Year!

Celebrating the new year was the last family event for me before leaving to Mannheim again. Will have to celebrate the new year which will be 9 hours and 1 second longer for me than the last one with some friends there during the upcomming week.