Skip to main content


Showing posts from 2011

Git-SVN mirror product: SubGit

Just a quick mention for you people who can't be bothered with my somewhat intricate Git-SVN mirror setup , there now is a now is a solution packed into a product: SubGit . I tried it out on a little local SVN repo recently, and it worked just fine. It delivered pretty much perfect two-way syncing/bi-directional mirror (which I've earlier deemed to be very impractical with git-svn ). The bad parts are: It's new (use at your own risk, in other words: DO NOT install it in your main-line subversion repo used by a 100 devs). It's closed source, so you're at the mercy of the SubGit devs for fixing any feature that you need in your special repository.  It requires instrumentation on the Subversion repository installation. If the repository is beyond your control (hosted externally, or by some separate department), you're stuck with my old setup . The good parts: Super-sweet functionality! I mean, bi-directional Git/SVN is highly sought after. Seems to

Google Guava's Predicates

So the other day I was working away on some rather tricky rules for validating an incoming identifier code. Like 999392304II+TJAJEIAJTI901119 or EPFOOMNNVLLALOWEIITOE Now, the system where this code is going is rather picky about what these codes should look like. (For the sake of this blog-post, I'll invent some business rules here on the fly, in reality they are a bit different, but the nature of them are the same): A code cannot be null, or an empty string (of course) If there are only letters (A-Z) in the code, it must be longer than 10 characters, but fewer than 20 On the other hand, if there are letters mixed with numbers, it must be exactly 10 or 15 characters Numbers only are not allowed No other symbols are allowed, but + signs are allowed, if the code starts with 999. In this case, the max length is 10. Instead of just going straight for the if-else'ing my way through these rules, I implemented it using Predicates from Google Guava . I was pretty hap

Some thoughts on Git vs complexity

I originally  wrote this  in the Git For Human Beings mailing list. The thoughts are stolen from Rich Hickey's Simple Made Easy talk . (Matthew McCullough  commented the same parallel  the same day, but I think his timestamp was a few hours afterwards). I wanted to tweet about it, but it ended up being a whole post, as I'm trying to gather my thoughts on it for my next Git talk . There's simple stuff, and there's easy stuff. Simple means the opposite of complex. Easy, on the other hand, means it's very close to the stuff you already know. Git is "simple" but hard. Subversion is "easy", but eventually complex. Git is *a lot* of features in one tool (think of the 100+ git plumbing commands). Each feature is simple, but learning to use them together is good bit of work. As soon as you've understood the model and you get that Eureka-moment, the tool never fails you, and you find it more and more fun to use the more you learn. (Th

Presenting Git on Windows at the next meeting

Update 18.11.2011: Due to Gad J. Meir visiting all the way from Israel, we've postponed our talks that were planned for the 28th of November. Most likely I'll be doing the talk near the end of January next year instead. It's been a while since I ran Visual Studio on my laptop. In my early university-college days, around ten years ago, .NET was just coming out of the oven. We learned algorithms and data-structures doing Java, but when it came down to actual application development, desktop- and web, connecting GUI's with databases, .NET was the thing. I liked it. It was bit of an eye-opener for me, that I could actually use programming for building useful stuff, and not just fantasize about being a game developer. Later on, I fell back into the Java/J2EE world, and rode there for a while. While working for Objectware 's Java department, it was always interesting to see what the .NET department was up to, and while they were part of them evil

Be a Good Audience

So I'm sitting here reading Scott Berkun's  Confessions of a Public Speaker , pretty good book by the way (from the Viaboxx library). I'm just through the chapter about "Working a hard room". And then it hits me:  I actually spend an effort being a good audience at talks . I go to the odd conference and user-group meeting, and whoever is speaking, and even if the talk is not hitting home with me, I always try to... Sit down in the middle, close to the speakers where they can see my face Focus my full attention on them - no smartphone/laptop React to what they're saying with my face, friendly smile when they say something smart, raise my eyebrowsand smile  when they say something surprising Laugh at their jokes (I mean, not fake laugh, but be open to laugh) Ask questions when I wonder about something Hold my criticism till after the talk, if any, and give it in person Think about and note any questions I'd like to ask in the Q&A A good spea

Why Releasing More Frequently is Good For You

So I was thinking a bit about frequent releases. There are many agile books and articles that explain how more frequent releases are a good thing. However, to many people in management, this is counter-intuitive. They say "Slow means safe. Slowing down means more time to improve quality, more time to test, and more time to fix bugs. Also slow is cheaper, because it's less overhead costs." I've seen a lot of projects where release frequency slows down, especially after the initial development burst and launch of a product, and I think this is a shame. So how do I go about explaining people that the slow-means-safe line of thought is wrong? I've come up with a little model I'd like to go through here. I start off with defining a  Rate of Development , which we'll assume is constant throughout the model (leaving out factors as motivation and skill). Now, having a high rate of development is not worth anything if we're not Doing  t he Right Thing .

Git-SVN Mirror without the annoying update-ref

This post is part of  a series on Git and Subversion . To see all the related posts, screencasts and other resources, please  click here .  So no sooner than I had done my git-svn presentation at JavaZone , I got word of a slightly different Git-SVN mirror setup that makes it a bit easier to work with: In short, my old recipe includes an annoying git update-ref step to keep the git-svn remote reference up to date with the central bare git repo. This new recipe avoids this, so we can simply use git svn dcommit   directly. So, longer version, with the details. My original recipe is laid out in five steps: Clone a fresh Git repo from Subversion. This will be our  fetching repo. Set up a  bare repo. Configure pushing from the fetching repo to bare repo In the shoes of a developer, clone the repo Set up an SVN remote in the developer's repo In the new approach, we redefine those last two steps: (See the original post for how to do the first three.) 4. Clone t

My JavZone git+svn talk is online

This post is part of  a series on Git and Subversion . To see all the related posts, screencasts and other resources, please  click here .  Update : I've also shared my notes from the talk.  Here they are . So, the Cisco/JavaZone folks were lightning fast and uploaded the recording of my session at JavaZone the day after I held it. Here it is: Living with Git and Subversion in Parallel from JavaZone on Vimeo . You'll have to watch it fullscreen and in HD to follow the command line action, I reckon. I think this marks the climax, and probably the end of my adventures with git+svn. I mean, we're still using it at work, and I'll still help people with it when they ask on the "Git for human beings" mailing list . However, I won't submit it to any more conferences or user group meetings. It's been a really interesting topic, and an important one. The resources-page has gotten 6000 views (plus a lot more on the blog posts), and the screencas

New job

In the end of June, I left IP Labs to work as a developer at Viaboxx Systems . I had a great time at IP Labs, and learned a lot there, but it was time to try something different. Viaboxx is a small company, much like a startup (although a bit more established). It's a small team of excellent professionals, and they are agile to the very core, much to my liking. I'm learning a lot: Groovy, Grails, with options of doing JavaScript and even some native platform dev in the future. But my favorite part is that I get to work on a whole product. From the user experience in the front-end, through software to the hardware components, the whole team is responsible for making it as good as can be. And just to mention a couple of perks: Waiting for me on my first day was a brand new top-o-the-line 27" iMac. We've got 20% innovation time (FedEx days). We work in a villa. We cook and eat together every day. And the company is sending me up to Oslo for the JavaZone X conferenc

Speaking at JavaZone 2011

Some weeks back I got word that my Git-SVN talk got accepted for JavaZone ! Last time I attended JavaZone was in 2008, where I did my talk on Web Testing (video available). Since then I've moved to Germany, and haven't really had the chance to attend the conference. However, I've heard its kept getting bigger and better every year, and I have no doubt this is the best Java conference in the world. So I'm really looking forward to coming back there, meeting a lot of old friends, and learning a whole lot of new stuff. This year marks JavaZone's 10th anniversary, and as usual their marketing is hilarious: So, see you in Oslo, early morning Wednesday the 7th of September!

2nd day at GearConf

I was gonna post this Friday evening, but I got knocked out by a cold over the weekend. Anyhow, here's Friday's highlights from GearConf the way I remember it: Stephan Hochdörfer did a talk on building software using generators and DSLs. The message didn't quite reach me, but the idea of generative programming was interesting enough. Some concrete examples and demos would have helped. Afterwards, Martin Geisler presented  Mercurial's Query Language (PDF link)  - which was a really impressive array of features. As is obvious of this blog , I lean towards Git as a favorite SCM, but through this talk I feel I really *got* Mercurial. With bookmarks and queues , it's basically has the same firepower as Git. The only aber aber about Mercurial I find to be the GPL licensing. I reckon this will make it trickier for 3rd parties to implement tool support (example: FogBug's Kiln uses Mercurial ). Onwards to a double talk with Hans Dockter , the Gradle chief. Thi

Git-SVN talk at GearConf 2011 done!

So, just a quick post to announce that I did my Git+SVN talk today at GearConf . I feel that the talk went pretty well. There were only 45 minutes at hand, so I focused on setting up a Git-SVN mirror with branches and tags . I also set up Jenkins to drive the git svn fetch+git push in the fetching repo, and in the end put the bare repo on GitHub (for full buzzword compliance). If you attended the talk, I would really appreciate to hear any kind of feedback! Either comment here, or rate my talk at . Otherwise, 1st day of the conference was great! I got an introduction to Chef from Martin Eigenbrodt , heard an eloquent Maven rant from  Halil-Cem Gürsoy , and  Michael Leibfried talked about how to introduce Scrum in hostile environments. All really interesting talks. Also speaking in the revision control department was Stefan Lay presenting the awesome upcoming EGit 1.0 release , and Martin Geisler , a fellow Scandinavian, presented Mercurial, where he's o

English Talks from the ROOTS 2011 Conference

Great news! The recordings from the recent ROOTS conference are now available online! Apart from the keynote speakers (including Jurgen Appelo and Dan North), there were a myriad of more local speakers doing lightning talks. Now, in spite of speaker "quality" on average being a bit below the keynote-level, I find these lightning talks are particularly refreshing. There something very real, and honest about them. Most of them are just regular developers sharing their good and bad experiences from  stuff they've tried out. Unfortunately, it's a right mix of Norwegian and English talks, and the good ROOTS folks haven't done any particular tagging in regards to language. I therefore had a quick skim through all the talks noting down which ones are English. Here they are: Keynotes: Patterns of Effective Delivery - Dan North The 7 Duties of Great Software Professionals - Jurgen Appelo Lightning talks (in the order I found them on vimeo): Too busy sharpening t

Added some ads..

I've just added some ads to this blog as well as my homepage . This is more out of curiosity than it is for making money, but maybe it'll be enough to pay for the domain ;) I'll keep them for a few weeks, and then take them away if there are any complaints. Please give me a tweet or a comment if you think they have a detrimental effect on the content.

