Weekend in Freiberg

This past weekend I took a trip down memory lane going to Freiberg for the weekend visiting my alma mater and a friend who is a doctoral student there. Saturday was “science night” (Nacht der Wissenschaft), a kind of open house where departments open up their labs and show off what they are working on. For instance, we got to see what a human hair looks like under a scanning electron microscope or how iron is extracted from iron ore (which is where the following video was shot):

They also offered tours of the backrooms and archives of the library and to the top of the dormitory (see picture below), areas that are normally off-limits to students. I also got to sit in on a lecture by a former professor of mine. It was kind of cool to be sitting there again, in the exact same second row spot I had sat in years earlier as a student. It was also a painful reminder how incredibly uncomfortable these wooden seats are.

Dormitory Looking West

When I started college in Freiberg in 2003, I was less than happy about it to say the least. The system of how one gets into a college at the time was a bit strange so after I didn’t get into my college of choice, I was pretty much assigned a school at random. Needless to say, I wasn’t very psyched about going to a school no one I knew had ever heard of in a really small town in Eastern Germany a ten hour train ride away. When I first came to the city, I was also shocked to see a large part of its buildings in a very sorry state, even though it had been 20 years since reunification and trillions of Deutsch Marks and later Euros had been spent by the government to fix up East Germany.

Since 2003, however, things have changed for the better. In the picture above all the buildings looked liked the one in the center: gray, boring and in disrepair. A lot has been done since to improve the situation on campus and in the city in general. Below are two pictures of the same area in front of the university cafeteria: dull and uninspired in 2007 (left), open and inviting in 2011 (right).

SONY DSC                     Mensa 2011

This is just one example of the many things that have been done around town. There is an official video on YouTube showing some more before and after shots. There are nonetheless still a couple of areas in the city where there is room for improvement, to put it mildly. Such as this place right by the train station. It’s very unfortunate that people getting coming to the city by train are greeted by rubble and a bunch of buildings with collapsed roofs. I know it didn’t help my impression of the city.

Train Station with Collapsed Roof

Looking back, I think it is kind of sad that I allowed my initial negative opinion of Freiberg to taint my entire relation with the city, the university and thus my years as a student there. Because I had decided I hated that place and I couldn’t get out of there fast enough at the end of the semester, I couldn’t see the many things Freiberg and the surrounding area has to offer. Instead I focused on my studies (which is a good thing, don’t get me wrong) and was counting down the days to when I would be able to go home again.

Hence, I think during the 48 hours I was there last weekend, I had done more things and gone more places then during the three years I spent in Freiberg as a student. For instance, this mine owned by the university and used in teaching by the geology department. It’s located on top of a hill overlooking the city and as I am told a beautiful place for picnicking in the summer. It would also be interesting to take part in one of the tours through the mine. However, as a student, I did neither.

Alte Elisabeth

Or Dresden, the state capital that’s only a 30 minute train ride away. It’s a beautiful city and steeped in history with lots to see, as a student, though, I bothered not once to go there. It’s a shame really.

Anyway, it was goof being back and I had a great weekend. Thanks to my friend Johannes for hosting me, showing me around and updating me about the latest developments in the city and university. I’m sure I will some back in the not too distant future.

111 Places to See in Düsseldorf

Schöne Aussicht

A while back I got this really interesting book of 111 places to see in Düsseldorf (in German) after reading its review in the local newspaper. It’s not the usual touristy thing, but contains some rather out-of-the-way and sometimes odd and unexpected places. Below is a complete list where I have marked all the places that

  1. I have seen (46),
  2. I know or have at least heard of but haven’t seen (24),
  3. I have never even heard of (41).

