Guess who’s back?!

September 5th, 2013

Wow, that were some holidays! First I went hiking with Aga in Norway in Jotunheimen. It took forever to get there (2.5hrs to Brussels Charleroi, fly to Oslo Rygge, 1hr bus to Oslo, 5hr bus to Fagernes, sleep, 2hr bus to Gjendesheim). It was wet, soggy, long routes, and quite difficult (slippery rocks due to wetness). I mean, the first day there was a rather insanely difficult stretch down. Turns out that just about everyone does that route the other way around… and yes, that helps.

Nevertheless, it was also quite awesome :) Mountain huts in Norway are different from those elsewhere. For starters, we had to go to reception every time to check in (yes, you read that right). We usually opted for a smaller (sometimes even a private) room instead of a dormitory. (Yes, you read that right too). We also opted for the 3 course dinner (uh-uh) and the breakfast buffet.

Following a wonderful and active holiday in Norway, I immediately went to Bobby (Oslo -> Rygge -> Brussels Charleroi -> Antwerp, where Bobby picked me up). The next morning, the second holiday started, and we went to Venice. In some respects, Venice is very touristy. But: the tourism fits. It’s normal that there’s all sorts of tourist stalls and street vendors in Venice. So, weird though it sounds, the tourism in Venice was a relief from having to check in at reception in a mountain hut.

Venice was great fun, thanks to Bobby. I shan’t tell all tales here, but do ask me about acquiring a small bottle of Venice water for Bobby’s sister, or how our plane was not leaving on the 29th, or how the opening night of the film festival could be skipped according to film fan Bobby (he was wrong).

From Venice we went to Vienna. Funnily enough, our original flight had a stopover in… Berlin. I kid you not. At the airport, they found that this was somewhat inefficient, so they rebooked us to fly via…. Dusseldorf main airport. Rather funny, seeing that we began the holidays from Dusseldorf Weeze airport. The weather in Vienna was rather different from Venice, the planetarium was no success, the permanent fun fair (Prater) closes around 23.00 on Saturdays (seriously, Vienna, what’s up with that??), and in front of the Opera house they sell you tickets for classical concerts that are not in the Opera house.

The last one was actually kind of funny to me :)
The concert we went to was Mozart and Strauss, and hearing them side by side it was obvious why Mozart is the better-known of the two. It was less obvious why the concert leader was racing through the performances – until the encore. Turns out he’s a big fan of showing off how fast he can play technically challenging pieces.

On Sunday, we visited Bratislava in Slovakia, just because we could (and just to add another notch on our world maps of visited places ;-). That day was quite an adventure in itself, and while the inner city of Bratislava radiates “17th century centre of culture and commerce”, the outskirts near the train station radiate a more “East block / Iron curtain” look – at least to our western eyes.

In a nutshell:
– Norway is wet. Wet rocks are slippery, and wet ground is soggy.
– Venice’s wetness is concentrated in the canals. Standing at a red carpet is better than you’d expect.
– Vienna is surprisingly mediocre after the exuberance of Venice.
– Bratislava, though nearby, is quite a look beyond the western world.
– It was all great!

Adding tabs to your website

August 7th, 2013

Lindy hop logoSjouke and I have been actively updating and improving the Swing Dance Luxembourg website. Informally, we’ve reached a division of tasks: Sjouke is focused more on content, and I focus more on tweaking CSS, HTML and Javascript. This division is obviously not 100% clear cut, but the Javascript work on the site that WordPress doesn’t handle, I do :) (yes, the website is running WordPress – you wouldn’t say, would you?)

One of the first more substantial pieces of work was making the FAQ such that it expands questions on a click. As with any programming task, the concept is fairly trivial, and the devil is in the details (e.g. updating the “?” character to a “?” for open questions). And, of course, Sjouke is perfectly happy to pretend he doesn’t understand code, and make user requests (“we ought to have a ‘show all’ link), which sound reasonable. Of course, there’s more than one way to implement such requests, and usually the easy way is not not quite supported by my Javascript… meaning more fun for me!

We’ve had a bit of a discussion on how to organise the descriptions of the various Swing Dances. There’s quite a few we describe, and just having all descriptions under each other was rather messy. Then I hit upon a great idea: using tabs!

The internet was rather helpful, and quite a few sites provide some bare-bones instruction on how to get the tabs looking like tabs. Halfway through, I switched to using this explanation, which was simple and showed some alternative approaches.

