Junior developers often write code without paying any mind to an application’s efficiency, focusing rather on creating usable code first and foremost. While that can be okay sometimes, as you get into more advanced projects it is certainly important to consider time complexity as you build code. Today we’ll look at a simple bubble sort and how we can measure time it takes to complete parts of code using a nice, built-in JS method — console.time.

Building a Simple Bubble Sort Function

Sorting can be a pretty time-intensive task, so we’ll build out two similar sorting functions that we can use to compare time to complete…

AI, Deep Learning, and Neural Networks

Artificial intelligence has long been a pursuit for computer engineers, and has gone through many periods of popularity over the last half century or so. Research into AI advanced heavily with the advent of microcomputers, and since then has gone through lulls, or periods of AI Winter, and surges that have led to further advances in the field of AI.

Machine learning is a subset of AI, with the general premise that a technology using machine learning will improve over time. In the world of chess computers, AI was relatively easy to achieve using supercomputers, but machine learning was much…

Before my days of software development, I was a high school engineering and computer science teacher. In many ways, that job helped prepare me as a developer; I had to quickly pick up many different technologies that were included in the curricula I was using in my different courses. I always had a million and one things going on, and juggling everything then sometimes makes the projects I’m working now feel relaxing. Variables! …


This week brought together a perfect opportunity for me to combine a newfound interest in data visualization with the big event of the week: the final presidential debate. This blog is not a political commentary whatsoever; it’s just a chance to share a cool API that I discovered this week and how to make good-looking charts in React using Chart JS.

The API that I’m using is IBM’s Personality Traits service. This service takes a block of text, analyzes it, and returns a personality “profile” of the text that includes percentiles of the “Big 5” personality traits, as well as…


React Styled Components is an easy way to incorporate styling into your React components. It has a very low entry level for developers that are familiar with CSS that haven’t yet been exposed to design libraries such as Bootstrap or Ant Design. Additionally, it is very lightweight to set up in your application and get started with, which you will see demonstrated below. Using styled components eliminates the need for using in-line styling in your React rendering, so it further helps remove the HTML content from the styling content of your document.

Using Styled Components

Assuming you already have a React app running…


Recoil is a fancy new state management library for React that helps React developers write cleaner and more efficient code. Created by Facebook, the same developers of React, Recoil is still considered to be in an experimental phase, and is not recognized as an official part of React, but it seems that it will become another extremely popular library for React devs in a short order of time.

React developers can surely all relate to the confusing act of jumping back and forth between files to check for states set in parent elements and determine whether that state can be…


APIs are software developers’ best friend. APIs, or application programming interfaces, help define how communication between different types of softwares should take place, and without them creating any sort of meaningful application would be virtually impossible. RESTful APIs, defined by Roy Fielding in his dissertation, take this importance a step further, as they define methods for applications to make HTTP requests to access data from servers. In this article, we’ll look at some of the inner-workings of RESTful APIs, including how servers respond upon receiving HTTP requests.


One important aspect of REST APIs and http requests are that the client…

It is alarming how frequently popular websites get hacked these days. Internet security methods are continuing to evolve, as are hackers’ methods for exploiting security vulnerabilities. Here, I’ll highlight two popular, albeit somewhat dated, types of attacks, and discuss general things developers can do to stay on top of security and resources that are available.

Cross-Site Scripting (XSS)

Cross-site scripting occurs when a user maliciously enters data that effects how the website is rendered. On social media sites, for example, when a user creates a post, data is sent to a server, and that data can be accessed and seen in as part…

In today’s world of computer science and programming, we often work with large datasets in projects. Accidentally modifying data is easy to do and hard to notice without a careful eye. This is why it is important to understand the concept of mutability and how to avoid carelessly editing data that is not meant to be changed. Here, we’ll look at a handful of different methods and how they transform (or don’t) the data they are interacting with.

Mutable vs. Immutable Data

Immutable data cannot be changed, and is comprised of all simple datatypes (i.e. numbers, booleans, and strings). The number 10, for example…

Greg Thompson

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