Going forward, as time permits, I would like to visit those I haven’t seen so far and eventually see most if not all of them. The first one (#90) I have already checked off, as the picture above proves. I will keep you updated on my progress in this undertaking.

1 Ackerstraße Been there
2 Alte Golzheimer Friedhof Know of
3 Apsis von St. Margareta Know of
4 Aschlökchen Never heard of
5 Atelierhaus Walzwerkstraße Never heard of
6 Berger Kirche Know of
7 Bilker Sternwarte Never heard of
8 Blumenlädchen am Barbarossaplatz Been there
9 Blutkapelle Never heard of
10 Bolkerstraße Been there
11 Bootshafen am Unterbacher See Know of
12 Botanischer Garten Been there
13 Burghof-Mauer Been there
14 Carlsplatz Been there
15 Carsch-Haus Been there
16 Düsseldorfer Malerschule im museum kunst palast Never heard of
17 Düsselquelle Never heard of
18 Ecke Tußmann- und Motkestraße Been there
19 Eisstadion an der Brehmstraße Been there
20 Ende der Zollstraße Never heard of
21 Engländerwiese Know of
22 Esskastanienallee Been there
23 Fähre nach Zons Been there
24 Filmmuseum und die Black Box Know of
25 Flinger Broich Know of
26 Frauensteine Never heard of
27 Fußgängerbrücke im Medienhafen Been there
28 Galerie Simonis Never heard of
29 GAP 15 Been there
30 Gehry-Bauten Been there
31 Gnadenauge der Maxkirche Never heard of
32 Goethe-Museum im Schloss Jägerhof Never heard of
33 Goldene Brücke im Hofgarten Been there
34 Grabbeplatz Been there
35 Grabmal Wilhelm des Reichen Never heard of
36 Greifweg Never heard of
37 Hand von St. Suitbertus Never heard of
38 Haus der Ey Know of
39 Haus Zum Neuen Schelfisch Never heard of
40 Heine Haus Been there
41 Hetjens-Museum Know of
42 Heyebad Never heard of
43 Himmelgeister Kastanie Been there
44 Hungerturm Been there
45 Hunsrückstraße 16 Never heard of
46 Internationale Bushaltestelle Never heard of
47 Japan Store Never heard of
48 Junge Rheinland im Stadtmuseum Never heard of
49 K20 Been there
50 K21 Know of
51 Kaiserpfalz Been there
52 Kaiserswerther Deich Been there
53 Karlrobert-Kreiten-Stolperstein Never heard of
54 Killepitsch-Stube Know of
55 KIT Know of
56 Kölner Straße Been there
57 Konrad Fischer Galerie Never heard of
58 Konsortium Never heard of
59 Kreuzherreneck Never heard of
60 Kreuzstation am Lindenplatz Been there
61 Kunstakademie Know of
62 Kunsthalle Know of
63 Lantz’sche Park Know of
64 Lassalle-Gedächtnisstätte Never heard of
65 Malkasten-Park Know of
66 Marokkanisches Viertel Never heard of
67 Mausoleum in der Andreaskirche Never heard of
68 Münstertherme Know of
69 Napoleonsecke im Schiffchen Never heard of
70 Neandertal Been there
71 Nitribitt-Grab Never heard of
72 NRW-Forum im Ehrenhof Been there
73 Oberbilker Markt Been there
74 Park am Spee’schen Graben Been there
75 Rahmenmuseum Never heard of
76 Ratinger Straße Been there
77 Ratinger Tor Been there
78 Raum 20 Never heard of
79 Reeser Platz Know of
80 Reinraum Never heard of
81 Reiterstandbild auf dem Marktplatz Been there
82 Rheinuferpromenade Been there
83 Rheinwiesen Been there
84 Rochuskirche Know of
85 Salon des Amateurs Know of
86 Schloss in Benrath Been there
87 Schloss Mickeln Know of
88 Schlosstreppe Been there
89 Schlossturm Been there
90 Schöne Aussicht Been there
91 Schwanenmarkt Never heard of
92 Schwarzwald-Christel Never heard of
93 Seufzer-Allee im Hofgarten Been there
94 Siedlung Freie Erde im Eller Forst Never heard of
95 Souterrain im Cafè Muggel Been there
96 Stadterhebungsmonument Been there
97 Stindermühle Never heard of
98 Stoffler Kapellchen Never heard of
99 Stresemannplatz Never heard of
100 Tausendfüßler Been there
101 Trödelmarkt am Aachener Platz Been there
102 Uerige Know of
103 Urdenbacher Kämpe Never heard of
104 Volksgarten Been there
105 Volkshaus Been there
106 Yede-Gör Never heard of
107 zakk Know of
108 ZERO-Atelier Never heard of
109 Zicke Know of
110 Zoo Been there
111 Zwischen Luegplatz und Belsenplatz Been there

Computing industry history and other things I am enthusiastic about

When I was in college, I was technically majoring in Business Administration. However, as the workload was manageable (at least initially)  and I was living on my own, I found myself with a lot of free time on my hands. Most importantly, it was also the first time I had broadband and an always-on internet connection. So many a night was spent teaching myself how to program in Delphi (I had already started with Turbo Pascal in high school) and wasted on other technology enthusiast stuff.


I am not entirely sure how it came about that my enthusiasm was focused on Microsoft, though. I guess it was just coincidence that at the time Longhorn had just been shown off at PDC 2003 and there was a lot of excitement around the great plans Microsoft had for their flagship product. Microsoft also had a great communications strategy whereby they offered all kinds of interesting and instructive videos for free download, such as The .NET Show and later Channel 9. While I am not sure, as I said, what originally got me interested in Microsoft I know what kept me interested and that was definitely Channel 9. Their first video describes their mission pretty well: to keep the conversation going and make Microsoft and their technology more approachable by showing the people and their enthusiasm in making Windows and their other products.

There is, for instance, this one video of J.P. Stewart, a car enthusiast working at Microsoft, who has fitted his car with Windows XP and a bunch of other technologies, or Scott Hanselman who has various Microsoft products integrated into his house. I find this communications strategy highly effective (I know it worked on me), because what makes one more inclined to be enthusiastic about a company’s products: seeing the real people working there and their enthusiasm for the technology or a guy congratulating himself, throwing around words like “revolutionary” and basically going on an on about one minor improvement in their manufacturing process that, let’s face it, few people will care about (I am talking about the unibody video, of course).

TrianglesAnyway, this is the story of how my enthusiasm for Microsoft came about. Naturally, I was very excited to see Microsoft put up videos from all their developer (PDC) and design conferences (MIX) of the past few years. There is some pretty cool stuff there. I find it particularly interesting to watch the really old stuff and see how what was new and exciting back then is already several generations behind now.

If you are a history buff like me, you might also enjoy The History of Microsoft series or Anders Hejlsberg’s tour through computing industry history at the Microsoft Museum. Or these videos of Larry Osterman talking about his early days at the company. I can also highly recommend his blog along with that of Raymond Chen who has a lot of insightful stories of the historic reasons for why certain are the way they are in Windows. On the topic of Windows history, let me also mention two books I find very interesting: First, Inside Windows 95 by Adrian King which has pictures of some of the early designs of the arguably most significant release of the Windows operating system. From the same time period there is also Visual Interface Design for Windows by Virginia Howlett that talks about the work done on for the 3D graphic user interface in Windows 95.

Another series of videos that I find very interesting is the campus tour. Microsoft is a big company and they have some pretty cool things such as their archives, research labs (parts 1, 2 and 3) and an awesome food court.

FogCreek Software

The other site in addition to Channel 9 that I spent a lot of time on during my in college days was Joel On Software. It has taught me everything I knew about the software development process when I got my first job. The Two Stories article, for instance, has had a profoundly influence on what I think makes a good manager. So it should come as no surprise that when we were looking for a new bug tracking/project management tool at work, I suggested FogBugz. I have also used CityDesk way back when I was getting into HTML and I needed a simple solution to create a bunch of HTML pages based on templates I had written using HTML and CSS.

Their latest product or rather service that I use is the Stack Exchange network of Q&A sites. As a programmer I obviously use Stack Overflow the most. But I also find the Stack Exchange podcast very interesting. I find it really cool to listen to Joel Spolsky, Jeff Atwood and others working on the site about the different design decisions that go into making the Stack Exchange sites great. It’s really unfortunate that due to the nature of my work at a bank, I cannot freely talk about the things I am working on or the technology challenges I face.


The other technology company I love is Amazon. I love their products, have shopped there regularly since 2003 and of the 37 online purchases I have made so far this year, 36 have been at Amazon (the other one was train ticket for an upcoming trip). There is a really interesting video on MIT’s World video site entitled Earth’s Most Customer Centric Company: Differentiating with Technology where Jeff Bezos, founder of Amazon.com,  talks about how they have used technology to set themselves apart from their competition. It’s really insightful and also quite funny. Another great source of Amazon.com history is Amazonia, a book by James Marcus, an early employee at Amazon.

Looking for the perfect memory manager

I have this colleague who is extremely smart and also very detail-oriented. Its seems like whenever he is writing code, he is thinking about optimizing it at a much finer level than anybody else would (such as whether its faster in Delphi to determine the length of string once and store it in a local variable or whether to call Length() two or three times). Since he is working on some of our core systems, so it’s generally great that he optimizes them for speed. One of his pet-peeves is the memory manager he uses. Over the course of the past couple of years, he has been alternating between three different ones. I thought him crazy for this, because memory management like networking is such a low-level thing that most programmers don’t concern themselves with and just take for granted that it works. At least that’s what I thought. I don’t anymore after seeing how much of a difference your choice of memory manager can make.

The memory manager does make a difference

Even though I do most of my new development in C# these days, I recently had to do some work on an old Delphi application of mine. This application is highly parallel and I have taken great care to write it in a lock free fashion for optimal performance. As the amount of traffic this application had to handle grew, however, we noticed that its CPU usage was barely exceeding 12% on an eight-core system, meaning despite its many threads it was using just one processor core.

These threads don’t share a single data structure or have to go through some code that would block them, since all the critical parts are lock-free. But of course, all threads do share something and that is the memory manager. Delphi makes it very easy to swap the default memory manager for something else, so I compiled my app with my colleagues favorite memory manager of the day and low and behold, performance improved dramatically because of it. This event has converted me and I started looking around what other memory managers there were that might be useful.

Finding the perfect one

Interlocking SquaresFor the type of applications I write (long-running, high-throughput server applications) the memory manager should first and foremost scale well with the number of threads. The memory manager I had used originally didn’t scale at all, since even on a multi-processor machine with multiple threads it was effectively locking me down so I was no better off than with a single-threaded application on a single core-machine. Another important aspect is low memory fragmentation, when the application has to keep running for days or even weeks. There is also the amount of overhead incurred by memory management, though I have found that to be negligible. As my code is mostly CPU- and not memory-constrained, a slight increase in memory consumption is not a problem.

Here is a list with the memory managers I have found people in the Delphi community use with a short comment on my experience with them:

  • Default Delphi Memory Manager: The default memory manager in Borland Delphi 2006 (the Delphi version I still use the most) is based on FastMM (see next bullet point). It was this memory manager that I had the aforementioned scalability issues with. It seems to be working fine, though, for pretty much everything else we do that is not heavily multithreaded. I can’t speak for the memory managers that ship with newer versions of Delphi as I haven’t used those.
  • FastMM: This memory has been created by Pierre le Riche as a replacement for the default memory manager. According to its creator it “scales well in multi-threaded applications, is not prone to memory fragmentation” which I have found to be mostly true. We do have seen some weird access violations though in an application using this memory manager that didn’t occur with other memory managers. It might not be FastMM’s fault, maybe we are doing something we are not supposed to do and other memory managers are simply more forgiving, but whatever it is, I am hesitant to use FastMM in any of my projects.
  • TBBMM: This one I came across looking for alternatives to FastMM. It is essentially a wrapper around Intel’s Memory Manager from their Threading Building Blocks library. I am not quite sure what the added benefit of the wrapper is (since I couldn’t find source code on their site), but it is pretty simple to include the threading building blocks memory manager oneself. In the experiments I did for my application, this memory manager has been the fastest and most scalable overall. However, it seemed to be prone to memory fragmentation as I was getting some nasty out-of-memory exceptions in a common scenario in my application (the application allocated a block of memory and after a while freed it, then a short while later allocated a slightly larger block freed that and so on).
  • Visual C++ Runtime Memory Manager:  Since one of our libraries written in C++ already required Microsoft’s memory manager, it seemed natural to give it a try for other parts of the application as well. The results were similar to Intel’s: it scaled well (though a bit slower than Intel’s), but was exhibiting the same problems with fragmentation.
  • Miscellaneous: In my search I have come a couple of other memory managers. Some seemed rather obscure or new and unproven so it didn’t spend much time with them. I include them here for the sake of completeness though in alphabetical order): google perf-tools, Nexus Memory Manager, SynScaleMM and TopMemoryManager.

