Programming Theory

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

Kicking the BucketSort in C#

Ever hear the term "Kicking the bucket"? If not, it is usually used here in North America to mean someone died. Well rest assured I am not going to be whipping out expressions like "I see dead programmerssss" or anything in this post. Ok, maybe I just did, but the idea behind BucketSort (aka Bin sort) is just that, creating buckets of numbers which we attack with our choice of ...

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 ...