Tuesday, December 29, 2009

mutex

I got an email offer to attend a web seminar ("webinar" :-& ) by some company selling Real-Time Operating Systems. A RTOS is an operating system that, unlike usual PC operating systems, can guarantee that some task will be performed before some future moment, if properly used. The guys were charging $39 for the exquisite privilege of attending their online seminar about mutexes and semaphores. Not any seminar about mutexes and semaphores, but an introductory seminar on mutexes and semaphores. Mutexes and semaphores are used so that two programs don't work on the same data at the same time, in order to avoid corrupting said data. Here's an introduction to mutexes and semaphores. Enjoy.
P.S. Some time ago a colleague was asked by a professor what "methods" does a semaphore have ("P" and "V"). "And which one of them increments the semaphore?" Dude, how the fuck should I know, I don't speak Dutch and I don't care for Verhogen! Can't you just call them increment and decrement or up and down like normal people?

Tuesday, October 27, 2009

ads

I was browsing the Web for Information. There it was, the front page. An annoyingly blinking red-on-green banner was announcing that I am the 999999th visitor and it was congratulating me. I would've smiled if it weren't blinking red-green/green-red. Of course I couldn't have been the 1e6-1th visitor because (a) that's too improbable and (b) that site claims to have one million visitors, yeah right! So I scroll down, trying to ignore the ad, and I see this other banner, a vertical one this time. This one is blinking red/blue. It's saying that I'm the 10000th visitor, but this time, "this is no joke!". This time I laugh. At least this number was plausible, visitor-count-wise. Of course it would've been much cooler to be the 999999th visitor because (a) the number is almost 100 times bigger and (b) it's not one million, it's one million minus one (that's being creative!). But sadly, the lesser number was more probable, and besides, that wasn't a joke. Deciding that I had to settle for ten thousand, I scroll down and laugh again when another red-green/green-red banner (this time neither horizontal nor vertical, but squareish) informs me that I'm the 999999th visitor after all! OK, now I'm confused.
I fire up a new browser but this time under the guest user so that my files would stand a lesser chance of being trashed by malware. Wow, now I'm suddenly the 12796869939th visitor! That site must have a lot of traffic, given that I was at most the 999999th about 10 minutes ago. The "this is no joke" banner disagrees by a much smaller percentage this time, indicating 12769870797. The square one says 12796871217, but there's a twist: I'm the 12796bla-blath visitor to see "this lucky banner", so maybe there are other sites showing the same banner and there goes my "not enough visitors visiting this crap" argument down the toilet. The small difference could even be explained by the different times my browser queried the ad server for the three banners while loading the crap. [must be a very big server.] I hit Refresh and lo and behold, I'm either the 999999th or the 10000th visitor again. This clearly can't be, because I already visited the site before as both the 999999th and the 10000th, under a different identity.

So I hold my breath and click the first banner.

It asks for my name, address, and e-mail address. There you go. Move along, nothing to see here, and quit clicking stupid adverts and quit encouraging spammers by opening their e-mails and clicking on their links and buying their cockpills, because if you encourage spammers and spammers send me spam, then you're indirectly to blame. The fuck!

Friday, September 18, 2009

taxi

I was in a cab one night and I glanced over the driver's dashboard, where the display was showing the total distance the car had traveled. It was about 170 Mm. I suddenly realized that such a distance is similar (of the same order of magnitude) to the distance to the Moon, or to one light-second (approx. 300 Mm). To realize that, during the course of a few years, a car can travel one light-something, where that something fits on the usual human timescale, is wonderfully mind-warping.

Tuesday, May 26, 2009

math

(fourth grade) Math Problem:

A mother is 25 years older than her son.
In 7 years, the mother will be 5 times older than her son.


Where is the son's father?










































Answer:

Let the child's age be c years and the mother's age be m years.
Now, m = c + 25.
In 7 years, m + 7 = 5 * (c + 7).
Substituting the first equation into the second one, we get
c + 32 = 5c + 35, from which 4c = -3, or c = -0.75.

So the child is minus nine months old, therefore the father is most probably in the mother.

Saturday, May 23, 2009

sex

After vast experimentation, we found the optimal parameters for sex:
* frequency: low, around 0.8 Hz
* amplitude: as large as possible (e.g. 15 cm)
* waveshape: approximately square wave
* duty cycle: cca. 80%
Something like this:

Monday, May 18, 2009

brideparade

I came home this morning looking forward to a good sleep, only to see the news: there's been a "Brides' Parade" in Bucharest! Now I can't really understand how I missed that, given that I crossed about half the city... maybe it was because we were busy spending meaningful time together instead of dressing up and parading... maybe it was because I was too drunk... I don't know. The Brides' Parade featured "past, present and future brides" (basically any woman would qualify) in wedding dresses parading on some street, possibly in a 1900s car. I hate it when "historical cars" run on the road, they're ugly, obsolete and environmentally unfriendly (mwahahaha). But I digress. The fun part was watching a relatively young girl in a wedding dress being interviewed by some reporter: "So, are you married?" "No, no :)" "Are you getting married today?" "No, no! :) No guy will take me! :) Heeeey! Guuuys! Take me! Take me!!!! I'm [fucking] yours!!!!! Take me!!" Yeah. Yeah. Ok. Great for you.
Parade. Feel fine. Waste time. Feel good. Exhibit yourselves. Feel nice. Display your young, succulent flesh on the counter. Feel great. Spend. Feel wonderful. Burn, age, wither away,... death of the soul, indoctrinated in false grace. Be happy.

One six six! The number of the bitch!
One four four! The number of the whore!

Friday, April 24, 2009

bits

I've had to learn the hard way that whenever you're taking a business trip (or a leisure trip for that matter) there are certain essentials that you have to bring with you, such as your towel. While having a laptop with your familiar environment and your favorite tools and music can make your life easier, it's not absolutely essential, given that you probably have an Internet-accessible box at home or at work. What is essential is a quick, straightforward way to get the job done. You need to be able to link your bits with their bits and measures. A simple way to patch your technological know-how into their system. Thanks to Microsoft et al deprecating "legacy" serial and parallel ports, now there isn't any simple, immediate way to interface stuff directly to a PC-class computer. You usually interface stuff directly to a microcontroller-class computer, but even that needs to be PC-linked to be programmed. So even if you're certain that you can find all the needed parts on-site, you still must always bring your own USB AVR programmer.