Living more comfortable by going through discomfort

Lately I made in interesting Observation on myself. And that is, I would take an action that felt uncomfortable to create a situation for me, that is actually more pleasent. Not sure if that makes sense, but I will go through my experiences.

Today I took a trip by train to visit my siblings. It was going to be quite a long journey, so I was about to stop at a supermarket to get some food that I could have for dinner which i would have on the train.

So there was a normal german Supermarket, that would have carried everything that I would usually buy for a small meal on the train. And that would probably be a sandwich and a softdrink.

That was the comfortable option, it was a big brand name supermarket, I shopped there already plenty of times, I would know what I was about to buy, and I would be on Auto-Pilot going through the motions, and buy at a big name brand.

However, around the corner, just a two minute walk away, I knew that there is also a Turkish supermarket, locally run probably, that I would usually hesitate to frequent, as the products sold there would be totally different than anything that I would expect from a supermarket. So, I would not know what to buy, and where to find it. It would be a more uncomfortable choice.

Never the less, I believe it took me a minute or two to ponder that question, I went for the uncomfortable option, and entered the Turkish supermarket.

In the end I bought some healthy salad from the salad selection, and some sweets from a to me unknown brand.

I am not sure if in this case I got something better tasting than I would have gotten at the other supermarket, but for sure what I saw was more interesting, as this supermarket had quite a large selection of salads, and even a real butchers shop inside the market, while the big brand name supermarket these days, only carries prepackaged meat.

What I did however, is that I primed myself to make the more interesting if uncomfortable choice, when faced with two options. And it took me some effort, there was a slight tingling in me to go for the easier option, that I had to overcome.

But the story did not stop there. I did buy the salad, but walking into the train station, I noticed that I did not bring any eating tool to consume said salad. I needed to get a fork or spoon, or anything. So simple walked into one of the bakeries that are at the train station, and took a plastic fork, that was provided there. And usually I would feel quite uncomfortable to get a fork from a place without buying there, but given that I was already primed to do uncomfortable things I took the fork. Would have been even more uncomfortable having to eat the salad without a fork. Basically a small transgression of my existing social code.

On I went to the train, and looking at my ticket, I noticed that I had a reserved seat on the train. I did not remember that, because I booked the ticket some time in advance. So I went to my seat, and in this type of train, there are different types of seat arrangements, it is either two seats next to each other behind another row of seats, similar like sitting in an airplane. Alternatively there are two seats that face another row of two seats and in between there is a small table. These tables are usually more spacious and comfortable, as in the seat rows, you usually only get a flimsy fold down table, like in an airplane. So I noticed I had reserved the wrong seat. But as luck comes, just the next row as a “good” row. So even though the train appeared to fill up quickly, and these “good” seats were marked “reserved”, I took my chances to sit there. Sometimes People do not show up, even though a seat is marked reserved.

To spare you the suspense, in the end, the seat I choose stayed free, and now I am sitting in the comfortable space, rather than in the cramped position I had reserved. And here is where it seems to get uncomfortable for many people. Everybody who has a reserved seat usually is quite happy to get there, especially if the train seems to become full. For me, I had all the options, a reserved seat, should I need one, but the chance for a better one, should it stay free. What I had to endure though was the possibility of two uncomfortable conversations. The first one would have been when the person on whose seat I sat would have shown up. And the second one when I would have to ask the person sitting on my reserved seat to get up. Luckily, that scenario never happened, so in the end I got the better deal, without any real risk at all.

But it does not stop there, quite often you can get a better deal, just by suggesting an alternative to the established procedure.

Recently I had to go on a company business trip, which I usually try to avoid as business trips are often quite a hassle, and feel not very comfortable to me.

However, this time I decided to make some small changes to the usual business trip arrangements, all without any consequences, but with immense increase in comfort for me.

The default magic rule for company travel seems to be the following, that is what you get when you ask the responsible person in the company to arrange for the travel. A trip by plane, a taxi from to airport to a regular business hotel in the vicinity of the customer location. Taxi trips to and from the customer and the hotel if necessary and that is it.

