Saturday, January 3, 2015

My Year 2014

My year 2014 was interesting and brought many changes from a professional and personal perspective.

From the personal perspective …

I had two great vacations: I was literally beginning the year under water on a great dive trip in Raja Ampat. Diving with oceanic mantas was something I will never forget:

And my mountainbiking vacation in Colorado/Utah was another extraordinary experience:

However the probably much more profound event in my personal life came in October with the birth of our first child:

From the professional perspective …

I started to do much more teaching in 2014. My engagement at the Berner Fachhochschule was expanded and I am teaching a mayor part in the new CAS (Course of Advanced Studies) “Multiplatform Development with HTML5” and a smaller part in the CAS Mobile Application Development.

During the year I was giving quite a lot of inhouse courses for JavaScript development and AngularJS. These courses range from 1 day bootcamps to 4 day workshops. I held courses for UBS, BIT, Puzzle ITC, Glue, IMS AG, ESGroup and I could again give my JavaScript Bootcamp twice at the ch/open Workshoptage.

I enjoy working in the emerging space of “JavaScript as a serious application platform” so much, that I quit my job as a architect at my former employer. I am now working as a freelance developer and trainer with my own company.
The adoption of JavaScript in enterprise application development is the area I am currently focusing on.

In the typical educational institutions JavaScript is still pinned to the space of “Web-Design”. Apart from that there are almost no public courses to learn professional JavaScript development. Thats where I try to offer my inhouse courses: I specifically target typical enterprise environments and enterprise developers (Java or .NET) and I try to show the similarities between the modern JavaScript ecosystem and the traditional enterprise plaforms and also the pitfalls of JavaScript. I am offering courses for professional JavaScript development, for AngularJS, for React and for architecting modern html5 based frontends for enterprise systems. But I always tailor my courses to the specific needs of the individual team.

For the coming months I have already engagements for courses at Postfinance and at Mobiliar and I am looking forward to work with more teams. If you are interested in setting up a JavaScript/AngularJS/React course or coaching for a development team, please contact me.

There are also public courses scheduled, where I will be teaching:

Starting from April I will also be looking for opportunities to work hands-on in interesting projects. Of course my preference would be to work in projects where JavaScript and enterprise systems intersect.

Wednesday, December 31, 2014

Gulp is the Wild West

TL;DR This post described how I implemented asset processing with Gulp in a .NET project.

enter image description here

I am working on a .NET web application using Nancy in the backend and AngularJS in the frontend.
I decided to use a frontend-build based on Gulp. Frontend builds based on Grunt or Gulp have a lot of momentum right now, and this seems a better option for me than some .NET based tools like Cassette or SquishIt

By the way: if you have a node based frontend build you can run it on each Azure deployment like described here.

My requirements were the following:

  • For development the project should be runnable from VisualStudio without having to trigger a frontend build. That means that all the frontend assets have to be present at development time and referenced from my .cshtml files.
  • For release the frontend assets should be processed (concatenated, minified, revisioned …) by a frontend build. This build also needed to manipulate the .cshtml files, since they must reference the processed assets.

I started with gulp-usemin:

