hello.js

var please = require('share');
console.log('thank you');

Tuesday, 24 July, 2018 UTC

How to use Let's Encrypt with Node.js and Express

How to use Let's Encrypt with Node.js and Express

Background Unlike Apache and Nginx, Let’s Encrypt has no way of autoconfiguring your Node.js app, as it can work in arbitrary ways, while the former two usually follow a predefined (and machine readable) configuration. How to configure a Node.js Express ... more


Tuesday, 10 July, 2018 UTC

Using Let's Encrypt with Supervisor

Using Let's Encrypt with Supervisor

Let’s Encrypt with Supervisor Let’s Encrypt works great with Supervisor, as it provides easy orchestration and some basic scheduling that the certificate management requires. Configuring it is also not rocket science; just identify the environment your ... more


Tuesday, 22 May, 2018 UTC

Getting started with Let's Encrypt

Getting started with Let's Encrypt

Let’s Encrypt provides an easy and automatable way to get valid and trusted SSL certificates for your webserver. Traditionally, getting a certificate consists of registering to a trusted provider, validating that you really own the domain, then installing ... more


Tuesday, 13 March, 2018 UTC

Best practices on how to work with collections in Javascript

Best practices on how to work with collections in Javascript

Motivation Why some projects are clean, easy-to-read, and performant, while others a convoluted mess? Why, when making a modification, in some codebases everything falls into place immediately, while in others it’s more like walking on a minefield? Writing ... more


Tuesday, 27 February, 2018 UTC

What to expect when you decide to migrate from Javascript to Typescript

What to expect when you decide to migrate from Javascript to Typescript

To a typed Javascript I finally made the leap. I always felt Javascript’s dynamic typing was a compromise in the wrong direction. Complex software need all the tools to prevent and detect errors, and a sound type system is a powerful one. Coming from ... more


Wednesday, 7 February, 2018 UTC

Effective debugging with breakpoints

Effective debugging with breakpoints

Previously in this tutorial series, we discussed manual verification and print debugging as possible approaches to problem-solving. Those techniques can provide the necessary insight in many cases, but they can also be very limiting when you have to ... more


Tuesday, 12 December, 2017 UTC

Demystifying chaining in Javascript

Demystifying chaining in Javascript

Chaining Chaining is when you wrap a collection, define the pipeline, then extract the result in the end. If you know Lodash’s or Underscore.js’s chain method, then you already know how to use it. In this post, we’ll look into how it works, and implement ... more


Tuesday, 26 September, 2017 UTC

Generators in Javascript

Generators in Javascript

Generators In the previous post, we’ve covered iterables. We’ve seen that they have a function that returns iterators, which are then used to access the elements of a collection. But they require a lot of boilerplate code to make them work. This post ... more


Tuesday, 5 September, 2017 UTC

Iterables in Javascript

Iterables in Javascript

Iterables In the previous post, we’ve covered what iterators are, and how JS defines a protocol for them. We’ve seen that they provide a one-shot traversal over a collection. But they require a lot of boilerplate to make them work. This post introduces ... more


Tuesday, 29 August, 2017 UTC

Iterators in Javascript

Iterators in Javascript

Iterators Iterators are a language-independent protocol to traverse a collection of elements. It abstracts away the intricacies of the underlying collection. Despite Arrays being the primary way to store a collection of data in JS, there are many other ... more


Tuesday, 15 August, 2017 UTC

Introducing: Weekly JS Tips & Tricks

Introducing: Weekly JS Tips & Tricks

Weekly JS Tips & Tricks If you like the articles on this blog, I’m sure you’ll love my new weekly newsletter of short tips on Javascript and WebDev in general. They are based on the experiences I’m gaining while working with SPAs and backend technologies, ... more


Tuesday, 13 June, 2017 UTC

How to create a Theme Plugin for Magento

How to create a Theme Plugin for Magento

Magento is one of the most powerful, actively developed open source webshop engines around. It has rich built-in functionality and a wide variety of plugins and themes available online. Because it’s based on PHP, it can even be deployed to cheap hosting ... more


Tuesday, 7 February, 2017 UTC

Why Webpack 2's Tree Shaking is not as effective as you think

Why Webpack 2's Tree Shaking is not as effective as you think

As WebPack 2 barrels forward, Tree Shaking — or more technically, the removal of unused exports using static analysis — is finding its way to the mainstream. Developers are putting their hopes high, as it promises to solve the pressing problem of bloated ... more


Tuesday, 31 January, 2017 UTC

Getting started with Browserify

Getting started with Browserify

Browserify bundles your code and brings all the power of Node to the browser. It not only lets you require files, but also provides a range of Node libraries for a seamless front-end dev experience. If you’ve used to write code for the server-side, you’ll ... more


Tuesday, 17 January, 2017 UTC

JSPM basics and review

JSPM basics and review

