Context adaptive numeric input for functions

When reusing functions coded long ago, I often ask myself "does my function take in numbers in this unit or that unit?" Different units can be used to express the quantities of the same type of object. And some pairs of numbers and units are easier to remember than other pairs for example:
  • half second vs 22050 samples (audio)
  • 10 seconds vs 300 frames  (video)
  • 220 instead of 1048576 (sizes that could be FFT'ed easier)
Most of the time the number will only make useful sense when it's associated with a particular unit. For example you would immediately know that 22050 seconds would be ridiculous in an audio application's context. Hence, I started to write "smart" functions that guess the proper unit based on the magnitude of the input and the normally used magnitudes and reasonable thresholds. For example:

function fftSomething(data, size)

if(size < 20)

       size = 2size

end if 

bla bla bla...

end function ffTSomething

Of course, I could have done a unit conversion before using the function. It would also be more difficult to use unusual numeric values. Things could go wrong if someone doesn't know that the function is doing this. But as for my personal programming, wherein I only deliver the results and not the code, where saving in thinking time is preferred over strictness and efficiency, where I know what typical values are used, this style works for me.

Misleading advertising is bad advertising

How many times have you (almost) downloaded crapware because you are mislead in what you thought was the download link to a file you're interested to? Whether it is actually crap or not, software that try to fool you to get themselves installed is annoying. The converse argument for "you get what you ask for" is that "you don't get what you don't ask for". And you shouldn't. Such strategy is almost like a trojan virus but using subtle social engineering/psychology tricks instead. For me, the worst part of this scheme is that they assume people are stupid. Whether or not they are offering a legitimate product, I don't care anymore and just blacklist them.
The same goes for software that gets side installed while you are installing something else. An example is Babylon toolbar, which goes further by modifying the homepage of your web browser. It turns out to be legit, even having a Wikipedia entry (well, they could have made that too). I suspect that it's relatively high Alexa rank (30 as of writing this) is just due to the infected browsers. This usually happens if you just keep clicking the default common sense options in installation programs, which is totally not your fault since that is perfectly fine in many cases. Now, you have to be more alert while installing software or browsing the web.
Look at the image of the supposed ad below. Can you tell what do they offer? (This ad appears in a wordpress.com blog, which puts ads on blogs if you're using a free account, whether or not you sign up for it. So you might as well sign up for it and at least get paid.)


Is that the download link powered by iliVid? NO! That wouldn't lead you to the file you want, but would instead give you a download link of their video software. After seeing a few of this before, I learned to avoid it. And finally blocked the website in my computer.