Skip over main section of the page and go to navigation links.

David Mandelberg — Blog — Archive for Tag: technology

Europe Trip

Posted on August 17, 2013. Tags: flower, photo, technology. 3 comments.

I got to go to IETF 87 and the RPKI Deployment Strategies Workshop in Berlin for work. Then I took advantage of the great opportunity and used some vacation to see Scandinavia. It was a rather amazing trip overall.

2013-07-25 – 2013-07-26

The flights from BOS to TXL were pretty uneventful. The ring layout of TXL's Terminal A was interesting.

I then headed over to Hauptbahnhof to get my EuRail pass activated and to buy some train seat reservations for the vacation portion of the trip. Berlin's public transit is the best I've ever seen. Throughout the week, I rode the U-Bahn, S-Bahn, Regionalbahn, and a bus. All of them were fast, on time, clean, and easy to navigate. Hauptbahnhof was huge, with lots of connections going all over the place, both in the Berlin area and to other parts of Europe. Stations felt safe at night.


Breakfast at the InterContinental was delicious. I had liver sausage, smoked mackerel, smoked salmon, a sprat, scrambled eggs, pancakes with nutella, waffles, fresh fruit, a pretzel, a few types of cheese, feta and leek salad, and fruit juice.

I got to Freie Universität Berlin early, so I looked at their collection of interesting old computers:


(just some work stuff this day)


I walked to Wittenbergplatz for dinner, then walked around looking for a music store. In the process, I ended up in the enormous department store KaDeWe. They had an amazing selection of Legos, Fischertechnik, and lots of other cool toys, but not the music I was looking for.


The social at the Deutsches Technikmuseum was great. The trains exhibit was beautiful from an engineering perspective, although some of the history was unsettling (but handled well by the museum). The replica of Zuse's Z1 was both pretty and fun to talk about with the other IETFers.


(just some work stuff this day)


I had dinner with coworkers at Käfer on the roof of the Bundestag. There was a really good view from the dome of both the city and the parliament below. After dinner, we walked back to the hotel through the very pretty Tiergarten.


I went to a biergarten with a coworker. My König Ludwig beer, pretzel, and pizza with mozzarella, basil, and tomato were very tasty. I finally found a city that has pretzels on par with or better than Philadelphia.

I also had a chance to walk around and take pictures:


Vacation! I got on the train from Berlin to København. After a few minutes, we were going about 190 km/h and I didn't even realize it until I read the sign. We passed forests and fields of corn, grass, wind turbines, and solar cells. The train took a ferry between Germany and Denmark. It was nice to get out and walk around on the ferry.


I took the train from København to Göteborg and from Göteborg to Mellerud. On the bridge between København and Malmö, I saw an offshore wind farm! I really don't get aesthetic complaints about wind power. Wind turbines are pretty. On the first train, somebody was blasting a remix of Only Teardrops. I was amused. On arriving in Mellerud, I walked until I found a place to sleep:


I understood intellectually that the night is shorter closer to the poles in the summer, but I didn't realize just how little sleep I'd get. I decided to sleep inside the remaining nights.

Mellerud is a nice small town surrounded by beautiful countryside. It's near Vänern, the largest lake in the European Union. I have a few photos:

When I got back to town, I asked a man near the train station if he knew if Kil has hostels. He didn't speak English very well. He offered to lead me somewhere, but I couldn't understand where or why. After about a kilometer, we were in what appeared to be the town center, with a tourist information center. I thanked him, and the people at the tourist info center were very helpful.

I took the train to Kil and found their tourist info center to get directions to the nearest hostel. It was farther than I felt like walking after hiking and walking around all day, so I gave in and stayed at the Kils Hotell. The room was simple, but very nice. The person working there was very nice.

I watched some TV in the hotel. I really liked the supermarket ads. They had spoken words, written words, and pictures for various types of food, which came in handy throughout the rest of the week. There was also a show with some good music.


I took the train from Kil to Oslo. In Oslo, I found a small cluster of antiques and second-hand stores. They had some really interesting things, including a butter churn, old skis, some manual SLRs and lenses, and a lot of furniture.

In the hostel, I shared a room with three South Koreans on vacation around Europe and two Italians on their way to Svalbard. I may or may not be seriously considering visiting Seoul and Milan now.


Another train, this time Oslo to Finse. I had a good time talking with a retired Canadian couple and a young Norwegian. The hostel in Finse had a bed, so I decided to stay there.

The glacier was beautiful and the air was a pleasant 10 °C. I ate lunch outside watching the lake and glacier. Then I decided to take a walk around the lake, which turned into a hike much of the way up to the glacier. The mountains, rocks, ponds, and snow were some of the most stunning scenery I've ever seen, and my pictures don't do it justice:


I woke up in Finse to a beautiful cloudy day. I walked around the Rallarmuseet and saw the biggest snow blowers I'd ever seen.

I took the train from Finse to Myrdal, then the Flåm railway to Flåm. On the Flåm railway, there was a photo stop at a waterfall with a wonderful surprise that I won't ruin.

I got lucky again and got the last bed in the hostel in Flåm, then I walked around. The mountains, valley, and fjord were just as stunning as Finse the day before, but in a different way. As before, my pictures don't do it justice:


I woke up to another beautiful day in Flåm, then took the train back to Myrdal and on to Bergen.

