Skip to main content

Posts

Joining Eyeo

A couple of months ago I left Viaboxx, more than five years after I started there.

It was a great ride. It combined the excitement and intensity of working at a startup, with the safety of working with a profitable, self-organizing company of experienced full stack developers.

During the time there I worked with everything from Raspberry Pis to huge parcel stations, from single-page-webapp AngularJS applications and Node, to state-of-the-art modern Java-cloud applications. I learned how to do infrastructure-as-code with Puppet, and immutable infrastructure with Docker. We developed our own products, did research projects and provided consulting for big enterprises - always learning, always trying out new things. Being small allowed us to optimize for learning while having an awesome culture where colleagues felt like family or great friends.

Still, a part of me missed some of the challenges I worked more with when I was consulting, or working for larger companies. Helping people to wo…
Recent posts

Encrypting and Decrypting with Spring

I was recently working with protecting some sensitive data in a typical Java application with a database underneath. We convert the data on its way out of the application using Spring Security Crypto Utilities. It "was decided" that we'd be doing AES with a key-length of 256, and this just happens to be the kind of encryption Spring crypto does out of the box. Sweet!

The big aber is that whatever JRE is running the application has to be patched with Oracle's JCE in order to do 256 bits. It's a fascinating story, the short version being that U.S. companies are restricted from exporting various encryption algorithms to certain countries, and some countries are restricted from importing them.

Once I had patched my JRE with the JCE, I found it fascinating how straight forward it was to encrypt and decrypt using the Spring Encryptors. So just for fun at the weekend, I threw together a little desktop app that will encrypt and decrypt stuff for the given password and sa…

Replacing Boxen with Vanilla Puppet (for setting up a new mac)

I recently got a new MacBook at work and decided to overhaul my personal setup routine. Last time I tried an early version of Boxen, and although I was pretty happy with it there were a few things that bothered me. It is very opinionated, and I had a hard time stopping it from overwriting my .gitconfig and things like that. It also dragged in a series of dependencies I didn't feel the need for, and made Homebrew a bit weird by installing it in the non-standard location /opt/boxen/homebrew.

Since Boxen is based on Puppet, and I've used plenty of Puppet on Linux, I wanted to simplify things a bit and see how far standard Puppet on OS X would get me.

Warning! Make sure you don't install puppet using brew! It'll install an old version which is not trivial to uninstall.
It's fairly straight forward to install Puppet on a Mac, but since there is no standard package manager, like there's yum or apt on Linux, you have to set it up with a provider, in our case: Homebrew.…

Retiring from the Bonn Agile Meetup

Yesterday I organized my final meetup.

Back in February 2011, I invited to the first meetup, back then under the "XP" banner, renaming to be Bonn Agile a few months later.

So, wow, that makes it nearly 5 years, or 50 meetups after a rough count.

Most of these meetups were not organized by me though. I want to use this post for thanking the people who were around in the begining, co-organizing or just giving great feedback on how to get the meetup rolling.

I'm sure I'm forgetting some names, but +Patrick Cornelißen+Kurt Häusler,  +Frederic Hemberger, +Christoph Pater and +Jan Ehrhardt  took their share of the load back then until they moved from Bonn to other places. +Simon Tiffert and +Matthias Lübken provided valuable advice when starting up. As companies go, +tarent solutions GmbH+doo and, most of all +Data in Transit GmbH (big thanks to +Jutta Horstmann!) have been supporting the meetup since the very beginning, with +Viaboxx (my employer) hosting the annual S…

Android Voice Commands for Cyclists Listening to Podcasts or Music

Disclaimer: I do not recommend using earphones while on your bike, but there are times or roads where I think it's OK. Pull out your earphones when nearing potentially dangerous situations (like intersections). At least pause the audio.
These tips also apply to anyone unable to look at and touch their device, leaving voice commands their only option (useful for visually impaired people, people wearing thick gloves, etc). First of all, you need an Android with a fairly new version of Google Now installed, like Lollipop. You'll need a headset with a microphone button. I’ve got an iphone headset that works great with my old Moto G, excluding the volume control. You need to make sure that a connected headset can bypass the device’s lock mechanism. It’s in:         Settings -> Language & input -> Google voice typing -> Hands-free Your audio playback software has to work with the Google Now commands. I’ve tried Google Music and BeyondPod successfully. So, off we go! You’…

The Sweet Spot of Docker