Important note: While most memory managers can be downloaded for free (for instance as part of some redistributable), they may not be free to use under all circumstances. Intel, for instance, has different licenses for open-source and commercial use.

Doing your own memory management

While rolling your own is probably a pretty bad idea when it comes to memory management, I did in fact end up doing something like it: I am still using the default memory manager for most of my memory management needs. However, some of the data structures that I used the most I converted to fixed-size records. This allows me to allocate one large chunk of memory and than carve out pieces to produce the records as needed. An integer-sized flag is used to track usage of the records. When my initial chunk runs out of free records, I just allocate a new one. Working with records  also cuts back on some of the overhead that comes from using objects, although I am not sure that that overhead is really significant, especially since you trade in some flexibility and convenience by using records. It did prove to be much faster, though.

Thoughts on Windows 8 and what’s to come

Yesterday Microsoft released a video showcasing the user experience of the next version of Windows, codenamed “Windows 8” . For more information, check out the accompanying press release or this article by Paul Thurrott with a run-down of the most important facts.

Looks great

This new UI is obviously not meant to be used on your boring, old office PC, but instead on “a new generation of touch-centric hardware”, presumably tablet-style devices, regular PCs with touch enabled displays and maybe even things like the Surface. It looks really cool, as it based on the Metro Design Language that has been used for Media Center, Zune and most recently Windows Phone 7.