To me that sounds usually like a complete horror-trip. Usually customer companies are in the very far outskirts of the city center, where land is cheap, and entertainment, as well as public transport is sparse.

That means that when the work of the day is done, you get into your taxi to the hotel and that is it. If you want to do any activities after that, you either have to pay for a taxi on your own dime, or take the bus, which in that area usually means a 30 minutes walk from the hotel to next bus station. And the same way back, after a few drinks. Good luck, finding yourself in a sleepy small town, with your phone battery empty trying to navigate to your hotel, when the last bus from town dropped you off at different bus stop.

And usually these types of hotels for business travelers are the most boring places ever, all other customers come in to sleep, or watch TV, exhausted from their day at work. Everything is usually nice, clean and orderly, but the audience is usually not anything close to what you’d call a party crowd.

Having found myself in this rather unpleasant situation several times again and again, I decided to take matters into my own hands and adjust the situation in a slight manner.

I gave precise instructions to the travel agent making the arrangements, and I was curious how it would play out. Again, no risk at all on my side, the worst that could have happened is that the company denied my wishes, citing some “travel policy”.

So I choose a specific Hostel right in the city center, that accordingly to the internet reviews, photos and location looked, like an interesting place to stay. And for the most part the diametral opposite of what I would expect from a standard business hotel. I even asked them to book a single bed in the dorm. But here the company took it on them to actually book me a single room in my preferred hostel. I did not complain.

Of course the hostel was quite a trip away from the customer, so I would not have taken a taxi for the trip. Again, taking taxis is not my preferred way of taking a car, I like to drive myself, so I asked the agent to book a rental car instead. My wish was fulfilled, again, I did not expect it, but it would not hurt to ask, and see, it payed off.

I do not even own a car myself, living in the city with every imaginable type of public transport is in walkable distance. However, I am signed up to every available “car-sharing” company that is available, (basically a rental car that can be booked by the minute with a mobile app, spread around the city) And that is usually what I use instead of a taxi. As I said, I prefer to drive myself, and I do it quite often.

Conveniently enough, the hostel even offered an option to book a parking space in the city center, an option which I requested and got approved. Not getting a parking space near my hostel could have spoiled the deal, but even that I could get covered.

The next inconvenience that I usually endured was air travel. I am not a big fan of air travel, especially if it is short distances. In this case it was something like a one hour flight. That sounds quite easy, but this is only the time, the plane is in the air. Add to that one hour of getting to the airport, one hour of waiting at the airport, while enduring the hassle of security checks, one hour of flight, another hour fiddling around at the destination airport waiting for luggage, searching the taxi strip, and then another hour plus minus for the trip from the airport to whatever the final destination is. All together that is about five hours, the same time, it takes for the train.

Except that it is quick for me to get to the main station, I get in my seat, the train has power outlets and WiFi, and I can get a solid 5 hours of work done, without interruptions. Finally. No waiting, no back and forth, no security checks, no getting on the plane, off the plane, waiting for luggage, etc. etc.

So I asked to get a ticket for a specific train at a specific time, that was the most comfortable to me, and got it approved, and booked. Great success.

In the end the business trip went as well as I expected, I could even visit a friend, on my trip from the customer to my hostel, I had a nice drink with a colleague in the local pub after work, and could easily walk over to my hostel after a few drinks.

And I got all that just by making the very slight uncomfortable choice of not going with the accepted standard of plane+taxi+hotel, and instead suggested my own most preferred options. And all of those choices were not in any way more expensive, than the default. They were just adjusted to my personal preferences.

Non existing risk for me, but great win.

Posted in Discipline and Knowledge, Lifestyle Skills | Comments Off on Living more comfortable by going through discomfort

All the Different Tools to create Packages for Debian/Ubuntu

Posted in Programming | Comments Off on All the Different Tools to create Packages for Debian/Ubuntu

HOWTO run a flask app under apache

In an effort to switch my php based web sites to python, here are the steps required to make a python based web app available under an apache server, using wsgi.

under /var/www/hello:

hello <-- folder with flask app hello/venv <-- virtualenv with all dependencies installed hello.wsgi <-- file with following contents:

