My blog has been moved to ariya.ofilabs.com.
Showing posts with label funny. Show all posts
Showing posts with label funny. Show all posts

Friday, March 26, 2010

multiples of 3 or 5

One day Helder showed me Project Euler, a collection of interesting math problems to be solved using computer programs.

I took a look at the first problem: find the sum of all the multiples of 3 or 5 below 1000. Getting the linear time solution was trivial, the constant time solution was also not hard. However, I could not help it, I continued by applying some obfuscation voodoo and came up with this answer (of course, constant time as well):

return "uncopyrightable"[n % 15] - 'a' + 44 - "xzoxy}pge]_LAKD"[n% 15] +
'A' - (!(n % 15)) * 9 + 15 * ((n / 15) * (4 + ("aaabbcdddeffggg"[n % 15] - 'a')) +
(n / 15) * (n / 15 - 1) * 7 / 2);

How did a word ("uncopyrightable") end up in that solution? Believe me, it was (a lot of) fun! :)

Wednesday, November 04, 2009

english vs indonesian

One thing which recently made it into my reverse-culture-shock impact list is the widespread use of incomprehensible (read: broken), mixed-language expressions, potentially due to many reasons (to name a few: innocent show-off, following the mainstream, or just trying to look more "educated"). It starts with an easy one, like denoting the printer cartridge types as "black" and "color", i.e. in English, although we have good Indonesian words for that ("hitam" and "warna", in case you can't recall). The worse part is yet to come, it kills me when someone starts to sprinkle English words in an otherwise perfect sentence, e.g. "tapi you mesti ngajak aku to follow your, ehm [can't find the English words], kegiatan, which is sebenarnya quite interesting". This wonderful fragment is ridiculously non-sense for both foreigners who never learned Indonesian and for my fellow countrymen who do not know English at all.

Of course it won't surprise you if I say that you can easily find flyers and other promotion materials exactly using the same pattern. Just today we found a state-sponsored, free Shopping & Travelling Guide booklet featuring dozens of pages with English headings. Again, the contents are written in Indonesian. This leads to a number of striking typos and mistakes, one of which is shown here:

the typical typo

I have nothing against foreign languages (I have my share by learning few of them), but I also still love my wonderful mother tongue, Bahasa Indonesia.

Friday, August 28, 2009

mails I wish I could skip

posten

Don't get me wrong, I love to get emails. In fact, as long as the emails are not nuked by the spam filter, I read each and every one of them. I might not give a response immediately, but I seldom skip an email. However, there are few types of e-mails that I wish I could just skip, thereby saving my and the everyone else's time.

that starts with "Dear Sir/Madam". Nothing wrong with it of course. But if someone knows my email address, a little check with Google would reveal my gender and my full name. However, with that Sir/Madam thing, I cast a suspicion upon the content of the email (likely a spam anyway).

that asks "how to download FooBar". Maybe s/he reads one of my articles or a post in my blog. But normally I always state the web site of that particularly interesting program so that people can try it. Usually I give her/him the benefit of doubt and send the first few links I find by googling (or lmgify-ing) on "download FooBar".

that only says "I tried to do X and it did not work". Unless I have a crystal ball, how on earth could I possibly know the problems? Shall I forward this email to Uri Geller, or any of his successors, then?

that requests suggestions for a (final) project. If I do not know the sender (what s/he's studying, what the interests are, etc), well what would I say then? I can mention anything, e.g. create a rocket that flies us to Jupiter, but that wastes more of our time.

that ends with "Please help, it's urgent" or something similar. As much as I would like to help, I also have a life, and I have my own sets of problems, too. And so does everyone else. True, urgency requires a delicate handling but I am not in business of waving a magic hand. Beside, we are not in the kindergarten anymore, screaming does not make the solution comes faster.

that asks for some architectural diagram of my example code. It's soooo "corporate". Seriously, do you expect me to fire up Rational Rose and draw colorful charts (flying arrows included) for a 300-lines example program? Some people fail to see that an example, just as the name implies, is meant to be taken as an example.

that is closed with a very long signature. It's fine for the legalese purpose, but isn't it ironic when the mail signature is ridiculously long, sometimes up to 4x longer, than the content of the mail itself? And when the email is basically a set of some of the points above, the signature is like adding an insult (a terrible one even) to the injury.

Do you ever get other types of annoyances like that?

Saturday, August 08, 2009

the power of definition

Have you ever got a simple question from a non-techie person, like "What is Java"?

Here is a portion of what you get from wikipedia on Java:

Java refers to a number of computer software products and specifications from Sun Microsystems that together provide a system for developing application software and deploying it in a cross-platform environment

Here is what you'd enjoy from its official site:

Java allows you to play online games, chat with people around the world, calculate your mortgage interest, and view images in 3D, just to name a few.

That really makes my day.

Tuesday, July 21, 2009

the price of ignorance

This blog entry from Hallvord really makes my day.

Unfortunately seems that this page is listed on Digg or reddit (hence the off-topic, bashing, and/or childish comments). Otherwise, I would expect some more cheeky yet insightful and thoughtful remarks.

Thursday, March 12, 2009

bias

Readers of my blogs might notice the remark "heavy corporate bias" [1] which was the most interesting comment after I showed the result of JavaScript benchmark test. Interesting? Because I work for Nokia [2] and none of the product shown in that benchmark result is from Nokia.

Of course I am not stupid. It is just because I am paid to hack on QtWebKit [3], right? It does not matter if I never pushed QtWebKit to replace KHTML or KJS. It does not matter if I never (God forbid) bad-mouthed or insulted KHTML, KJS, KOffice, or any other KDE sub-projects, or any of its developers. It does not matter if I (and other KDE developers and ex-developers here in Qt Software) give our best [4] to ensure that the latest Qt release plays well with KDE 4.x.

I guess some people are just hostile, not matter what I do. The greatest lessons of it are (1) I try to be active again in KDE, despite Real Life (tm) would make it a difficult task (2) I will post more food pictures, apparently these did not annoy people enough :-)