In a nutshell, you use a regular list (UL) for the tabs. So each tab is in its own LI element. You use CSS to then tweak the presentation. The beauty of using CSS, you can actually nicely separate presentation and structure, thus ensuring a better degredation for screen readers / non-graphical browsers. In particular, you’d use list-style: none outside none; for the UL, and either display: inline or float: left for the LIs. To get the tab to look as part of the content, you extend the padding on the bottom a bit to overlap with the content (and decrease the margin by a similar amount – to ensure the content is not pushed down by the padding).

As you can see, I tweaked the looks somewhat further. Adding a border to the LIs, except at the bottom. Rounding the corners of that border (border-radius), but not the bottom-left-radius or bottom-right-radius. I added a background to the lot.

Done! Right?
Nuh-uh.
The tabs don’t work yet.
Oh, right….

So, some coding is needed. Each tab’s “content” is in a separate DIV. All DIVs except the default one are set to display: none to hide them (which is not necessarily ideal — it still involves loading all DIVs upon first opening the page). So what is to happen when we click a tab? Well, the active content DIV is hidden, and the one clicked on is shown. That part is actually trivial.

But: the tab itself must also come to the foreground. I am currently coding the required style updates in Javascript itself, which is very ugly and makes it hard to update.
I just found this little gem, so basically I should be able to just update the class names instead of tweaking styles. While it works for now, I’ll probably have a look to that soon, because it just is so much better.

Nevertheless, the current result is already le awesome! To support old links to anchors (...#blues and such), I even added some Javascript to check if such a link was requested and then load the requested DIV. One funny thing that tripped me up there: you can only switch DIVs after the DIV is loaded. Rather obvious once phrased like that, but it means that that particular piece of Javascript has to be at the bottom of the page :)

Herräng, or how I learned to dance a bit

July 21st, 2013

Lindy hop logoI just got back from Herräng, and it was totally awesome!

The official overview of Herräng 2013 week 2:

However, that misses out on all sorts of really cool things.
First of all: auditions. Auditions are an always necessary but painful aspect of dancing workshops. There’s too many people for one group, so you need to split it somehow. Herräng campe up with an interesting idea: peer auditions.

In a nutshell, you dance with about 7-10 different people. Each of them rates you, and you rate each of them. These ratings are then used to divide you into groups. Obvious advantages include that you’ll be dancing with a group of people that want to dance with you (it’s quite common for people to “challenge” the auditions and try to move up, because they feel they’re better than the folks in their level). An interesting aspect is that your fellow dancers will not only judge your technique, but also your charm and your innovativeness — well, basically they will rate you based on how much “fun” the dance was. A surprising move might well push you up!

Which probably explains why I ended up one group above the other “Luxemburgers”. Actually, for two days I thought I was one below – I mean, I know they all dance better than me. Then someone explained to me that no, it was the other way around. Mind-boggling, but ah well.

The peer auditions were validated by teacher auditions the next morning. This was no longer very scary, since we were already divided into groups. I guess the teachers were mainly looking to see if anything was amiss. I think they found little to correct, so the peer auditions worked sufficiently well. I ended up in a wonderful group, so for me it worked out.

Group photo

We had a great week together and learned a lot. One of the coolest things was that when there was a large surplus of leaders, the leaders would hook up together and practice the current figure together. Given that you’re dancing with pretty advanced dancers, that worked surprisingly well.

Thanks to this and some leaders not being hesitant about leading a guy, I actually managed to get some serious following done. Besides the guys from my class, I also danced with one guy from Advanced, and with Juan. So yeah, I can follow a bit if I dance with really good leaders… well, that’s kind of cheating, but okay :)

Lots of other things happened, including a juggling and hip hop class (I taught the juggling part), me following a Capoeira class (muscles responded: OUCH!), late night parties, and a severe case of the Herräng flu (it’s been 8 days, and I’m finally starting to recover).

All in all: wonderful, I’m coming back for more!

Sweden, part 1: top-heavy galleon

July 21st, 2013

Lindy hop logoI got back from Sweden a week ago, and Herräng totally rocked! I’ve learned more about swing that I’ve ever forgotten about dancing – some of it might even stick :) However, first things first: I spent a day in Stockholm. Very low on sleep on account of waking up at 2.30 to eventually take an early flight, but still, it was cool.
Ingrida and I used our one day in Stockholm to view the old town and the Vasa Museum.

