Image for post
Image for post
Photo by Possessed Photography on Unsplash

Algos, algos, algos: the cornerstone of a competent software engineer. This is why I’m compiling all my research and work on the topic in a set of articles titled Algorithm Action.

Today, we’re checking out a specific sorting pattern known as naive search.

What is it?

Naive search is more of a brute force method of finding strings inside of other strings, or any other problem like it, for example.

How does it work?

Naive search is pretty straightforward, using two for loops to go through each string and increment a matchCount as matches are found.

Let’s first define a function that takes two strings:

function naiveSearch(long, short) {…

Image for post
Image for post
Photo by Clem Onojeghuo on Unsplash

Algos, algos, algos: the cornerstone of a competent software engineer. This is why I’m compiling all my research and work on the topic in a set of articles titled Algorithm Action.

Today, we’re checking out a specific sorting pattern known as binary search.

What is it?

Binary search is a much faster form of search. Instead of eliminating one element at a time, you eliminate half of the remaining elements each time a certain condition is met. The one caveat, however, is that binary search only works on sorted arrays. …


Image for post
Image for post
Photo by Daniele Levis Pelusi on Unsplash

Algos, algos, algos: the cornerstone of a competent software engineer. This is why I’m compiling all my research and work on the topic in a set of articles titled Algorithm Action.

Today, we’re checking out a specific sorting pattern known as bubble sort.

What is it?

Bubble Sort if an algorithm where the largest values “bubble” to the top. While it’s not commonly used or very efficient, it does work in niche situations. In the category of sorting algorithms, it’s especially important to know what each type does and in what situations they perform optimally. …


Image for post
Image for post
Photo by Michael Dziedzic on Unsplash

Algos, algos, algos: the cornerstone of a competent software engineer. This is why I’m compiling all my research and work on the topic in a set of articles titled Algorithm Action.

Today, we’re checking out a specific problem solving pattern known as the sliding window.

You Mean That Gwyneth Paltrow Movie?

Image for post
Image for post

Nope, that’s Sliding Doors. (It’s a good one!) The sliding window approach involves making a window, which can be an array or number from one position to another, that either increases or decreases in size depending on conditions that are triggered.

Using a sliding window is effective when needing to keep track of a subset of data in your dataset. Here’s a simple problem you might see that calls for the use of a sliding…


Image for post
Image for post
Photo by Anthony Intraversato on Unsplash

Algos, algos, algos: the cornerstone of a competent software engineer. This is why I’m compiling all my research and work on the topic in a set of articles titled Algorithm Action.

Today, we’re checking out a specific problem solving pattern known as divide and conquer.

Take Command Of Divide & Conquer

The Divide & Conquer approach is important because, for a lot of problems, it usually greatly decreases time complexity. It involves dividing a data set into smaller chunks, applying some sort of condition to both, and then repeating the process with whichever subset of data passes, and on and on. …


Image for post
Image for post
Photo by Olav Ahrens Røtne on Unsplash

Of the many problem-solving approaches there are with algorithms, the one I went over yesterday involved using frequency counters. With them, we can keep track of the number of times a certain alphanumeric character, for example, occurs. Afterward, we can use those frequencies to determine solve the problem.

Let’s check out an example!

Anagrams

A somewhat common, easier question, anagram problems usually task us with comparing two strings to check if they’re anagrams of one another.

Given two strings, write a function to determine if the second string is an anagram of the first. …


Image for post
Image for post

On my journey to better understand Vanilla Javascript, I came across Wes Bos’ Javascript 30 Challenge. It’s simple: there are 30 different projects solely built with Vanilla Javascript, complete with starter files, completed files, and video tutorials explaining Wes’ approach at completing the challenge.

To be a better programmer, I have to program, right? I’m watching each video once and attempting to solve it until I absolutely need to refer to the video or the internet for an answer. …


Image for post
Image for post
Photo by Luke Chesser on Unsplash

A few weeks ago, I wrote an article on the topic of simplicity in web design. In it, I talked about how inherently unequal web access is around the world. Over designing websites exacerbates that problem.

In that article, I covered some interesting ways some programmers are tackling the issue of internet access and use. Shortly after, I learned about polyfills.

A Pithy Look at Polyfills

A polyfill, or polyfiller, is a piece of code (or plugin) that provides the technology that you, the developer, expect the browser to provide natively. -Remy Sharp

With polyfills, users can add utility to a browser in order to make it more fully featured and capable of running code we’d like to run, all without a preprocessor, command line tool, or libraries/packages to download. …


Image for post
Image for post
Photo by Markus Spiske on Unsplash

About a week ago, I stumbled on an article by Johannes Baum titled Stop Using Objects as Hash Maps in Javascript. Being that my card game project Triple Triad prominently uses an object-based hash map as a core part of how it works, the article inspired my goal of refactoring relevant parts of the project’s code.

Admirable, right? After reading the article, I figured I could not only increase the project’s speed and efficiency but also really experience the challenge of refactoring essential code. After much research and toying around with different Maps in a Repl I established, the answer is much more complicated than it originally seemed. …


Image for post
Image for post

Some of my most memorable experiences as a young kid centered around the time I spent playing trading card games with a group of people I’d see weekly. I started off with the Pokemon Trading Card Game as a child and graduated to Yu-Gi-Oh when I was in middle and high school. It all came back around in February 2020, when I decided to brush up on the rules for Magic: The Gathering and finally give it a go.

At the same time, I was attending the Flatiron School and learning how to program in a variety of different contexts. As I spent more time learning the ins and outs of plain Javascript, Rails and React, the overlap between coding software and playing trading card games began to really stick out to me. …

Nicholas Echevarria

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