Mike's blog
Slick JavaScript-based browser-specific CSS helper
Here's a nifty tool for your bag of tricks: JavaScript snippet that tags HTML elements with browser- and OS-specific attributes so you can target browser- and OS-specific 'peculiarities' without resorting to the usual bizarro selector tricks or Internet Explorer-specific conditional comments.
Using this script, you can target browser-specific elements via simple CSS selectors as follows:
.ie6 #targetElement { border: solid 1px #eee; }
OS Codes
win - Microsoft Windows
linux - Linux (x11 and linux)
mac - Mac OS
Browser codes
ie - Internet Explorer (All versions)
ie8 - Internet Explorer 8.x
ie7 - Internet Explorer 7.x
ie6 - Internet Explorer 6.x
ie5 - Internet Explorer 5.x
gecko - Mozilla, Firefox (all versions), Camino
ff2 - Firefox 2
ff3 - Firefox 3
opera - Opera (All versions)
opera8 - Opera 8.x
opera9 - Opera 9.x
konqueror - Konqueror
webkit or safari - Safari, NetNewsWire, OmniWeb, Shiira, Google Chrome
chrome - Google Chrome
This only helps with JavaScript-enabled browsers, but it's an interesting alternative to the usual CSS madness.
Is Google Evil?
In a Reuters article, Eric Schmidt talks about their stated philosophy - "Don't be evil" - and how this translates into practice, and what it means to the company.
In an on-stage interview with writer Ken Auletta of the New Yorker magazine, Schmidt said "Don't be evil" is meant to provoke internal debate over what constitutes ethical corporate behavior, rather than representing an absolute moral position.
Google will likely continue to have difficulties in the PR arena, because, for many people in this culture, CORPORATION = EVIL RICH = EVIL, and BIG = EVIL, thanks to a variety of social factors.
And because BIG (or rich, or successful) = EVIL and CORPORATION = EVIL for many people, there is simply no way that G can avoid being viewedas EVIL as they continue to expand into new business areas (regardless of the validity of such a view).
See, when Google was the upstart, the underdog, the brash newcomer, the better alternative, it could get away with the slogan, and it worked well for them. It's not working so well these days.
Note that I'm not calling Google evil (although I think Google sometimes does things that makes people wonder if they take their stated philosophy seriously). I'm pointing out a cultural trend towards class (and economic) rhetorical warfare, over which Google has little control. And that is what will cause trouble for Google, over the long haul.
Metric vs. Imperial system smack-down
Here's a funny (and over-the-top) diatribe on the advantages of the Imperial over the metric measurement system:
The metric system also fails to be sized appropriately for humans. Because of its derivation, units of measure are divisible by ten, but ill-suited for labor that does not involve extensive mathematical computations. Is it any wonder that a man is still six feet tall? Measuring a six-foot, 31-year-old man's height in centimeters (182) makes as much sense as measuring his age in months (372).
DIY - Silver Lightning cleans silver via electrochemical reaction
OK, this is off-topic but what the heck - it's interesting (to me, anyway).
I've seen commercial advertisements for Silver Lightning on various television shows, The product demonstration shows a person placing the Silver Lightning plate under water, then placing tarnished silver on the plate -- and like magic, the silver brightens and the tarnish vanishes.
I'm an inquisitive guy, so I assumed this was due to some kind of chemical reaction involving electrolysis, so I searched the web to see what I could find on the subject.
It turns out that silver tarnish is silver sulfide, much of which comes from the trace amounts of sulfur in the air. The Silver Lightning product is apparently nothing more than an aluminum plate, which, when placed in a solution of baking soda and water (about 1 cup per gallon) causes an electrochemical reaction that draws the sulfur away from the silver and to the aluminum.read more »
Mollom.com: another spam prevention mechanism for Drupal admins
When trying to keep web site content clean and on-topic, the site administrators often face monumental challenges from spammers.
Mollom.com is an alternative to using the Spam or Akismet modules. It's in beta at present, and it is free of charge at present. It is expected to remain free for low-volume users (for details, please refer to the mollom.com web site - link below.)
Nero 7 Essentials: Stupid Stupid STUPID thing to do to developers.
I was debugging a Windows application that makes use of DirectShow to render media - and for some strange reason, the application would terminate without warning when run under Visual Studio's debugger.
No error message, no exceptions, nothing. The application ran fine outside the debugger. I was able to debug the same code base several weeks ago without incident.
Poking around a bit, I isolated the line of code causing the silent termination: The DirectShow IGraphBuilder interface's Render method. Digging deeper, I find that the ultimate culprit is Ahead Nero 7 Essentials, which had been installed on my development system several weeks before. Apparently, Nero Essentials installs a variety of DirectShow filters on the target system, and, these filters actively prevent running under a debugger. In this case (on my development system), there was absolutely no error message or other indication of why - just a silent termination.
After I isolated the problem, I was able to determine that there is supposed to be a "Nero Protection Error" message box presented to the user, but it never appeared on my system, nor did the system event log contain any useful information. Feh.
This gets my vote as one of the dumbest stunts I've ever seen. I am pretty sure there's nothing all that special about Nero's DirectShow filters, and, if someone really wants to reverse engineer them or break the protection/licensing, they will. This lame attempt does nothing more than encourage (force?) legitimate users to remove the Nero filters from their machines. Nice going. Did the developers or marketing geniuses stop to think about this use case?
Ahead Nero 7 Essentials just cost me an hour or more of productive time. Then there's the aggravation.
Lame. Stupid. Did I mention lame? And I used to *like* Nero software.
ImgBurn - Freeware, and it works!
Update: I've tried ImgBurn, a freeware CD/DVD image read/write utility, and so far, it looks good. UI is slightly wonky but it's a very good piece of free software - and, best of all, you can install it without Administrator rights. Give it a try!
Ringtone downloads - Ringtones, Ringtones, and More Ringtones...
Ringtone Downloads - what's all the fuss about?
Ringtones. Seems like everybody's searching for them and downloading them. Ringtone download sites are all over the 'net, and ringtone download advertising is pretty big business, if the number of ringtone download site ads visible on the average web site is any indication.
Ringtones For You, Ringtones For Me, Ringtones As Far As The Eye Can See...
I've never spent much time paying attention to ringtone download sites. I always figured that they were aimed at a younger audience, and, I have always been satisfied with the ringtones that were built in to my cell phones. Who's visiting the ringtone sites?read more »
Antivirus gone wild: Kaspersky busts Windows Explorer
This morning's news brings reports of another case of mistaken identity leading to false arrest and other abuses of power by our neighborhood beat cop (um, I mean, anti-virus product.)
This time, Kaspersky anti-virus pulled Windows Explorer to the side of the road, hauled it off to jail, and put it in solitary confinement on suspicion of being infected with Huhk-C (reported to be a low-risk virus.)
Windows Explorer was eventually cleared of all charges and released. One hopes that the renegade cop Kaspersky faces disciplinary action. Given the historic lack of corrective action I'm not holding my breath.
Hell is other people's code
Jean-Paul Sartre said: "Hell is other people".
To which I say: "Hell is other people's code".
All kidding aside, working with other software developers' code can be daunting enough, even when the code was written by diligent, conscientious engineers.
It becomes downright nasty, bordering on torture, when it was written by someone unconcerned with the need to maintain the code later. I wonder, when working with such code, what level of Hell I've landed in.
I've seen near-identical functions located adjacent to each other in the same file, each differing by only a few characters here and there, and both spanning a half-dozen display screens, making it impossible to even tell which function you are looking at. Each having conditional compilation controlled by the same manifest constant with a near-meaningless name. The second function body #undef'd the manifest constant before the first line of the function. So there was no way to know, when looking at a particular screen full of code containing conditional compiled statements, whether the code was compiled and active in this particular context.
I've battled the vile demons of magic numbers, copy-and-paste code as a means of code 're-use', low-level communication code that pops up blocking error message dialog boxes in the middle of threaded data send routines, what-should-have-been-library-code-but-was-just-another-source-file (used in a GUI application) that unceremoniously calls exit() when an error occurs in the middle of an initialization routine.
All the while, I'm repeating to myself: "I have no mouth and I must scream".
So: When you write or maintain code, please try to keep in mind that someone else may need to read, understand, and even - *gasp* - modify the stuff you are generating. It's a good way to help make the world a better place. Really.
Resist the temptation to take that shortcut. Drop a few comments describing your assumptions. Sprinkle the code with a few assertions to describe the conditions required for proper operation - but don't rely on assertions to provide runtime error checking; use exceptions or well-defined return values if you must. If you know about a precondition or gotcha, make a note of it for the benefit of others. Do something, anything, to improve the condition while you are working on the immediate need.
Take the time to think about those who follow - They'll love you for it.
A new twist on link requests
I must say I found this one to be rather unusual. It appears to be a variation on the "paid post" or "paid review" theme - except the requester writes the content rather than paying the webmaster to write content linking to the requester's site.
[Name Snipped] sent a message using the contact form at http://exodusdev.com/contact.
I ran across your site today as I was searching for some computer info. On Google. Your site is fabulous and certainly grabbed my attention!
I run a website also, and would like to see if there are ways we can work together to benefit both our businesses. As I am sure you have found, reciprocal links have very little value these days – getting ahead on the search engines relies on two factors…read more »


Recent comments
8 hours 32 min ago
1 day 8 hours ago
1 day 8 hours ago
1 day 12 hours ago
1 day 18 hours ago
5 days 9 hours ago
1 week 8 hours ago
1 week 3 days ago
1 week 4 days ago
2 weeks 21 hours ago