Extroverted Introspection

Me looking at new things

On Mobile App Development

Mobile app development is a mess. Sure, it’s getting better but it still has a long way to go catch up with the development process on the desktop or even backend technologies.

Last year, german software company SAP cited that the development costs for a mobile app covering more than one platform starts at $50.000 and other figures I’ve seen concur with that estimate. Considering that this covers only the initial development, a lot of small and medium-sized business will think twice about developing their app and again think doubly on how to keep costs small. Back at doo we had mobile development teams for each platform, writing native code for each and even adapting workflows to suit the habits and expectations of users of the respective mobile OS.

But not many teams will be able to afford so much manpower, and so, with a tight budget and time schedule for our evopark app, I looked at and evaluated a lot of mobile development frameworks in the past weeks.

Thank You for Thanking Me

At the beginning of this year, I hacked together a small utility to reconfigure the function keys on the Logitech K290 when on Linux. Since then, I not only added a Arch Linux configuration but also received a couple of pull requests to ensure compatibility with a number of different Linux distributions and also improved support for udev, systemd and pm-utils.

But just as great as those pull requests are people writing to me and giving me their thanks for writing this small utility. Given how obscure a niche this tool is filling, there can’t be that many users. But despite that, I already received a couple of emails from happy people for whom the tool proved useful.

So this post is to say “thank you” to all those who contributed or sent me one of those mails. I got into software development to write good software that would facilitate the life of its users or - while I was still in game development - provide them some fun in their spare time.

Having said that, I can’t describe how uplifting it is to me to find that I seem to be successful in this mission. Receiving these emails goes a long way toward restoring my faith in humanity . As a result, I want to encourage you to do the same every now and then: whenever you find a piece of software to be useful - especially if it’s written by a single author or small team - take a couple of minutes to write its author(s) a few lines to express your gratitude: they’ll surely appreciate it.

Interestingly enough, there’s a fairly current “issue” on Github, thanking the Rails team for doing such a tremendous job in its development. Feel free to chime in if you’re using Rails or have been using it in the past!

So: thank you! Both for thanking me and for contributing to the world of open source software!

Reporting in Rails

Some time has passed after my last post and despite my solemn vow to blog more, that didn’t happen. That’s because I’ve been a busy bee and, again, too preoccupied with other stuff to write anything meaningful. The search for a new interesting job was - luckily - very short and left me in the company of the great guys at evopark. There I’m now responsible for the architecture, implementation and related sys-ops of their IT infrastructure. It’s loads of fun and I can finally work with Ruby On Rails full-time again.

And if there’s one thing to take away from the last couple of weeks, it’s that the development process with Rails has become even more awesome since its initial inception.
The surrounding ecosystem is huge, there are loads of stable, well-tested and documented gems to quickly develop complex, yet maintainable applications.

But there’s one subject that’s still… suboptimal: creating PDF reports. There are a couple of approaches that can roughly be divided into two categories: wkhtmltopdf and Prawn. Yet, when compared to mature reporting solutions from the Java world, like BIRT and JasperReports they all seem woefully inadequate.

Ember Data: Nested Resources

As anyone who has worked with Ember.js before can tell you, its learning curve is as steep as the framework is awesome. And its awesome indeed. That is why I want to share my insights from this afternoon to provide some instructions on how to use Ember Data with nested resources.

Gitlab CI: Clashing Sidekiqs

For a few months now I have been wondering about occasional hickups in my Gitlab setup. I run both Gitlab and Gitlab CI on my server, along with a number of other Rails-based applications.

Since I could mostly relate these to the creation of new repository, which is something I don’t do that often, I didn’t care that much about it.

But then today it happened again and, having some time on my hands, I decided to finally investigate. As it turns out, it was a problem with both Gitlab and its CI using the (wonderful) Sidekiq gem for asynchronous job execution. And both instances tried to use the same Redis instance, getting hopelessly tangled in the process.

Luckily, this kind of situation can be easily solved with a custom initializer. Just create a new file, config/initializers/sidekiq.rb in each project, with the following content:

require 'sidekiq'

