Computer science, programming and code examples, blog posts, and small projects.

To encourage ticket sales, I built a real-time tickets purchased ticker in Node.js using WebSockets in an incredibly short amount of code.

ViewI like using Canvas - especially for practical purposes such as making lightweight and user-friendly image magnifications.

View9 Product Hunt Submissions, a couple dozen domain names registered, dreams to last for years, and other notables from my journey as a solo-preneur.

ViewUsually, there are tools out there that make a project more efficient, but sometimes it's best to build something from scratch. Here's why I built a Node.js client CMS ...

ViewBinary Trees are common data structures used in computer science specifically for programs geared toward high efficiency searching and output.

ViewBinary search trees allow for efficient functionality but only when their nodes follow the rules. Here's how to check if a binary search tree is valid.

ViewProbing allows hash tables to have dynamic sizes which greatly influence memory and time efficiency. Here's how you can build the functionality in JavaScript.

ViewBinary max heaps allow for efficient data insertion and max value extraction and are used for the efficient heap sort algorithm.

ViewWhen utilizing a lot of data from multiple MySQL databases, routes in Express can get a little messy. Here's my strategy on leveraging Express Middleware to achieve DRY code.

ViewThe heap sort algorithm is one of the most efficient ways to sort values in computer science. This post includes a concise JavaScript implementation of the algorithm.

ViewCombining Express.js route calls and using closures in a way that will make any DRY programmer giddy ...

ViewThe binary search algorithm is one of the most efficient ways to find an element in an already-sorted set of data. We can implement binary search with a simple array data structure in JavaScript.

ViewUsing Canvas to make an interesting and interactive background effect.

ViewWebsite-generated spam is a major problem - one that doesn't go away and is next to impossible to solve. Here's what I did to all but solve the problem entirely.

ViewHash tables provide a great data structure method for storing large quantities of data because, on average, they provide constant time search access to the data.

ViewYou can create a stack object in JavaScript that will enable you to maintain your data in constant time including pushing, popping and getting the maximum value.

ViewClosures in JavaScript provide a great way of manipulating multiple items in the DOM. Here's how I use a closure to make my links opening in new tabs accessibility-compliant.

ViewThis is a simulation of a network packet processor actively receiving new packets, placing incoming packets in queues and processing them according to size and memory constraints.

ViewWe can create an object in JavaScript to behave like a stack and a queue to help us with the sliding window, constant-time conundrum.

ViewWe can use binary heaps to create efficient priority queues. In this code example, we simulate a scheduler program that sends jobs to multiple processors based on priority.

ViewCode examples for validating string balance particularly when it comes to opening and closing brackets.

ViewSome users prefer to view content with their screen set on 'dark mode'. Not only can we set up our website to provide a dark mode option, but we can automatically set it based on the user's preferences.

ViewSee how to create, add to trees, remove from trees, traverse trees and more in these JavaScript and PHP coding examples.

ViewAlthough arrays in JavaScript size-up automatically, we can create a stack object to replicate the process of creating a dynamically allocated array.

ViewLinked Lists are a computer science data structure that uses pointers to connect nodes located at different points in memory. Here we implement linked lists in JavaScript.

ViewThe merge sort algorithm works by dividing larger data sets into small ones - think divide and conquer - before rebuilding the dataset in the sorted order.

ViewThe Radix Sorting Algorithm is an interesting program that puts integers in order by breaking up integers into their individual places - think 1s place, 10s place, 100s place and so on in decimal.

ViewThe Selection Sort algorithm sorts a dataset by finding the smallest value and moving it to the left of the data structure. When it locates the smallest number from the remainder of the unsorted dataset, it'll swap it with the value that currently resides in the left-most opening.

ViewShell sort is an in-place comparison sort. It can be seen as either a generalization of sorting by exchange (bubble sort) or sorting by insertion (insertion sort).

ViewBubble Sort is a simple linear algorithm that loops through a dataset comparing elements that are side-by-side and swapping their order if the next value is smaller than the current one.

ViewThe Insertion Sorting algorithm is a program that runs one loop through a dataset and upon coming to a value, it checks for values in the dataset prior to the current value that are larger than the current value. Then, if there are larger values, it moves the current value forward to its ordered place and shifts all other values back.

ViewThe Quick Sort algorithm is similar to Merge Sort in that it divides the dataset into smaller, more manageable datasets and sorts them before combining and returning.

ViewBinary search trees aren't a linear data structure, but here's how you can return the next value in the data set just like you can with arrays and linked lists but more efficiently.

ViewHundreds of flashcards that I've put together to help with the transformation from self-taught coder to computer scientist.

ViewUnlike common data structures such as arrays, stacks and linked lists, tree data structures can be traversed and values returned in multiple ways. Here are a few depth-first traversal orders.

ViewRabin-Karp's Substring Algorithm allows us to find occurrences of substrings in text using hashing. Here is an implementation of the algorithm in JavaScript.

ViewDirect addressing is method of storing values in a variable that allow for constant time addition, deletion and value returning. Here's a JavaScript implementation.

View#JavaScript#Node.js#Express.js#websockets#socket.io#Canvas#CMS#client software#binary tree#binary search tree#avl tree#order statistic tree#logarithmic time#tree data structure#hash table#linear probing#binary max heaps#heap sort#Middleware#DRY#MySQL#sorting#algorithm#closures#lambda#binary search#array#Spam#distributed hash tables#consistent hashing#overlay network#distributed storage#stack#constant time#accessibility#network#packet processing#simulation#sliding window#queue#object#binary heap#PHP#string balance#linear time#CSS#dark mode#prefers-color-scheme#UX#recursion#traversal#dynamic arrays#linked list#javascript#merge sort#radix sort#selection sort#shell sort#bubble sort#insertion sort#quick sort#inorder successor#trees#graphs#Rabin-Karp#hashing#search#direct addressing

Tweet me @tylerewillis