On a slightly unrelated side note: after all these (tough) years, "biased" is probably not really my thing (those who know me well, please speak up!). I use all major browsers on an almost equal basis. Of all three phones I use since I start working for Nokia, none of them are Nokia ones. I enjoy working on QtWebKit, yet I like the simplicity and easy-to-follow KHTML. My home machine runs (the beautiful) KDE 4, my work desktop is still with (the trusted) KDE 3. I am a proud vim user but hardly recommend it to novices. My main debugging tool is still gdb but everyone knows how I praise VS integrated debugging. I like and use git (rebase) with passion, still I believe mercurial patch-queue rocks. I contributed a lot to KOffice but I am a great fan of Jody Goldberg and Michael Meeks' work on Gnumeric and OpenOffice.org.

If you come to me [5] and tell me how bad my code is, likely I will buy you a drink. And I am usually still the one who hates my code most.

[1] The phrase "heavy corporate bias" starts to become an insider joke here among my fellow Trolls :-)
[2] The disclaimer in my blog explicitly states do not necessarily represent the official view of my employer.
[3] If you fail to see the connection, Chrome and Safari are powered by WebKit as well.
[4] We are still human^Troll, and there are only 7 days a week.
[5] Nokia employees may not enter the contest.

Tuesday, March 03, 2009

for the glorious nation

Approaching the Qt 4.5 release, in order to relax the atmosphere a bit, and while I was just back from vacation in Indonesia, last week I brought nice goodies to the office. Read what I posted to our internal list:


Subject: durian, for the glorious nation of Indonesia
Date: Tuesday 24 February 2009
From: Ariya Hidayat <ariya.hidayat@trolltech.com>

Executive summary: try durian candies I brought, find them on the desk in the 5th floor, next to the stairs.

Durian [1], an arguably very nutritious and delicious fruit, my all-time favorite snack, best things before sliced bread and LISP, is unfortunately forbidden to be carried in the flight, placing it in the same category as guns and drugs. Since I am not a brave as our Chief Troll (with his cheese adventure), instead of smuggling a large quantity of durians, cowardly I fall back to a simpler solution: durian (flavored) candies. For me, they taste fantastic (albeit not as heavenly as the fresh fruit, or when made into mixed drink [2,3]), but for most people, they stink, smell horribly, and taste disgusting.

When you start the losing fight with your stomach, when you count the minutes in the toilet, when your days in Emergency Room are almost over, now think about it: how do most Asian feel about European cheese? [4]

Now I am back on completing my patent application on "Method and Apparatus of Information Extraction from Combatants Using Exotic Tropical Fruit", before someone ratifies the counterpoint as an addendum to the Geneva Convention.

Enjoy the ride!

[1] http://en.wikipedia.org/wiki/Durian
[2] http://flickr.com/photos/ariyahidayat/3293814359/
[3] http://flickr.com/photos/ariyahidayat/3294638128/
[4] Surprisingly, "durian" and "revenge" share a general theme: they are best served cold


These candies of course can not reach the real taste of the fruit itself, especially when made into fresh drink like the picture here:

durian with ice

Saturday, December 20, 2008

fragrances

I decided to ask her. "Sorry if I'm rude, but isn't your perfume Escada Moon Sparkle For Men?"

She smiled. "Yes, and it is wonderful. " She continued smiling. "I got it from a customer, I work in a bank."

"Ah, I see."

"Don't you also use Bruno Banani Pure Woman?", her turn now to ask me.

"Oh, yes I do. So I feel that my other half is always there."

One second passed. Then we shared a laugh.

Tuesday, October 14, 2008

Pimp My Widgets

You think you are good? Why don't you try to win a Segway or some N810. Head straight to:

http://trolltech.com/pimpmywidgets!

Update: our pimp announced the contest right after dinner here at DevDays 2008:

Saturday, September 13, 2008

curiosity kills the cat

The unverified reason Irn-Bru is not available in Germany is because the ingredients label and so on are only English, not in German. Usually this is remedied by sticking another label in whatever language it should be. No idea why it doesn't work out.

Apparently, this famous Scottish soda is available in Norway.

Sunday, August 17, 2008

Yes, honey (or the beauty of double meaning)

A sunny morning in a small coffee shop.

"Hi!"
"Hi!"
"I'd like one chai latte, please".
"OK."

The girl went on to prepare the order. After a while,

"Do you want honey or sugar?"
"Yes."
"Yes what?"
"Yes, honey."

One second passed. Then we shared a laugh.

(Just like in a [HB]ollywood movie)

Sunday, May 11, 2008

the ninja made a movement

So you think Ken Lee is the best Internet meme? Hold on, you haven't seen Benny Lava yet!

Thursday, March 13, 2008

Guitar Hero for C64

Well, ray tracing into a sparse voxel octree might be inspiring, but for the time being, Toni's Shredz64, which is essentially the Commodore 64 version of Guitar Hero, is tantalizing!

Tuesday, March 11, 2008

who understands this boring blog

blog readability test

At the time I check Planet KDE, it is for high school while Planet GNOME requires junior high school level. Strangely, my website is only for genius (no wonder I myself could not understand it).

Someone knows the algorithm behind that detector?

Monday, March 03, 2008

chasing of the day

We don't believe improving your OS should be like chasing Tigers or Leopards.

-- gOS, on its free updates for life feature

Thursday, February 14, 2008