I am a big fan of Metro and feel its tile-based UI has a lot of advantages over other competitor’s grid of icons approach. I’ve talked before about how I feel that a grid of icons no longer cuts it, and that using desktop gadgets or now live tiles is the preferable way to make the desktop more useful. Check out this demo to see what cool things the British Airways app does with the new and improved live tile technology in the upcoming Mango release of Windows Phone. I’m really excited to see these kinds of things come to the desktop in Windows 8.

But some questions remain

Even though the UI looks great, there are a couple of things that have me concerned. For one, the gestures used to switch between applications and the like shown in the video to me don’t seem very discoverable or intuitive for that matter. This, I think, is the most serious problem with touch-based UIs, as there are but a handful of gestures that are really natural: tap (obviously), pinch to zoom, swipe to scroll, double-tap as a replacement of double click and maybe tap-and-hold for a context menu, although that last one is already pushing it. Any other functionality exposed via gestures would probably be better exposed via a menu or other kind of on-screen control.

Furthermore, they say these new kinds of Windows 8 apps are build on standard web technologies such as HTML 5 and JavaScript. Why? it reminds me of a couple of other, not so great attempts to bring web technologies to the desktop: Active Desktop, HTML applications and most recently Windows Desktop Gadgets. I don’t think I ever saw the first two used for much and even though I wouldn’t call desktop gadgets a failure, there isn’t a great number of really good ones available.

