What first started out as a simple site that used Angular just to switch panels, turned into the Javascript problem-solving olympics for me. Every time you refresh the site you will see the quicksort algorithm unfold in a different way (unless you watch it a lot of times or have terrible luck). The standard quicksort algorithm is recursive, so getting that to happen with delay in javascript meant using setInterval() and looping through a bunch of processes to keep track of everything happening. If there were a few hundred letters that needed to be sorted out you would see how there could be a dozen letters being sorted at once in very different rows which represent different levels of recursive calls. Luckily for me I was using Angular and the entire process happens by manipulating objects in a nested arrays that I have the DOM tied to by using ng-repeat! Even though it made my life easier for the most part by taking care of all view operations for me, I still ended up with some crazy problems to get through. For instance the process for setting all the objects to pivot on after the first one is done with this function:
###So much going on just to make some new letters turn big or red! (Okay that's just part of the case but still all the user really sees happening)
Simple things are sometimes the best to show off, so if that function was annoying and complicated here's a nice little array shuffler I had to implement in order to shuffle the letters around at the start:
###Loop from the back of an array if you want to chop it up!
For the design of the website I decided I was going to make a sleek black and white theme, and I feel it really makes the home page cool! I did use the ever so popular vertical bar approach to the project tab, just I do not have generic colored background colors. You can use the link on my site to email me if you request a version of my portfolio site that looks like everybody else's web page, and I will happily oblige and enter 4 lines of css code for you :) (sacrificing all style creativity I had). Speaking of links, all of them open in a new tab like they are supposed to! Another cool thing I put in is a sticky bottom: a bottom bar that stays right below my content and wont overwrite anything if you drag the bottom of the window up.