AgileCoachCamp: Germany

In a few weeks I'm driving down to the AgileCoachCamp: Germany ( #accde11 ). It's taking place in a place called Johannesberg, near Frankfurt am Main, from 17th till 19th of June. I'm not sure what to expect, but I'm sure there'll be a lot of eye openers on how to help agile adoption. My personal pain-point is how to avoid agile saturation , meaning where an organization comes to the point where they have "enough agile", or too many non-movable obstacles are in the way of further change. I'm really looking forward to finally interact in-person with other people on the German agile scene, as well as some from other countries. It's been a while since my last agile gathering/conference (apart from the Bonn XP meetups ), so this will be a blast!

Git-SVN at GearConf 2011

It's that time of the year again! Well, actually last year GearConf took place in October , and this year it's June 9-10th. Well, anyhow. Again I've gathered up some premium octane Git-SVN knowledge , a bit like the stuff I did at the RuhrJUG in Essen , but this time I have to fit it into a slot smaller than one hour. At least I hope to fit in the interaction with Jenkins and GitHub this time, and do a bit less of the git-svn basics. So, if you live around the Ruhr  area, in  NRW , or otherwise nearby, get your GearConf ticket  now!

Agile Game Development: Magicka

Update 2011.05.09:  Arrowhead posted a reply to this post . This post is a tribute to a company which, judging by the looks of it, is kicking ass, agile style. "This sprint is really going down the drain" from the first scene of Magicka in adventure mode. What's this about The company is called Arrowhead Game Studios , and they've made a game called Magicka . Now, I'm not going to write so much about the game itself, but it's awesome. I used to play a lot of computer games growing up, all the way through my studies. Since then, it's been pretty sporadic. Until I tried out Magicka. I've been playing it for over 50 hours, which is pretty good value-for-money, considering it cost 10€ (plus DLC's, which are a point I'll come back to later). How successful is it? In the first 17 days it was for sale, it sold over 200.000 copies . At times it topped the stats for most-selling game on Steam , at one point selling 30.000 copies in 24 hour