Vasa and Vasa model

Yep, that’s right. That is an almost-completely-intact frikkin’ galleon. No shit, Stockholm! The story behind it is even better: after completion, the galleon left its birth harbour. Within the first 1600 meter, a wind rose. Ideal for a sailing ship, right? Nope, the ship toppled and sank.

I kid you not.

Really, Vasa museum, if you had a t-shirt like the below quote, I would’ve bought it. Hell, if I ever go to Stockholm again, I just might have it printed myself!

“My newly-finished galleon sank on the first breath of wind it encountered, and all I got was this lousy t-shirt.”
— King Gustav II

Running from Rock to Swing

July 3rd, 2013

Lindy hop logoLast weekend, Wichard was over and we went to the Rock A Field festival. Volbeat was as good as I remembered from last time they were at RAF, but other than that, there wasn’t much rock happening. On the other hand, I cobbled together a first draft of a teaching statement and a research statement that weekend, and Wichard and I watched all Indiana Jones movies (me with half an eye), Hotel Transylvania and Wreck It Ralph (the latter two movies are warmly recommended). Of course the statements I wrote need to be polished more (at least I didn’t write “X never marks the spot” ;-), but still… not bad for one weekend!

That actually came hot on the heels of a visit by Anke and Rogier, which, in turn, came hot on the heels of the Chase festival (I realise I am losing my blogging credentials right now by not linking anything here, so let me link that up for you: chase festival, Rock a Field, and yes, I’m too lazy to go back and put them in the proper spots :P).

Next up: Herrang swing dance camp! One week of improving swing dancing. And then it’s of to London for VoteID 2013 (see, now that I know to add links, I’m going crazy with them :), after which we’re immediately back to the one-day beginners Swing Dance course in Luxembourg (I’m one of the teachers :), and of course, practice all the dance moves at the Blues ‘n Jazz Rallye later that evening.

Any wonder I need holidays? ;-)

Swing Dancing is becoming “A Thing”

June 2nd, 2013

Lindy hop logoThere has been a lot of Lindy Hop dancing lately in my life. I’ve been enjoying the dance right here in Luxembourg since roughly 2010. Sjouke dragged me to the first classes by Ieva and Einar, and I’ve stayed on and even tried to help out here and there.

As one may expect, teaching 2 levels of dance classes in the week, organising regular dance evenings and organising workshops is a ton of fun. It’s also a serious strain on one’s free time. Einar and Ieva were thankfully not the only ones who realised this.

It has taken us a while, but a month or so ago we finally managed to start our very own asbl. I’m proud to be a co-founder of this club, and to be involved in helping to structure this club during this initial period. Big items on the list were actually officially starting the club (which required concensus on the statutes – yeah, that’s nitpicking), and the workshops that had been planned already before the official start.

Luxembourg dancers at smokey feetWith Einar’s blessing and tutelage, I’ve taken over organisation of the “Sharing the Fun” initiative, where experienced dancers prepare a one hour clas and share their fun at dancing with others. To top it all off, I’ve been to Smokey Feet, Swinging in the Rain, the Mini-Swede-Swing-Weekend (only advertised on Facebook, I believe) and 3 dance workshops in Luxembourg (Catrinne, Marjorie, and Balboa by Einar and Gaby).

So: holy cow! Where does one find the time to do anything else? I dunno, but I definitely did and plan to do more.
One thing that did not happen yet: creating a website for the ASBL. Once we get round to it, you’ll find more HERE than empty pages.

Skype on Ubuntu 12.04-64 bit

March 20th, 2013

here’s what did work for me.
(sorry for the short post, in a hurry!)

Unity crashes on Alt-Tab (Ubuntu 11.10)

February 21st, 2013

So, there’s a bug, where Unity (Ubuntu’s window manager) crashes on Alt-Tab. It’s been fixed for a year now in the newer Ubuntu’s, but those of us running the old stuff… we’re stuck.

Unless, of course, we follow the advice in one of the comments:

  • Install “compizconfig-settings-manager”
  • run “ccsm”
  • go to “Ubuntu Unity Plugin” -> Switcher
  • disable all key bindings.
  • Go back to the main screen and enable “Static Application Switcher”.
    (If you do it the other way around, you will get segfaults.)

