Blog Post Archive

Things I’ve written over the years. Explore blog posts by date below or by tags.

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 range keyword 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

Today I was experimenting with some new tools (Prose) and was confronted with a screen that probably everybody that owns a smartphone or uses any kind of connected online service has seen before: an authorization screen where the user is expected to either approve or deny an application based on list of permissions. Here’s how Github’s screen looks like:

Github Authorization Screen

Android has a similar screen when you install an app, IOS probably has one as well. Pretty much every connected system, be it Facebook, Github, Stackoverflow, pretty much everything that uses OAuth or similar technologies will have a screen like this. From a technology and development point of view it makes a lot of sense; at least initially. You break down privileges in a system into a few neat categories and if an application wants to use this service, it has to declare what it uses. Ideally the system would enforce that the application can only use the declared permissions and in theory that would make everything safer…

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

A while ago LinkedIn introduced what looked like a really cool feature, an easy way to “endorse” skills of your contacts. It’s really easy to go in and click “Endorse” on a bunch of skills. However, one thing that kept surprising me was who endorsed what skills. For example, just today I had a ex-coworker from over 4 years ago endorse me for Hibernate. Which by itself is a nice gesture, only thing is, he’s an art director. I don’t want to be pretentious, but I would believe that he knows as much about Hibernate as I know about Photoshop filters or fine arts. As a matter of fact, I usually get yelled at for my choices of colour. If he would have endorsed me for “Teamwork” or “Attention to Detail” or something like that, I would agree that it is an accurate representation of my skills. But getting endorsed for my Java ORM skills by a designer doesn’t constitute valuable feedback.

ilikeorangutans

Jakob Külzer’s personal blog