Agile Lean Europe: Some thoughts

Just jotting down some thoughts.. A couple of weeks ago, I drove up to Düsseldorf to attend the Scrumtisch Rhein/Ruhr meeting, because the topic was this new Agile/Lean Europe (ALE) Network . Olaf Lewitz facilitated the discussion ( credits to CodeCentric for the free beverages/food). I first heard about this network in this discussion in the Norwegian agile forum , initiated by  Sergey Dmitriev  and followed up on by Johannes Brodwall . Olaf and Deborah Preuss were both involved in the Agile Coach Camp in Norway earlier this year, and I suspect that they already discussed some of these things there. This makes for a firm connection between the German and Norwegian agile scene, and I hope to be able to support this bridge somehow. Now, why does this European interconnection matter anyway?  I'll give you three reasons why it matters to me personally: 1) It's no fun doing it alone Agile is deeply nested with social drive. While it's perfectly fine to drive on

The Dreaded Service Locator Pattern

Torbjørn Marø recently blogged about Dependency Injection, due to  Mark Seeman visiting the Norwegian .Net User Group in Bergen. This triggered my thinking about the dreaded Service Locator. I have worked with several teams that favored a home-made ServiceLocator class, a static component referencing a set of  services , typically chunks of functionality that are singletons that interact with something external like database, filesystem, or web-service. My beef with the Service Locator is that you can put it in, and use it from anywhere: It can be used to grab services in a controller/action component, inside a service, in a domain object, inside a for-loop, anywhere. This sounds pretty powerful, but ends up bringing in a lot of maintenance problems. Now, in spite of my troublesome experiences with it, I keep finding myself being pretty lousy at explaining the disadvantages of a ServiceLocator to my peers. I therefore hunted through Seeman's blog for some better explanati

