Welcome on ilikeorangutans
Recent content in Welcome on ilikeorangutans
- Generator
- Hugo
- Rights
- © 2026 Jakob Külzer
- Public lists
- I ♥ RSS
- Fetched
Inspiration and Action
Data Engineer, Data Platform
Freelance Consultant, Security
On Wasted Time
Recently I’ve been feeling… unaccomplished. Despite all my achievements, acquired skills, and successes I’ve had a thought gnawing at the back of my mind. I realized, after looking at my extensive list of side and toy projects, that none of them are making any progress. In some of them I invested lots of time, others are just ideas, barely sketches. But they all have in common that I grew tired of working on them. Either because after a day at work my brain is tired, or because other things are taking precedence. I’ve moved into a house that requires constant upkeep. Things break or wear out and before your know it you’ve spent an afternoon fixing something. And then I’ve finally picked up a regular workout routine. Generally I’m proud of that, and because these things take time, I had no time for my side projects. Or at least that’s what I thought and told myself.
Google Appengine, Go, and Vendoring
I’m working on a small app running on Google App engine using Go and upgraded to the latest version of the GAE SDK. The latest version uses Go 1.6 instead of 1.4 like the older version I had. Upgrading was mostly straightforward, but once I started using vendoring I got strange build errors like this:
2016/05/22 13:26:47 go-app-builder: Failed parsing input: parser: bad import "syscall" in vendor/golang.org/x/net/ipv4/dgramopt_posix.go
I got different variations of this, but all came down to the same problem: some code was importing packages that GAE doesn’t want you tu use. Sadly these errors don’t show up during normal goapp build or goapp test cycles, but only when you want to deploy or start a local devserver.
Writing an Operating System - Environment Setup
I’ve been reading The little book about OS development and wiki.osdev.org and took some notes along the line. Here’s what I wrote on environment setup.
Environment setup
You’ll need a cross compile toolchain consisting of GNU Binutils and gcc. The osdev wiki has a great page on setting up a cross compilation toolchain.
It took me a few times because I didn’t read the instructions properly. It is important to unpack the sources for binutils and gcc and have separate build directories, gcc-4.2 and gcc-build for example. Then, for building gcc, make sure the newly built binutils are on your path.
gorename and invalid expression
This took me longer to figure out than I care to admit, so here’s the solution.
The issue comes up when trying to use gorename:
$ gorename -from "github.com/ilikeorangutans/foo".MyType -to 'MyBetterType'
gorename: -from "github.com/ilikeorangutans/foo.MyType": invalid expression
Even though the from query looks normal, gorename just refuses to work. However the issue is not so much with gorename but rahter my shell, zsh. Turns out properly escaping your from query, fixes the issue:
$ gorename -from '"github.com/ilikeorangutans/foo".MyType' -to 'MyBetterType'
Renamed 15 occurrences in 5 files in 1 package.
Notice the single quotes around the entire from parameter.
Software Developer
Using Golang and Graphviz to Visualize Complex Grails Applications
At work we are maintaining several large and complex grails applications. In order to improve stability and reliability, we’re trying to increase test coverage. But as with all projects, time and resources are limited. In order to get a better understanding of what parts of the application are more important than others, I decided to use Graphviz to help me get a better overview of our applications.
Meet Graphviz
I discovered my love for the dot language when I used it years ago to analyze template hierarchies in a proprietary CMS system I worked on. In a nutshell, it lets you specify a graph with nodes and edges plus some extra attributes for labels, shapes etc. It’s really a concise little language:
Maven Release Plugin and Git 1.9
Ran into this issue today and wasted a good hour on figuring out what happened. Seems to be an issue with Git 1.9.x.
Symptoms
Maven release plugin successfully completes the release:prepare goal, creates the tag, but fails to commit the changed pom.xml.
Solution
Git’s output format changed slightly in one of the recent versions and Maven’s SCM provider expects output in a certain way. Luckily you can force git to use the old output style:
Golang Reading and Notes for April 2014
Last week I attended the Toronto Golang Usergroup Meetup and it was plenty of fun. If you’re in or near Toronto and like to dabble with Go, come out. Oh, and did I mention free pizza?
Notes
-
Casting in Go is slightly different than in C related languages. Instead of a cast, you perform a type conversion:
var myVariable SomeGenericType = ... casted, ok := myVariable.(MoreSpecificType) // ok is a bool if ok { // Type conversion successful } else { // myVariable does not implement MoreSpecificType } -
The
rangekeyword when used with two return values does not return references, but rather copies. This had me struggle for a while as my code was not behaving as I thought it would. I had a slice of structs and was happily iterating over it:
Grails 2 Testing Guide
Note: I’m still working on this post, but I already use it as a reference so there’ll be more content over time.
I’ve been quite busy at work with updating a Grails 1.3 application to 2.3.4. While writing a test harness it became apparent that lots of things have changed since I’ve last worked with Grails. Many changes are for the better, especially the integration of Spock framework. However, there were some issues that took me a while to figure out. The Grails docs on testing are comprehensive, but long. Here’s my cheat sheet.
First impressions: Go
Ever since Google release Go I’ve been curious. Many good things were said and I always read bits and pieces here and there. Last week I decided to dive deeper and write some small things and get to know the language.
So far I’m really impressed. This is a quick list of things I’ve noticed:
Language
The go language is full of nice surprises. I haven’t seen everything, but just a few things that really impressed me:
Thoughts on Authorization Schemes
JSR-269 Annotation Processing
I’ve been contemplating compile time bytecode manipulation for the Object Mapper Framework for a while now. Compile time instrumentation of classes seems to be a better approach and does away a whole lot of class loading issues, especially in OSGI environments. In any case, I remembered Project Lombok and reading about JSR-269, which was introduced with Java 1.6. It’s an API that allows you to plug custom annotation processors into javac.
After experimenting and reading a bit, here is my reading list:
Switched from Eclipse to IntelliJ
Over the years I have always been fan and user of the Eclipse platform. I liked the openness, the available plugins, and many of its features, including the CTRL-1 hotkey that does everything, and a few other things. However, over time Eclipse got slower and slower, more unstable, and after a while just a pain to use, especially when using more than one screen. I decided to give IntelliJ another try, as I’ve done a few times before. And like every time I tried it, I got really frustrated. IntelliJ and Eclipse differ in certain areas, and my inability to use the old shortcuts just made me feel like an infant on stilts. However, after more encouraging tips from Reddit and other research, I installed the Key Promoter Plugin which shows an angry popup whenever you use the mouse to do something that has a shortcut. With that, I’m learning keyboard shortcuts quite fast…
Making Eclipse's Method Stubs Better and other things
Just downloaded Eclipse Kepler and I’m quite happy with it. It appears fast and stable so far, but that could be just that it’s a brand new install. Anyways, I re-added some of my usual code templates and while doing so, I discovered a few useful things. And because I keep doing this on every Eclipse installation, I decided to write this down here. On a related note, an Eclipse plugin to share your Eclipse templates would be pretty rad. But I digress.
The Case for Continuous Integration
In my career as a software developer, I’ve come to appreciate the principles of Continuous Integration (CI). It forces you to do the hard things early and often and thus helps you reduce risk during development. It forces you to write tests, and be responsible about what you check in. All in all, good qualities and something that every development team should aspire to. Or so I thought. Reality is different, and so far almost every development team I have interacted with is deadly afraid of doing CI. So much, that there’s been near-mutinies because CI and what it means for team, causes so many problems. This is something that puzzles me, and I realize it might be because the teams in question don’t fully understand what CI is or only realize a subset of what it means. This is my attempt to demystify and explain CI.
The Problem with LinkedIn's Skills Endorsement
On Developer Happiness and Productivity
I’ve had the idea for this blog post in my mind for a long time. It is based on all my personal experiences and observations over the past years and is in no way scientific. It is my personal opinion, and even though this is how I perceive the world, it might not be true for other people. With that said, let’s jump to the core of things.
A happy developer is a productive developer.
Date Arithmetics in XSLT 2
Now here’s something I didn’t know: XSLT 2 and XPath actually support date arithmetic! Took me a while to figure it out, but here’s how it works.
First, all your dates will have to be in ISO-8601 format. For dates only it looks like this: YYYY-MM-DD and for dates and times, like this: YYYY-MM-DDTHH:mm:SS.sssZ. There’s a few other formats, but these are the ones that probably cover all use cases.
In order to make use of all the functions regarding date and time, the values will have to be converted into the appropriate types. They data types are defined in the XMLSchema namespace http://www.w3.org/2001/XMLSchema and are:
OSGI, Guice, and Peaberry: first steps
Introduction
I’ve been trying to get Google Guice and Peaberry to work in my OSGI projects for a while. Google Guice is a great dependency injection framework, and Peaberry promises to bridge the gap between OSGI services and dependency injection.
However, getting Peaberry to work was not trivial, mostly because there aren’t many docs and the quality of the docs is somewhat lacking. The best piece is still this pdf Peaberry - blending services and extensions, but it’s a lot of information in very little space.
Type Incompatibility With Maven SCR Plugin
Google Guice and Scope Mixing
I’ve been working on a small Java application I wrote a few years ago for some bug fixes and in the process of making it better, I introduced Google Guice, my favourite dependency injection framework. On of the great features of Guice is that it supports different scopes for injection. Per default, Guice will return a new object for every request. But sometimes you want to objects to be created a bit less liberally, for example, you want a certain object to be created only once. Guice has a @Singleton scope for that. Want an object to be created once for a request? Guice and guice-servlet offers @RequestScoped and SessionScoped. But there’s more, need JUnit per test scope? Guiceberry has exactly that: @TestScoped that will make sure every test gets exactly one object.
Reading List: JVM Internals, Rugged Software, and 12 Factor Apps
Recently I’ve been reading a lot about software development and philosophies on how to write better software. I really enjoyed the Rugged Manifesto as it emphasizes how software is crucial in our world and the responsibilities that come with it. Another great guide is Twelve-Factor App, a list of 12 principles on how to effectively implement and operate applications. And last but not least, Understanding JVM Internals, a really well written cross cut through the JVM, including class file format, JVM structure and stack memory layouts.
Apache Sling Resource Resolver Rules in a Nutshell
If you work with Apache Sling, you have probably encountered the ResourceResolver and its configuration rules.
In short, the ResourceResolver is the part of Sling that resolves incoming requests to actual or virtual
resources. For example, if a request for /foo/bar is coming in the resolver will resolve that to a
corresponding node in the JCR. However, sometimes it is not desireable to expose the internal structure of the
repository or the required external structure cannot be represented using the JCR. In that case the resolver
can be customized by installing resolver rules. Resolver rules can be modified via the OSGI configuration
editor or the OSGI ConfigurationAdmin.
commons-logging in OSGI Environments
While working on a small toy project using Apache Felix and commons-httpclient, I kept running into the issue that there is no official OSGI bundle for Apache commons-logging out there. While most Apache commons projects either provide simple bundles or full blown OSGI implementations with Activators and Services, commons-logging is an interesting exception. If you scan the Commons OSGI status page, you will notice that there is no OSGI version for commons-logging available, and a separate section to explain why. I haven’t dug into why and how it conflicts with the OSGI classloading scheme, but I can see that being a problem. Be it as it may, there is no official OSGI bundle for commons logging.
OSGI Bootstrapping
I’ve been working with OSGI based technology for a while now and it’s a great piece of technology. However, so far I’ve only worked with OSGI technology that runs in existing instances of the framework. A running framework is easy to deal with, but how do you get to this point? I spent some time today playing with that, and it took me a while to put it all together. So naturally, I’ll have to record my findings here.
OSGI Classloading Reading List
I’ve been doing a lot of reading on how OSGI handles class loading. I’m starting to fully understand and leverage OSGI and I’m trying to keep my framework Object Mapper as compatible with OSGI as I can.
In OSGI classloading is very restricted, similar to what happens in enterprisy Java application servers, and completely unlike traditional Java applications where everything shares a single classloader. In OSGI each bundle has its own classloader and what is visible accross the bundle boundaries is subject to strict export rules. In order to use a class outside of a bundle you’ll have to explicitly declare its package as exported. There are many benefits to this strict architecture, clean architectures, reusable components and the ability to update bundles at runtime are probably the most important ones.