Brief Overview

What is object-oriented programming?

Another trick in software is to avoid rewriting the software by using a piece that’s already been written, so called component approach which the latest term for this in the most advanced form is what’s called Object-Oriented Programming.
-Bill Gates

Object-oriented programming has been around since at least the 1960s. The first generally accepted object-oriented programming language was Simula, developed in 1967. Since then, the “object-oriented paradigm” has taken over computer science. Nearly every modern programming language is considered object-oriented or heavily influenced by object-oriented principles. …

cryptocurrencies and how they work

Image for post
Image for post
Wikipedia Commons

I have been fascinated by cryptocurrencies for a while now. It is an understatement to say they have a mixed reputation. Opinions about them range from unending praise to scorn. Some say they will usher in a new age overturning old economics. Others believe they are a Ponzi scheme only used by drug dealers that will destabilize national economies. I look at them as a fascinating space that could potentially change how people interact and relate with each other in the marketplace.

Whatever you think about them, I’d like to give you a brief introduction to this new trend and the technology that underlies it the blockchain. The mathematics that fuels blockchain technologies and, therefore, cryptocurrencies are exceptionally complex. However, the basic idea and mechanisms behind cryptocurrencies are simpler to explain. …

Two underrated data types

Maps and sets are two underrated javascript data types. Many javascript developers rely on arrays and traditional objects when solving problems. However, they often overlook these two gems which I have learned can be incredibly powerful. I’ll briefly explain maps and sets and give simple examples to give you an introduction.


Image for post
Image for post
source: Wikipedia

A set is a collection of values of any data type. Unlike arrays and objects, each of the values in a set must be unique. Also, unlike arrays and objects, the values of a set are not accessible directly by key. The set’s values are, however, available by using the keys and values method. …

searching from root to leaves

The depth-first search algorithm is a handy algorithm highly applicable to a wide variety of computer science problems. This algorithm involves searching through a sequence of nodes in a tree or data structure. However, unlike a breadth-first search, a depth-first search follows a different pattern. In the depth-first search pattern, the algorithm goes ‘deep’ instead of ‘wide.’ In other words, it searches for a path from the root node to the lowest leaf before moving onto the next possible path.

Image for post
Image for post
Depth-First Search Graphic

The animation above shows the flow of depth-first search. The algorithm finds all paths from the root node to the lowest leaves by going as deep as possible and then backtracking to find the next lowest leaf. If not exited, both depth-first search and breadth-first search algorithms visit every node, just in a different order. Depth-first search algorithms can solve many of the same problems as breadth-first search, although depth-first is well suited to find paths in a graph or maze, scheduling optimization, and topological sorting. …

Transversing the tree of nodes

Amongst the most common and useful algorithms is the breadth-first search algorithm. This algorithm involves traversing or searching nodes or data points in a tree or graph data structure. These algorithms often arise in technical interviews and are a stepping stone to understanding more advanced problems. What’s excellent about breadth-first search is its applicability to a variety of issues not involving trees or graphs such as sorting an array, finding a maximum sum of number combinations, and finding the shortest distance between two nodes in a graph.

Image for post
Image for post

Breadth-First Search

Bread-first search is an algorithm that governs the movement from one node to another in a tree or graph. The order of the search is by the depth of the tree. In other words, the search algorithm starts at the top root node then moves to the second level and searches every node there. Then the algorithm proceeds to the next lower level and repeats until it reaches the deepest nodes. …

Special Characters

In our last installment of the series, we started off our regular expression engine with some simple pattern matching. The first iteration of our code can match literal characters and match a wildcard character. To look at more of the inner workings of regular expressions, let’s add some capability to our engine. More specifically let’s add some commons special characters: ‘?’, ‘+,’ ‘*’ Before we get into how the engine works to identify these patterns, I’ll briefly go into how each special character works:

Image for post
Image for post
  1. ‘?’- The question mark means match this character once or more times. …

Writing a regular expression engine

Image for post
Image for post

In our last installment of this series, we focused on repeating characters as well as more uses of ‘match’ and ‘matchAll.’ For this article, I am going to take a slight detour by examining how the regular expression engine itself works. I’ll do this by briefly reviewing some fundamental regular expression concepts. Then I’ll start coding our own regular expression engine.

First, we need to go back to some basic regular expression concepts and terms. A regular expression is a set of symbols representing a text pattern. These symbols are a formal language interpreted by a regular expression engine used for matching, searching, and replacing text. Many programming languages use regular expression engines, including JavaScript, .NET, Python, Ruby, C, C++, Java, PHP, and Perl, to name a few. …

When technical knowledge isn’t enough

For those of us who have been coding for years, it shouldn’t be a profound revelation that coding is tough. When I say tough, I’m not just talking about the technical problem-solving. I don’t just mean the continuous learning and adding skills while pushing boundaries. I’m not even talking about the long hours spent crafting efficient code that works to solve complex algorithms. These are necessary but not sufficient skills for excelling at Software Development.

If you want to move yourself to the next level and truly excel at your craft, you must strengthen your non-technical side. The importance of non-technical skills is apparent in fields such as marketing, sales, and human resources. However, even in a field as technically oriented as software development, your “soft skills” can be just as critical. …

Repeating characters

In our last installment, we learned how to use regular expressions to validate phone numbers and emails in a form. These problems illustrate essential concepts in regular expressions such as matching groups, repeating digits, and order of characters. For this installment, I am going to go down a rabbit hole into repeating characters generally.

‘match’ and ‘matchAll’

For this article, I will introduce two instrumental regular expression methods that give more valuable information than the simple ‘test’ method. If we want to know more than just true(the regular expression matches) or false(the regular expression does not match), we can use ‘match’ and ‘matchAll.’ Match returns the first matching substring found along with its index in the string while ‘matchAll’ returns all of the matching substrings along with their indices. …


Everything that happens on the Internet boils down to clients making requests of servers and servers responding to those requests. When you visit a website, you are sending a request to a server possibly halfway around the world for an HTML page along with its CSS and JavaScript add-ons. The request-response cycle follows a simple formula.

A. The client sends a request to a server to initiate communication

B. The client sends the request and waits for a response once the connection is locked.

C. The server receives the request and sends the data in the proper format.

To use a typical example, when you type in your browser and press enter, the browser establishes a connection with Google’s servers, and makes a “GET” request to the server for Google’s homepage. If Google receives the request securely, it returns a response with data, including status line, headers, and the Google page’s HTML, CSS, and javascript. …


Adam Shaffer

A full-stack software developer who likes writing about tech.

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