How to load environment variables in Svelte

applications. In contrast to React, it does a lot of the heavy lifting in a compile step instead of in the browser. It’s very clever and comes with enormous advantages but can also have its pitfalls for developers used to the more popular frameworks. In case of the environment variables, one can’t just import dotenv wherever and assume it will work – a replace plugin of rollup (the bundler) has to be used instead. This tutorial uses yarn for a package manager and would work the same with npm.

You need a manager, not a boss

In a conversation about how a lot of part-time workers vs a few full-time workers can affect a team, my tech friend recently asked me: “Are managers a relic of the past or are they absolutely essential?” Both, I answered.

Always write at least 1 end-to-end test. You’ll love it, I promise.

The first time I ran an end-to-end test of a web service I was developing I had tears come up to my eyes from joy and relief. You can feel like that too. If you always write at least one end-to-end test as soon as you start developing a new project or a module in your project. Why?

How to get an accurate position estimate from the Geolocation API in JavaScript

The Geolocation API has been introduced into modern browsers many years ago and hasn’t changed much since yet it still can waste many hours of your time if you don’t know how to work with it. There’s a lot of magic happening behind the scenes that isn’t properly explained in the documentation. Here’s a straightforward way to get an accurate estimate without you having to spend the 2 days I’ve spent figuring out why my location estimates look like out of a random number generator.

5 unexpected advantages of working with more experienced developers

I’ve spent the last year and a half developing the software part of a bigger product as the only software engineer in a startup that I cofounded. It had many benefits but also made me realize these surprising benefits of having more experienced colleagues around.

Coder’s biggest and most hidden enemy. Creeping up on you right now

It’s to a programmer like a pandemic to a society. It creeps up on you. Slowly. There are some tiny signs of it at first but… who would bother? Then it becomes more and more obvious but to an untrained eye, it still seems ignorable. I mean, it’s not like it’s that bad, right? Life’s a bit harder: it gets harder to focus, things are getting a little bit out of control, few bugs here and there creep into the application. But for sure, that can’t yet justify the effort that would have to be applied to resolving it, can it?

Don’t struggle with extending the service worker in Create React App anymore. Upgrade to version 4!

No need to struggle with how to customize and extend the service worker without ejecting Create React App anymore. Version 4, released in October 2020, comes with a service worker file available for extension in the src folder.

The easiest way to extend or customize Create React App (v.3) service worker without ejecting

Create React App (version before 4.0.0) by default includes a hidden Service Worker that will do some background magic for you in order for your app to be recognized as a Progressive Web Application. But if there’s one pitfall of CRA, it’s definitely how closed the configuration is and how difficult it is to modify, extend, or customize it without ejecting (taking full control of the configuration) the application. Here, I discuss and present what I found to be the simplest way to extend the out-of-the-box service worker functionality.