Git+SVN at the Java User Group in Essen (ruhrjug)

Update: There's now a Xing signup for the event: I will be heading up to Essen next month to present Git+SVN at the ruhrjug event . The arrangers ( Infaktum ) are also behind GearConf , where I presented on the same topic last year . The event takes place on 14th of April, and starts at 18:00 in the Glaspavillon Campus Essen: View Larger Map If you want to know the tricks of living with Git and Subversion in parallel , be there! I'll be showing off all the steps, from getting started with git-svn, through the obligatory Git-Subversion mirror, to the final-migration-away-from-SVN. Hopefully there'll be time for showing off stuff I didn't get to at GearConf, as well as some good discussion. Oh, by the way, if you've got any reference cases where you are also using git-svn, I would love to hear about it. I recently noticed that Gnu Cash  are using it, and it would make me happy to

The Dream of a Bi-directional Git-SVN mirror

This post is part of  a series on Git and Subversion . To see all the related posts, screencasts and other resources, please  click here .  I just got an email asking me how one can set up a bi-directional Git-SVN mirror. It ended up being quite a long answer, so I'll post it here for the benefit of other Git-SVN readers with the same idea. As you may know, I'm a proponent of my own Git-SVN setup . I remember trying to go down the path of a bi-directional repository, but always ran into problems. Here is how it could work: However nice this would be to have, it can be very hard to achieve in practice: Git-svn requires working in a non-bare repository, so pushing to it is by default refused. You can work around this by doing this in the target sync repo: git config receive.denyCurrentBranch ignore You also have to automatically perform a git reset --hard in the syncing repo after each push (by some git hook?), because the work-dir is considered dirty when it is

