“If your business depends on you, you don't own a business--you have a job. And it's the worst job in the world because you're working for a lunatic!”
by Michael E. Gerber The E-Myth (Revisited)

Binary search tree epiphany…

Oh, wow! I finally found a real-world representation of one of the worlds stupidest “computer science” scenarios. I’ve heard of the binary search tree being of the utmost theoretical importance to CIS instructors. Being a developer, and writing code every day, I can honestly say that I have never ran into an instance where I thought “Oh, this is a perfect time to implement a binary search tree!”

Well, at least now I know that the need does exist, it may have some uses, and wouldn’t be a complete waste of retention. It all came down to Morse Code in the end. While writing a regular expression replacement snippet for SOS, I stumbled across this wonderful display of binary-tree-search-ism. ;)

learn morse code

Place your pencil where it says START and listen to morse code. Move down and to the right every time you hear a DIT (a dot). Move down and to the left every time you hear a DAH (a dash). Here’s an example: You hear DAH DIT DIT which is a dash then dot then dot. You start at START and hear a DAH then move down and left to the T and then you hear a DIT so you move down and RIGHT to the N and then you hear another DIT so you move DOWN and RIGHT again and land on the D You then write down the letter D on your code copy paper and jump back to START waiting for your next letter.

2 Responses to “Binary search tree epiphany…”

  • Corine:

    Good post.

    Thumb up Thumb down 0

  • One of the issues with silly ID caicolatluns like these is that IDcreationists presuppose that evolution had to find some single and *specific* sequence to get a functional biological polymer, instead of just anything that works. They can never seem to wrap their heads around the idea of contingency. That evolution didn’t really do a seach with a specific goal in mind, what happened was just that genes mutated over generations and sooner or later, something stuck because it happened to work in the requisite organism. That given a different environment and an organism with a different evolutionary history, something else would have evolved that would have fit that different organism, in it’s different environment, just as well as this extant protein does now. But to IDcreationists, they’re sitting at the end of this long sequence of events and and thinking because something that works resulted from it, it must have been designed. It’s a sort of texas sharpshooter fallacy, mixed in with the unsubstantiated(and indeed counterfactual) belief that functional biomolecules are extremely rare among the total set of possible combinations. As if there was no evolutionary pathway to some extant protein, because they believe evolution had to search through some enormous sequence-space of nonfunctionality to get that one and specific extant sequence, and that without that one specific sequence, no other molecule would have been functional in it’s stead. Contingency, contingency, contingency. They’ll never get it. They resulted from it, and they just cannot fathom that this could have happened without design, planning and foresight.

    Thumb up Thumb down 0

Leave a Reply

Get a free book about code review best practices.