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?
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…
Perhaps I’ve been living under a rock, but for this task, I’ve used
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
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.
While our website was a simple
React 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. …
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.
From the scarce information given it, all boils down to that their merch shop will…
If you do a google search for the term
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…
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.
css in the
HTML is considered bad practice, why would putting it in
js be any better, right? …
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?
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.
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.
This is the sub-title from the React landing page, which subtly expresses its main concern — rendering components in an efficient manner, this is also emphasized if you do a bit more reading on their main page.
Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes.
For the developer, it means that the framework does not provide a de facto way of managing an application state, only a local component state. This can be a blessing or a…