Showing posts with label algorithm. Show all posts
Showing posts with label algorithm. Show all posts

Monday, November 28, 2011

On Chess, Design Patterns and The Dying Art of Programming

Chess is probably one of the best game or sport to instill discipline and sportsmanship: you win or lose not because you did or didn't listen to and followed the counsel of your coach, but because of the choices you made. While basketball has Michael Jordan as its greatest player, billiard has Efren 'Bata' Reyes and Edison Arantes do Nascimento, better known as Pele, is the best soccer player of all time, chess has the late Bobby Fisher. It's notable that of the sports greats I mentioned, chess again stands unique: its greatest and most popular representative has already passed away.

Tuesday, April 26, 2011

Proposal for Boyer-Moore String Pattern Search Algorithm Optimization

I first encountered the Boyer-Moore string search algorithm in mid-1990s when it was mentioned in a local computer magazine discussing virus detection mechanisms and referred to Cormen's Introduction to Algorithms for more details.

Back then, DOS was king and Microsoft was omnipotent, with computer viruses as nuances in one's computing experience, the holy grail of computer programming enthusiasts in my former university (but my college alma mater is here) was anti-virus programming.

The paradox is that to learn how to create an anti-virus you have to create a virus against which it should work. Mark Ludwig's bookwas a coveted possession but the only one I got my hands on was Ralf Burger's work and I learned how to make a functional computer virus then. To fix the problem, you have to find it (fast!); this is where virus detection becomes critical, and Boyer-Moore string search algorithm is one of the best algorithms known then for this purpose.