Programming Theory

Best practices, structuring of code, dissecting algorithms and talking about the “Why?”

A Slice of PI Using the Monte Carlo method In Java

Everyone loves PI don't they? Cherry, Apple, Blackberry and even Pumpkin is which is one of my all time favorites! Ok, I am not talking about that kind of pie or that geeky guy who called himself PI on Beauty and the Geek (love that show... why? Because I am a geek and wishing I could hook up with hot super model chicks who depend on my intelligence and willing ...

Nodes in a Linked List and Binary Trees

A node... a singular entity found drifting in space. So you throw out the tractor beam and bring it aboard. Safe right? After all, what can a simple node do? Little did you realize that the node, when combined with others, could form an organized group with a singular purpose... TO ASSIMILATE YOU! Ok, perhaps I am going a bit overboard with the whole Borg analogy. But when you think ...

Waffle Matrices…Mmmm Where is the Syrup?

Have you ever sat at the kitchen table where you mom made you a big stack of waffles only to stare at the squares and realize it could be a matrix? Young child programmers do all the time! Heck you might have even written in random numbers using syrup into each square before eating it all up. Skyhawk133 wanted me to make a video on this very subject and while ...

Pig Latin Definitive (C++, C#, Java, VB.NET, PHP)

Igpay atinlay isway oolcay... or so they say in the world of pig latin. A childhood language that was supposed to be "secret" and only the select few would know. Little did we know back then that parents had been speaking that language ever since they were little and no way did we get anything past them. Maybe I shouldn't have called them some nasty words. No wonder they sent ...

Rainbow Tables: Taste the Rainbow

Skittle advocates would blast me for applying their beloved slogan to something as sinister as password cracking. "Down with Martyr2!" or "Lets rip off his head and feed it to the lions! But we don't have lions, ok, feed it to the bin of mutated rats growing a human ear!" The truth of the matter is that understanding the processes of password cracking can help protect and safeguard our electronic ...

Quicksort Definitive (C++, C#, Java, VB.NET, PHP)

One of the funnest things about being fluent in multiple languages is porting code from one language to another or in my case, porting a piece of code to 6 or 7 languages and allowing any newbie the opportunity to learn algorithms despite their language. It also makes it great to see the differences between languages and some challenges (as we will see with our Java example). On this entry ...