Something smart

Posted on Tuesday 15 November 2005

I realize that I use probably 5 or 6 design patterns in my job. Everything else is pretty much window dressing. Which makes sense, as I work on UI stuff and those patterns are pretty well defined. So, today, Woods asked me about something and I surprised myself by coming up with something clever. Basically, he has a lot of numbers (n) and he’s got a mean from them. He needs to recalc when an edit happens to one of those numbers. So, he could reloop through all the numbers. I told him to take the old mean, multiply by n, subtract the old number, add the new value and redivide. I’m sure people use this all the time, but I haven’t seen it too much. It made me feel good to know that I can do more than write for loops that populate combo boxes.


1 Comment for 'Something smart'

  1.  
    6/29/2006 | 9:23 pm
     

    buy valium

    uk.

Leave a comment

(required)

(required)


Information for comment users
Line and paragraph breaks are implemented automatically. Your e-mail address is never displayed. Please consider what you're posting.

Use the buttons below to customise your comment.


RSS feed for comments on this post | TrackBack URI