gulp.task("usemin", function() {
    return gulp.src("./Views/*.cshtml")
            js: [ngAnnotate(), uglify(), rev()]


This was nice and easy and worked well … until I had some more requirements …

The problem:
With gulp-usemin you have not access to the stream in a pipeline. So you are limited to list some tasks that should be performed. If you want to do something more fancy, you are out of luck. In my case I wanted to add the output of angular template cache to my main js file after it has been concatenated and minified…
In my case I wanted to append another JavaScript file that contains my angular templates (generated with gulp-angular-templatecache)

So I started looking for another solution… thats where I discovered that I am in the Wild Wild West: gulp-usemin2, gulp-spa, gulp-asset-transform, gulp-inject, gulp-rev-replace, gulp-useref, gulp-rev-all, gulp-rev-collector … all seem somehow to do something similar, documentation is minimalistic and you can waste a big amount of time to find the right plugin combination that works for you.

I ended up with the following combination of plugins:

var gulp = require("gulp");
var ngAnnotate = require("gulp-ng-annotate");
var templateCache = require("gulp-angular-templatecache");
var uglify = require("gulp-uglify");
var addsrc = require("gulp-add-src");
var concat = require("gulp-concat");
var rev = require("gulp-rev");
var minifyCSS = require("gulp-minify-css");
var useref = require("gulp-useref");
var filter = require("gulp-filter");
var revReplace = require("gulp-rev-replace");
var order = require("gulp-order");

gulp.task("angular-templates", function(){
    return gulp.src(TEMPLATES_SOURCES)
        .pipe(templateCache(TEMPLATES_JS, {module: "moonwalk", root: TEMPLATES_ROOT}))

gulp.task("release-assets", ["angular-templates"], function() {
    var assets = useref.assets();
    var jsFilter = filter("**/*.js");
    var moonwalkFilter = filter("**/" + MOONWALK_JS);
    var cssFilter = filter("**/*.css");

    return gulp.src("./Content/**/*.cshtml")
        .pipe(assets)               // Concatenate with gulp-useref
        .pipe(ngAnnotate())         // Process javascript sources to add dependency injection annotations
        .pipe(uglify())             // Minify javascript sources
        .pipe(minifyCSS())          // Minify CSS sources
        .pipe(moonwalkFilter)       // Filter the moonwalk.js source file, which is generated above by useref
        .pipe(addsrc("Temp/" + TEMPLATES_JS))// Add the templates.js to the stream, which is generated by a seperate task
        .pipe(order(["**/" + MOONWALK_JS, "*.js"]))// Order stream, so that templates.js is appended to moonwalk.js (needed, since templates depend on the angular module)
        .pipe(concat(MOONWALK_JS))// Concat the existing moonwalk.js and the templates.js into moonwalk.js
        .pipe(rev())                // Rename the concatenated files
        .pipe(useref())             // Replace the original references in the cshtml with the concatenated and processed resources by usemin
        .pipe(revReplace({replaceInExtensions:[".cshtml"]}))         // Replace the usemin generated resources with the reved resources

And by the way: This thread about running tasks synchronously is representative for Gulp (final verdict: “This will be fixed in gulp 4”) … welcome in the wild wild west!

Sunday, December 21, 2014

Weekend Reader, Week 51

IMG 0221

Rob Ashton speaks at the .NET user group

I never met Rob, but I think he is a very interesting character in the programming space.

His episode as a “journeyman programmer” is mind blowing and I suggest to every enterprise programmer to have a look at it: "The software journeyman's guide to being homeless and jobless.” (or if you have a plural sight subscription you can watch the production: Change it Up where Rob Conery does an extensive interview with Rob).

Rob will be speaking on January 7th in Bern and on January 8th in Luzern about "Frameworkless development with NPM and React” - a very interesting topic in my opinion. And of course not at all related to .NET programming :-). So I hope to see some non .NET programmers at the event...

While we are at it, here are some further interesting posts of Rob Ashton:


Software engineering in practice

Very nice presentation by Marc Hofer about Agile software development.


Which Silicon Valley company has the best intern perks?

So the myths are true, there are companies that do a lot for their employees ...


From Open (Unlimited) to Minimum Vacation Policy

… perks are not without problems:

Netflix has it, Virgin has it: Unlimited vacation policy … but not everything that shines is gold:

The cause was intended to be noble, as we didn't want to get into the way of people taking time off as much time as they need to recharge.[…] Two years later, this idea turned out to be a failure, and we're changing our vacation policy.


Letter To A Young Programmer Considering A Startup

Startups are not that sexy any more according to:

A startup job is the new office job. Startup culture is the new corporate culture.

Here is also a recent production of Swiss radio SRF about the “disillusion of startups” (in German): Start-up-Firmen: Der Traum vom nächsten Facebook


The State of JavaScript in 2015

The JavaScript world seems to be entering a crisis of churn rate. Frameworks and technologies are being pushed out and burned through at an unsustainable speed.


More developer tidbits:


Friday, December 19, 2014

Presentation: Java & JavaScript - Best Friends?


Last week I was invited again to give a talk at the annual developer day of Swiss Railways (SBB).

As every year the conference was a great event with many great sessions and interesting discussions during the breaks.

My talk was about how JavaScript can fit into a Java ecosystem.

Tuesday, December 2, 2014

There is something about JavaScript - My Slides from the Choose Forum 2014

I was very honored that I was invited to speak at the Choose Forum 2014 along with Michael FeathersErik Doernenburg and Adam Tornhill.
These were the slides for my talk “There is something about JavaScript”:

Wednesday, November 26, 2014

Speaking at the Choose Forum 2014


This Friday the annual Choose Forum will take place in Bern.

The Choose Forum is a small and lesser known conference that features highly interesting speakers each year.

I am very honored that I was invited to speak at the Forum this year along with Michael FeathersErik Doernenburg and Adam Tornhill.

My talk is titled “There is something about JavaScript”: 

This is the tale of an enterprise developer taking the adventurous journey into the realm of JavaScript. We will learn about all the dangerous pitfalls that lured on the way, but also about all the amazing encounters and beautiful discoveries that were waiting in on our protagonist.

I am looking forward to the event on Friday.

Monday, November 17, 2014

Weekend Reader, Week 46

.NET is Open Source

The big news of this week is of course Microsoft open-sourcing .NET:

Image 3379f52c 2764 4a61 8b29 7bff2dc68dde

Microsoft commits to making .NET cross-platform and to build a stronger ecosystem by adopting open source development. They will develop completely in the open and accept commits from the community.

The source for the next .NET is hosted on GitHub.
There will also a free full-featured edition of VisualStudio: Visual Studio Community 

What does change? Some predict the death of Java… but I don't think that much will change after a short hype: Enterprises that bet on the Microsoft Stack will still use Windows, I don’t think that .NET on Linux/Mac will be a relevant scenario in the enterprise any time soon. Since VisualStudio still only runs on Windows, mainstream .NET development will still happen on Windows.

.NET for Mac Desktop, iOS or Android development will remain a niche, as it its now with Xamarin.

I guess the one place where this move makes .NET a more attractive development platform are cloud scenarios: .NET becomes a more attractive platform, when there is no vendor lock-in to Azure.


LeSS: Scrum for the Enterprise


While there is a general disillusion about Scrum, the topic of scaling Scrum to the enterprise is still thriving… there must be money in that!

LeSS: Large Scale Scrum is the latest manifestation of "Enterprise Scrum” I have come across.

Welcome to the family of methodologies promising Agility to the enterprise:

Personally I still don’t believe in scaling Agile to the Enterprise.


Trust can scale

 if you replace trust with process, you’ll rip the heart right out of your company

Maybe instead of focusing on how to scale Agile to the Enterprise by introducing processes and ceremonies, we should remember what Agile is all about: Its about trust!

Hierarchical coordination fails when manager decisions depend on specialist knowledge:

21164 strip


Sacrifical Architecture

Often the best code you can write now is code you'll discard in a couple of years time.

Martin Fowler writes about the idea that maybe code is not meant to last. Throwing away code and rewrite applications might often be a good option. If we embrace this idea, then we should focus everything around the software delivery process to enable such rewrites efficiently. This is a radical change to the traditional approach of software creation.


How Google Works 

The only way for businesses to consistently succeed today is to attract smart creative employees. 


I see a lot of parallels with the book "The New Kingmakers"



Deliberate Advice from an Accidental Career

Screenshot 2014 11 17 01 44 34Great story telling by Dan North, definitely worth the time.

Related Posts Plugin for WordPress, Blogger...