Thursday, January 19. 2006So Long Minolta
I was surprised to read today that Minolta is getting out of the camera business. I used Minolta Maxxum 35mm cameras for years and even put up a page on my website for them.
In 2004 I got tired of waiting for Minolta to release a digital SLR that was compatible with my lens collection. So I sold off the whole thing on eBay, bought a Canon Digital Rebel, and started a new lens collection. I sort of felt bad leaving Minolta behind but now it seems like it was the right choice. And I've been really pleased with the Canon gear since. The article mentions that Sony will take over developing digital SLRs for the Minolta lens mount. I hope they really do, but I won't be looking back. I've always been disappointed with Sony's proprietary focus ("standards" that nobody else uses, like those memory sticks). So long Minolta; it was fun. Hello Canon! Wednesday, January 18. 2006More Inbox Spam Woes
Shortly after I wrote my complaint about Thunderbird's junk filter last October, I decided to try to train SpamAssassin's Bayes filter. Using procmail, PHP, and MySQL, I built a crude interface to keep copies of my incoming email and let me classify them as OK or spam. After training SpamAssassin with over 7000 messages, I have to say I'm really disappointed. SpamAssassin still regularly misses spam, and Thunderbird frequently misses the spam that SpamAssassin misses.
(I added a similar (but prettier) interface to a web-mailbox that my client uses, and unfortunately the SpamAssassin Bayes feature has been ineffective for them too.) POPFile is the only reliable blocker I've used, but it runs on the client and therefore you have to download all your mail, spam included, before POPFile processes it. I think the method I will try next is to turn off SpamAssassin's Bayes filter and just let it find the really obvious spam, then pass the rest onto the client for POPFile to sort out. Might as well turn off Thunderbird's junk filter at the same time. In the meantime I keep pondering allowing only whitelisted addresses send me mail. Everyone else could use my web contact form. I'd just have to be really careful that I whitelist all the websites I use. Thursday, January 5. 2006Banker's Rounding for PHP
Via Slashdot I found this detailed article regarding various rounding methods. There are a lot more ways to think about it besides just rounding up to the next highest digit on the fives.
The article reminded me of a problem I worked on last fall. PHP's standard rounding function round always rounds the fives up. This was causing an upward creep in my calculations for hours worked in time clock data. I needed a way to minimize that creep. I settled on a different method of rounding known as "banker's rounding." This method alternates the rounding of fives based on the even-/odd-ness of the preceding digit. So for example, a 3.5 rounds up to 4 and a 4.5 rounds down to 4. I have created a PHP function to do this, and the source code is here: GPL version; BSD version. You give the bround function two parameters: first the value to round, and second how many decimal places to keep. So bround(3.55,0) produces 4 and bround(3.55,1) produces 3.6. I hope it's helpful to someone and please don't hesitate to report bugs or a faster way to do this. (Normally I'm not a fan of using the Ternary Operator but in this case it keeps the function compact and is fairly straightforward.) Update 2007-04-23: Someone going by the name of "Hitlers Pet Gerbil" replied to my method stating it was "slightly incorrect." I posted a reply to the comment on the PHP site, but for some reason it was deleted. Today I stumbled upon a copy of my response, which was written on October 6 of last year: In reply to Mr. Pet Gerbil, I think you're wrong when you state "Your calculations are slightly incorrect." My calculations do take into account when the thousandth's digit is a 5. I ran your function and mine side-by-side and got the same results. Update 2007-10-01: Added BSD-style licensed version (see above). Tuesday, January 3. 2006Congaree Swamp is Growing!
I just found out that 2,300+ acres were added to Congaree National Park (near Columbia, SC) last November. I'm glad to hear it; it is a beautiful place, one I enjoy visiting any time of the year.
I couldn't find a map of the new boundaries, but according to that article, some of it now borders Bates Old River, an oxbow to the east of the park. A few more links time I've spent in the park:
(Page 1 of 1, totaling 4 entries)
|
CategoriesQuicksearchArchivesSyndicate This Blog |