Archive for the ‘Computer’ Category

n program yang paling sering kupakai

Friday, April 18th, 2008 by Agro Rachmatullah

Beberapa waktu yang lalu di Planet Ubuntu tersebar mim “Inilah 10 program yang paling sering kupakai”. Contohnya ini. Caranya sangat mudah, yaitu mengetikkan suatu perintah konsol kompleks tertentu.

Ikut-ikutan ah…

C:\Documents and Settings\Agro>history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}’ | sort -rn | head
‘history’ is not recognized as an internal or external command,
operable program or batch file.

C:\Documents and Settings\Agro>

Aduh! Lupa aku!

Pemblokiran situs oleh pemerintah Indonesia

Thursday, April 10th, 2008 by Agro Rachmatullah

Buka Pidgin, tiba-tiba aja dapet pesan offline dari teman saya Ferdi. Dikasih link untuk berpartisipasi dalam petisi yang menolak pemblokiran situs-situs tertentu, termasuk YouTube, oleh pemerintah Republik Indonesia.

“Apa pula ini?”, pikirku…

Kausalitas mengharuskan kejadian ini memiliki sebab tertentu. Aku menduga ini pasti gara-gara film yang namanya Fitna itu. Judul itu pertama kali kudengar dari adikku yang di Jakarta beberapa waktu lalu. Udah nonton di YouTube katanya. Selanjutnya nggak sengaja kudengar di radio saat berada di dalam mobil. Berikutnya, ngeliat judul itu di headline sebuah tabloid, entah apa namanya, yang tergeletak di rumah. Terakhir, adikku yang di ITB juga bilang udah nonton, dikasih temennya lewat fasilitas transfer berkas Y!M.

Kutanya temenku yang lagi online, ternyata bener Fitnalah penyebabnya :).

Ah, sepertinya Fitna memang sedang menjadi wadai. Aku sendiri… waktu luangku tidak terlalu banyak untuk menyempatkan mencari atau menonton film tersebut.

Banyak hal yang bisa dibahas tentang topik ini, cuma aku hanya ingin menyampaikan pendapatku tentang pemblokirannya: Sangat tidak setuju! Penyensoran internet tidak sepantasnya dilakukan pemerintah. Memblokir halaman tertentu saja aku tidak setuju, lebih bodoh lagi kalau yang diblokir adalah satu situs penuh! Apa yang pantas dibuka, dan apa yang tidak ingin dilihat, biarkan diserahkan kepada individu masing-masing.

Jangan sampai pemerintahan kita jadi seperti China, yang bahkan membuat Google terpaksa mensensor hasil pencariannya agar sesuai dengan sudut pandang pemerintah.

Multilanguage support in Windows programs

Sunday, April 6th, 2008 by Agro Rachmatullah

The more our information society progresses, the more we realize the value of having a program available in different languages. The effort towards internationalization and localization is an amusing trend for me, because at childhood I once thought that the existence of multiple languages is a bother, and envisioned that at some age the human civilization will settle on one ultimate lingua-gaea.

I couldn’t be more wrong. Now I realize that each language is beautiful and unique in its own right and every effort must be spent to conserve them, or at least document them sufficiently before its last speaker dies.

Anyway, multilingual programs… People might need a certain language simply because she couldn’t understand any other languages. In this case, the availability of a program in a certain language is crucial to reduce the technological gap. People might also want a certain language simply because she enjoys that particular language the most. Another use is for studying foreign languages, like me who tries to set every possible program to Japanese in order to immerse myself in the language.

With that in mind, we will investigate how Windows programs currently handle the user’s desire to choose her preferred language. (Some of the discussion might apply to other OSes such as GNU/Linux and OS X)

One installer to rule them all

The most convenient case is when a program installer includes all available translations. Examples are Inkscape, Pidgin, Battle for Wesnoth, Paint.NET, and iTunes. For example, when I tried to download the newest Inkscape, there’s only one installer for Windows: Inkscape-0.46.win32.exe. It has English, Japanese, and a myriad of other languages included. Even Indonesian!

The next question is, what language will such programs use by default? Some programs, most notably GTK programs, are smart enough to detect the operating system’s language settings. Where is it set?

In Windows XP, the user can set what language she prefers from “Control Panel” → “Regional and Language Options” → “Advanced” → “Language for non-Unicode programs”, like so:

Note that this setting is actually to enable non-Unicode (e.g., ancient) programs to display its text correctly instead of mojibake. However modern Unicode-aware programs use the value we set here to decide what language it should present to the user.

Mine is set to Japanese, so Inkscape appears like this:

Japanese Inkscape

Other programs ask for what language the user would like to use, perhaps at install time or when the program is run for the first time. An example is Paint.NET:

Paint.NET Setup

The rest just set the default language to English or whatever else the developer prefers. If the user desires, she can change the language through some means because the language data are already installed anyway. An example is an old version of OpenTTD which defaults to English:

Open TTD defaults to English

If the default language doesn’t suit you, how do you change it? Some programs offer the convenience of setting it within the program itself. An example is iTunes:

Language selection in iTunes

And The Battle for Wesnoth:

Language selection in The Battle for Wesnoth