activate_this = '/var/www/hello/hello/venv/bin/'
execfile(activate_this, dict(__file__=activate_this))
import sys
import logging

from hello import app as application

Howto generate a secret (from flask documentation):

python -c 'import os; print(os.urandom(16))'

And then in the apache site configuration the following will make the app active:

WSGIDaemonProcess flaskapp user=www-data group=www-data threads=5 home=/var/www/hello/hello
WSGIScriptAlias /hello /var/www/hello/hello.wsgi

WSGIProcessGroup flaskapp
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Order deny,allow
Allow from all

Alias /hello/static /var/www/hello/hello/static

Order allow,deny
Allow from all

And that should make the site available under the path /hello

Posted in Programming | Comments Off on HOWTO run a flask app under apache


This gallery contains 4 photos.

More Galleries | Comments Off on Canyon

Modern Software Development or Slow as Molasses

I’ve been looking at that issue for quite a while, and always tried to play nice and be quiet about this, but quite recently I’ve experienced the discrepancies that I am going to describe quite intimately, so I feel I can no longer hold back.

But lets start with a little introduction and motivation for the topic at hand. I am going to be talking about Software-Developers mostly, but some of the general ideas are probably relevant to all kinds of crafts and handiwork.

The tools we use are shaping the way we work. They also shape the results of our work, the shape how we divide our time between different tasks, they shape how we estimate the effort needed to finish a project. And they shape what kind of projects we approach, and what the size of the projects we approach is.

They shape how we think about our work, and about the world.

So I’ve been pondering the idea of getting into Android App Development for a while, and this week I put my plans into action and attended an Android Developer Meet, and got started with the first basic Android tutorials. I tried to approach this whole endeavor with an open mind, fully expecting that the first few steps might be a bit rocky, and that it can be frustrating when you are on unfamiliar ground as an experienced developer.

Never the less, with the helpful support from someone at the Meet, I managed to stumble my first few steps into the foreign fields of Android development.

Now as a bit of a back story, to say the least, I’ve been developing Software for quite a while, especially on the frontend and graphical user interface side. I started with Delphi and Pascal, moved on to C++ and I’ve used many of the different user interface libraries that are available for C++, like wxWidgets and Qt. Over the years though, I started to prefer a rather obscure and not so well known toolkit for my personal projects. It is called FLTK, or Fast and Light Tool-Kit.

Moving more into professional Development in the recent years though, I am currently working more often with the Qt toolkit.

But never the less, the next day after this Android Development Meet, I decided to give the good old FLTK another spin, just to see how it compares to what I learned about Android the other day.

I had to tinker a bit with the environment on my laptop to get started with the FLTK library again, but I managed to get it all going.

I typed up a little “Hello World” style basic program, compiled it, started it, fired up the included FLTK Form Designer “fluid” and added a few buttons and controls to my program, when I suddenly came to realize the horrors that I experienced the other day.

Compiling and starting a basic program based on FLTK on my laptop happens in an instant, compiling the project happens under 1 second, it is barely noticeable. Starting the program on my laptop, the window opens almost as soon as I press the enter key after I entered the name of the binary in the console.

The FLTK Designer is fast, it starts in an instant, you create a form, add elements, etc. at no point at all is there any waiting involved.

And slowly it dawned me, I tried to fend the thought off, but I could not help myself. I tried so hard to stay open minded about android, to not be the grumpy old man that says “In the olden days everything was better”.

I tried to come up with several excuses and defences, of course Android has way more capabilities, it has to support different devices, resolutions, layouts, it has a more complex rendering pipeline, using accelerated graphics for its display, and supporting transitions and animations, etc.

But how could I kid myself, watching the IDE spinning its wheels over some gradle script, looking at the massive boilerplate that was generated for even the most simple project, waiting for the designer to switch between the text- and the graphical view taking more than a few seconds. Waiting what felt like ages for the emulator to start and show me the results of my feeble efforts. And even if I did not need to restart the emulator for changes to become apparent, just having the updated app restarted took way longer than what I looked at in the case of my simple FLTK project.

There is just one dominant feeling inside of me, and that is, how can anyone accept these kind of tools, why is there no outrage about this massive timesink, how can there be such a large number of Android developers, and nobody dares to speak up for some sanity in the development tools.

And then I start to really think, maybe that is why so many Android Apps are the way they are, because the developers are stuck in molasses. There is no room in Android development to quickly whip up a crappy little experiment, and bring it live, there is not much room, for radical and quick experimentation, everything needs to be well thought out, planned, and then implemented.

It is a set of tools, that more or less forces the developer to adhere to a corporate style slow moving waterfall model of development, because quite simply, no other style of development is possible.

Even for my little Hello World style Android app, I started to fear the moment of having to switch to the designer view in Android Studio, which would take long enough to put me out of my flow, and anger my patience.

That is probably why paper sketching is so popular in App development, and why there is a proliferation of “Mockup” Tools, and Designer Tools, specialised towards App development, because apparently, it is not possible to “think” visually and sketch in the Android Studio Designer. It is only possible to realize a design that is already thought through.

Funny enough, I sometimes use an old and discontinued UI Designer called wxDesigner, to sketch and plan my user interfaces, before I implement them in the framework required for the job.

But it goes further than this, the tools we use change the way we think, and I think being confined to limited tools like the Android tools confine the way we think about ourselves as Programmers. And now I am no longer talking solely about the slowness, but also about the complexity of the environment, that is the number of concepts that need to be understood to implement even the most basic application.

One such source of complexity is for example the changes between the various platform versions of the android system, and the way that the platform implementers choose to expose the developers to those changes. To say the least, references to changes between android versions are all over the place in the documentation and everywhere. In my opinion this is unnecessary noise, and noise takes attention and attention is limited.

In fact I think this leads to a point where it is more or less necessary to be a full time Android developer to write Apps. It is not likely or easily possible, to be, lets say a scientist for example, and to develop a little Android App on the side to control some lab equipment, or to support a little experiment.

And I think that is bad, it is a choice that the developers of the platform are making. It is a choice that takes power away from developers, because it binds attention that could be used elsewhere. Of course you could argue that it gives developers job security, because making the system too complex to understand for outsiders, makes them hard to replace, but well, software should be used to make the world more interesting, and not necessarily more boring.

I feel that these kinds of tools give the developer the feeling of being a cog in the machine, you are suddenly “just” an implementer, implementing other peoples ideas, realizing designs that other people thought out, you can no longer think about problems to solve, but rather all your creative energy is bound in the problem of handling the platform. It becomes a purpose of its own.

And it goes the other way around too, suddenly if you have an idea or problem, you can no longer solve it by implementing an app yourself, when you are a “non” programmer. You need a programmer, because it is not possible to write a simple app yourself, while still keeping focused on your actual field of expertise.

Anyways to wrap up my little rant, I think doing simple things should be easy, and writing a simple app should be simple. And shortcomings should be complained about and should be fixed. Can’t possible be an acceptable situation that one of the most popular platforms in the world is a pain in the butt to develop for.

Posted in Programming | Comments Off on Modern Software Development or Slow as Molasses

Great Crisis inspires Great Leadership

Have you ever participated in a great crisis? Probably the answer is no. Most of the people in control of the Western World as we know it, have never seen a great crisis. Or as Tyler Durden would say:

We have no Great War. No Great Depression. Our Great War’s a spiritual war… our Great Depression is our lives.

We and everyone else around is enjoys a comfortable sedentary lifestyle. Even if there is individual crisis and the associated trauma, it has been a long time that there has been a collective crisis. And why is this a challenge for us, and for the western civilization? Because great crisis is a good teacher, it requires and therefore develops great leadership.

Have you been to the Moon recently? No? And neither was anyone else. The last manned Moon landing was in 1972! About ten years before I was even born. At that time a publicly accessible Internet wasn’t even available yet. Still, this incredible feat of engineering was accomplished.

What was driving those people at those times, how did they get the capable leadership and vision to pull through such an unimaginable project? One of the driving forces was the cold war, the result of World War II, which inspired a sense of competition between superpowers. But World War II also allowed produced a vast population of veterans, pilots and officers. People that were very capable precisely because the had gone through such a great crisis. They had a sense of what was possible through conducted cooperation, and they learned to release their knowledge and energy for the good of humanity, and made the moon landing possible.

And now Civilization is at a crossroad again, we are slowly losing that practical knowledge, the world lacks people and understanding of the forces that drives it. Beneath the surface is a vast network of machines, structures and organizations, that are for a large part on autopilot operated be the ants and bees on its levers and buttons, but without any oversight or insight.

I like to compare this to the scene in Matrix 2, where Neo goes to see Councilor Harmann in the underbelly of the secret underground city. The look at large machinery, that keeps the city running, and the Councilor laments how he does not understand what exactly it is that they do, but that he knows they keep the system up.

So now we have this challenge, on the one hand, there is the desire to avoid such a gruesome experience like a worldwar again, but there is on the other hand a lack of human beings, that carry the experience of overcoming such a crisis. So how do you learn what can only be learned through crisis, and at the same time work to avoid such a crisis?

Well, that is a good question, but it is a question for another time, as I have to leave know.

But maybe, I will feel inspired to write a follow up, or a part 2.


Posted in Long term Goals, Motivation and Inspiration | Comments Off on Great Crisis inspires Great Leadership

Solution C++ Challenge: SimpleServer API

Hi there,

I’ve created a solution to the C++ Challenge, and a new Blog for this kind of content:

Solution Challenge #1: SimpleServer API

Have fun,

Posted in Allgemein | Comments Off on Solution C++ Challenge: SimpleServer API

C++ Challenge: SimpleServer API

This week I’ve prepared a little challenge in C++ programming. The example is not extrodinarily complex, but not completely simple either. The purpose of this example is, to challenge myself a little to get to know boost::asio networking, and to contemplate about how simple APIs for prototyping could look.

So the challenge is to create a class, that allows prototyping simple network servers, by implementing a convenient base class. The interfaces and base classes are already layed out, including an example that send the reply “Hello” for any incoming connection.

The specification is a bit open, and is not so much concerned with corner cases. So using the simplest solution possible is probably the right thing to do.

Ok, here we go for the boilerplate: read on, I will add a few explanations below.

So, it goes like this: IConnection is the virtual interface for implementing a connection. That is, for every new connection, a new instance of an IConnection implementation is spawned, that is bound to that connection. When the connection is closed, the instance is deleted.

The IConnection receives a function pointer as argument, so that it can send replies. You can see how this is supposed to work in the example: “HelloConnection”. That example simple prints the received string on stdout, and sends “Hello” back.

SimpleServer is the class that you need to implement, here you can have all the bookkeeping, and you are probably going to need some internal connection class, that handles  each socket created, etc.

Anyways, I will probably be implementing the SimpleServer myself this week, so I might be able to post a follow up with a solution.

But anyways, this task is simple enough, that a veteran C++ programmer should be able to do it. And it is definitely intended as a practice to work one ones programming skill, so go ahead and try it.

Post your solution in the comments, or send them via email:

If you send via mail, I will add your solution to a follow-up post. 🙂

Have fun,

Posted in Programming | Tagged , | Comments Off on C++ Challenge: SimpleServer API

Managing C++ libs with CMake ExternalProject and Git

Writing modular software, you might sooner or later come into the situation, that you have some functionality, that you want to share between different projects. Let’s say, to have built a couple of convenience classes and function that you want to reuse.

There are different ways to skin the cat, one of them might be using a dedicated C++ dependency manager like Biicode. Or a general package manager for your platform of choice, like apt-get on Debian and Ubuntu, or Homebrew on OSX.

Usually you will start with putting your module or library into a git repositry, if you haven’t done that already. For Code that I want publish publicly, I usually choose my github account.

Now for creating a homebrew package, or a debian package, you either need to create some project description, a bit of boilerplate, and need some platform like launchpad to publish packages. Or in the case of biicode, you need an additional account at another platform, and you have to install another tool.

However, there is another approach, that uses software that you probably already have, and that is CMake and Git.