Using web technologies on the PC seems even more strange considering there are other (in my mind superior) options already available to developers today, namely Silverlight and Windows Presentation Foundation (WPF). WPF, in my mind, should be the premier technology for writing any kind of Windows client application, because its powerful and allows developers and designers to write really engaging applications that can look just like those shown in the Windows 8 demo.

I’ll write up another article about the limitations of Silverlight that I have found trying to write my first Windows Phone app, but it still is a very nice piece of technology. Even though there have been rumors that Microsoft is going to phase out Silverlight in favor of HTML 5, which they deny. If you asked me, I wouldn’t mind seeing Silverlight replaced by HTML 5 on the web side and WPF on the rich client side. Silverlight to me occupies a weird middle spot: HTML 5 is clearly the way to go for web applications that should run on a variety of platforms and not require a plugin (as Silverlight does). And even though Silverlight supports so called “out of browser” applications, I think one should rather write “real” applications that use the full power of WPF and have those update themselves in the background sort of like Chrome does (which seems already possible today though it’s not as widely used as it should be).

Dreaming of: one computer in multiple roles

Considering that this new UI in Windows 8 is not going to replace the traditional desktop for certain scenarios, here is what I would like to see: Imagine an ARM-based, Windows 8 powered tablet that was light and small enough so you could it carry around most of the time (maybe a form factor like that of the Amazon Kindle). Such a computer would be perfect on the road for some light email, web-surfing and the like, but for serious work™, one would obviously want a full-sized keyboard, mouse and monitor(s).

How cool would it be if there was some kind of a dock or connector one could plug their tablet into, attach all the devices to and use that setup in lieu of a regular computer. It would be sort of like the laptop dock for Motorola’s Atrix phone. Maybe one could even integrate a co-processor or some “power boost” into these workstations (sort of like one can today off-load some calculations to the graphics card if one is available). This way, the device could have a low-power, high-efficiency processor for on the go and one still had more computing power available when needed for work. And when docked the touch screen of the tablet could be used either as a giant track pad with multi-touch and gesture support or as a means to take notes with a pen (like on the Courier), giving the user a choice to use whatever kind of input was most suitable for a given situation.

Imagine the possibilities if these connectors were standardized and everybody could bring in their tablet or other little handheld device and connect it to whatever display happens to be available. And given that Windows 8 supports these different user experiences, one could then pick what ever mode of operation was best for the given situation: the tile-based touch interface on the go, a traditional desktop at work and maybe the media center interface at home in the living room.

An now combine that with the cloud

One could go even farther and combine that with the cloud. Maybe one doesn’t want to carry around all their data, so that could be up in the cloud. I could even imagine applications that I have purchased stored in the cloud and then downloaded on demand when I need them. This way I could have a core set of applications on my device; just the stuff I need on the go or when internet connectivity may be limited. And when I am at work and I need some specialized application, that could be streamed to my workstation either from the public could or from the company’s private cloud (something like Microsoft’s RemoteApp feature in Terminal Services). These apps could be keep running in the background and when I disconnect and later reconnect they could be there again in the same state as they were when I left them. No longer would I need to spend half an hour every morning starting up all the applications I need for the day.


I am aware that a lot of the stuff in this article is wishful thinking. But considering the different pieces of technology that are already available today, powerful portable devices, docks that expand their functionality, cloud storage, remote desktop et cetera, I don’t think what I have ben describing is that far fetched. And given that Microsoft is a player in one way or another in all of these fields (mobile devices, PCs and servers), I think they are uniquely positioned to make this a reality. I sure hope they or someone else does…