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.