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

Be environment aware!


Every once in a while, I see or hear someone complaining that a basic React application ran through Webpack ends up being 700 kB or more. I think it’s important to take a look at why this is happening – cause it’s usually all about the environment.

When you’re in development, what you want is:

  • Quick builds
  • Being able to trace an error back to the correct line number
  • Warnings if you’re doing something wrong

When you’re in production, what you want is:

  • Smallest bundle size
  • Fastest execution


Content in the right context is king

In the media industry content is no longer king, content delivered in the right context is now king. We need to deliver the right content at the right time to the right person. The dialog between a newspaper and their readers has to change from a blanket broadcast to the masses to a tailored conversation with the individual.

How can we create content and products that replicate natural conversation, if journalists had the ability to sit down and have a conversation with each of their readers, how would they adapt the conversation so as to best challenge, entertain and enlighten each reader based on their level of knowledge on different subjects.

Personalisation is all about improving the users experience of the product by adapting the product based on what we know about the user.


How App linking in Android M and iOS9 will help to increase app engagement


New functionality available in the next version of both Apple and Googles mobile operating systems (iOS9 and Android M) will have dramatic consequences for publishers trying to get users to use their apps instead of the mobile web browser. The next version of the iOS and Android operating systems will take deep linking to a new level.

Both Apple and Google have worked simultaneously on improving app linking, and essentially blurring the lines between content displayed in an app and content in a mobile website.

Android Databinding: Goodbye Presenter, hello ViewModel!


The Model-View-Presenter-pattern (MVP) has been the dominating trend lately when it comes the UI-layer architecture of Android applications. Frameworks like Ted Mosby, Nucleus and Mortar have all talked about Presenters to help you achieving a clean architecture of your app. They also (to a varying degree) help you with the infamous issues of device rotation and state persistence on the Android platform. This isn’t directly related to the concept of MVP, but the pattern helps you isolate the boiler plate code.

Logo redesign and the thoughts behind


Vektklubb is the largest weight loss service in Norway, owned by VG. The goal is to help people loose weight by eating healthy food and exercise. No diets, no starving. We believe that changing habits over time is key to achieve a better and healthier lifestyle. The service has been around for ten years, and is still going strong! However, last year it was time for a makeover.




Location based Ads at VG

At VG we have been experimenting with offering location based advertisements in our VG app.

The goal is to deliver relevant advertisements to the the users at the right time and in the right place. Smartphones have provided the opportunity to serve more relevant information based on a users current physical location or locations they have previously visited.


Don’t forget the View Model!



I’ve observed an increase in architecture-focused Android posts lately in channels such as /r/androiddev and Android Weekly. That’s great, but frankly it’s about time. When I transitioned from Windows Phone development to Android a couple of years ago I felt it was difficult to find good examples on how to architect a solid app. It didn’t help that Google’s examples violated most best practices[1] either. I kind of went with my own version of MVVM (or MVPVM) which I had with me from the .NET platform and it sort of worked. Reading
Hannes Dorfmann’s post on MVP and his Mosby framework, I realize I’m not the only one who’ve been struggling with getting the established patterns working with Android (he spent 3 years). The Android SDK is not exactly leading you into a good architecture out of the box. Maybe Fragments is partly to blame, and why Square Inc is advocating against it. (more…)

Product Management In Media

Media companies where journalists and technologists don’t get on the same page regarding product and product management will die.

Tl;dr — Unless media companies step it up and totally change their view and abilities on product management, they will be eaten by tech and new players. Only those that fully embrace that product management in media is the intersection between journalism, user experience, software, data and analytics will thrive.

The ability media companies have to innovate and compete in this tech-eats-everything-world is fully dependent on how they view product and product management. As of now, it seems very few (traditional) media companies are able to agree on these terms internally.


The current state of the Wearable industry


The wearables space is quite broad and includes everything from fitness trackers, smartwatches, augmented reality glasses, smart jewellery, smart clothes and even implants. Its all about the connected self and the use of this new technology to do things like monitor your health, to play games, to make you fitter, to save you time or to make you more organised.

The industry is still lacking a killer feature, platform or device that can rejuvenate this market. Everyone is looking to the soon to be released Apple watch to do to wearables what it did for the mobile industry.

Below are some examples of how wearables are being used today.


Clean and simple Z-index with SASS lists


So.. Z-index. Ever used it on a rather large scale site before? Or in a CSS environment that you don’t really know inside out? What number did you set? Did you make it really, really high just to be sure? Ever used z-index: 100003? Or 99999999?

Highest z-index was an astonishing 999999999999999999999999999 or 9.99e26. With a default key repeat on OS X, this would take 3 seconds of holding down 9 to type.

QuickLefts 2014 CSS report

You don’t do that, right? Perhaps you rather build systems with levels set in hundreds or thousands, to be able to sneak in future elements? The oddball z-index: 1005; here and there?

For my latest project I used a rather simple trick in SASS that got me out of this potential mess, and I didn’t even set a single number. SASS took care of that for me! (more…)