Bergen is a wonderful city. I took a walk on a cobbled street and through a large park. The variety of colors of old houses was pretty. The park had public xylophones, glockenspiels, and a slack line. A few (presumably) locals asked me to play a glockenspiel for them, so I made something up. They applauded when I finished.

The open air fish market at the docks had stalls selling all sorts of delicious-looking fish, both for immediate consumption and for later preparation. I saw salmon, whale, monkfish, live giant crabs, live lobsters, shrimp, mussels, and many other things. I tried some free samples at various booths, then settled on a delicious fish curry for dinner.


I woke up early and flew home, meeting some interesting people in the process. The Oslo–Newark flight had a really good view of southern Greenland. I hope I can see those snowy fjords at ground level some day. It's good to be back in the land of the free (gratis bathrooms and water fountains, that is) and contra dancing.

Automatic List Filtering with Procmail

Posted on April 13, 2013. Tags: technology. 1 comment.

I've been using procmail for a while, filtering mailing list messages into per-list folders with one rule per list. I recently decided to try automatically sorting lists by List-Id headers. When I searched for pre-built rules to do this, I found some that came close, but none that did what I wanted. So I wrote my own compound rule and posted it here. The below code sorts a List-Id like or into the Maildir folder

* ^List-Id: .*\/<[a-zA-Z0-9_-]+(\.lists)?\.[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+>$
    * LISTID ?? ^<\/[a-zA-Z0-9_-]+
        * LISTID ?? ^<[a-zA-Z0-9_-]+(\.lists)?\.\/[a-zA-Z0-9_-]+
            * LISTID ?? ^<[a-zA-Z0-9_-]+(\.lists)?\.[a-zA-Z0-9_-]+\.\/[a-zA-Z0-9_-]+

This has a few advantages over other rules I found online:

  • The entire List-Id is used, not just the part before the first dot.
  • The resulting folders are hierarchical.
  • Only a limited character set is allowed in folder names. This prevents something like List-Id: <foo/../../../etc/passwd> from causing trouble.

It also has a few disadvantages:

  • It only works as intended for List-Ids of the form list-name.domain.tld or list-name.lists.domain.tld. Other List-Ids are either incorrectly assumed to be in one of those forms, or ignored.
  • It only supports a limited character set. This has security advantages, but usability disadvantages.
  • It does not place a limit on the length of the directory name. Unfortunately, procmail makes that difficult to do.
  • It converts dots in the domain into hyphens, but hyphens are allowed in domain names. This could cause both and to be sorted into the same folder,
  • It's a bit hard to read.

Polyball Bounce 0.2.1 Released, Goals for Future Release

Posted on October 4, 2009. Tags: technology. No comments.

I just released an update to Polyball Bounce. This release only makes minor changes, including making the paddles curved for better control.

For the next release, I plan to work on separating the game into a client and server, allowing multiplayer games over the network. I'm also considering switching from pygtk to OcempGUI for the configuration window.

Polyball Bounce 0.2.0 Released

Posted on September 29, 2009. Tags: technology. No comments.

I just released the second version of Polyball Bounce. This version is actually playable, but still rough around the edges. A screencast is available.

Polyball Bounce 0.2.0

Polyball Bounce 0.2.0: Configure

Polyball Bounce 0.1.0 Released

Posted on September 23, 2009. Tags: technology. No comments.

I just released version 0.1.0 alpha of a new game I'm working on, Polyball Bounce. To see what it looks like, check out the screencast.

It's currently in pretty early stages, but I plan to keep working on it till it's at least playable.

Student Union Elections (Server Side)

Posted on September 16, 2009. Tags: technology. No comments.

First, a bit of background info: I'm currently the primary administrator for xenon, an old server that I inherited from former members of COG. Xenon used to run a bunch of important things, but it currently only runs the Student Union website and some very low profile and unused personal and club sites. I've been pushing for the Union to move to something more manageable on a newer and better maintained server, and Yale Spector has been doing a lot of work to that effect. The new site is Almost There™, but we had to run another round of elections on xenon. Unfortunately, everybody who knew how to set up elections on the old site has left Brandeis.

After some effort, mostly on Yale's part, to figure out the election system, everything seemed to be working. If there were any random crashes, they were fixed automatically by a script I wrote after problems with last year's elections going down.

Towards the end of the election's time window, the list of candidates disappeared from the website and admins couldn't stay logged in. Fun times. Nobody could figure it out and I was unreachable, swing dancing and then hanging out with a friend in the gym, which has bad cell reception. I got back to my dorm to see some interesting messages.

After some digging around, I found that the relevant code for listing candidates does something like SELECT * FROM candidates WHERE election=12345 ORDER BY RAND(), which gave ERROR 1030: Got error 28 from table handler. When I removed the ORDER BY clause it worked fine, so I was about to accept non-random ordering of candidates until I could find out what's wrong or randomize the order in PHP instead.

Since I'm not familiar with the code, I decided to make an in-place backup copy before changing the relevant file. When I tried that, I got the dreaded no space left on device. Duh. MySQL must have been trying to use disk space to "sort" the table. The admin interface must have been trying to insert rows into MySQL or otherwise write session information to disk.

After a minute or two with du and sort, I found what looked like a safe file to delete. Magic, people can view candidates and make an informed decision before voting.