I just stumbled across this "Ask HN: What is the actual purpose of Docker?".

After using Docker more and more over the last months, my answers have gradually changed. It used to be more hype-like, with "immutable infrastructure", "portable" and stuff like that. Now it's more practical, I feel I can say more concretely what our benefits are.

My favorite answer comes down to Docker being a standardized way of deploying and running applications.

The old way of deploying our software was complex with a taste of chaos, then became managed but complicated through the introduction of Puppet (or your configuration management tool of choice). I'm hoping Docker will nudge it more towards the simple (quadrant).

How we used to deploy (and still do) - most of these are done through home-made shell scripts we distribute using Puppet:

Installing Debian packages (mostly standard packages, sometimes from 3rd party repositories)Dropping WAR files into Tomcat (applic…

A Better Way to Git Push to Deploy (updateInstead & push-to-checkout)

Wow, nearly a year since my last post. I was sort of thinking it would be something more profound, but here goes: Git recently (with version 2.3) introduced a way of easily pushing changes into a remote non-bare repository, a.k.a. push-to-deploy. The old way would be to have a post-receive hook run some update logic which would do some procedure to update a non-bare repository. There now is a simple way of configuring the target repository to update its work tree instead upon being pushed to.

Now, pushing to the target repo may fail in cases where it has been modified, so soon after, a new push-to-checkout hook was introduced to deal with this, but it will only take effect in Git 2.4. I'll show how to set up both below.

Surprisingly, when searching for "push-to-checkout", I found very few articles about this, even though it was loudly mentioned on the GitHub blog (twice, and on StackOverflow, of course). So here's another one for the googles. Besides, I just wrote th…

GitMinutes Taking on a Sponsor

I was a bit unsure whether I should put this post on the GitMinutes blog, but figured I'd rather not mess up the nice episode overview there. I'll share this link via the GitMinutes Twitter and Google+ feeds, and of course everyone listening will hear about it.

I am a bit worried that some people will not like that I'm going in a commercial direction with the podcast. Git is an open source project, and all my guests have participated on a volunteer basis. I've received hundreds of micro-donations via Gittip and Flattr, and probably some of the donors expected the show to keep going as an independent thing. If anyone feels hurt by this move, let me know and I'll reimburse your donations at least.

The main reason I'm doing this is that I want to create more GitMinutes content. Not only for the podcast, but maybe do screencasts and other stuff as well. I want to engage the community in a lot of new ways, and this will require resources that I don't want to pay…

Managing dot-files with vcsh and myrepos

Say I want to get my dot-files out on a new computer. Here's what I do:

# install vcsh & myrepos via apt/brew/etc
vcsh clone https://github.com/tfnico/config-mr.git mr
mr update

Done! All dot-files are ready to use and in place. No deploy command, no linking up symlinks to the files. No checking/out in my entire home directory as a Git repository. Yet, all my dot-files are neatly kept in fine-grained repositories, and any changes I make are immediately ready to be committed:

config-atom.git
    -> ~/.atom/*

config-mr.git
    -> ~/.mrconfig
    -> ~/.config/mr/*

config-tmuxinator.git  
    -> ~/.tmuxinator/*

config-vim.git
    -> ~/.vimrc
    -> ~/.vim/*

config-bin.git   
    -> ~/bin/*

config-git.git          
    -> ~/.gitconfig

config-tmux.git  
    -> ~/.tmux.conf    

config-zsh.git
    -> ~/.zshrc

How can this be? The key here is to use vcsh to keep track of your dot-files, and its partner myrepos/mr for operating on many repositories at the same time.

I discovere…

Automating Computer Setup with Boxen

I just finished setting up a new laptop at work, and in doing so I revamped my personal computer automation quite a bit. I set up Boxen for installing software, and I improved my handling of dot-files using vcsh, which I'll cover in the next blog-post after this one.

Since it's a Mac, it doesn't come with any reasonable package manager built in. A lot of people get along with a combination of homebrew or MacPorts plus manual installs, but this time I took it a step further and decided to install all the "desktop" tools like VLC and Spotify using GitHub's Boxen:

  include vlc
  include cyberduck
  include pgadmin3
  include spotify
  include jumpcut
  include googledrive
  include virtualbox

If the above excerpt looks like Puppet to you, it's because it is. The nice thing about this is that I can apply the same puppet scripts on my Ubuntu machines as well. Boxen is Mac-specific, Puppet is not.

It was a little weird to get started with Boxen, as you're offered…

Calling All Programmer Podcasts

One of the reasons why I started podcasting, is that I listen to a lot of podcasts.

It took me a long while to build up my podcatching portfolio. For half a year, I listened to mostly gaming podcasts because the only programmer podcasts I knew about was Hanselminutes and Java Posse. I simply didn't know what programmer podcasts were out there.

Podcast discovery is about as well established as it was 10 years ago, meaning iTunes. Of course you can blindly google for "<topic> podcast", or you might start off with some recommendations from friends, but there still is no established way of discovering more podcasts of the kind you'd like (1).


Another problem is that I see very little cross-pollination between the programmer podcasts. Even though they intersect just the right amount, I never heard JavaScript Jabber mentioned on TheChangelog, for example (2).

To help remedy this I've thrown together all the currently active, English-speaking programmer-oriented p…

Presenting Git for Windows again

A couple of years back I did a talk for the local .Net user group on how to use Git on Windows. I also wrote about my Git setup on Windows. Even though I don't do a lot of work in this environment, I figured I could contribute a lot of good tips and experience as a somewhat seasoned Git user.

Since then a few things have happened, so next week I'm heading back to Bonn-to-Code.Net to refresh their memories on what Git is about, and what has changed since last time.

Update: Talk done. Recording and slides can be found here.

So what has changed since last time then?
Microsoft has fully adopted Git as their (second) version control system of choice.Git projects can be hosted inTeam Foundation Server, as well as on VisualStudio.com (which is kind of like TFS in the cloud).You can operate Git repositories from within Visual Studio (without installing any extra Git tooling, thanks to libgit2). On the desktop, you can and should still install MsysGit if you're going to use Git - Visu…

How To Defeat Piracy and Conquer The Movie Industry With One Box

Some weeks ago, a friend of mine was tweeting about the crappiness of DRM and the movie industry. Well, actually I think all my friends have complained about this at one point or another. You know what the problem is (read anything by Cory Doctorow if you need more material).

Instead of chiming along as usual, I decided to counter with:
"Why don't you as a programmer come up with something better yourself?" The discussion that ensued gave me an idea for a business/product that I'll share here. Feel free to steal the idea and build the "BetaBox"!
Imagine we built a solution for buying movies & series with all the problems of today's services removed. Imagine Hulu or Netflix, only with *all* movies and series, not just crappy old ones. It's not like Spotify is dominated by music from the 80-90's, and the newest songs are from two year's back, right?

Additionally, all content can be streamed or downloaded onto all your various devices. 

Now, t…

More git-svn Woes

I was pretty happy with myself after I figured out to always use git-svn with the --prefix configuration. However, as +Johan Herlandforetold, this stopped working after Git 1.8.3.2. Or to be precise, the convenient branch checkout/tracking mechanism stopped working.
So while you could do this before (imagine a fresh git-svn clone with --prefix=mirror/):

>git branch -a                                        
* master
  remotes/mirror/trunk #this is a svn remote

> git checkout trunk  
Branch trunk set up to track remote branch trunk from mirror.

Now, after upgrading Git past Git 1.8.3.2, you'll get this instead:
> git checkout trunk
error: pathspec 'trunk' did not match any file(s) known to git.

Even if you try doing it more explicitly:

>git checkout -tb trunk mirror/trunk
fatal: Cannot setup tracking information; starting point 'mirror/trunk' is not a branch.

Strangely enough, git branch earlier told us that this is a branch. We can even check out the head of it,…

Finally a Book on Google Guava

Well, this was about time:

TL;DR: There's a little book about Guava out. I've had a quick look through it and it looks mighty fine.

Earlier this week I got an offer to review this new book on Google Guava. For those of you who don't know Guava, I dare say it is the finest utility tool-belt library available for Java development.

The author, Bill Bejeck, hasn't been involved with the development of Guava, but he has blogged some articles on the subject in the past. What I've read so far in the book speaks that he knows what he's talking about.
Why do you need a book about Guava? Now, Guava is a library where you can only fully immerse yourself by reading through all of the JavaDoc, and in the first few rounds of doing so you probably won't understand half of it.

What you can do instead, for starters, is to read through the GuavaExplained wiki pages, which offer a much nicer reading experience, but go into very little detail.

So then you're left with looki…