VGTech is a blog where the developers and devops of Norways most visited website share code and tricks of the trade… Read more

Are you brilliant? We're hiring. Read more

Async patterns on Android: Kotlin with coroutines


9 months ago I wrote about asynchronous programming patters in different languages covering C#, Javascript and Java. Lately I’ve been digging into Kotlin and specifically the Coroutines implementation in their 1.1 beta. This finally brings the async/await-pattern to Android – a pattern I grew learned to love when it was introduced to C# some years ago. The main benefit from my point of view is how it integrates asynchronous programming into the language syntax, making writing, and even more important: reading asynchronous code simple.


VR and 360 video in the media industry

360 video

My first VR experience was using an early developer edition of Oculus Rift. It was easy to see the potential in the technology but it was somewhat overshadowed by the overwhelming feeling of motion sickness and the desire to throw up. My second experience was at Websummit in Dublin where I got to try the production ready version of Oculus Rift together with the hand controls. I was blown away by the experience. The problems with motion sickness had all but disappeared and the immersive experience and quality of content had improved immensely. Hand controls and spatial awareness sensors has helped to improve the perception of reality.

Since then we have acquired our own VR headsets and are like many media companies trying to figure out how to storytell through this new medium. The reality is that the technology is very much in the ‘early adopters’ phase of its lifecycle. Truly immersive VR headsets and the computers needed to power them are currently too expensive for the majority of people, the hardware and software needed to create quality content for these devices is also lacking or too expensive. Since these devices are largely stationary and located in your house the barrier for consumption is substantial, you have to be at home and it takes effort to put them on and find the content you want to consume. For a pretty comprehensive guide to the hardware and software currently available check out the guardians article, The complete guide to virtual reality – everything you need to get started


Simplifying login with Googles smart lock for passwords and Apples shared web credentials


To deliver a truly personalised experience across multiple devices we require our users to login. To get our users to login we need to create a seamless login experience. Users often forget their username or password or do not understand that they can use the same login credentials between the different products or services we offer.

Password management services make it easy for users to keep track of their login credentials and use them across multiple platforms.
Apple and Google have created services to manage user credentials. Apples initiative is called “shared web credentials” and Googles “Google smart lock for passwords”.
If you update your apps and website to support both ‘shared web credentials’ and ‘Google Smart lock for passwords’ you can simplify the login experience for those users who have chosen to save their credentials with Apple and Google. The biggest benefit is in sharing login credentials between your website and your apps.

Javazone 2016 – more than just Java


This is the second year I’m attending Javazone in Oslo – a large IT-conference of the highest international standard, by and for the Java community. Although the Java technology is at the core, the topics range from front-end to back-end and infrastructure, security, architecture, patterns and processes. In short, you don’t need to be a Java developer to get something out of this conference, which now has its 15th year anniversary.


Using OKRs in the Media Industry

The media industry has and is still going through tremendous and rapid change. The transition from print to digital, from desktop to mobile, from traditional display advertising to programmatic, from primary news distributor to content provider for new social distribution platforms, from broadcast journalism to personalised experiences, from local competition to competition from global tech giants. Add to this personnel cutbacks and the challenges appear overwhelming. The only thing that is consistent is change.

Managing this ever changing media landscape is challenging. Systematic, coherent and well coordinated focus from all departments is required to tackle these challenges.
Objectives and Key Results, or OKRs, is an organisational planning methodology VG and Schibsted have begun using. Its main goal is to connect company, team and personal objectives to measurable results, making people move together in the right direction. Creating a clarity of purpose among all departments, teams and individuals in an organisation.


Engaging audiences through emojis


Apps are evolving to be more than just functionality available behind an app icon on a users home screen. Custom keyboards, widgets, notifications, 3D touch, extensions and siri integration are among the many ways developers can now engage with users outside the confines of the traditional smartphone app on the homescreen.

Async programming patterns in different languages


During the 10 years I’ve been into professional programming, the largest paradigm shift I’ve witnessed is the one from sequential to asynchronous programming. Not that it is a new concept – asynchronousity has been has been present in programming since the dawn of time, but what’s new is the tight integration in programming languages and the prevalence of it. From events and callbacks in C# to async-await. From callbacks in Javascript to Promises. In Java we got Futures in Java 7, CompletableFuture, lambdas and streams in Java 8. On top of all these language features you have a vast array of libraries that help you implement common async patterns – ReactiveX for instance exists for all the three languages mentioned, and a lot more.


VG increases advertisement viewability to 74%

Advertisers don’t want to pay for advertisement placements that people don’t see. An ad loaded doesn’t necessarily equal an ad viewed, the publishers and advertisers have caught on to this and are naturally shifting towards valuing ‘viewable’ ads rather than served impressions. VG has been working on improving the percentage of ads viewable on our website, we are now guaranteeing a minimum of 70% viewability of ads on


Roc  —  One solution to JavaScript Fatigue



An open source toolkit for JavaScript development

There has been a lot of talk recently about how hard it is to do web development in this day and age. People are describing the current state of web development as depressing and frustrating, referring to it as JavaScript Fatigue. If you haven’t I would recommend you to go and read this excellent article by Eric Clemmons on the topic: Javascript Fatigue.

We need to do something about this and we need to do it now. Web development should not be frustrating. In fact I believe that it has never been as exciting and fun as it is now.

As mentioned in the article above several people are trying to find a solution to this symptom, all with different goals and ambitions. I would like to go ahead and present one such solution, one that I have personally been involved with, Roc.