GTK programs does not visibly offer any such options, because it assumes that you will in most cases want the language you set on the operating system. However, it atually checks for the availability of the LANG environment variable (probably ISO 639-1 codes). You can use it to quickly try out a language. For example, go to the command prompt and type:

set LANG=th

And from the same command prompt, run the program, say inkscape.exe:

Inkscape in Thai

Ah, I feel nostalgic :).

Exceptionally Easy to Extend (E3)

Some programs come with only one language, and to choose another we must download the required language files. Though quite inconvenient, it is not that bad because language files shouldn’t be that large. An example is µTorrent:

Language selection in uTorrent. Oops, you must download the language pack first...

Predestination, believe it or not

Other programs offer seperate installer for each language. If you go to their web sites, you will find one installer for the English version, another for the French version, and so on. The concept is very simple: what you download is what you get. Needless to say, it’s a pain the arse for the curious or the language learners out there. Two glaring examples are OpenOffice.org and Mozilla Firefox. Here’s a Japanese version of Firefox that I recently installed:

Firefox in Japanese

It’s of course better than no multilingual support at all, but still it’s a waste of bandwidth to download another version and troublesome to actually install it (uninstall the other-language version first).

My take

A modern program should at all cost include all available translations in its installer. It should then detect and display the user’s preferred language by default.

About language-changing facility, I can understand GTK’s decision to hide it from the program’s preferences. They are probably following Gnome’s guideline that every GTK app should look the same (think about themes), and if the user wants to change anything, she can apply a system-wide change. To take things into perspective, it’s bizzare to imagine that every GTK app has its own theme settings, right? At least you can set it per program using an environment variable.

For µTorrent that separates its language pack, I think it’s an acceptable special case because µTorrent aims to be a small no-frills downloadable program. Heck, even the language pack is larger than the core English program itself! However, I think for most other programs the size of the language files shouldn’t matter that much.

So big cheers for GTK apps and other programs that include all translations by default. A big, big boo for OpenOffice.org, Firefox, and the gangs that require a different download for each language.

Japanese kanji handwriting recognition in Windows XP’s IME

Saturday, March 31st, 2007 by Agro Rachmatullah

Did you know that in Windows XP’s IME we can input a kanji by drawing it? (Does Ubuntu, and Linux in general, have it?) I will outlay the steps here.

Obviously you need to have the IME installed. See this Wikibook page. For illustration, we’ll use Notepad. So fire up Notepad, switch the IME on, and input any character on the keyboard. I use ‘a’, which the IME will convert to hiragana ‘あ’ on the fly:

あ on Notepad

The magic key is ‘F5′, which will launch the IME pad. Press it and you’ll get this:

IME pad welcome dialog

Press “OK” and you’ll get this:

IME pad

On the screen pictured above, you can find a kanji by its radical (部首, bushu). However that’s not what we’re interested in right now. To input by drawing, click the top-leftmost button (circled red). You’ll get this:

IME handwriting pad

Here’s the explanation for the UI elements:

  1. This is the drawing area. You draw the strokes here by holding the left mouse button and dragging.
  2. Matching shapes (and not-so-matching shapes) you draw in (1) will be listed here. If you’ve found the kanji you want, just click it.
  3. 戻す (modosu) means “to return”. Click this to undo the last stroke.
  4. 消去 (shoukyo) means “erasing”. Click this to clear the drawing area.

One thing to note is that stroke order matters! Try to draw a perfectly matching shape but with a random stroke order, and chances are the program will not give the kanji you want.

The power of this tool cannot be underestimated. For one thing, it allows you to quickly find a printed character you see. Suppose you went to a mini market and see a notice written in Japanese (for example, in Circle K Terban, Yogyakarta). If there is an unknown kanji there, you won’t have any information other than its shape. Finding the kanji through the method explained above will be very easy. After you have the digital form of the character, you can find its readings, compounds, and meanings in electronic dictionaries.

Second, you can use it to input rare kanji easily. Suppose for some insane reason you want to write “koe” (sound) using the rare kanji 聲 instead of the normal 声 (see for example “Endless Rain” by X Japan). You know its sound (no pun intended), but you can’t find it by typing in the IME because that kanji is archaic (even EDICT don’t list it). However, by drawing it you can find the kanji.

The third is for writing names. When IME don’t recognize a name, you can input it by drawing character per character.

No need to read this…

Wednesday, February 28th, 2007 by Agro Rachmatullah

I got a temporary modem to replace the fried one, but the situation is still unideal because the internet has been on and off. Worse, the connection was completely blacked out for the last 2 days.

So, I set out to go to a net cafe to blog stuffs. Of course I’ve prepared the stuffs on my flash disk so I could just copy-paste here.

But alas! After some seconds of browsing the flash disk, the contents just dissapeared from Windows Explorer. I tried plugging to another USB port and guess what?!? The contents are corrupted!!! (many files missing, file names using weird characters, etc…)

That why I hate technology with a passion… They simply don’t work! (oh, you DON’T want me to blog about how my mnemosyne data was corrupted by a UPS failure and I lose 3 days of work (thank God I have a backup)!!! Oh wait, I just blogged it…) Sometimes I think that life would be perfect if I was born a couple of centuries earlier, living as a farmer and not having to deal with the thing called computer…

Nuff ranting and whining. I’ll read some news and then go home…