What is Docker?

When you start getting into deploying your application, chances are you ran into a thing called: Docker. You then ask yourself: “What is Docker?”, and we begin to investigate the question. In this post, I will outline simply put: “What is Docker?” and where to look to get started on your project. What is it? Why should I care about it? Let’s have a scenario, you have built your new MERN application, and now you are looking to deploy it. Docker is a software platform that simplifies the process of building, running, maintaining, and distributing your software. It does this...

Continue reading...

OOP VS FP Styles of Programming

OOP VS FP is a topic that has been going around for a while, in this blog post I hope to clear up what OOP is (object oriented programming) and what FP is (functional programming). There is a debate on which is better, OOP VS FP. This post hopes to clear up misunderstandings of either and educate a little bit more about the two. OOP – Object Oriented Programming What is it? Object Oriented Programming (OOP) is a style of programming in which uses classes, inheritance, etc. to keep it’s methods tied to an object. This style of programming makes...

Continue reading...

What are Closures in JavaScript?

Closures in JavaScript is where your function can “remember” the lexical scope — even when the function is ran outside of the scope. Instances of similar occurrences like this can be seen in Object Oriented Programming (OOP). In OOP, you can create an instance of the class object and access it. This functions in a similar way. This is called: Closures in JavaScript. First, let’s dive into what “lexical scope” is and the significance of its role in closures. Lexical Scope Scope is lexical, meaning it can be accessed only on the block of code in which it is defined....

Continue reading...

How To Track Your Website Visitors

Website visitor tracking is a lot easier than what it sounds. And no, I’m not talking about the type of tracking that social media does on you, but instead: analytics! A good engineer keeps good track of his analytics to make sure that he is on track to obtaining the ultimate goal he is after (or might be after): visitor traffic. Not all visitors are good visitors. Some visitors are bad-actors that wish to slow down your website with distributed denial of service attacks (DDOS) or even spam your submission forms (in the form of bot messages that attempt to...

Continue reading...

Callback Hell – What is it?

JavaScript Callback Hell is way too real. Your first question should be: “What is a callback?” as well as “What is Callback Hell?” — Both which are essential to understanding the problem that we encounter. What is a Callback? A callback is a function passed as a parameter to another function. Usually, there is not much problem with doing this a time (or two..). However, When we start nesting callbacks within callbacks, we get a boomerang of callbacks. Then we have: Callback Hell By nesting functions as parameters to other functions, you get something similar to this (shoutout to freecodecamp...

Continue reading...

What are Code Design Patterns?

A “Code Design Pattern” is a re-usable pattern that is used to solve problems with code. This happens on a design level in software, and ultimately makes code easier to manage, and more efficient in some cases. From algorithms to LeetCode patterns, Code Design patterns even go as broad as entire ways to design an entire system and how it relates to other internal systems. Why should I care about Code Design Pattern? Design patterns can accelerate the development process. When you try to solve something without a pattern, you are actively trying to reinvent another pattern that someone else...

Continue reading...

for(;i–;) (JavaScript for loop explained)

This JavaScript for loop is something I came across the other day solving problems in LeetCode. What seemed like an easy problem was difficult as to understanding different ways to combine a set of stairs. Here’s a picture of the problem on LeetCode (the algorithm problem): Solving the for loop So, to solve something like this, there needed to be a form of loop as to the number of times, and then adding exponentially a number that counts the amount of times. So without going much further, here is a solution to this problem: Understanding the JavaScript loop versions So,...

Continue reading...

Space Complexity & How to work on it

Introduction to space complexity Space complexity is how much memory an algorithm takes when executing it’s set of instructions. Usually, time complexity is much more important in a business perspective (quicker results to the client, and we can just buy more hard drive room). However, making sure that you are not taking up too much space is also just as important. Why should I care? When computers evolve, so do the problems we need to solve using the algorithms. The data continuously grows over time, and so does the demand. We also do not want to overload or run out...

Continue reading...

Algorithm Efficiency & Time Complexity.

As you keep hacking away, you will sooner or later hit a brick wall because your algorithm efficiency takes a century to run. You can solve this by creating an efficient algorithm, and measure the algorithm efficiency. Big O notation “Oh no it’s Big O!”…. Oh, yes! The big O notation allows us to measure space and time complexity as to measure the efficiency of our algorithms in two dimensions. By using this, we can work on more efficient algorithms and compare solutions to one another. O(1) Time Complexity The ideal/perfect algorithm efficiency is shown in green. O(1) would be...

Continue reading...

How to Do Recursion in JavaScript (The Basics)

Recursion in JavaScript (and any other language as well) is where you create a function, and then have that function call itself recursively to solve a problem. Think of it as an alternate method of looping through some data or related. It’s common in the algorithm area for you to use recursion to solve some types of problems. In this post, I will outline the basics of solving some simple recursion problems as an introduction to those unfamiliar. The Recursion Problem Okay, so an example of a problem you could solve in recursion with JavaScript is getting the length of...

Continue reading...