Sunday, February 28, 2010

february

Whoever decided that February should have 28 days was an idiot (less so than the idiot who came up with daylight savings but an idiot nevertheless). Why should all the months have 30 or 31 days with the exception of February which has 28? That's inconsistent and thus stupid. Why not have more months with 30 days instead of 31 and make February have 30/31 days as well? Because someone was stupid, that's why.
Here:

scheme j f m a m j j a s o n d total days
stupid 31 28 31 30 31 30 31 31 30 31 30 31 365
stupid leap 31 29 31 30 31 30 31 31 30 31 30 31 366
fine 30 31 30 31 30 31 30 31 30 31 30 30 365
fine leap 30 31 30 31 30 31 30 31 30 31 30 31 366

There. Isn't my scheme much neater? Look how fine the months alternate. And on leap years you add one day at the end of the year, not at some arbitrary position. Much like they do with leap seconds on New Year now.

Monday, February 22, 2010

http

One morning I was webbrowsing:
ret@ret-laptop:~$ telnet some-server.com 80
Trying some.ip.address...
Connected to some-server.com
Escape character is '^]'.
GET /32452tr534tfgr4 HTTP/1.1
Host: some-host.com

HTTP/1.1 404 Not Found
Date: Mon, 22 Feb 2010 12:07:12 GMT
Server: NOYB
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1
...404 and so on.
WTF? No shame:
# Server masking is optional
#fake server banner - NOYB used - no one needs to know what we are using
SecServerSignature "NOYB"
Hey, NOYB yourself, fucker! You know I'm OK with you bragging about how secure you are and everything, but what makes you think you can abuse protocol like that? It doesn't hurt to be polite, you know! Is it so hard to come up with something decent like "hidden"? So much for user interface. Kids these days...
Anyway, here's the rest of the reply:
(some-html-tags-that-blogger-chokes-on)
Apache/1.3.34 Server at www.some-host.com Port 80
(some-other-html-tags)

LOL.

Later edit: oddly enough there actually is a www.some-server.com which obviously has nothing to do with this post, please substitute www.example.com in the text above :P

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: