Embracing the dystopian future

1984 is just a bit late.

Weeknote 36/2019

Weeknotes could be an easy way to get back into writing more regularly. Friday will now be weeknote day.

  • Karabiner-Elements is an amazing tool for remapping a Mac’s keyboard. It not only provides me with a more useful keyboard layout, it now also forces me out of bad habits. Among other things, it turns the useless Caps Lock key into an easier to reach Esc (or Ctrl if held with another key). My right Command key has been promoted to Hyper (Ctrl+Shift+Option+Command) for a whole new layer of hotkey definitions. And as of today, the left half of my alphanumeric block doesn’t work with the left Shift key anymore.
  • Speaking of keyboards: If you’re looking for me, I’m down the custom mechanical keyboards rathole. This morning, I swapped the springs and lubed the keys of the Cherry MX80-11900 I got cheaply from Ebay. Now I can finally type on it for longer than 5 minutes. Lots of soldering and waiting for group buys in my future.
  • This week (geez, that T took me three attempts), I finally got to do my personal retreat for this year. For two days, I booked myself into a hotel, disabled most notifications and roamed the Mount Usher Gardens thinking about the really important stuff. I’m very happy with the results.
  • Doing my live coding late in the day to reach more viewers was a stupid idea. The quality of the little code I was able to produce recently (when my weary brain wasn’t blanking completely) is embarassing. From next week on, I’ll be streaming right after my morning coffee.

Have a great weekend!

Getting started with a big codebase

In my recent talk about monorepo, I mentioned as a downside of the all-in-one approach that the sheer volume of code can be intimidating. This article has some tips for getting started: “Don’t let that huge codebase scare you! Tips and tools to make sense of other people’s code”

How I manage my dotfiles across hundreds of machines

Almost all of the command line tools I use on my Mac workstation, on my development server in the cloud, and on my company’s Linux server infrastructure store their configuration in so-called “dotfiles” — files (or even whole directories) in my user home directory that are hidden from plain sight by prefixing their name with a period, for example .vimrc. (Like this example, actually quite a few of these files do end in rc. That’s why they’re sometimes also called “rc files”.)

On dev.to, Jonathan Carter asked “How do you manage and synchronize your dotfiles across multiple machines?” Since “multiple” in my case means “more than 500 servers” (we operate a managed high-performance hosting platform for Drupal and WordPress), I thought I’d answer his question in a short blog post.

dotfile management

Most of the dotfiles I use come from our shared team dotfiles repository. Having a big overlap in configuration settings between our SRE allows us to easily share and take over a terminal session via tmate without having to struggle with individual tmux or vim keybindings. Doing pair work in a terminal session has the huge advantage that it takes up much less bandwidth than screensharing via Zoom or Slack.

Some tools still allow a certain degree of individuality. For example, the shell prompt details can vary without causing confusion. You can also have your own magic shell and git aliases. That’s why I layer my personal dotfiles repository on top of the team one.

Another complication is that the BSD subsystem on the Mac sometimes behaves a bit differently from Linux. That’s why, for a few configuration files, I’m maintaining alternative versions. They’re stored in subfolders starting with tag-. The dotfile deployment then installs the right version depending on the host OS.

dotfile deployment

So how do you maintain a set of dotfiles in your home directory on hundreds of machines if they come from two overlapping, even conflicting, git repositories? The trick is to clone both repositories and then symlink the configuration files to where they are expected by their application. The key to keeping this process simple and error-free is rcm. It can handle multiple dotfile directories, each with its own precendence. You can also provide it with tag names telling it from where to source certain dotfiles.

I install rcm manually when I set up a new development machine (which only happens once or twice a year). On our servers, it gets installed automatically via our configuration management software Chef.

Here’s the script that I use to deploy my dotfiles:

#!/bin/bash

if ! which rcup >/dev/null; then
  echo "Fatal: rcm is not installed on this machine."
  exit 1
fi

os_type=$(uname -s)

# Remove oh-my-zsh
rm -rf ~/.oh-my-zsh

if [[ -d ~/.dotfiles ]]; then
  cd ~/.dotfiles
  git pull
