One autumn day I decided to I wanted to build something with my unutilized first-generation Pi. I landed on making a “smart” speaker that would greet people entering a room and play some elevator music until they left, bidding farewell at the end as well. I made a rule to not use the AUX jack to make it more interesting. The triggering of the device shall make use of an ultrasonic sensor because I already had one and my landlord would not be happy If I'd start attaching switches to the door frame. …


Photo by Marie P on Unsplash

Once I went to a lavatory that greeted me, played smooth jazz, and even said farewell upon exit. It was a mesmerizing experience that I wanted to recreate.

I had a first-generation Pi sitting in a drawer which should serve the purpose perfectly, only one decision remained — which language should be utilized?

Not being a fan of Python and not willing to use Javascript yet again Rust came into the picture. According to the StackOverflow survey, it is the most loved language 5 years running now. Using a low-level language should yield a performance benefit, keep in mind that…


Photo by Christopher Gower on Unsplash

Some background

All machines I’ve previously owned have run Windows, have tried dual-booting with Linux, but sooner or later always have gone back to just using Windows as my operating system. Have not even bothered trying since WSL became an option (it cannot do everything, but it can do most things).

For about 2 years my employer provided me with a late 2013 (I think) Macbook Pro, the whole company shifted to Mac’s at the time. It was a bit odd at the start, but when I got used to it I enjoyed working on it. A great screen, a good keyboard…


Photo by Diego PH on Unsplash

Perhaps I’ve been living under a rock, but for this task, I’ve used parseInt and parseFloat and never second-guessed my approach, what else could there be? Turns out there is a shorthand I could have used most of the time that is 10 times shorter!

I’m talking about parseFlaot that ends up being just a single character, that operator is called the Unary Operator or just a + symbol.

const s = "10";
const n = +s;
console.log(typeof n); // "number"

It can be used in expressions as well, though it does look a tad odd in that environment.

const…


Photo by an_vision on Unsplash

While our website was a simpleReact application there were no client-side logs, just API logs, and the trusty Network tab of the Chromes dev-tools. This was enough for debugging and fixing issues.

Then came a day when SEO became important, the simple React application had to implement SSR (Server Side Rendering), a NodeJS process became involved.

It turned out great — the website loads a lot faster and is crawlable, but it did complicate the debugging process. …


Photo by Alex Knight on Unsplash

On the 22nd November of 2020, LTT released a video about a Colorful RTX 3080, which they later were going to “give away”. It is in quotes because, in reality, they were going to sell it for one dollar in the next 24 hours. A nice and neat idea.

Linus did, however, say that bots won’t help because the page does not yet exist. This got me thinking — is that really true? If it were that simple then scalping would not be a problem.

The challenge

From the scarce information given it, all boils down to that their merch shop will…


Photo by Mohdammed Ali on Unsplash

If you do a google search for the term javascript operators and click on the first result— this mystical operator will be nowhere to be seen. At least in September of 2020, you have to click on the fourth result and then do a search on the page for it, otherwise, it is really easy to overlook it as it is not included in any of the pretty tables.

Enough secrets!

I’m talking about the Nullish Coalescing Operator?? , it is a binary logical operator, the same as || (logical OR)and && (logical AND) except that it does not do…


Photo by Andrew Ridley on Unsplash

Everyone has probably heard about them by now, though many have been probably been scared off by hearing the words “CSS in JS”. I wouldn’t blame them, I was very pessimistic when I first heard that word combination.

If placing css in the HTML is considered bad practice, why would putting it in js be any better, right? …


Photo by Markus Winkler on Unsplash

Introduction

Have you ever been exited and filled to the brim with motivation to do a certain task only to find your self slowly becoming less and less productive?


Why using just React’s state mechanism is a bad idea

Photo by Guillaume Bolduc on Unsplash

Introduction

Now that we have hooks and the Context API , it may seem appealing to forgo a state management library when starting a new project in React — should we give in to the temptation? Let’s find out by looking at a simple shopping cart example, starting at the bottom of the tree — item list view.

At the bottom

A context consumer component would look something like this, granted, this is quite a simple example, but it illustrates the main points of interest well. It simply renders a list of items, which can be added or removed from the cart.

const SimpleItemList…

MustSeeMelons

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store