1. Computing

Stress Calculator For A (Delphi) Programmer

By October 28, 2011

Follow me on:

in Coding Errors ::I love the comment Robert Oschler left to my D'oh! Those Negative Boolean AND Bitwise Expressions :(.

 // by Robert Oschler
function StressLevelInProgramming : extended;
  // the constant 0.001 was added to the Max() function in the denominator
  // because once the number of hours left on the project is less than 1,
  // the programmer's stress/pain approaches infinity asymptotically.
  // And to avoid a divide by zero Exception of course.

  result := AbsDistance(intendedFunction, actualFunction) * (1 / Max(NumHoursTillDeadline, 0.001));

Have you noticed how time passes by more quickly as you approach "The Deadline"? The function you are working on seems more complicated than when you created the function header and perfectly knew what the function should return and how to code it?

Finally, the stress calculator you can use to explain to your boss why the Deadline should be tomorrow and not today :)

Can you come up with a more accurate function?

Comments are closed for this post.
Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

©2014 About.com. All rights reserved.