
All posts by
Espen Hovlandsdal
Be environment aware!
Espen Hovlandsdal 2015-11-13Every 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
JavaScript Code Style
Espen Hovlandsdal 2015-02-03Code is read much more often than it is written. Having a consistent and defined coding style helps developers read the code, and it also helps to make a code base feel like one unit, instead of individual pieces written by different authors with their own way of doing things. Having
Writing, testing and publishing Javascript modules
Espen Hovlandsdal 2015-01-20So you want to write reusable, maintainable and modular Javascript, huh? Good. Here’s a rather extensive “getting started”-guide by yours truly – which means it’s my own preferred way of doing things. It’s written with open-source in mind, but most points can be applied to “private” modules as well.
The magic of createObjectURL()
Espen Hovlandsdal 2014-12-01The web platform is maturing faster and faster, and we’re seeing the work normally done by native desktop applications now often shifting towards web-based applications instead. Features that may appear to have little importance can be really powerful when combined together. A good example of this is URL.createObjectURL(). On it’s own,
NPM, Travis, Node 0.8 and the “Caret Operator”
Espen Hovlandsdal 2014-05-30If you have a node.js project that you want to have tested using Travis-CI, you may run in to a problem if you want to support node <= 0.8. The reason for this is the new caret operator, which was introduced in node-semver. This module is used by npm to
Visualizing the most read articles on VG
Espen Hovlandsdal 2014-03-07D3. 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
OpenVPN configuration files + Ubuntu’s network manager
Espen Hovlandsdal 2014-02-28OpenVPN has feature that exports client configuration files. While it is definitely possible to run OpenVPN from the command line, I prefer to have a GUI that allows me to easily connect/disconnect from VPN. Ubuntu’s network manager and the .ovpn configuration files exported from OpenVPN does not play well together,
Varnish + requests with no Content-Length header
Espen Hovlandsdal 2014-01-13HTTP 1.1 introduced the concept of chunked transfer encoding. This (among other things) enables us to send a request without knowing how large the content is going to be at the time we start the request. An example usage would be where you generate content on-the-fly. You could potentially send chunks
EditorConfig: Consistent coding style
Espen Hovlandsdal 2013-08-23If you’ve worked on more than one project in your coding career, you’ll probably have come across different coding styles. While some projects prefer an indentation of four spaces, others might prefer to only use two. Some may even use tabs. Then there’s line-endings, charsets and trailing whitespace. When you
PHP: Perform HTTP requests in parallel
Espen Hovlandsdal 2013-07-23Ever had to request multiple HTTP-resources in your web application? Often, you need data from one request to be able to request the second – in this case there is little you can do but wait for the first to return. However, if the requests are not dependent on each
WebGL DAE model viewer
Espen Hovlandsdal 2013-07-083D modeling is pretty fun. I’m nowhere near an expert – in fact, I’ve only really used Sketchup. There was a time when I was really into it, making 3D-models for all sorts of PC components. The other day, I was looking at a WebGL demo made in three.js, and
Server-side Highcharts rendering
Espen Hovlandsdal 2013-06-27Highcharts is a fantastic tool for generating javascript-based charts. It’s flexible, fast and can be extensively customized. Recently, I had to find a way to render Highcharts as static images on the server as we wanted to attach charts in emails. The reason why we wanted to stick with Highcharts