Archive for January, 2005

Spotted in the Wild

Posted 1/23/2005 By Jason

Here is a little teaser of something I spotted in the wild!!!

Google Vs. Blog Comment SPAM

Posted 1/19/2005 By Jason

Via the Ruby general list I stumbled on Preventing Comment Spam from Google. This seems like an easy enough idea; I will have to see if I can scrounge up enough time to hack it into WordPress.

On a related note, I heard that sometimes spammers actually have real people entering these inane blog comments. If so, I think they need some more training. 😉 It seems they are leaving obtuse comments without a url linked, and therefore with no purpose at all?!?

Euclid’s Algorithm in one line of PHP

Posted 1/14/2005 By Jason

Sometimes I am amazed at how forums work. The way in which people come and offer help, myself include, impresses me. I do not fully understand my own personal motivations for participating in forums, but at least one one of the reasons is sometimes the opportunity to write so code just for the fun of it presents itself. One such case was here. The original poster essentially wanted to reduce a fraction (though he was kind of beating around the bush about it). The post had been up on the board for a day, and several people had answered trying to help and clarify the issue at hand.

I dredged up some grade school math memories from long ago, and recalled the way to reduce a fraction was to identify the greatest common denominator, and divide each of the parts of the fraction by the gcd. I jumped to my del.icio.us reference page and located the Dictionary of Algorithms and Data Structures to search for greatest common denominator.

This quickly lead to Euclid’s Algorithm, a heuristic methodology for identifying the greatest common denominator. About a minute of thought later, I implemented the algorithm in a one line recursive function call:

<?php
function gcd($a, $b) {
  return ($b) ? gcd($b, $a % $b) : $a;
} 
?>

With that in hand, it becomes trivial to write the function to reduce the fraction.

So why am I blathering on about this? No particular reason, sometimes I just like the elegance of a particular solution, and this one struck me as one I wanted to mention and save for posterity. It is not an OOP solution, but being object oriented is not a requirement for elegance or utility. As a side effect, it was an opportunity to throw out some links that someone may end up finding useful.

New Job

Posted 1/4/2005 By Jason

Today the announcement came out at work regarding my promotion. I am now the eBusiness Manager for Alcoa Mill Products. My friend Robert Yoerger, was promoted from eBusiness Manager to Director / Customer Service, Demand Planning and eCommerce for AMP North America, and I am officially departing my IT role of Senior Project Leader to fill his vacated position as well as report to him.

This role is a gentle change from an IT role to a business role. I have always “over functioned” a bit in my IT role to assist in defining business process. Now my role explicitly demands this. I essentially have become my own customer. I still have two contractors reporting to me with strong SQL and Siebel skills (as well as developing PHP/web skills), and in addition, the eBusiness Marketing Staff Assisting will also report to me.

The biggest tasks on my plate this year are the need to upgrade our current version of Siebel CRM, and to maintain all of our existing commercial systems while we deploy a new Oracle order management solution at our largest facility. In the meanwhile, I also need to make sure our newly deployed Gentoo Linux intranet web server meets our internal audit standards and is SOX compliant.