It gives you a more limited switcher (only to windows on current desktop). On the other hand, this one switches to windows instead of applications — so no more annoyance trying to switch to the right window of an application that you’re running 10 times (such as a terminal window).

SokoDroid

January 10th, 2013

sokodroid logoThanks to Filipe Ferreira, we have tested Soko2012 on an Android system. You can see the result below.

It works!!!
photo of sokoban on android tablet

SokoBan 2012 released!

January 4th, 2013

Arnout de Mooij and I are proud to announce the first official release of SokoBan 2012! This is a classic version of the game Sokoban, completely programmed by Arnout and myself. We started programming this around the time we both just had access to pentiums. Or perhaps even slightly before. Well, it took so long this game can go straight into nostalgia haven!
Sokoban menu

Quick install

  1. download and unzip soko2012.zip
    Android users: you’ll need an unzip utility.
  2. install DosBox 0.74 or higher
  3. For Windows only, here’s how to create a shortcut (see also the below picture):
    • Go to the Desktop.
    • Select the DosBox icon.
    • Press Ctrl+C and then Ctrl+V to copy the shortcut.
    • Right-click, select “Properties”
    • At the end of the field “Target“, add the full path of soko2012.exe.
      E.g., if “Target” was "C:\Program Files\DOSBox-0.74\DOSBox.exe" -userconf, and the files were extracted to C:\Users\hugo.jonker\Downloads\sokoban\, then “Target” should become "C:\Program Files\DOSBox-0.74\DOSBox.exe" -userconf C:\Users\hugo.jonker\Downloads\sokoban\soko2012.exe.
    • Change the field “Start in:” to point to the folder where you extracted the zipfile.
      E.g., continuing the previous example, “Start in:” would now become C:\Users\hugo.jonker\Downloads\sokoban\.
    • Change to the Tab “General” and rename the icon to SokoBox.

Shortcut icon properties

To play:

  • Unix: run startsoko.sh from the command line.
  • Windows: Double-click the SokoBox icon.
    Potentially the game runs slow, press Ctrl+F12 a few times to speed up DosBox.
  • Android: Run DosBox and enter the following commands:
    • cd Downloads\sokoban
    • soko2012.

Screenshots

Sokoban's level selector Sokoban's image sets
Sokoban lvl 6 in play playing lvl 5

Features

  • 48 completely original fields
  • 22 completely original, totally not-ripped graphical sets, including:
    • a fastfood-themed set
    • a halloween-themed one
    • a crisis-themed one (bring your money to the bank)
    • a Sinterklaas-themed one
    • a christmas-themed one (notice that Sinterklaas != Santa)
    • a few inspired by videogames of the 8-bit era
    • and more!
  • a stand-alone level editor
  • a stand-alone graphics editor (heavily updated in 2012!)
  • Keeping tracks of 2 types of highscores:
    1. the best efforts (least moves, then quickest) for the first 10 levels
    2. the 10 players who got the farthest completing all levels
  • A player-state saving system, so that you could continue to improve your score for the 2nd type of highscore
  • Level selector with thumbnails of the levels
  • a demo mode (don’t touch any key for a while in the beginning, and the game will play one of the first 20 levels).
    Pointless? FUN! :)
  • Opening and ending scrolling titles
  • Insanely trivial-to-break encryption scheme for said titles :)
  • And, lest we forget: CHEATS! Including a complete internal level editor. I kid you not.

System requirements

Yeah, that’s sort of it. This game was in development for a while, and unlike Duke Nukem Forever, we never deviated from the original specs. Sure, we need some memory (640K is enough :),  CPU (press Ctrl+F12 to speed up, Ctrl+F11 to slow down — these are dosbox controls, not ours), and some graphical requirements (stock VGA modes). Really, your smartphone can handle these. With two fingers in its nose.  :)

Development history

Question: what does this version of Sokoban have in common with such pretentious names as Guns n’ Roses’ Chinese Democracy, or the game Duke Nukem Forever?
Answer:

  • Chinese democracy: in development 1998-2008
  • Duke Nukem Forever: in development 1997-2010
  • Sokoban by us: in development 1994-2012

Message to take home: all good things deliver. Alternatively: not everyone can maintain their development quality as long as Arnout and I can :)

Thanks

Big thanks due to everyone who helped and inspired us. You’re probably named in the titles already!

Questions/comments

If you have any questions or comments, don’t hesitate to contact me!
If you’re reading this blog, you ought to know how :)