My blog

Here are the latest blog posts I’ve written. My plan is to write entries more frequent in the future, but often actual hacking comes in the way.

Mojo::IOLoop likes running programs asynchronously

12th of June, 2022

Want to be able to run programs and arbitrary Perl code asynchronously, while being able to read from STDOUT and STDERR, and also write to STDIN? Try out Mojo::Run3! When working with Mojo::IOLoop, you might find yourself in a situation where you want to run another program, but you also don’t want to block the …

Read more

Write and test Perl command line tools with ease

30th of May, 2022

Writing command line tools often involves a lot of boilerplate and they can be hard to test. Getopt::App is a module that helps you structure your command line applications without getting in the way. I already have a competing module called Applify on CPAN. This module aims to solve the same problems as Getopt::App, but …

Read more

Browser testing is hard. Let’s go shopping

3rd of May, 2017

Tonight at the monthly Oslo.pm meetup, I gave a talk about how to test your web application in a real browser. This blog entry is a collection of the steps I went through while running live demos showcasing my module Test::Mojo::Role::Selenium. My module uses Selenium::Remote::Driver which is a library that communicates with desktop browsers, such …

Read more

Rewriting Mojolicious::Plugin::AssetPack

21th of February, 2016

Update: I suggest checking out Mojolicious::Plugin::Webpack instead. AssetPack is a Mojolicious plugin which helps you process CSS and JavaScript assets. It can convert other formats, such as SASS, Less, CoffeScript (and many more) into a format the browser understands. This makes the development process a lot smoother. AssetPack also makes sure the assets are minified …

Read more

How I write web applications

31th of October, 2015

This blog post is about the standard components I use when I develop and deploy my web applications. Server side components Mojolicious When I make a web page or web application I use Mojolicious. Mojolicious is this awesome realtime web framework, which makes web development a walk in the park. It has a lot of …

Read more

Testing with a real database

20th of September, 2015

Writing tests against a database is a struggle. Maybe the best way is to not test against a database at all, but providing a mocked interface instead. Even if this could be true in many cases, you still need to write integration tests for your models against a real database. This post digs into various …

Read more

Convos revamped!

31th of August, 2015

Convos is a chat application that runs in your browser. It allows you to be persistently connected to IRC servers, where you can leave the office and up the conversation on the bus without being disconnected. Convos was born in June 2012. It has been developed to scratch an itch that both myself and Marcus …

Read more

Reasons for choosing Mojolicious

10th of July, 2015

This blog post is a response to http://perlmonks.org/?node_id=1133505. I tried to reply directly, but I got “access denied” for some reason, so I decided to write a blog post about it instead. The post on perlmonks was: Good day fellow monks, I am starting a new project, with a clean slate, this is a wonderful …

Read more

@swaggerapi and #Mojolicious – How to validate your input/output with a schema

5th of July, 2015

OUTDATED This blog post is outdated. You might want to check out A RESTful API with OpenAPI instead. Mojolicious is an awesome web framework which allow you concentrate on the business logic, while the rest Just Works ™. Swagger is “The World’s Most Popular Framework for APIs”. Swagger is a language for specifying the input …

Read more

The Lenovo Thinkpad x240 is awful, but…

27th of September, 2014

Worst x-series laptop The thinkpad has an awful touchpad. Or even worse: it’s a clickpad! A clickpad is a touchpad without physical buttons. This means that it seems like you only have one big super-sensitive button in Linux. You do actually have two buttons, but they are at the bottom of the clickpad, and not …

Read more