• Tiny tool to merge multiple .ics files!

    Planning to attend a local conference, I went through all the lectures and workshops that would interest me and wanted to add them to my calendar. Thankfully, the conference website has iCalendar files available, one for each event.

    I organise my agenda with Google Calendar, but I discovered that it is not possible to just import all of these .ics files at once.

    After a quick search, I discovered there were some small command-line scripts or windows executables available to merge several .ics files into one, but none of them was a simple and painless website.

    This is why I decided to make a website for just this very specific usecase! Find it here, at:
    http://michaelion.net/icsMerge

  • How not to do E-Government - The 'Citizen Card' of Austria

    So a week ago I decided to get political - for the first time in almost 3 years - and to support a referendum to uphold the smoking ban in Austria’s restaurants. I used to smoke on and off for 3-4 years before giving up. That smoke is utterly disgusting in closed rooms, is a truth I always knew though. Anyway. I go to the local council and sign it. On the campaigns website, I notice I could have done this comfortably from home, by registering for a “Citizen Card” or a phone signature, which allows you to settle various formalities online. Nice! I am pretty late to the party anyway, the citizen card has been introduced already 15 years ago. I heard that the citizen card had its problems when it launched, but surely they must have fixed everything since then… right?

    First things first, I need a card reader. They recommend buying one for 15 Euros from a “trusted” shop, or put a link to an alternative on a price comparison site. The model on that site is one of the most expensive you can find, for >50 Euros. I wonder why they want to make you buy from that specific shop? I found one (the Cherry 1300) on Amazon for 6 Euros.

    It arrives, I look on the site for the drivers and install them, works fine.

    I go to the Citizen card site. I want to register from home and receive a mail with the final activation code. First, I need to setup the ‘Citizen Card environment’, developed by the state. There are several providers, but only one, “Mocca”, is available for Linux. I download the intallation file - or so I thought. It’s a .jnlp file. Turns out this is a file that downloads the installation program itself. But I need a program to run it first. After some googling, I find an app and install it:

    1
    sudo apt-get install icedtea-netx

    So I installed the program to finally be able to install the program. I run it, with:

    1
    javaws mocca.jnlp

    It crashes. There’s some JWT error. The terminal tells me to run it with Java 1.6 - that’s not gonna happen. After even more googling, I find another alternative. I type:

    1
    sudo apt-get install icedtea-plugin

    I can execute it, it downloads the files. Cool. I need to install and approve a certificate for browsers. Easy. The app I installed runs this Mocca thing in the background. With this, I will be able to register on the site. I navigate there and it tries to start some Java Web App thing. They sure love Java in the Government. Chromium and Chrome will have none of that - looking at past security vulnerabilities, surely this wasn’t the best way to proceed with this whole thing? In Firefox, it crashes. I am pissed off.

    I repeat all the steps on Windows. It can run the jnlp file from the get-go, fortunately. This time, I use the kingslayer - Internet Explorer. I have to click away three security warnings before the Java App can launch in the browser. It loads… it loads… and then I get some cryptic Java runtime exception that I cannot inspect further.

    I am even more pissed off. Who in the world thought this was a good idea? If you want to make a population change their ways, you have to make it as easy and as comfortably as possible for them. Who in the world looked at all this, at all the steps necessary for the setup, all the applications to install, and said: “Yup, this will change how the government works. This is the future.”

    It hurts to think the state paid millions in money and countless hours in manwork to create such a turd. Why didn’t they bother looking at how other governments were doing these things at the time? The UK, for example, has an impressive history of e-Government. And then, the leading force and head of the certification authority in Austria who produced all this things, said in an interview how he doesn’t understand the criticism. He said, the system works, they even sold it to Liechtenstein. To Liechtenstein! I am sad for these poor souls (all 37.666 of them).

    There’s no surprise the citizen card has been adopted by only 2.4% of the total population (Liechtenstein can be a considered a major win compared to this).

    Ok. I liked the idea to have this card, but I made a mistake in ignoring the outdated approach behind it. It baffles me however, that they do not just completely revoke the citizen card for the failure it is, and still put it as a viable option for things like public petitions.

    Anyway, next try: Mobile phone signature. It seems you can do everything with it as with the card - and it makes sense! All the banks use this form of 2 factor authentication. For activating this one, you have to identify with your passport at a local post or council. Luckily, I already did this once before so I have an authorized online post account, so it only takes two clicks. However, if you have not done such a thing before, it will be another one-time annoyance. In order to avoid going to the council, you have to go to the council first.

    Anyway, I’m waiting for my signature now, and then I will sign all the petitions there are. Hooray for direct democracy!

  • Create custom, web-based, interactive crossword puzzles for your friends in no time!

    Example Crossword using the Qurossword Project by J.Weisbeck

    So this year, I wanted to give my best friends a special gift - or better said, I wanted to give them my gifts in a special manner. So instead of just handing them a well-thought-out gift, I made a crossword puzzle for them to solve before allowing them to unravel their gifts. The clues consisted of funny memorabilia, quotes, events and other random things that were in some way connected to my friends or my friendship to them. I will show you how you can make a similar one in no time! Your friends, family or lovers will love it. In the digital present, nothing is as real as a digital present!

    1. Get your clues together

    Think of some awesome clues! In the best case, those reflect your relation to the person for who this crossword is for, but using their favourite movies, books or bands can be a fantastic source as well!

    2. Generate a crossword

    Sure, you can now just layout your puzzle on your own, however you see fit. But I will just use one of the numerous crossword generators on the internet… Those sites have some irritating limitations (they want to make you pay for unnecessary downloads or someting), but remember, we only want the layout for our crossword out of this.

    The one I used is Puzzle-Maker, as it doesn’t limit the number of clues you can use and typing your clues in is pretty neat: Just your solution word and the clue (which can be as long as you wish), separated by a slash. No unnecessary form or restricting format.

    Okay, fill in your clues and generate your puzzle! You know should have a picture of the crossword of your dreams. In the next step, we will make it interactive!

    3. Fill layout information into crossword app’s json file

    For building the crossword in the browser, we will build on the fantastic “Qurossword” jquery plugin, developed by J. Weisbeck. Basically, we will just edit one file in this whole project (with our clues and the relative positions) and the scripts will take care of the rest. I did a fork of this project to add a crazy final screen when someone completes the crossword, which you can find here.

    You can add clues as follows: Open the file script.js in the folder js. You will see an array containing this array:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    var puzzleData = [
    {
    clue: "First letter of greek alphabet",
    answer: "alpha",
    position: 1,
    orientation: "across",
    startx: 1,
    starty: 1
    },...

    Just modify this array so it contains one entry for each clue you have. Per clue, you have to specify if the clue goes “across” or “down”, and where the position of the first box is. Btw, we deal here with screen coordinates, so the origin here is on the top left with startx = starty = 1. If you fill this information correctly, your clues should interlock nicely with each other.

    If you downloaded my version with the crazy final screen, you also need to change a little detail. Open the file jquery.crossword.js and look for this part:

    1
    2
    3
    // FILL IN HERE - put here the amount
    // of character fields to trigger the win screen!
    var wordsLength = 9;

    You need to change the value of wordsLength to the number of blanks that you have in your crossword in order to trigger the winning screen (so the length of all your clue words minus intersections).

    That’s it! Now you can upload the whole folder to your website, and if someone goes to this folder, they get redirected instantly to the index.html page (which you also can edit to customise the final message). If you don’t have a webpage, just make a quick and easy one with github pages and jekyll!

  • Comparing transportation costs in Vienna - A R/Shiny example project

    Complete Visualization: Public vs. Car transportation cost in Vienna
    With some time during my holidays, I took part in the Open Energy Data Challenge 2017[^2] organized by the City of Vienna council. The aim of the project was to come up with an original idea for putting the publicly available data of the most recent energy report[^1] to good use.

    Looking through the data

    For this, all participants received numerous excel files that contain all the data in a neat tabular form and additional visualizations used in the report. There were a lot of different attributes, but at the first glance, it was hard to put something useful together. The data included everything about consumption, prices and distribution of energy. By energy, everything was included - Fuel to power cars, electricity produced by various sources like wind farms or coal plants, and so on. It was split up into data on industry and private homes. Some of the attributes concerned only Vienna, some only different states, some information was only available aggregated on the whole of Austria. Some were only measures for the year 2013, others included dates back to 20, 30 years ago. It was a mess.

    I first wanted to make a cool map-based visualizations that the user could manipulate, but the data was clearly not cut out for that. But for what was it, then?

    Well, after carefully looking through each single file, I noticed there was some interesting data on car usage, fuel price, yearly ticket costs for public transport and other transportation-related items. I decided to do a visualization to compare what the average Austrian citizen spends on public transport with what he would spend on fuel using a car.

    Building the project

    Using Shiny

    I used the R Shiny web framework for this. It is a very intuitive way to bring R programs to the web. In short, you write all the app in R in this form:

    1
    2
    3
    4
    5
    6
    7
    library(shiny)

    ui <- fluidPage()

    server <- function(input, output) {}

    shinyApp(ui = ui, server = server)

    All the layouting information comes into ui, all the data access, manipulation and usage of visualization methods go in server. Then, you need to connect the pieces in the server to the interface elements in ui. A great tutorial and everything you need to know you can find on the dedicated shiny page. I used the solarized theme for the plots and the flatly theme for Shiny.

    The final product

    The web app is split into three parts:

    On the left there are the user control to manipulate the visualizations. We can modify the car consumption, daily drive kilometers, how many drivers are present in Vienna and if we want to have cost per year or daily costs. If you don’t specify certain values, you can tick a box to use real (averaged) values.
    Left: Control panel of Visualization

    In the middle there is the display of transport cost per person plus miniature visualizations on price developments. Price developments are visible if an area in the visualization is selected. These are how the prices are calculated from the data:

    • Public transport:
      Year card price
    • Car usage:
      Car km per day * Fuel price * Car Fuel Consumption

    If cost per day is selected, prices are divided by 365. Not all the information I needed here was to be found in the energy report[^1], so I had to find other sources as well[^3]. Missing values between time points were estimated via linear and LOESS regression.

    Middle part of Visualization

    On the right, we see the total cost of transportation of all persons according to these formulas:

    • Public transport:
      Year card price * Total tickets sold
    • Car usage:
      Car km per day * Fuel price * Car Fuel Consumption * Total number of cars

      On the right bottom, there is an indication on how many sustainable energy plants could be built with the money that was saved from buying fuel for car when using public transport. For this, an area must be selected on the right top visualization.

    Right part of Visualization

    Please check out the final product, and dig into the sources if you like!

    [^1]: The “Energy report of the City of Vienna 2016”
    [^2]: Open Energy Data Challenge 2017”
    [^3]: Additional daily kilometers, average fuel consumption of cars; Amount of cars in Vienna; Daily kilometers 2016: VCÖ Austria; Fuel prices 2016;

  • An introduction to... The best places to play awesome board games online!

    About one year and a half ago, I became hugely interested in board games. All of it began “offline”: Me and my SO got us the game Jaipur, a 2-player card game involving trading goods and camels. We got hooked instantly and grave battles were fought to win the sympathy of the Maharadscha. When we lived apart for a time, we didn’t want to stop playing this great game, and as fate would have it, there existed not only one, but several online platforms that had this amazing game in their collection!

    And that was not the only one. Over the following months, I started to devour lots of different game rules, from easy, low-investement games (so-called “fillers”) to complex, super-strategic hardcore games that last for hours and involve so many pieces that you will not ever catch a cheater (which is a strong plus for online board games and/or having trustable friends). I never realized how much amusement I got out of cardboard/plastic/offline board games (as opposed to video games) and since then try to excite my friends in the same way. Which does not work always - so good that some big online communities exist of willing board game players [^1].

    Three platforms really stand out on the web, and on these ones I tend to play a lot. What they all have in common is, that they have all big, friendly communities and that each of them has awesome games - some are shared, but some are unique to each site. You might want to look into each one of them to see if there are some games that you already love or are really interested in! I will present some of my favourites of each split up into proficiency categories - for just trying the sites out I recommend to look at the beginner games, as they mostly take less than 10 minutes to learn an so you can focus on the features of the site! For players looking for more intricate games with complex rules, look at the more advanced categories, although they require some studying of the game rules.

    Interestingly, the sites are either originally german or french, but people from all over the world are using them and almost everyone speaks english. That’s convenient if you ever run into a problem on the site or during a game.

    1. Yucata

    Yucata was the first site I discovered due to the game Jaipur being featured on it. It was started as a hobby project by Kay Wilke, who wrote lots of the games on the site himself but since has been expanded vastly by the community.

    ###The awesome games

    • Beginner, super quick to learn and master

      You can learn and play the games in this category in just a few minutes. Most of these so-called ‘lite’ games are dice- or card-based and often, luck plays a role - however, they still leave you with some tough decisions to make. Yucata offers lots and lots of these games, however, it is hard at first to notice them because games on Yucata are not necessarily sorted into difficulty categories or such[^2], so I will give some examples.

      If you’re into dice games (like Yahtzee), check out “Shanghaien”, “Can’t stop” or “To court the king”.

      For simple card games not harder than Uno, check out “R-Eco” and “Port Royal”. Beginners should look at these right away, but they can also be a blast for a seasoned gamer!

    • Advanced, takes some time to learn and master

      Now, let’s take it a step further. We enter the section of games that are still very easy once you get the hang, but they take a bit longer to learn. All in all though, the rules should not take you more than half an hour to totally understand and the games will be clear halfway through (if you ever only played things like Risk and Monopoly and want to see what other things board games have to offer, this is the place to start ).

      A Yucata-exclusive example in this category would be “St. Petersburg”. Each turn, you can buy one of the cards on the table. Every turn has a theme, at the ending of which you get either money or points if your cards match the theme. The strategy here is to balance money and points - get too many points in the beginning will not get you the good, point-heavy cards later because you can’t afford them, get too much money and you will fall behind with the points. Easy-peasy to play, but hard to get it juuuust right.

      Another one worth trying out is “The Speicherstadt”, which is set in the charming, historic warehouse district of Hamburg. Set your game figures (meeples) on cards representing resources, missions, firefighters and other bonus cards (called a “worker placement”-game). Multiple people can bid in these way on the same card - the first person to bid on them can buy it, but the more meeples are on it, the more expensive the card - so bid and choose wisely! The most points you get when you complete missions by providing the right resources. Also, there are bonus points (or malus) for the person with the most (or least) amount of firefighters in the game. It is a combination of smart bidding and bluffing which leads you to be the winner in this game!

    • Expert, needs proper dedication to learn
      Ah, you want to know about the biggest and longest on Yucata? These “Expert” games take some time to read and understand the rules - about an hour - and need one or two plays to be appreciated fully. They offer lots of decisions, which might make you feel lost in the beginning - but extremely gratifying if you get it and your strategy just works. “A Few Acres Of Snow” follows the British-French conflict in Canada during the 18th century. It is very interestingly designed and combines thematic play with lots of different game mechanics. If you liked “The Revenant”, you will love this! Just beware of raids of the natives!

      Trains seem to be a popular theme for board games, and one of the most beautiful ones is “Russian Railroads”, which is a fascinating and exclusive game on Yucata. This game portraits pretty well how tedious and exhausting the construction of huge railway lines must have been in the rural and desolate places of Russia. Progress is slow - bit by bit you hire engineers, buy better and better trains, factories and build one of the three most prominent train routes (of course including the Leviathan that is the Trans-siberian railway from Vladivostok to Moscow). What makes this game incredibly tense is the fact that players can block each other: It is a ‘worker placement’ game like ‘The Speicherstadt’, although once a player has chosen an action, no other player can occupy the same space in the same round! However, there are a lot of ways to make points in Russian Railroad. A LOT. Which means: There are a lot of ways to win: Fancy railtracks, lots of factories, lots of engineers… Most often, you focus on one part to generate points and then slowly drive up the point generators on other parts of the game (resulting in point scores in the hundreds, which adequately puts this game into the category of so-called “point-salad” games). There are a lot of different actions to choose from, and to be honest, I still have not figured out a preferred playing style in this. I really love the possibilities though.

      On a side note: It goes without saying, that the very best form to enjoy board games is as a group activity, with friends and family, around a table, with a physical game out of plastic and cardboard. However, the form of online play is really great [^3].

      By the way - you can always use the main chat in Yucata on the landing page to ask around if someone is willing to teach you any game - there are a lot of helpful and nice people there!

    But there are lots more to discover, and I only played a small minority of them until now! With more than 100 different games available, that’s hardly a wonder.

    The awesome parts

    Yucata centers on turn-based games.
    Yucata is 100% free-to-use and ad-free. This spirit comes also from the circumstance that the site and the games on it are all developed as fun projects in the creators spare time. The site is donation driven to compensate for the server’s running costs.
    A really cool feature of Yucata is that they always incorporate the rules of every game into the site. Those documents do not only include the actual rules of the games themselves, but also indicate differences of the gameplay in the implementation (thanks to the digital medium, a lot of processes are automated and skipped, so you don’t have to do them - e.g. counting points at the end of each round) or in the games interface (e.g. the only interaction possibilities are highlighted so you don’t have to think about what you are restricted to). Additionally, with the new framework, it has also become a standard to create a short, summarised version of the rules as well as the original rules text (i.e.: lengthy and detailed ), which you can inspect on a sidebar. This is very handy and time-saving for when you come back to a game after not playing it for a while.

    ###The other parts
    No “real” live games. This can be a turn-off to some hardcore gamers that want to finish games in one go - there is no penalty if someone just decides to log out and leave a game unfinished. Sometimes for weeks. Games get also deleted after 30 days of inactivity, so that can be annoying if you had a really good go at one game, but you can’t get it completely finished.

    This got longer than expected! I will focus on other sites in another post, at another time. Hope you enjoyed!
    For completion, these are other sites that I am also playing on:

    2. Board Game Arena

    Board Game Arena

    Real-time gaming built on cutting edge web technologies like Sockets and Dojo

    3. Boîte à jeux

    Boîte à jeux is another french site, which is functionally very comparable to Yucata.

    [^1]: Compared to playing your friends, it is sometimes more satisfying if you play, let’s say, a french opponent online in ‘Through the Ages’ and they succumb to your giant army led by Napoleon - Ze tableaus ‘ave turned, mon ami! Only to have your opponent play Gandhi in the next go and rendering your whole power useless. D’oh…

    [^2]: One way to find those, is to look at the “Yucata Game Statistics”. Often, the most played games on the sites are also the easiest and shortest - like “Can’t Stop” in this case.

    [^3]: Especially for the times you just can’t persuade anyone to play that awesome new game that takes two hours and another one to explain and set up

  • About the first round of presidential elections 2016

    The Austrian presidential election, that is.

    …which was quite interesting, mostly for two reasons:

    1. None of the candidates of the conventional party were even close to progressing to the second round

    2. The high lead of alternative-party and independent candidates

    3. A very high lead (far higher than the already high prediction) of the candidate of the right-wing party FPÖ

    …which of course spurred a whole new lot of all kinds of debates. People from the left calling people from the right stupid and uneducated, people from the right calling people from the left unrealistic and pretentious. Sadly, the normal political discourse in Austria these days. Then, of course, lots of calling others Nazis or Communists or whatever. As if anyone would really care.

    The presidential election is not so important politically as it is more of a symbolic act; but it sends a clear signal to the conventional parties, a fuck you to the establishment and is also a remarkable observation of the political trend of the last years.

    1. The conventional parties, the SPÖ and ÖVP (think Democrats and Republicans, or Labour and Tories) have to do some serious reform if they want to stay in business.
    2. All of the other parties should start listening to the demands and needs of the right-wing voters. Of course they will continue to vote the FPÖ if they are ignored and patronized, as is now the case. They do not care if the people they vote for are part of some clubs with german-nationalistic ideologies, as long as they tell them that they will give them what they want.

    Maybe the conventionals will take the chance and make some changes. Maybe they will just continue to do nothing and accept their fate passively. Then, probably, a government with the right-wingers in the lead will take control and they, maybe, will ruin this country financially - as they did before. Who knows.

    Anyway, I don’t want to make a big opinion piece of this. We will see on the 22nd May who finally gets the presidency - everything is possible and depends, above all, on the amount of non-voters and how the voters for the other, now disqualified candidates, will decide.

    Post-Chaos Edit: What an election! So much (smear) campaigning for one of the most unimportant political positions in the world! It’s hilarious how the rest of this campaign unfolded. After the second round, won closely by Van der Bellen, the right-wingers succeeded into nullify the whole thing! Vote repetition! Voting a third time! But actually not - shortly before election day, the envelopes used for voting-by-mail were found to have a faulty glue attached to them! This meant… A fourth round! Millions of taxpayers money and hundreds of hours wasted… Luckily, the fault was quickly found by the Austrian officials: It was german glue! Those pesky germans, trying to strip our democracy down to its fundaments…

    And then we voted a fourth time for our president. Beginning of December… Looking back, this election really dominated conversation and press the good part of 2016 - pretty insane! I guess the same goes for the US.

    Politics is a blast!

  • Introduction to Code Poetry

    Today I saw a seemingly randomly hanging little poster on a wall in my university. A poster for a code poetry slam. Say what?

    I was quite familiar with the concept of poetry slams. They got quite well known in German speaking regions after the excellent poem by Julia Engelmann went crazy viral in 2013 in all major medias (which you should check out if you know German. Yes, it is full of post-teenage-angst, insecurity, everything bothering about millenials and being one, but it is technically flawless and definitely leaves an impression on everyone listening). Afterwards, there was a hype about those slams, a revival was declared on the art of writing poems, long thought dead, the performance bit made it fresher than just “poetry”, events and competitions took place everywhere. The hype existed in the States way longer, on Youtube you can find tons of inspiring, angry, moving, thoughtful, poignant or just plain funny slam poems (this poem by George Watsky is one of my favourites, such a good blend of technique, message and spit-take). Now they seemed to gain too much popularity for their own good sake, angry and fast-spoken rants were now also declared “slam poems”. But it’s all in good fun.

    But code poetry? That was something really new I have never heard of. My first mental images of how this would look like ranged from the very awkward to the very awesome. Avid programmers regard coding beautiful algorithms poetry in itself, but of course this was not gonna be only about nice, efficient lines of code. It seems that the first event of this kind was organized at Stanford in 2013, with a spiritual predecessor being the code{poems} project by Ishac Bertran in 2012 (unfortunately the contents are not freely accessible). Looking through some of the examples, I am either extremely delighted by the completely genius of some of these or extremely lost by the lack of getting-it.

    Check out these lovely examples from the first Standford Code Poem Slam:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    //"That Girl" by Ian Holmes

    import java.Object.*

    public class ThatGirl {
    public SomethingBetter main() {
    return whatYouFound;
    }
    }

    or

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    ///"Expect_Delays" by Dylan Moore

    private Boolean she_smiles_for_me() {
    //heart:
    while(true) {
    System.out.println("beat.");
    try {
    Thread.sleep(86400000);
    } catch (InterruptedException e) {}
    }
    return true;
    }

    The programmer’s love, expressed. How cute! Actually, one could combine the two poems, which would add a nice fatalistic Goethian touch. So poetic!

    Some poems are harder to get. The high entry barrier of some of these poems is the only thing that can block someone from enjoying code poetry to the fullest.

    It seems that almost all of the code poem examples that I found can be classified in one of these two categories:

    1. They are actual poems themselves, either written in real, machine executable code or typed in some form of pseudo code inspired by some programming language. For example, the two poems posted above!

    2. They are not actual poems, but more executable poem generators, most of the times spitting out different results each time they are run. One brilliant example is 21st Century Prophecies by Hunter Bacot, which is a tongue-in-cheek statement about the ideological leaders of nowadays. Another one is Ross Goodwin’s Poetizer, which will spit out lots of more or less sensible rhymes according to the parameters you specify (of which there are lots to choose from).

    Anyway, I just found out that my Uni actually hosts one slam like this in May for the second time, so I will check it out. The results from last year were kinda mind blowing (especially for some that were in a german-english mix), so I can recommend looking through the site.