redisConfig = {
  namespace: 'Gitlab', # adapt name for each project
  url: 'redis://' # replace '1' with a unique number

Sidekiq.configure_client do |config|
  config.redis = redisConfig

Sidekiq.configure_server do |config|
  config.redis = redisConfig

Technically speaking, the namespace is not required but I think it’s a good idea nonetheless.

To New Horizons

This week my employer, Bonn-based startup doo announced that they must discontinue the development of our planned product and had to let go of all associated teams.

Given the dynamics of the IT startup world, it wasn’t that much of a shock. There are different numbers for success rates out there but even the best ones don’t exceed 30% probability.

What surprised me much more was that apparently there is not enough demand in the market for the product we were trying to build: an end-to-end encrypted, distributed file storage and collaboration tool. At the point of writing, there is only one competitor that I do consider to be on-par with my expectations of security/cryptography: Tresorit. But even they, although they have a product with very high security standards and a good (though not outstanding) user experience, don’t seem to be able to get the required traction. People don’t seem to care about their data.

One year after Edward Snowden publicized the massive intrusions of the Five Eyes states into our personal lives - and also their close cooperation with other intelligence services like the german Bundesnachrichtendienst - everything is the same as it was before. True, a few nerds may have cancelled their Facebook account or installed GPG, but still we have been unable to communicate the situation to the vast majority of the population. So: more crypto, please. We need better IT products.

Having said that, I’m now free to look for new challenges and opportunities on which to hack on. Luckily, skilled developers are in high demand and my broad range of experiences makes me versatile enough that it shouldn’t be a problem to find interesting projects, so I’m much more excited about what’s to come than worried about unemployment.

During the coming month, besides writing job applications, I hope to work on some open source software projects, make a lot of music and also find time and inspiration for some more blogging. One thing I’ve been contemplating was to write a series of posts entitled “The Big Continuous Integration Shootout” wherein I present a number of CI systems, their strengths and weaknesses and where they are best employed. If you have any comments on that, please drop me a line!

Numenera: A Random Focus

In my quest for more storytelling-oriented role playing systems and more exotic settings, I recently came across Numenera, a game by RPG-veteran Monte Cook, whom you may know from games like D&D or Call of Cthulhu.

I won’t go into a full review of the game here. If you are interested, you may find one on LivingDice or as a video by the Gentleman Gamer on YouTube.

The setting of Numenera allows for a number of strange and powerful character foci, which work a bit like classes in other rule settings. Here I’m going to present to you a new focus I came up with while becoming familiar with the material. I’m not yet sure whether the balancing is ok, but in the face of fire-wielding and mind-reading characters I don’t think it’s as over-powered as it may seem in other contexts.

Controls Chance

Where others only see random occurrences, you observe the underlying patterns. Others may think you just lucky but what they don’t know is what you can achieve with only little nudges to the fabric of the world. Sometimes it’s just unconscious, like stepping aside just before a projectile would have hit you, and sometimes you are fully aware of what you are doing. A possible explanation is that the numenera all around you feed you information that your subconscious interprets; but no matter what the cause, you know how the dice are going to fall. You need to be in the vicinity of the events happening and they must be happening right this moment: Drawing the right card from a deck is easy but knowing which numbers will be picked in the lottery next week? Not so much.

Connection: Pick one other PC. For some reason your powers don’t predict anything she does. It’s quite distracting and you may decide whether you fear her or want to solve the enigma.

Additional equipment: A deck of beautifully crafted cards and a set of dice. You learn so much from experimenting in small scale.

Minor effect suggestion: Your luck surprises your target, leaving them distracted for their next action which becomes one step harder for them.

Major effect suggestion: You are prepared for this to happen and can immediately take a second action during this turn.

Tier 1: Understanding Randomness. You know the likelihood of everything occurring. Whether it’s winning at Blackjack, a weapon misfiring or the chance for rain, you know how likely it is to happen, down to the last decimal. Enabler.

Tier 2: Influence Chance (1+ Intellect points). You finally have not only understood chance but even managed to open a back-channel. No one’s gonna beat you at dice. For every Intellect point you invest, you can improve the odds for something to happen by 50% of its original potentiality. Action.

Example: a perfect coin toss usually has a chance of 50% to come up heads. Spending one point increases it to 75%, another point to 100%. On the other hand, the chance for the opposing mercenaries gun to misfire may be 1%, so increasing it to 1.5% is still unlikely to save your hide.

Tier 3: Uncanny luck. Your understanding of your surroundings has become subconscious. For the suprise attack rules, the character is always considered to be on guard. In addition, you can reroll your Speed Defense rolls and take the better result. Enabler.

Tier 4: Lucky Coin (4 Intellect points). You can extend your power towards another player, usually by giving him a lucky coin or other small token. For the next hour, this player has the same advantages as from your Uncanny Luck. Applying an effort extends it to 24 hours. Action.

Tier 5: Zen Centering. You have finally mastered your understanding of the world around you and completely internalized it. You always pick the right ledges when climbing, time your attacks better and know where to set your feet to reduce the chance of a mishap. Your Speed Edge and Effort score increase by 1 and your Intellect pool is improved by 5. Enabler.

Tier 6: Nothing left to chance (1+ Intellect points). Your understanding of your surroundings has also made manipulation a lot easier and even quantum flux feels predictable to you. For every intellect point you spend, increase the chance for something to happen by 10%. Action.

Note: The initial chance can be really small but it must be plausible. It’s not realistic that suddenly a piano will fall on an opponent from the sky. But that doesn’t mean that some of the artifacts he’s carrying won’t suddenly go haywire or that his sword - despite being forged my a master craftsman - breaks.

Friday Night Hack: Logitech K290 on Linux

TL;DR: If you have a Logitech K290 and want your F-keys to work regularly on Linux, you can now.

A few weeks ago I got myself a Logitech K290 keyboard for my home office. I really like how silent it is and the attack on the keys feels very nice, too. Also it is quite resistant to crumbs, which were somehow always squeezing through the gaps of my former Cherry XStream.

But despite this, the keyboard has a major flaw: by default, the function keys work as a kind of “multimedia” keys instead of good ol’ F1 through F12. On Windows that can easily be remedied by installing the Logitech Setpoint software. But on Linux, where I do most of my hacking, it is a major PITA to always need to use the Fn modifier.

At first, I thought I’d just have to roll with it or begin The Chase For A Comfortable Keyboard anew but after accidentally shutting down my machine yesterday - when all I wanted to was to press F12, forgetting the modifier -, I was overcome by a sudden Nerd Rage: this device obviously needed some serious hacking.

Equipped with cursory knowledge about the USB protocol and my usual can-do-attitude, I fired up the browser, looking for a way to snoop on the USB traffic. After two unsuccessful tries, I came across USBPcap, which can be used in conjunction with Wireshark to do USB protocol analysis.

After a few tries it became quickly apparent that toggling the checkbox in the Windows software would send one specific control packet to the device, so I decided to write a small tool to do exactly this on Linux.

At first it did not work, because I used the simplified libusb_open_device_with_vid_pid function from libusb which has no proper error reporting. So I added proper device enumeration and found that the error was LIBUSB_ERROR_ACCESS. And behold: running it via sudo made everything work on the first try!

So this concludes a wonderfully entertaining friday night. :D

A Cheer for Ignorance

(A late New Years post)

Well, not really for ignorance, but for being able to recognize and admit to it. I was recently reminded of that fact after finishing A Brief History Of Humankind at Coursera. While explaining the evolution of our race, Dr. Harari often mentioned how many things in our lives are just intellectual constructs: countries, companies, religions and of course our financial and other social systems. After going through humankinds early history, When reaching modern times, he explains how admitting our ignorance and discovering science could lead to all the advances in the past few hundred years.

Before, humanity was unable to grasp all the unknown unknowns all around them. Everyone believed in a god-given order and accepted how everything worked. Then some people decided they wanted to know why things work the way they do, create theories and verify hypotheses. But they could only do that by first admitting that they didn’t know how things worked. And during the scientific process, one will always be wrong more often than one right.

That is also applicable to everyday life. In recent years, I have grown more and more annoyed at how society shapes an inability to admit flaws and errors. The old saying Errare Humanum Est1 seems to have disappeared from our collective minds along with its latin roots. Whether it is politicians or CEOs, to admit to past errors has become unconceivable; everyone wants to set themselves up as a larger-than-life icon, a photoshopped character on the frontpage of a magazine. And here is where we come to the second part of that formerly mentioned phrase: perseverare autem diabolicum, et tertia non datur2. If no one is able to admit their mistakes, they won’t be rectified and nothing will improve.

I just hope that instead of trying to loose a few pounds, in 2014 more people will start admitting to their flaws and facilitate the same for others by accepting theirs. Here’s to making many mistakes and learning from them! Cheers!

  1. To err is human

  2. To continue (making the mistake) is of the devil, there is no third way

StoryMOOC and Star Wars

This weeks post has to do with the course “The Future of Storytelling” which recently started on the new platform Iversity.

I have been interested in this subject for some time now, especially in collaborative storytelling in role-playing games, so when this course came along, I knew I couldn’t miss it.

What makes this course a bit different from the other courses I took in the past, is that it seems to involve actual writing and storytelling. At the end of each week (a “chapter”) the students are given a task which to accomplish.

The task for this week, to be executed in this very blog post for your reading pleasure:

Please think about which story you have read, seen, listened to, played or experienced has impressed you most in your life. … Which story can you still very well remember? Write down both, the summary of this story (what you remember of the story, not what Wikipedia says.. :) and – on the other hand: – what made it so special to you that you can still remember it.

So here is the story how Star Wars changed my life:

The Hero’s Journey

A regular summary of the Star Wars story is probably quite uninteresting for everyone who hasn’t been living under a rock the last 30 years. From a storytelling point of view, it is quite unremarkable, even: a science-fiction-themed fairytale describing the classical “hero’s journey” as described by Joseph Campbell in “The Hero with a Thousand Faces”. I use the term “fairytale” because it has many resemblances to traditional folk tales: from the way it starts off with the sentence “A long time ago…” to the distinctive way that characters are painted good or evil and employing easily- recognizable archetypes.

Yodas wisdom

I don’t remember exactly how old I was when I watched the first Star Wars movies, but I guess I must have been around 10 years. The scene that would have such a lasting effect on my life is from the beginning of “The Empire Strikes Back”, the second movie of the Star Wars trilogy. The alien Yoda, portraied to possess unassailable wisdom, is mentoring Luke, the protagonist and training him to use the Force. When Luke struggles with a particular mental excercise, Yoda utters this quote:

“Fear is the path to the dark side: Fear leads to anger, Anger leads to hate, Hate leads to Suffering”.

I could not help but ponder this quote, comparing it to my own observations and found much merit in it. My 9th birthday, 17th January 1991 had coincided with the starting date of Operation Desert Storm. My parents television was running and I still remember the pictures of war, slowly coming to a first understanding of the situation in the world and wondering how it could have come this. Why people were building were expending all this energy to build high-tech jets and other weaponry just to kill each other.

Becoming a Jedi Zen Master

The Star Wars movie awakened in me the notion that people are driven to this behaviour via these emotions, fear and anger, followed by hate. The story also told how engaging in evil acts - those associated with the Dark Side - would have a poisonous effect on someones character, leading them down a road towards more and more evil. And since it was clear to my young and impressionable mind that I didn’t want to be evil, I concluded that I would ever need to be wary of these emotions, fear, anger and hate and where they could lead me. In this aspect, Star Wars fulfilled another aspect rooted in the origins of storytelling: providing examples for socially desirable behaviour, worthy of imitation.

Understand that I didn’t want to become a Jedi Knight or somesuch thing: I fully realized the fictional aspect of what I had seen. Nonetheless, “Don’t fall to the Dark Side” became some kind of a motto for me. And I can say that I have successfully managed to adhere to my old tenets until today. So much even, that a few years back a friend of mine jokingly called me “Zen Master Marcus”. It was just a stray remark but I still find it hilarious.

And surely enough: to this day I have read enough books and listened to enough Psychology lectures to have garnered a much more differentiated understanding of emotions and the way to the “Dark Side”. But I also have experienced people acting cruel and callous. Both in reaction to being hurt and out of desire for power and control over others when they themselves seemed to lack control of their own lifes. This makes me think that the simple Yoda version works well enough as an approximation to the truths behind the self-perpetuating suffering. And it’s certainly easier than trying to explain social psychology studies to a ten-year-old.

Bonus part

So much for the #StoryMOOC task. But funnily enough there is a second aspect on how Star Wars influenced my life. It probably could have been any other movie, too, so this is kind of a bonus scene in this blog post.

At the age of 13 or 14 years I started having occasional nightmares. Therein I was chased by evil characters who wanted to shoot me. After a few repetitions - each one some time apart: this is not that kind of story where the young boy is haunted by nightmares every night - the pursuers turned from gangsters shooting at me into the droids C-3PO and R2-D2 from the Star Wars movie. Ok, now I should probably give you some time to stop laughing. Awake, I found the notion quite ridiculous myself: the meanest thing C-3PO would have been able to do was to call you a buffoon in 6 million forms of communication. Sure, R2-D2 could probably use his 1337 hacking skillz to crack your social media profiles and post “My mother can’t cook.” to your wall, but back then there wasn’t even an internet.

Nonetheless, these two robots were in my dreams, chasing me through the village and into my room upstairs. How R2-D2 managed to climb the stairs in my parents’ house, I’ll never know. But the same dream continued to occur. And since it was always the same dream, after a few months I started to recognize it as such. And once I figured out I was in a dream, I decided that I should just jump out of the window: to die and thus wake from the dream. The first time I did this I was more scared of trying this than from the actual nightmare. But it worked and I could wake, turn around in my bed and fall peacefully asleep again. The second time - or maybe third, I don’t exactly remember - I grew more adventurous. Since it was a dream, I decided, I didn’t need to die but I could as well fly away from the two figures who, even though relentless as robots, were quite slow and could never catch me. And once again it worked. Unbeknown to my younger self, I had taken my first steps - or flight - in Lucid dreaming. All combined, I can say without doubt that Star Wars spiked both my desire in mastering my emotions and realizing that, with some training, I could master my consciousness enough to even control my dreams.