A small Subversion guide for Git users

A recurring problem for us Git users is that we tend to forget the good old Subversion tricks. We want to do some patch on some old code in a Subversion repo, and suddenly we've got no idea how to work around. Here's a quick guide: > git pull > svn update > git add new_file svn add new_file > git add changed_file N/A: SVN automatically adds all modifications to the index. If you don't want to commit it, don't change it. > git commit; git push (you always have to do these together): > svn commit > git revert [SHA] > svn merge -c -[R] . > git branch branch_name > svn copy url_to_project/trunk url_to_project/branches/branch_name > git tag tag_name > svn copy url_to_project/trunk url_to_project/tags/tag_name > git checkout branch_name > svn switch url_to_project/branches/branch_name/ > git merge branch  svn merge -r[start]:[end] url_to_project/branches/branch_name . (Note that you have to keep track


Kent Beck wrote a small chapter about Communities  in his book Extreme Programming Explained: Embrace Change (2nd ed) : Participate in communities, local and global. Look for communities that encourage you to be your best self. If you can't find such a community, start one yourself. If you are wrestling with difficult questions, you are not alone. As a community we can accomplish more than we ever could in isolation. When I lived in Oslo, I was a member of the local XP-meetup group. It was awesome. In the beginning, I was still a CS student, and I felt privileged I could attend these meetings. These experienced people were dropping serious knowledge about how to work and develop software in practice. It was so refreshing compared to the artificial subjects at university, and it just made more sense . At the same time, the speakers were so humble, you could ask them anything, and they would try to identify with you, draw parallells based on experience, tell stories.. Over the

Sonatype and Hudson/Jenkins: An Analysis

I'm dare say I'm a seasoned Hudson user (admin) and proponent. For over five years I've been introducing different kinds of CI at whichever place I worked at. When Hudson entered my radar, this work became a lot easier. I'm also a heavy Maven user, and Nexus did for Maven repositories what Hudson did for CI. The Plot Over recent weeks, the community around Hudson has been shaken by a fork: The main developers ( Koshuke and crew) have renamed Hudson to Jenkins , while Oracle have kept on developing Hudson in partnership with Sonatype . Here's a simple illustration of what happened: These are my pure external speculations about what has happened recently in the forking process, with regards to Sonatype's involvement in particular. So who is running this show? I noticed that Sonatype (usually personified by Jason) have gotten their fingers pretty deeply into the Hudson infrastructure already: Like  this tweet  noted, it appears they are controlling

Google Guava r08 is released

A few days ago, Google Guava r08 was released . "This project contains several of Google's core libraries that we rely on in our Java-based projects: collections, caching, primitives support, concurrency libraries, common annotations, basic string processing, I/O, etc." I had a little look through the API changes to find some neat new details, and put together a couple of JUnit tests that show them by example here . That whole GitHub project is a Guava showcase, so if you can think of some more examples that should be in there, please fork ! Especially the IO, Net,  and Concurrency bits could need some examples. I've also taken my old blogposts about Google Guava and ported them to . After noting this, the Guava guys honored the effort by linking the page from the Guava homepage , which gave me quite the traffic bump! Luckily, my pages are all hosted on Google servers, so it's their own bandwidth bill ;)