Ideas · Knowledge · Technology

Web 3.0?

I recently did some research on blockchain, crypto, and Web 3.0 finally, trying to understand the buzz, and I must say it’s quite interesting, but not necessarily in a good way 😅 I’ve been wanting to share my take, so here it is: Blockchain, as I understand, is another software application backend, like a SQL… Continue reading Web 3.0?

Professional Development · Technology

Running A Web Dev Project Built for Mac on Windows

This post covers how to run a web development project (application) that was build for Mac OS on Windows. I will be using Windows Subsystem for Linux (WSL), which is a new feature added in Windows 10 that allows you to run Linux operating systems in a terminal from your Windows desktop. Step 1: Install… Continue reading Running A Web Dev Project Built for Mac on Windows

Professional Development · Technology

Getting Your Head Around JavaScript Closures

One concept that is considered “advanced” in JavaScript is closures. MDN defines closures as: A closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment). In other words, a closure gives you access to an outer function’s scope from an inner function. In JavaScript, closures are created every time… Continue reading Getting Your Head Around JavaScript Closures

Professional Development · Technology

MERN Authorization with Passport.js

Any web application of significant complexity is going to require user-level security. In this post, I walk through how to create authorization for users in a MERN (MongoDB, Express, React, and Node) stack web application. Full code is available here: This post assumes knowledge of React and node.js and just shows how to incorporate… Continue reading MERN Authorization with Passport.js

Professional Development

Refactoring a While Loop with Recursion in JavaScript

A quick example of how to refactor out a While loop in JavaScript by using recursion instead. The problem is as follows (from TestDome): Your company assigns each customer a membership ID, and you are implementing a check digit for those IDs. The check digit should be calculated by adding up all digits in each… Continue reading Refactoring a While Loop with Recursion in JavaScript

Professional Development

Class properties versus Constructor in React

A simple counter component in React can look like this: The component initializes the state variable “counter” with the value zero and then updates it by one every time the button is clicked. See it working here. This same code can be written much more cleanly using class properties instead of constructor properties, like so:… Continue reading Class properties versus Constructor in React

Knowledge · Professional Development

Clean Aggregation with JavaScript ‘Reduce’

A common beginner (?) programming question is as follows: Given an array of items, find how many instances of each item occurs in the array. For example, given the below array of US states, return an object with the count of number of instances of each state: The interesting thing about this problem is it… Continue reading Clean Aggregation with JavaScript ‘Reduce’