JSPM is a package manager on top of the SystemJS loader. Advertised as frictionless , it gives you all the comfort of modern JS development with ES6 modules, Babel transpilation, packaging, and proper dependency management. Install & init To get ... more


Tuesday, 10 January, 2017 UTC

Managing Scala projects in Vim with Ag and Ctags

Managing Scala projects in Vim with Ag and Ctags

Last year I wrote a short summary about the Vim plugins I was using at that time for Scala development. Those were the low-hanging fruits I could easily configure to solve my initial comfort problems with Vim. Since then I’ve attempted to tackle larger ... more


Thursday, 22 December, 2016 UTC

Why Bower is still relevant

Why Bower is still relevant

Background Many developers consider Bower to be a thing of the past that is superseded by npm. If you are using a bundler, like Webpack or Rollup, it’s certainly true. But if your webapp is missing this compilation step, using Bower is a big improvement ... more


Tuesday, 22 November, 2016 UTC

Frontend dependencies without tools

Frontend dependencies without tools

Motivation Introducing a library to a front-end project is a common task, and nearly every project depend on others. There are several ways you can do it, and while it seems like an easy task, it can easily end up in a mess if not done with caution. In ... more


Wednesday, 14 September, 2016 UTC

One year with Vim

One year with Vim

Background I’m using Vim for a little more than one year. I switched in last August, and it’s my main editor since then; I’m writing these lines in it. To celebrate this anniversary, I’m writing a summary of my motivations, experiences, and the learning ... more


Tuesday, 9 August, 2016 UTC

Parallel Processing in JS

Parallel Processing in JS

Motivation For a long time, Javascript was missing any kind of processing threads. While the single-threaded model added to developer comfort, it also made the platform unable to do serious and time consuming calculations, and the only way to circumvent ... more


Tuesday, 14 June, 2016 UTC

Simulating movement with ES6 generators

Simulating movement with ES6 generators

Motivation One particularly good example to infinite collections and ES6 generators is movement simulation. This requires a possibly complex calculation of the points along the path, and you need to take care of a few additional cases like collision detection ... more


Tuesday, 31 May, 2016 UTC

Infinite collections with ES6 generators

Infinite collections with ES6 generators

Motivation Infinite and lazy collections are commonplace in many languages, and they are beginning to find their ways to mainstream Javascript too. With the new iterators and generators spec getting widespread adoption, you can now use them in your projects. ... more


Wednesday, 18 May, 2016 UTC

More readable Javascript without variables

More readable Javascript without variables

Motivation The single biggest obstacle of understanding a piece of code is a lot of variables. Variables introduce state, which in turn increase complexity exponentially. Every single bit of variable information makes reasoning and understanding the code ... more


Tuesday, 10 May, 2016 UTC

Fully automated dockerized Let's Encrypt reverse proxy

Fully automated dockerized Let's Encrypt reverse proxy

Motivation While most people agree that securing web sites with SSL is a good thing, many sites still lack the necessary certificates. There are free options available when it comes to trusted certificates, but setting them up is a tedious process. The ... more


Tuesday, 19 April, 2016 UTC

Proper random numbers in Javascript

Proper random numbers in Javascript

Motivation Math.random() is thought to be “the way” for generating random numbers on the client. It should be sufficient for the common use cases, except for cryptography. The specification leaves a lot of room to browsers on how to implement it, and ... more


Wednesday, 13 April, 2016 UTC

A brief overview of hack.summit() 2016 (part 3)

A brief overview of hack.summit() 2016 (part 3)

hack.summit() This is the last post about the 2016 hack.summit() conference. As with the previous two, you can read short excerpts from three of the talks. Managing quality in large communities, an introduction to React Native, and some life advices are ... more


Tuesday, 5 April, 2016 UTC

Dealing with async in React

Dealing with async in React

The problem Handling asynchronous operations in React is tricky sometimes. The framework handles synchronous operations quite well, but, unlike in AngularJs, there is no support for promises and other deferred executions. If you do not test and handle ... more


Tuesday, 29 March, 2016 UTC

Detecting errors in the browser with Selenium

Detecting errors in the browser with Selenium

Recently I’ve been writing Selenium tests for a large web application. The tests cover the most important features, and the suite grows nicely, but some flaky tests causing much pain and making the progress slower. While investigating the problematic ... more


Tuesday, 8 March, 2016 UTC

A brief overview of hack.summit() 2016 (part 1)

A brief overview of hack.summit() 2016 (part 1)

hack.summit() Hack.summit() is now over, and many interesting talks were presented. It’s a virtual conference with many prominent people speaking. You can hear from CEOs, founders, and lead developers their best practices on how they run their companies. ... more


Tuesday, 2 February, 2016 UTC

The first steps from Grunt to Webpack

The first steps from Grunt to Webpack

Motivation After Grunt, Gulp, then Browserify, Webpack is the new leading build technology for the frontend. Just as Grunt, it helps you build your codebase, and just as Browserify, it brings support to modularization; but it has more impetus than the ... more