Best Linux commercials (TV ads)

There are a few commercials (TV ads) for Linux. There are not many and they are not very well-known either. So for old times sake and to promote the good cause I will share my three favorite videos.

#1. IBM: The Future is Open

This is a Linux advertisement from IBM, released in September 2003 titled “The Future is Open”.

#2. RedHat Linux Commercial

This is a Linux advertisement from RedHat. I have not found any background information on it (does anyone know?).

#3. Linux Foundation: How Linux is Built

The following video was published in 2012 by the Linux Foundation. In my opinion, it is not as powerful as the above two.

Ideas or suggestions? Use the comments!

Share

Net neutrality is boring! says John Oliver

“Net neutrality is boring!” is the message that John Oliver sends in his video. I think this is indeed how many people feel about the subject. That’s why it is extra remarkable that he made a 13 minute long video about it that went viral. Check it out:

john_oliver

Be warned that John Oliver is a strong advocate of “net neutrality” and he is presenting a very one-sided take on it. Nevertheless quite entertaining.

Share

“The Expert” is Lauris Beinerts viral comedy sketch

“The Expert” is the title of the short comedy sketch Lauris Beinerts (Google+) posted a last week on his Youtube account. It went viral and is heading for half a million views in under seven days. It is about a “Funny business meeting illustrating how hard it is for an engineer to fit into the corporate world.” The video stars Orion Lee, James Marlowe, Abdiel LeRoy, Ewa Wojcik, and Tatjana Sendzimir, and is written & directed by Lauris Beinerts. It is based on a short story by Alexey Berezin titled “The Meeting” (in Russian) or translated by Google.

“I can do absolutely everything, I’m an expert!”

expert_video

At LeaseWeb we understand…

At LeaseWeb we understand how hard it is for an expert to operate in the corporate world. So, if you have been in too many meetings like the one so well portrayed above, then you may want to take a look at our career offerings for engineers. Currently we are looking for:

  • Senior Engineer Virtualization and Storage
  • Hosting Engineer Virtualisation and Storage
  • Hosting Engineer Cloud
  • Software Engineer CDN
  • Software Engineer Cloud
  • Infrastructure Security Engineer
  • Infrastructure Engineer Cloud

We employ over 360 people in the Netherlands, Germany, the UK, and the US. Despite the company size, we try to keep things informal around the offices, with few layers of management. The members of the OCOM Group (LeaseWeb, EvoSwitch, FiberRing, DataXenter) hail from over 34 different nationalities, making English the language of choice.

Interested in working for us? Take a look at our careers website!

Share

Text mode 2048 game in C, algorithm explained

2048 is hot! It may be considered the next Flappy Bird. I implemented 2048 in the C programming language, so you can run it on your Linux server on the console (in text mode). You can find the 2048.c project on Github.

2048

Rules

You can move the tiles in four directions using the arrow keys: up, down, left, and right. All numbers on the board will slide into that direction until they hit the wall and if they bump into each other then two numbers will be combined into one if they have the same value. Each number will only be combined once per move. Every move a new number 2 or 4 appears. If you have a 2048 on the board you have won, but you lose once the board is full and you cannot make a move.

Algorithm

I chose to store the field in a two-dimensional array called board that is 4×4.

[2][0][8][2]          [2][4][8][4]
[0][4][0][2]  press   [4][8][4][4]
[4][0][2][2]  up key  [0][0][0][0]
[0][8][2][2]          [0][0][0][0]

Since I want the board to be addressed as board[x][y], the board consists of a set of four columns size four. So the first column is the array [2,0,4,0]. If we press the up button this should become [2,4,0,0]. The function “slideArray()” is reponsible for this. This function will “slide” the numbers in the arrays like this:

[2,0,4,0] => [2,4,0,0]
[0,4,0,8] => [4,8,0,0]
[8,0,2,2] => [8,4,0,0]
[2,2,2,2] => [4,4,0,0]

The algorithm can just use board[x] to point to a column and work directly on that. In pseudocode, this is what the algorithm does:

- walk over the array from the first to the last number
  - for each original number in the array that is not zero
    - look backwards for a target position that does not contain a zero (unless it is position zero)
      - if the target position does not contain the original number use the next position
    - if the target position is different from the original position
      - add the number to the number on the target position
      - replace the original number by zero

The above algorithm executed will do all transformations, it will:

[2,2,2,2] => [4,4,0,0]
[0,8,2,2] => [8,4,0,0]

But there is a problem, it will also do this:

[2,2,4,4] => [8,4,0,0]

The two’s are merged into a four and then the first four is merged into that making it an eight. This is wrong. It should be doing this:

[2,2,4,4] => [4,8,0,0]

This is avoided by adding a “stop” variable that will be initially set to zero, but when a merge has been done it will be set to the merge position plus one. This will make sure any next slide will stop before it merges into this number again, since double merges are not allowed.

To prevent complex programming I use a function rotateBoard that rotates the board 90 degrees counter-clockwise. This allows the moveLeft(board) to be implemented as:

rotateBoard(board);
moveUp(board);
rotateBoard(board);
rotateBoard(board);
rotateBoard(board);

As long as you rotate four times in total everything works as expected. This method is not very efficient, but reduces the complexity of the code.

Compiling and running

Since 2048.c is a single C file it is easy to get running, just execute the following commands:

wget https://raw.githubusercontent.com/mevdschee/2048.c/master/2048.c
gcc -o 2048 2048.c
./2048

This will run on most machines. If not, then execute the following command to install the compiler:

sudo apt-get install build-essential

Further reading

Share

Xtranormal software development videos

xtranormal

Software development industry has its issues. Some of these issues are (exaggerated and) turned into videos using Xtranormal. Xtranormal is a text-to-video service that used to be run on Xtranormal.com. It is a text-to-video service that is no longer available online:

As of July 31, 2013, Xtranormal, an easy online animation tool, will be closing its virtual doors. They will be discontinuing their services and subscriptions while they explore new dreams for the future. — goanimate.com

We’ve found this set of 5 software development related videos on YouTube for you. Since they are made with Xtranormal, you can see this post is a sort of a tribute to that service.

5 software development related Xtranormal videos

The videos are full of negativity and sarcasm and this is intended to be funny. Let’s hope it does not get too close to reality for any of you. If it does I feel very sorry for you – and you should immediately apply for a job at LeaseWeb 😉

Warning: Some of the dialogue contains strong language.

We created a new “Funny” category in which we will try to post more funny software related articles in the future. Let me know how you liked these movies using the comments and keep visiting us!

Share