Johannes Schickling

A blog about (web) technology

Livereload for Phonegap/Cordova/Ionic

I love the fast feedback loop of webdevelopment and wantend to have the same experience for developing mobile applications. I finally found a way, which is ultra fast and dead simple to use.

Override system time in javascript

I recently wrote a time-dependent part of a business logic, which I needed to unit test. (In javascript I run all my unit tests with Karma and Jasmine). The logic I had to test depends on the current system time. So it behaves (and should behave) differently if its 10pm or 8am. My first rough workaround was altering the system time of my operating system. Obviously this was a kinda bad solution so I needed to find another way.

Perlin texture generator

Over the last weekend I spent my time writing a procedural Javascript texture generator with @bwanner using the perlin noise method. It generates monochrome textures based on a lattice of random values. By defining lattice distances and interpolating (bilinear/bicubic) between the generated random values, one can produce effects like marble or cloudy structures.

Cache layer for Laravel

For one of my projects I've built a RESTful JSON API using the awesome laravel framework. This API is used by several single page applications. The most frequently used urls are GET routes, whose content almost doesn't change over time. So caching those responses would make sense. My first approach was to cache the responses "inside" laravel and return them later with a controller. This already led to a nice performance boost from around 160ms response time before to 60ms. The main advantage was that the database wasn't hit anymore but PHP still had to handle each request.