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

The pursuit of perfection

Many see the aspiration for perfection as an unrealistic endeavor and a recipe for unnecessary strain or disappointment. Most of us know from experience that virtually nothing in our world ever reaches a static state of perfection. Yet, there are ways to relate to the notion of perfection that is both practically useful and inspiring. Think of perfection as a journey – a direction, rather than a final destination. The pursuit of perfection is a consciously directed process of continuous improvement. It serves as a driving force, moving the present condition in the direction of perfection – the desired goal. (more…)


Less code, more beer

Misc

So, a couple of months ago I quit my job of almost 8 years as a developer here at VG to start a micro brewery in my hometown of Fredrikstad, Norway called Ego Brygghus. Because of this I won’t be writing any more posts on this blog (unless I can write some guest posts about brewing beer in the future that is).

I hope you have enjoyed at least some of the stuff I have been writing about since we started. I’ll leave you with a list of some of the (still relevant) posts I have written:

So, until next time, cheers!


Look, look – we built something!

Carpentry

As mentioned in one of the previous blog posts, two of the guys from development @ VG went to The Gathering last week. Together with Prisjakt and Level Up they had a booth there to get in touch with the young and bright geek minds.

With them to Vikingskipet they brought our new pride, and proof of the development departments handiness; a wooden, two by two meter Level Up logo with green cold cathodes. Handcrafted by Espen H, André and Kristoffer. Below I’ll share some pictures from the process. We had a really good time and I think all three of us would do this again any time!

Oh, did I forget? We don’t usually do stuff like this, so we’re very happy with ourselves :) (more…)


JavaScript: What the hell is this!?

JS

In this post we will cover some JavaScript basics with focus on areas experienced JavaScripters take for granted; but beginners sometimes struggle with.. If you fall somewhere in between then maybe this post will teach you something new!

(more…)


The Gathering Contest

The Gathering LogoLevel Up, VG and Prisjakt join forces and have a joint booth during annual easter LAN-party The Gathering, which is located in Hamar Olympic Hall. The booth will be open from 8:00 a.m to 10:00 p.m throughout the event. Here you can get some refreshments, play games or just chill out.

Not only will we have a amazing booth – you can also participate in our awesome competition with a first price of 30 000 NOK! (more…)


Comparing your privates in PHP

PHP

While working with some code that should compare two different instances of the same class I discovered a “hidden” feature in PHP.

I was going to compare several private properties between to objects and started making a piece of code to perform the actual comparison using getters for the properties. I felt the approach sucked, and started looking into alternatives way to do this. (more…)


Visualizing the most read articles on VG

JS

Article visualizationD3. Behind this name is a pretty neat concept, called Data-Driven Documents. I took a look at the framework last year after seeing a lot of cool demos using it. It’s really flexible, and is not tied to a specific form of presentation – you can use D3 to generate an HTML table from an array of numbers, or use the same data to create an interactive SVG bar chart with smooth transitions and interaction.

After looking through different layout algorithms available in D3, I found the treemap algorithm particularly interesting. I’ve seen it used before in both profiling tools and disk usage analyzers and found them to be very efficient for visualizing the difference between numbers. An idea popped into my head: “Maybe this can be used to visualize which articles are being read the most?”. I decided to give it a try. (more…)


Xcode Plugins

iOS

If you haven’t done so already it’s time to check out some Xcode plugins. How about managing cocoapods from inside Xcode or getting a Todo-list window generated from your code comments? Clang-formatting your code, install new colorthemes or getting a minimap-view like in Sublime text? (more…)


Deploying apps in openshift

DevOps

After you’ve set up openshift with a node or two, deploying an application is as easy as it gets.

You can do lots of stuff in the broker console, but rhc is the way to go:

rhc is a rubygem installed like all others:

Show code
~$ gem install rhc

To set it up:

Show code
~$ rhc setup --server your-broker-01.example.com

(more…)


Swagger docs in ZF2 with examples – Part 2: Swagger UI

PHP

This blog post on Swagger UI is a follow-up on my recent post on Swagger annotation parsing in ZF2. If you’re not already set up with Swagger annotation parsing in you ZF2 app I recommend that you read part 1 first.

In the last post we got ZF2 set up with annotation parsing and everything, and the only thing missing was Swagger UI for the neat presentation. I skipped that previosly but today we’ll add the last piece. (more…)