Posts with tag software development

How to solve canvas crash in Vitest with threads and jsdom

2022-08-27

Read More...

Themed websites with multiple color schemes the easy way

2022-08-19

Nowadays a lot of Operating Systems support Light and Dark themes and even Web browsers started supporting it thanks to the prefers-color-scheme media query.

In this blog post I'm going to explain you how to apply and switch color schemes (themes) in a web application. I find it important that the mechanism is simple and the codebase stays maintainable (DRY).

Read More...

I want a mock API and change responses on runtime

2021-11-17

Nowadays many web applications are Single Page Apps that connect to an API via HTTP (for example REST or GraphQL). When you develop such an application, you do not only have to run a local development server, but also an API where it connects to. The API could be running on a dev cluster, but you can also run it locally on a different port for example.

A big advantage of connecting to a real API, is that you probably create less bugs. On the other hand, it is sometimes hard to test or setup up all possible scenarios. How do you for example test, in a controlled way, that your API responds with an internal server error and how the client handles this? In this blog I explain how to do this.

Read More...

Mocking Vuex in Storybook and Vue Test Utils

2020-01-06

This blog post demonstrates how to set up a simple unit test and story for a component that is connected to a Vuex store. These components usually are smart/container components.

Read More...

5 Reasons why you should test your code

2015-07-27T00:00:00.000Z

It is just like in mathematics class when I had to make a proof for Thales’ theorem I wrote “Can’t you see that B has a right angle?! Q.E.D.”, but he still gave me an F grade.

Read More...

L-system Tree

For my 3D Computer Graphics course in 2010, I had to create a procedural model as an assignment. We decided to make a tree using L-systems. After a few daws of coding, the result of this assignment is a program which can draw procedural trees using OpenGL. Although OpenGL is nowadays an oldfashioned 3D drawing technique, the result looks quite pretty.

Read More...

ColorBrewer interpolation comparison

The ColorBrewer color scheme picking tool is a wizard in the data visualisation world, especially for maps. What makes these color schemes so powerful?

Read More...