else
  git clone [github.com/geewiz/do...](https://github.com/geewiz/dotfiles.git) ~/.dotfiles
fi

if [[ -d ~/.freistil-dotfiles ]]; then
  cd ~/.freistil-dotfiles
  git pull
else
  git clone [github.com/freistil/...](https://github.com/freistil/dotfiles.git) ~/.freistil-dotfiles
fi

rcup -f -t $os_type -d ~/.dotfiles -d ~/.freistil-dotfiles

As you can see, it clones the dotfiles repositories (after a bit of cleanup) and finally calls rcup using an OS-specific tag (“linux” or “darwin”). Thanks to a a post-up hook, it even launches vim to update its plugins from Github.

You can find the current incarnation of the deployment script in my personal repository as bin/dotfiles. Since its directory gets symlinked as ~/.bin and added to my shell search path, I can execute the dotfiles command at any time to update my local configuration.

As for the initial deployment on a new machine, I simply curlbash the script:

curl -L [raw.githubusercontent.com/geewiz/do...](https://raw.githubusercontent.com/geewiz/dotfiles/master/bin/dotfiles) | bash

That’s how I manage and deploy my dotfiles to have a consistent setup across all my work machines and our hosting infrastructure.

If you’d like to watch me put these nifty dotfiles to good use, join me on Twitch for my next live coding session!

Keeping the old gears grinding

Video games good for building focus create environments that are fast-paced, interactive, adaptive and have complex reward and gaming structures. Like a brain playground.

So at my age it’s basically mandatory to keep playing WoW!

Stephen Wolfram's productivity systems

I’m amazed, especially by the amount of things you can do with Wolfram Notebooks.

How to automate posting to Jekyll from iOS

I am so stealing this clever workflow using the Shortcuts and Working Copy apps.

Test-Driven

The concept of Test-Driven Development (TDD) isn’t particularly new anymore. But even after quite a few years of accompanying my code (regardless if it’s a Rails app or Chef infra code) with tests, TDD is still far from being second nature to me. I’ve recently watched a talk from RubyHACK 2018 which motivated me to get better at it.

In his talk “Some Truths About Some Lies About Testing”, David Brady explains why so many of us find it hard to start with building tests first and implementing the actual business logic second: Most of us learned programming in a way that immediately tackled the implementation. Actually, that’s how we’ve learned problem-solving in general: take a problem, break it down into manageable chunks and build up the solution piece by piece. In the end, the solution will deliver the desired outcome. Or maybe it won’t, and this is the time when we start testing to find out which of our pieces doesn’t behave the way it’s supposed to.

In his talk, David calls this approach “Test-After-Development” (TAD) or “Q3 Development”, because knowing the implementation but not what exactly the desired behaviour looks like is quadrant III between the two axes “Behaviour known/unknown” and “Implementation known/unknown”.

  • Quadrant I: Behaviour known, Implementation known
  • Quadrant II: Behaviour known, Implementation unknown
  • Quadrant III: Behaviour unknown, Implementation known
  • Quadrant IV: Behaviour unknown, Implementation unknown

It’s quite obvious that Test-Driven Development is generally quadrant II: I’ve clearly defined the behaviour I want and am working out the implementation.

David also has a good explanation why I often have to force myself to spend effort on building tests at least for my implementation if not before my implementation. TAD gives you instant gratification. You see your code doing something that brings you closer, if not full way to the solution. The problem is that this development approach may start easy but gets harder as your codebase grows. David mentions how a change that resulted in a single line of code took them almost two days to implement.

TDD, however, pays off sometime in the future. Granted, it starts hard but it gets easier over time as you can more and more rely on your tests guiding you.

When I have tests, I can make changes if not more efficiently, then at least with much more confidence that I won’t accidentally break things. Compared to the pain of untangling code that seemed completely unrelated to my latest change but suddenly started behaving strangely nonetheless, the time spent building tests is a so much better investment. And the experience of deploying code with peace of mind every day is enough of a reason for me to move into quadrant II, step by step.

Watch David’s talk, I found it both entertaining and inspiring!

I'm coding live again

Earlier this year, I started live coding as an experiment in knowledge transfer for our team at freistil IT. You can read more about my motivation on the freistil Blog. In summer, I took a break to go on family holidays. But for a number of reasons (too many of them unpleasant), I didn’t pick up my regular schedule again until today. I’m happy to announce that Full Stack Live is back with a new concept!

I felt that a change of concept was necessary. Previously, the topics I picked for my live coding came from work that I had on my plate that week anyway. This was convenient because that way, the live stream didn’t take too much time away from my work tasks. However, the downside of this approach was that the live stream often offered only tiny windows into projects on which I mostly worked off-stream. And since that work almost always happened in private Github repositories, viewers didn’t even have the chance of catching up on my progress by looking at commits and pull requests. I thought that there was much unused potential.

In order to make my live coding more valuable for my viewers, I’ve decided to start a new project specifically for Full Stack Live. With Jupiter, I’m going to implement an old idea that I never got to execute on. I’m building a web application for IT infrastructure management. I’ll start with scratching my own itch, i.e. managing the many hardware servers on which we run our managed hosting platforms freistilbox and staqops. From there, I can see it extending to cloud providers like DigitalOcean or AWS as well.

I’ll try to do most of the interesting engineering tasks live on stream. And since Jupiter is going to be open source, the Github repository will allow everyone not only detailed insight into what’s going on but also the chance to participate. Everyone who finds the application useful will be able to file issues and even submit pull requests. To be honest, I’m pretty excited about the possibilities!

Here’s the recording of today’s session. I’m afraid it isn’t very interesting because for most of the time, I was only waiting for installation scripts to finish. Not quite peak entertainment…

But hey, it’s the inaugural session of a project that I hope in total will be very educational. So, here’s to Jupiter and season 2 of Full Stack Live!

Check out my live coding page for the schedule and where you’ll find the recordings. Don’t forget to follow the stream on Twitch to get notified when I’m going on air, and make sure to say hello in the chat!

Star Trek TNG intro, the missing lyrics

Wil Wheaton:

When we worked on Next Generation, Brent Spiner and I would sit at our consoles on the bridge, and make up lyrics to our show’s theme song. I vaguely recall coming up with some pretty funny and clever stuff, but nothing that held together as perfectly as this

Expect me to sing along from now on.

Live coding on Twitch

After migrating my blog from WordPress to Jekyll (which was long overdue), I’m going to pick up writing again. This first new post is easy, because I’ve already written it for my company blog. It’s about my live coding stream on Twitch that I’ve been doing for a while now. It’s called “Full Stack Live”, a fitting name (I think) for a stream that covers all kinds of DevOps topics from Rails coding to operating Kubernetes (coming soon!).

If you’re interested in why I’m taking my daily work to the digital stage, you can read all about it in my article “Turning ‘Working Out Loud’ to 11: Live coding on Twitch”.

So, if you’re interested in DevOps topics and/or would like to watch me struggle and (sometimes) succeed, hop on over on Twitch and follow my channel! When I’m back from my holidays in late July, I’m going to be live coding again every Tuesday and Thursday afternoon.

Assembling the plane on the way down

Managing people is an ability that requires practice and learning, just as any other. As the German proverb goes, "No master ever just fell from the sky."

Regardless of how much you've thought about the topic, how much you've read about it or even taken courses, it's a fact that no amount of theory can compensate a lack of management practice. As Jason Fried says in "On being a bad manager":

"Sure, you’ve listened to music for decades. But your first day on guitar sucks. Just like you may have watched people be managed — and you were likely managed yourself. That doesn’t prepare you to pick up the management instrument and strum a beautiful melody."

People are messy. That's why leading people is messy, too.

The problem with getting better at management is that there's no --dry-run option. It's like learning the guitar on stage. You'll get better over time but it comes with screwing things up in public, getting critical (or even devastating) feedback, and leaving the place feeling ashamed for not meeting your own expectations.

Getting better as a manager is like assembling the plane after you've already jumped off the cliff. You might land as a master. Or crash spectacularly.

There are people who are willing and able to deal with this kind of challenge. They're the right candidates for switching from being an individual contributor to a management position. For all the others (probably the majority), we'll have to provide other avenues for growth.

Friendly, stretchy, prescient

Ms. Marvel is awesome.

I say we should reach higher

In "Who can blame Melania for resisting her Easter egg role?", the Irish Times suggests using the vacant East Wing of the White House to install a First Shrink. I suggest launching a Center for Megalomaniac Studies. He did promise lots of new jobs, didn't he?

Computer science to be Leaving Cert option

The Irish Times reports that computer science gets an upgrade in secondary education. That's very good news.

Simon Sinek on the game of empathy

I have a man crush on Simon Sinek. I consider his book "Start with Why" essential reading for every entrepreneur and leader. I also did his Why Course and found out amazing things about what drives me.

He's even better in person. Go watch his talk "Understanding the Game We're Playing" at Creative Mornings and get some inspiration to practice empathy:


Here's the follow-up Q&A, too:

Keyboard One

Marco Arment:

“What I hadn’t considered was that even though I had common tasks that could fit within the MacBook’s limited specs — email, writing, chat — all of them required a lot of typing. Oops.”

That’s one of the reasons why I decided to go for a Macbook Pro 13" as replacement of my old MacBook Air 11", despite of the weight. All my work has to do with typing, be it in a browser, a terminal or even in Word.

These podcast thingies seem to be all the rage

In recent weeks, I've seen articles about how podcasting is the new radio popping up everywhere. What has happened? It’s been years since I’ve unsubscribed from Adam Curry’s Daily Source Code after years of listening to it. Over time, I’ve spent my children's college fund on buying every new podcatching app I could get my hands on. Has podcasting really been that obscure that mainstream publications now regard it as a new sensation? 

Mindful breaks

Supported by the little BreakTime app, I’ve been breaking up my work into chunks for a long time now. I’ve started with the common Pomodoro intervals of 25 minutes of work followed by a 5 minute break.

Recently, I’ve switched to a 50/15 rhythm. This gives me longer time to focus on what I’m doing and I get more options for what to do during my breaks. For example, I can now move around the house a bit (sitting kills, as we know), make myself some tea and chat with my family.

Today, I’ve started to do short mindfulness exercises during my breaks, too. I got the idea while testing the Calm.com iPhone app. When I meditate in the morning, I use a wooden meditation bench on the living room floow. But while listening to the “7 steps of Calm” intro sessions, I realised that if a chair is okay, why not a desk chair, too?

During my 15 minute breaks, I can now do a short mindfulness exercise to regain my focus and still have time to lift my ass around the house.

A Simple Place to Live

“I can be at home anywhere because feeling content and safe and loved has nothing to do with the stuff that surrounds me.”

What Courtney Carver describes as “A Simple Place to Live” resonates quite a bit with me.

The Ireland of the land and the people

“Having seen quite a bit of the country in the past three years, we agree with those who say you don’t have to leave this island to know Ireland boasts one of the world’s most stunning ensembles of landscapes. And all of it decorated in an eye-soothing colour that is the Irish green.”

”But what really makes you feel you will never leave Ireland is the Irish people. In the course of our three years here we had numerous visitors who took trips throughout the country. All returned with very fond memories of the Irish they had met. And they had met many!”

It's nice to see two of the main reasons why I moved to Ireland shared by Eckhard Lübkemeier, departing German ambassador to Ireland. Read his full farewell message in the Irish Times.

It's Movember!

Up until this year, I’ve never paid much attention to the Movember movement. People growing facial hair in a way that should have been banned since the 80s, what’s that all about? But this year, it dawned on me that I really should look into the issue the Movember movement tries to shed more light on: Men are getting cancer. And with cancer victims in both our families, that topic is far from irrelevant to me.

When I saw a friend’s Facebook post about him taking part in Movember, I spontaneously decided that I’ll join the fun, grow a mustache and finally learn about the health issues I may need to face as I grow older.

Speaking of face, here’s my progress so far:

Photo on 15-11-2013 at 10.07

What do you think? Leave me a comment below!

It looks like fall puts me in a spontaneous mood because, a week ago, I also decided on a whim to participate in the Dublin Mo Run this Saturday. In that context, it’s important to know that I stopped running in November last year due to tendonitis in both of my legs and that I haven’t done a round since then. I registered myself for the Mo Run regardless and did two test runs this week to see how I do. Surprisingly, I managed to run the 5k without major problems. It must be the two children that keep me on my feet day and night. ;-) And that I’ve lost 10kg since June probably also helped a bit.

So, the geewiz family will head out to Dublin early morning tomorrow to see a lot of people carrying furry animals on their upper lip across Phoenix Park. My start number will be 26.

May I ask you, my dear reader, for a favor? Support Movember by making a donation. In Ireland, prostate cancer is the second most common cancer in men; each year 1 in 8 men is diagnosed with prostate cancer. Movember is a fun way to lower these numbers. Simply go to my Mo Bro page and help fight a terrible disease!

I believe in working remotely, too.

We've now been living at our new house in Bray for almost two months now and we're happily settling in. The move to Ireland has had almost no impact on my work because I've built freistil IT as a virtual company from the get-go. It really doesn't matter where our team members do their work; it only matters that they do a great job.

Being able to freely move to another place is only one of the advantages we have as a distributed team. In his post on the Stack Exchange blog, David Fullerton lists several more reasons “Why We (Still) Believe in Working Remotely”:

  • It lets you hire good people who can’t move. Maybe they've just bought a house or they need to take care of a family member. Not being able to hire people who've made a commitment doesn't make any sense to me.
  • You don’t lose people to silly things like their significant other going to medical school. Or like fulfilling their wish of moving to another country…
  • When done right, it makes people extremely productive. We've built freistilbox, our platform for Managed Drupal Hosting and Managed WordPress Hosting with a team of three doing everything from IT architecture to payment processing and accounting. The flexibility of our work environment helped us not getting burnt out despite many challenges.
  • It makes you focus on more than butts in chairs. Big companies like Yahoo! and HP recently called their remote workers back into offices with the explanation that this will make their teams more effective. I think that's nonsense. “Going into office” doesn't equal good work and “counting butts in chairs” doesn't equal good management.

David goes on with giving some insight into their learnings and how they collaborate. I highly recommend reading the whole post.

Here are a few more reasons why we, too, think that the benefits of working remotely outweigh its disadvantages:

  • It makes expenses more effective. Instead of paying for more and more office space, we rather put money into the tools that make us more flexible and productive (powerful laptops, mobile internet access, collaboration software, coffee machines).
  • It makes teamwork multi-threaded. It's like parallel processes in an operating system: Once you have the “inter-process communication”, i.e. collaboration tools and processes, in place, each team member can work independently without relying on everyone being readily available at the opposite desk.
  • It makes choosing the right things easier. My family is the most important thing in my life. Back when I was working in an office, I could not go home just to babysit for half an hour while my precious had a haircut. Today, a haircut can be an opportunity for both of us to take a break from our usual responsibilities.

I'm the first one to admit that running a distributed team has its challenges. And there are ways to master them. If you'd like to know more, please leave your question in the comments!

Want to make more awesome from whereever you're the most happy? Join our team!

It's simpler than I thought.

One thing to help you be a great dad.
Appreciate your child’s love for you.
Do this every day, whenever you see your child, and even when they’re not around.

(via Zen Habits)

Just say "Hi"

For many introverts, it’s incredibly difficult to start a conversation with people they don’t already know. Paul Campbell recently wrote about this inner conflict in his blog post “Hi, I’m Obie”. I can relate very much because I feel the same when I’m at conferences, especially with people who I admire and would really love to get to know better. I remember so many occasions when I tried to join a group conversation, stood there for a while not knowing what to say and finally backed away, slightly embarrassed and disappointed about myself.

Paul then describes a watershed moment:

He put out his hand to shake my hand, looked me in the eye, and said “Hi, I’m Obie”. “Hi, I’m Paul.” I had never felt so loved.

In this moment, Paul had an epiphany: You don’t need to do extraordinary stuff to get in touch with people. Just say “Hi”.

Introducing yourself by name at a conference might not seem like a huge deal, but for me, it was just the recipe I needed to break the ice, to avoid the “what do I say now?” question.

I had the same insight start of last year, after reading a great ebook. It made a big change about which I wrote in “How to survive and succeed at conferences as an introvert”.

As IT guys, we’re familiar with the principle of breaking big tasks down into small parts that are easier to handle. The thing is, we can apply the “divide et impera” principle to the conversation problem, too: Instead of trying to tackle a whole group at once, just pick a person, stick out your hand and say “Hi, I’m $NAME.” I can assure you, noone will answer with “Yes? And?”

Except maybe if there’s such a thing as professional asshole conferences. But then again, you might not want to attend these anyway.