Auto-install Node.js and npm from Makefile

This is how you can detect existing Node.js and npm, or automatically install a temporary Node.js if none is already installed. About the only things needed are make, bash, curl and git, which are usually available on all development / CI machines. (I’m planning to work around the requirements for curl and git, so those won’t even be needed in the future.) Put this at the top of your Makefile:

Then download the find-node-or-install script to the same directory:…

Getting started with Gradle

Did you know that there is a Java build system that does not use angle brackets? More and more projects are using Gradle as an integrated part of their development process. In short, Gradle provides a Groovy DSL for declarative builds based on build conventions. This blog post aims to give you a kickstart if you want to start exploring Gradle yourself by introducing some core concepts and commands. Installation If you have not used Gradle before, you must install…

How to make Tab work inside a RichTextBox with Hyperlinks on Windows 8

OpenGL ES 2.0 Tutorial for Android – Part I – Getting started

A Responsible Programmer

Using maven-failsafe-plugin wildcards to dynamically target test classes

In this blog post I will describe how you can use maven-failsafe-plugin wildcards to dynamically target test classes in your build tool. This is useful when you are using SpringJUnit4ClassRunner or other testrunners which does not, without hassle, allow you to use JUnit Categories. It is also useful when your tests depend on data being populated to a database (for a clean testenvironment). I chose maven-failsafe-plugin before maven-surefire-plugin since they run in different maven phases and in my case I…

Confess 2013 Conference Report

The four of us recently visited the Confess, CONference For Enterprise Software Solutions, in Vienna. It was located at the Messe Wien Exhibition & Congress Center which was a nice place for the conference. Here’s a summary of some of the sessions during the conference. Couchbase – Michael Nitschinger Michael gave an overview of Couchbase and in particular the new features of the 2.0 version. Couchbase combines the features of an in-memory data grid and a document database with secondary…

Solving asm conflicts after upgrading to Groovy 2.1

What’s new in REST Assured 1.8?

Serializing groovy.util.slurpersupport.Node to XML

Hypermedia APIs with mobile clients

Javascript Conditionals

As we all know, Javascript is a very flexible language. In the article I will show different ways to execute conditional code by using some common idioms from Javascript and general object-oriented techniques. Default values Javascript does not support default values for arguments and it is common to use an if statement or a conditional expression to set default values.

I usually prefer to use an or-expression instead. The short-circuiting or, ||, avoids the repetition of the conditional operator…

Event Sourcing in Clojure

Three Undocumented Features of JSON

Update: This article was written as an April Fool’s joke, taking a stab at the fact that JSON is a closed, dumb, and pretty anemic data format. There are other interesting data formats available, such as extensible data notation (edn). JSON (JavaScript Object Notation) is widely known as JavaScript’s data format, often used as a language-independent data interchange format. However, what I consider to be the three most powerful features of JSON are little-known. The main reason for this is…

Automatic Deja vu tracing

Behaviors in WPF introduction

Upgrading Jersey with Spring, JAXB and Jackson 1.x to Jackson 2.x

A while ago we decided to upgrade Jackson from 1.x to 2.x (faster jackson). We were also using JAXB to map Java objects to JSON and Jersey for exposing our REST services and of course we wanted to retain those after the Jackson upgrade. The process is really quite easy once you’ve figured things out. Maven dependencies Before the update we depended on the following Jackson artifacts in Maven:

Where the jackson.version property was equal to 1.9.11. All of…

Label printing in your .NET application with a DYMO LabelWriter 450

Aggregates + Event Sourcing distilled

Configuring Maven to use Java 7 on Mac OS X

Recently I switched to Java 7 and then ran into a couple of issues. I had a Mac with OS X Mountain Lion (10.8.2) and Maven 3.0.4 (Maven installed using “brew install maven”). Both Java 6 and Oracle Java 7 was installed on the system with the default JVM set to Java 7: $ java -version

But Maven was picking up Java 6: $ mvn -version

The JAVA_HOME environment variable was set in ~/.profile:

but it was…

Windows 8 app development lessons learned – slides

Yesterday we hosted some guests in a double session event regarding lessons learned developing Windows Store apps. First of all, thank you to all visitors! Secondly, thank you to Peter Bryntesson from Microsoft Sweden for a really good session. We, the XAML team at Jayway .NET, held on session on a bunch of topics – and we here present you with the slides. Enjoy! Robert Hedgate preaching about snapped vs full vs filled view. Peter Bryntesson on Javascript, PCL and…

Scandinavian Developer Conference report