8bitrocket.com
16Dec/080

Algorithms For Modern Managers: Calculating Christmas Bonus

Here is the first in a series of "Managment Sucks" "algorithms for modern managers" (written in ActionScript!)

private function getManagerChristmasBonus(mgr:Manager,
                        employees:Array)
                        : Number
{

  var managerBonus:Number = 5000;

  for (var i=0; i< employees.length; i++) {
    switch (employee[i].status) {

	case FIRED:
	   managerBonus += 3000;
	   break;
	case OUTSOURCED:
	   managerbonus += 2500;
	   break;
	case LAYEDOFF:
	   managerBonus += 2000
           break;
	case ON_THE_VERGE_OF_QUITTING:
	   managerBonus += 1500;
           break;
	case HOPES_AND_DREAMS_SHATTERED:
	   managerBonus += 1000;
	   break;
	case SPIRIT_BROKEN:
	   managerBonus += 500;
	   break;
	case HAPPY_WELL_ADJUSTED_EMPLOYEE:
	   managerBonus += 100;
	   sendHarrassingEmailAboutTimeCard(employee[i]);
	   break;
	}

     }
 return managerBonus + Math.random()*10000;
}
If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.

This site is protected by Comment SPAM Wiper.