CMake has a functionality called ExternalProject_add, which can use, to automatically check out a git repository, and build that as part of the normal build process.

Of course, the same functionality would be possible with git submodules, but honestly, I always found this part of git rather cumbersome, and unnecessarily complex, for what I want to do.

So, I’ve created two small examples, that show how to create a small library, and link to it through CMake ExternalProject_add:

The first one is the library: cmake_simple_lib

And the second one is the project that uses the library: cmake_simple_demo

I hope you find that useful.


Posted in Programming | Tagged | Comments Off on Managing C++ libs with CMake ExternalProject and Git

The decline of the hierarchical Organization in Popular Culture

Being a fan of the popular Space Saga “Star Trek”, and especially of the “Next Generation” Enterprise with Captain Jean Luc Piccard, I cannot help but notice the stark discrepancy in tendency to currently popular Television Series.
Star Trek and the Star Fleet is largely based around a huge hierarchical military organization. The chain of command is clearly defined, the captain receives orders from Star Fleet, the first officer respects orders by the captain, and everyone else respects orders from the first officer and the captain and so on. But it does not stop there, there are further roles within the organization, that supplement the strict hierarchical order. There is the doctor and the counselor, both of which are below the captain, in the chain of command, but never the less can override the will of the captain as experts, should they decide that the captain is incapable of fulfilling his obligations because of a medical or emotional condition.

In a way, the structure is laid out almost like a game of chess, where different roles have different advantages and disadvantages that can override each other in complex scenarios, making strategic games possible, and interesting.
I regard Star Trek as a historical artifact, that allows us today to take a peak into a system of cultural thinking an expectations that has changed not so long ago. A TV-Series is in a way a reflection of the society that created it, and a reflection of the society that were its primary consumers.

And in comparing the series to todays popular television shows, I cannot help but notice quite a stark contrast. So I keep asking myself, what has changed. What has changed in the perception of society in the perception of writers and producers, as well as consumers that made such a change inevitable.

Of course, there are series that contain plots that are concerned with hierarchical structure, and military organizations, Game of Thrones being the most prominent one that comes to my mind. But the topic of this series is never to indulge in the intricacies of a hierarchical organization, but rather to wreck havoc in every possible way of backstabbing and killing leaders and moving hierarchies around.

This is in stark contrast to the Star Trek series, where the concept of the structure of Star Fleet is never questioned as such. It is accepted as a de facto institution. The game is about how to work within the confines of this structure, and seldom and only in far and in between edge cases to question Star Fleet structures as such. So that does happen, but it is the exception, rather than the rule.

And if a series is not about wrecking havoc and creating intense drama and violence, it goes of into the other end of the spectrum.

Take all of the popular sitcoms, like Friends, How I met your mother, Big Bang Theory, The office and probably some more. These Series feel more like a kindergarten of childish innocence. The characters trapped in a Hell of Douglas Copelandian Nihilism. Nothing is serious, everything is wrapped in layers of self-depreciating sarcasm and cynicism. The Brave new World, everything is fun and games, and nothing is serious or important. The topic is no longer about creating great things, and exploring unknown territories, but rather it is about cuddling up in a warm and safe nest, and exchange pleasantries with ones fellow inmates. Every screwup can be shrugged of with a joke, and every tragedy with an outbreak of over acting dramatization, often about not much more than spilled milk.

Contrast this with seriousness of uncomfortable conversations between the leading officers of the Enterprise. Where they spend time pondering how their next move will be perceived, and whether it is moral and ethical to proceed in a certain path. Whether it is a viable tradeoff to insult the feelings of an adversary, or even if stall or a bluff is an appropriate response. None of those Strategic meetings are taking place in modern TV.

Is it that people have changed, that desires and goals have changed, or maybe it is our perception. The idea that we are no longer seeing us as serious and important in the things we do. That in fact the seriousness in which Jean Luc Piccard and his mates acted were overacting devoid of any resemblance in the real world, where all is actually fun and games.

Well, that is probably for everyone to decide for him- or herself.

Posted in Allgemein | Comments Off on The decline of the hierarchical Organization in Popular Culture