30 Days of Programming

Visualizing Sorting Algorithms with D3.js

Hey everyone! The original intent of joining this challenge was, among other things, to really solidify my undergrad courses in a time where I'm between college and a career. I figured, with a few months without much luck on the job front, that something like this would really get me motivated and bulk up on the topics I've learned (or perhaps maybe touched on). Plus, I'm unemployed so what else should I be doing? :) Well, enough explaining myself. Let's get down to it. D3.js is a very nice library for visualizing data. With something like this, I thought it'd be nice to take a stab at writing some interactive sorting algorithm tools. So, if you look at the bottom of the page, you can see what I've come up with so far! I've written a small example program with insertion sort. The easiest of the sorting algorithms! Each time you click the button, it will perform a single step (with very little feedback).

What's next?

Add more sorting algorithms, of course! Also add some feedback to see the current iteration the sorting algorithm is on, clean up the code (I'd like a nicer way of adding javascript that doesn't require inline script tags. I got very comfortable with browserify and node on a previous project, and I want that same level of clean for this site.)