Archive for the ‘Hardware & Software’ Category

KKN etc

Tuesday, July 11th, 2006 by Agro Rachmatullah

Real and integer - 7:12 PM 7/9/2006

In C, there is the data type “int” and “float”. When I met Pascal in university, I realized that the same data types are named “integer” and “real”, respectively. I hated those names because “integer” couldn’t actually represent all integers and “real” couldn’t actually cover all real numbers.

But that’s all just nitpicking, because then I couldn’t use the name Complex to model complex numbers, Point to model points in a plane, etc.

PHP 5 number parsing inconsistency - 7:08 PM 7/9/2006

Try entering a very large number in decimal (for example a hell lot of 9s). The number will be float(INF) (infinity).

However if you enter a very large number in hex (for example 0x followed by a hell lot of 9s) the number will be int(2147483647) which is the largest possible integer in PHP.

PHP 5 integer limit quirk - 6:55 PM 7/9/2006

In my machine’s PHP 5, the statement

<?php var_dump(0x7fffffff) ?>

outputs

int(2147483647)

while the statement

<?php var_dump(0x80000000) ?>

outputs

float(2147483648)

This hints that integers in PHP is 32 bit so the lower limit should be -0×80000000 or -2147483648. The silly thing is that

<?php var_dump(-0x7fffffff - 1) ?>

outputs

int(-2147483648)

as expected. However

<?php var_dump(-0x80000000) ?>

outputs

float(-2147483648)

which is pretty funny, since the previous output shows that technically the number fits into an integer. This is probably an intended feature to make the parsing quicker.

KKN - 8:43 PM 7/8/2006

So, what’s KKN like?

In regular KKN, we are assigned a random team and place. I’m taking thematic KKN, so the team and place is designed by the participants.

My KKN’s theme is something along the lines of “Optimalisasi Penggunaan TI” and the place is at Keparakan. I’m on the developer team (the others are “maintenance” and “socialization & migration”), and the main program is to make a disaster management system.

My workplace is at BID (Badan Informasi Daerah, Regional Information Office). Typically, I bike with Dimaz and Toni to get there and to get home. We leave around 8:30, arrive around 9:00, and get back home around 15:00. A nice activity to balance my lack of physical exercise.

There are currently 6 computers on the developer’s room. Because there are 6 developers, most of the time the leftovers aren’t doing something productive. There’s a plan to relocate 5 of the developers to another office (LTI) which has 5 spare computers.

We’re going to build the system using CakePHP, a web development framework using (guess..) PHP.

2 days using a 2.1 speaker etc

Saturday, July 8th, 2006 by Agro Rachmatullah

2 days using a 2.1 speaker - 5:28 PM 7/7/2006

I usually hear sounds from my sound card using a headphone. I have a speaker, but the sound quality is awful. It is cracky, for a lack of better word.

For some reason, yesterday I decided to buy a speaker. I visited Resentika Computer after KKN to buy it. There were three alternatives: a cheapo 20k speaker which seems to be the same as my free (as in beer) speaker, a 35k Mentari speaker which seems to be better, and a 53k Sturdy speaker which has a left, right, and subwoofer speaker. After comparing the sound quality and looking at my wallet, I decided to buy the 2.1 Sturdy speaker.

Sturdy is its brand, and a “MADE IN CHINA” was printed of the box. Must be some randomly named company mass producing cheap electronics. Well, at least it is a lot better than my current speaker. Big names like Logitech and Altec Lansing is out of my reach.

Installing it is simple. First you plug the power which stems from the subwoofer. Then you connect the subwoofer to the sound card using the provided cable. The last one is to plug the cable from the left/right speakers to the subwoofer. An extra bonus is that the subwoofer has another hole for a headphone. When a headphone (or any other device) is plugged there, the sound output is completely redirected to the external device.

When the time came to position the speakers, an immediate problem is to identify the left and right speakers. As I thought, there was no indication on the speakers, an obvious usability minus. So I played an MP3 and opened Windows volume control. Windows volume control had a left/right balance slider. I tried sliding it to the extreme left and then to the extreme right.

A problem was immediately obvious. When the slider was on the extreme left, no sound came out. When the slider was on the extreme right, both speakers still emitted sound. There was no problem whatsoever with my headphone and even my free speaker in this matter.

I also loaded Moyo Go Studio. In MGS, a stone placed on the right side will really emit sound from the right. However with the Sturdy speaker, I couldn’t get the illusion.

It turned out that the culprit was the subwoofer unit. If I plugged the left/right speakers directly to the sound card, they would work correctly. If I plugged my headphone and free speaker to the external hole on the subwoofer, left/right balance didn’t work. It seemed that the subwoofer transformed a stereo audio into a mono one.

So the next day, also after KKN, I went to Resentika again. I described the steps to reproduce the bug (feature?) and the bug faithfully appeared. The technician proceeded to get 3 other units from the back and as I had expected, they all didn’t work. It was a feature after all.

To give the idea to the technician the correct behavior, I asked him to take another brand. He took the cheapest speaker and it worked like wonder.

When I asked for a return, the technician pointed me to a lady. I told him about the problem and the lady discussed this with other staffs.

The lady then told me that I need to pay a fee because I didn’t return the item on the same day that I bought it. I told her it was impossible since I bought the item just before the store was closing. She then told me that I should’ve returned the item this morning because then she could discuss it with upper management guys. I told her that I couldn’t do it because I had KKN. When she showed me that there is a “GOODS CANNOT BE RETURNED AFTER BOUGHT” on the receipt, I argued that my case is different because I bought a broken product. Finally, I told her that I was a customer there (I bought my printer and cartridges there) and if she still insists on making me pay a fee, I would stop going there and tell my friends that Resentika’s customer service is bad.

Customer power worked well. After more discussions with other staffs, she handed me a return form and finally the money (if there’s a return form, what’s witht the “GOODS CANNOT BE RETURNED AFTER BOUGHT” notice?).

So there it goes… I am now back with my headphone, free speaker, and 53k. Don’t buy a Sturdy speaker, they can’t do stereo.

God bless Notepad++ - 5:25 PM 7/7/2006

If I set the language settings of Notepad++ to HTML then activate the “Plugins” - “TextFX Settings” - “+Autoclose XHTML/XML <Tag>”, Notepad will do autoclosing of tags like <p> and <h>! This feature is very handy because this blog is written in HTML.

Image size limitation on Wordpress - 11:11 PM 7/4/2006

Using the current Wordpress theme, if I post an image with a horizontal size larger than 450, the image will be scaled so that the horizontal size is exactly 450. This produces horrible-looking images because browsers don’t use any kind of filtering to resize the image. I’m really puzzled, is it really that performance demanding to resize images using a decent filtering? I’m going to visit Firefox’s bugzilla.

PS: Bugzilla sucks. I like Malone a whole lot more (Malone is the bug tracker of Launchpad, used for Ubuntu development).

So, for the meantime, I need to always remind myself to limit the horizontal size of the images I post on this blog.

PS2: MediaWiki has a very cool server-side image resising. Examples:

Analyze the URLs of the above images to understand what I mean.

Moyo Go Studio translation done etc

Tuesday, July 4th, 2006 by Agro Rachmatullah

BOAB naming convention - 4:13 PM 7/3/2006

Since the “BOAB”, “Another BOAB”, “Yet another BOAB” naming scheme sucks, I decided to change the naming scheme. The naming scheme will be “[The most insteresting BOAB] etc”, for example “I won a 10 million lottery etc”

Moyo Go Studio translation done - 3:30 PM 7/3/2006

I think the translation (784 strings) has passed sufficient quality control to be released to the wild. Some translation and naming issues that were brought to light:

  • How should menu items be capitalized? “Add Games”, “Add games”, “add games”, or, God forbid, “ADD GAMES”? I chose to capitalize the start of every word, except for some particles like “and”. The English strings aren’t consistent in this matter (for example “Add games” vs. “Save Board Capture As”).
  • Which brings us to the next question: What words are immune to capitalization? “and”, “or”, “in”, “on”… What else? I chose to not capitalize “not” (”tidak”). Is it appropriate? There must be a guideline somewhere…
  • If a menu item contains an explanation in parentheses, how should it be capitalized? An example is “Result (fast, inaccurate)”. I chose to capitalize the explanation also. Is it overcapitalizing?
  • What is the criteria to give ellipsis (…) to a menu item? I read on a usability article somewhere that ellipsis should be used on a menu item that prompts the user for more information before being able to execute the intended action. For example, “Save As…” should use ellipsis because the program will prompt the user for the file name before being able to save. “About” shouldn’t use ellipsis because it directly does the intended action which is displaying the about dialog. I follow this guideline. Some English strings violate this guideline, for example “Search” and “About…”. (Almost every Windows program use ellipsis for the “About” menu item)
  • A convention I don’t like is that the English strings append the ellipsis in the msgid. I prefer that the ellipsis be added at run time when building the UI. What problem does the current practise pose? Here’s one example: There is the msgid “Search”, which is used in the “Database” - “Search” menu. It really should be “Search…”, so I translated it as “Cari…”. It turns out that the msgid “Search” is used on places other than the menu (for example on the button on the dialog of “Database” - “Search”) and in those other places the ellipsis isn’t appropriate.
  • How should one capitalize tooltips? “Back up and take other variation” or “Back Up and Take Other Variation”? I prefer to capitalize only the first letter of the first word.
  • Should tooltips end with a dot? “Back up and take other variation” or “Back up and take other variation.”? Things get messy when a tooltip contain 2 sentences. I prefer to omit the dot for single-sentenced tooltips while use dots for multiple-sentenced tooltips. There are inconsistencies in the English Moyo Go Studio (For example “Move trough current variation.” vs. “Board perspective”).
  • The translation of a single English word can be multiple words, in which the problem of capitalization arises again. For example, should “Handicap” be translated as “Batu bantu” or “Batu Bantu”? The translator must check where the string will be used to determine the correct capitalization (by running the program and hunting for the string). A serious problem occurs when the string is used in 2 places with different capitalization requirements.

With those problems, it is impossible to create an Indonesian translation that consistently adheres to a good UI naming guideline. Therefore, some compromises must be made. I chose to make the menu perfect even if that means inconsistencies on other places.

I’ll give an example of the inconsistency that arises. Menu capitalization dictates that it is “Langkah Baik”, not “Langkah baik”. Sadly, a tooltip uses the exact same string. Because tooltips are supposed to use a different capitalization rule, the tooltip violates the rule.

My idea is that words in the msgstr should be lowercased except for proper names (which starts with an uppercase), and then the program will call an appropriate method to build the final string. For example:

string menuString = MakeMenuString(GetString(msgid));
string tooltipString = MakeTooltipString(GetString(msgid));

An alternative is to have multiple msgids for the same word which is used in different places. For example:

msgid "menu-handicap"
msgstr "Handicap"

msgid "tooltip-handicap"
msgstr "Handicap"

I envy languages without uppercase/lowercase mess, like Arabic, Japanese (カタカナはuppercaseじゃない), Korean, and Chinese.

I mentioned many inconsistencies of Moyo Go Studio’s English strings. However, I believe that string consistency is generally an underworked area in many other software projects. For example, Notepad++, the software I use to write this blog entry, also has many inconsistencies in its strings.

Other than string consistency (or the lack of), another area where Moyo Go Studio sucks is in its window layouting system. Widgets in its dialogs have fixed coordinate and size, so problems like this arise:

With the availability of toolkits like GTK, hardcoding coordinates and sizes is oh so outdated. It is as obsolete as hardcoding the time cycle of old games to clock frequecies (try playing Sonic 3 on a modern computer and you’ll see what I mean).

Moyo Go Studio sucks on at least one other thing: It can’t change language on run time (need to restart the program). Even my (+Wijaya and Karnan) LifeSimulator can do it :)! Hmm, as far as I remember, even SmartGo can do it :) (tried the time-limited trial version).

Wait, I found another area where MGS sucks: It doesn’t run on Linux (Frank stated clearly that he’s running a Windows software shop so no chance of this happening soon). It would be cool if MGS has a GUI-less server version mode or a library of its core with usage documentation (easier to port), so other people could write a Linux client.

How good is Moyo Go Studio as a Go Suite? I’ll probably write a full review some time in the future after I’ve become more familiar with the beast and if I have free time. My first impression is that it is a superb Go study tool lacking some UI polish. However don’t let this blog entry discourage you to buy MGS because the problems mentioned probably won’t bother your daily use and because it will certainly be fixed in the future (after the kickass tactical module project?). Moyo Go Studio is definitely worth your $$ (or time, if you plan to translate it)!

UPDATE: I told Frank about this blog entry. Some days later, on July 7, Frank released an update that adds an extra space to the problematic widgets. That workaround made my Indonesian translation look fine.

TK II done! - 12:27 PM 7/3/2006

At last I finished the TK II! I’ve given the report and CD to an Ilkom office staff which will hopefully be passed to Pak Medi.

My TK II was about making SharpJiten, a kanji dictionary written in C# which uses GTK# for the GUI and KANJIDIC for the dictionary. Here’s a screenshot:

Some last remarks:

  • I can’t get GTK# for .NET working. Therefore I opted to bundle Mono in the CD.
  • IconView is a terribly slow widget. Give it 200 items to draw and it will choke. A workaround is to divide the items into separate pages but I didn’t implement it.

A page, which contains SharpJiten’s description, installation method, source code, and TK II report can be found at http://agro.web.ugm.ac.id/sharpjiten.

Since the TK II is done, now I need to finish my other duty: translating Moyo Go Studio.

PS: One flaw in the hardcopy of the report is that page 12 and 13 is flipped!!!

Early month shopping - 9:12 PM 7/2/2006

Phenomenon: There are many people shopping early at the month (1st or 2nd day). Queues are extremely long.

Hypothesis: People just got their salary.

Explorer/Windows file name limitations - 10:17 PM 7/1/2006

In Windows Explorer, we can’t rename a file to “prn”, “con”, “com0″ - “com9″, “lpt0″ - “lpt9″, and only God knows what else. That’s because in the Windows world (which originated from the DOS world”, those names are special names used to address some devices. For example, “prn” refers to the printer (Which printer? Probably the primary one.) and “con” refers to the console. Turn on your printer (if you have any) and try this command:

copy con prn

You will effectively have a typewriter.

PS: How did I know it? Remembered it from my old DOS times… In those days, tricks like “copy con config.sys” is commonly cited.

That system itself is inferior to Linux. In Linux, devices are files in the /dev directory so you won’t have artificial file name limitations.

But if that’s the limitation of the lower system, I can accept that Explorer don’t allow it. However, what’s confusing is that Explorer won’t give any explanation for this behavior. Instead, when renaming files to one of those names, it will set the file to the previous name.

Next case. NTFS and FAT32 support file names that start with a dot (for example “.bashrc”). As a proof, try:

echo > .test

And a file with the name “.test” will appear.

However, try making a file in Explorer that starts with a dot and Explorer will say “You must type a file name”. Silly.

Another one. NTFS and FAT32 also support file names that start with a space (for example ” foo”), as long as it is followed by a non-space character. As a proof, try:

echo > " foo"

However, when renaming files using Explorer, it will remove the leading space.

I don’t know whether this is the limitation of NTFS and FAT32, but I can’t find a way to make file names that ends with a dot (like “crhsab.”) and file names that ends with a space (like “foo “).

I’ll test all those in ext3. As an evil hack, I’ll try creating the illegal files on a FAT32 partition under Linux >:).

Another BOAB

Saturday, July 1st, 2006 by Agro Rachmatullah

Dying Windows - 10:12 PM 6/30/2006

My Windows installation is starting to choke badly. Some of the annoying things:

  • Disk management using GUI is awfully slow. This is using any file manager.
  • Closed programs remain on the process list (in other words, they’re still running.
  • Programs randomly eat 99% CPU cycle. When the program is terminated forcefully, other program foolishly assumed the CPU killing job.

I’ll probably reinstall after finishing the TK2 report.

Morning breeze - 6:51 AM 6/30/2006

The cold morning chills me to the bones. Is that why I fear it so much? I have not felt it for ages so that the pain is almost like an exciting thrill.

The SRT subtitle format - 9:38 PM 6/27/2006

Making a subtitle using the SRT format is very easy. The example below is self-explanatory:

1
00:00:02.849 --> 00:00:05.348
JUMP JUMP take offしようぜ!
JUMP JUMP take off shiyouze!

2
00:00:05.400 --> 00:00:08.321
天使の羽を持っている
tenshi no hane wo motteiru

3
00:00:08.309 --> 00:00:11.600
見上げれば 未来
miagereba mirai

4
00:00:11.750 --> 00:00:14.783
Boys & Girls! Be Ambitious!

Some things to note:

  • The file should be saved using the srt extension. Saving in UTF-8 works.
  • The time format MUST be HH:MM:SS.SSS. For example 00:00:1.2 won’t work (there must be 5 digits for the “seconds” part.

A fine media player that supports the SRT subtitle format is Media Player Classic. Just activate the “Load Subtitle…” menu item from the “File” menu.

IME not restricted to natural languages - 9:07 PM 6/27/2006

When I activate the Japanese IME, I can pop 私 by typing “watashi”. This works anywhere: From typing on a text editor to renaming files on Explorer. I often imagine how easy computing life would be when the use of IME is not restricted to languages.

Here are some examples:

  • Typing “date” would yield the current date, for example “2006-06-27″
  • Typing “time” would yield the current time, for example “21:12″
  • Typing an equation would yield the result, for example “=2*3″ would yield “6″

If using an IME layer is overkill, a system wide shortcut key should be available to pop up stuffs that don’t require user input (like date and time)

BOABfest

Tuesday, June 27th, 2006 by Agro Rachmatullah

Unconscious agreement - 9:14 PM 6/25/2006

Sometimes our brain assumes that something wrong is correct, and when no inconsistencies are found, that assumption will hold for a very very long time.

The database that SharpJiten use is named KANJIDIC (kanji dictionary). I don’t know how it began, but the class to store the data was incorrectly named EdictEntry (EDICT is a Japanese to English dictionary, quite different from a kanji dictionary). Since I assumed that EdictEntry is a correct name, the string edict was abound in the source code (for example the interface IEdictEntryFilter, and obviously many variable declarations). In fact, the word kanjidic only appeared when loading the KANJIDIC file.

The inconsistency was found when I was going to write about the nonexistent KanjidicEntry class for the report. Luckily Visual C# Express’ refactoring feature made changing names very easy. Just change the name in the definition (for example EdictEntry to KanjidicEntry), then click the refactoring icon that pops up, then choose “rename EdictEntry to KanjidicEntry”. The IDE will smartly rename all relevant strings.

Messy Go play - 8:38 PM 6/25/2006

My performance on KGS is very bad currently. After jumping to 10k?, 2 weeks of losing streak made me crash to 15k?. Can’t do a lot about it now, because I first need to finish my TK2 report.

Sizeprober - 10:27 PM 6/24/2006

My hard disk space is critical, so it’s time to delete junks. In doing this, I often need to know which file/folder is the largest in a folder. To solve this problem, I made a program called sizeprober. The syntax is:

sizeprober [folder]

Sizeprober will then display all files and folders in [folder] sorted by size. The size of a folder without subfolders is defined as the sum of the size of the files in it. The size of a folder with subfolders is defined as the sum of the size of the files in it plus the sum of the size of the folders in it.

The output still sucks but it’s functional. Here’s the first 4 lines of output of “sizeprober g:”:

ngerampok ||| Folder ||| 2756735507
sifat shalat nabi ||| Folder ||| 672308471
cd islam ||| Folder ||| 671341814
FMA the Movie ||| Folder ||| 647416444

The meaning of temp - 10:02 PM 6/24/2006

Note to self: The temp folder is for putting files that can be deleted any time.

Telephone cable - Damn I forgot to add the date and time

My Bu Kos’ phone pad wasn’t working, so he asked me to install another telephone (which wasn’t new). Just because I’m a CS student, she thought that I could do telephone stuffs.

The telephone cable was wired permanently to the broken phone so there is no plug and play method. She then asked me to buy a phone jack (and later, jackholes) so that I can plug the cable to the other phone

I bought 1 cable (with jacks on its ends) and 2 jackholes (don’t have a better term). The plan was to make this kind of connection:

-------[ <-----------> ]T

< and > are the jacks, [ and ] are jackholes, —- is a cable, and T is a telephone.

Of course the other telephone already had a jackhole. The other jackhole I bought was for the broken phone which didn’t have it. In other words, it is for changing

----T

into

]----T

The seller kindly told me that old cables internally have 2 wires while the jackholes I bought supported 4 wires, and that I would need to use only 2 of the available connections.

I connected the black cable to the red connection on the jackhole, and the white cable to the green connection on the jackhole. However the other phone’s sound turned out to not work. Thus the old phone was used, but with the new connection model.

B.O.A.B.

Saturday, June 24th, 2006 by Agro Rachmatullah

Transcend sucks? - 9:21 PM 6/23/2006

To transfer a large amount of files from SIC, I borrowed my friend's 1 GB flash disk. The brand is Transcend. Before going to SIC, I transfered all my friend's file to my HD so that I have a clear disk to use. However two files cannot be copied (the error message? I forget).

Running scandisk makes the file copyable but as expected, the file was corrupted (it was a compressed file). I then reformatted the drive. I didn't choose the quick format option, but the process was impossibly quick. I suspected that no bad sector checking was done. Then I tried to scandisk the drive with bad sector checking set, but the process also went lightning fast. Oh well… (bad sector checking not supported on USB drive? If so, why?)

Unsurprisingly, 1 file I copied from SIC couldn't be read (the error message was "device not ready"). The file can be deleted, though. The disk must have some bad sectors.

To locate the bad sectors, I made a program to fill the drive with 1 MB files. 976 files were written. I then moved the files to my hard disk to check whether the files were readable. However, to my dismay, all the files were movable!!! What is wrong then?!?

To make the conditions as similar as possible, I created the files in a folder named transfer (the previously failed file was also on folder transfer). I even unplugged the flash disk. Still, moving the files to the hard disk worked like a charm. Sigh…

Anyway, the name of the program is diskfiller and the syntax is:

diskfiller [folder]

Wrapping up the TK2 - 3:57 PM 6/22/2006

Now that the finals are cooling down (2 remaining), I can start working on my TK2 report. I'm now doing the easy part, translating the EDICT format documentation. The hard part will be documenting the program architecture and/or algorithm because I have forgotten most of it by now. Luckily some parts are quite heavily commented.

The newest version of 2xExplorer… - 7:45 PM 6/20/2006

… is the same as the version I have, which is 1.4.1.12. Actually the development of 2xExplorer have ceased because the author is now developing its successor, explorer². The bad is that explorer² can only be freely used for 21 days :(.

Yes, another BOAB

Tuesday, June 20th, 2006 by Agro Rachmatullah

Self-service mail - 2:37 PM 6/20/2006

Usually packets are delivered right in front of our doors. However, yesterday a postman delivered a notice to take a package from Norge (probably Moyo Go Studio). I must go to Pleburan and pay Rp. 7000.

The official letter mentioned that it is for someone named "Agro Rachmatullah" which resides on "Sekip Flat B3", with the warning "Bila tidak sesuai panggilan harap membawa surat ket. domisili" (roughly, "if anything doesn't match please bring an official letter explaining so"). I figured that everything was fine (my name and the address are both correct).

Today I went to the post office with my motor-riding friend. To my dismay, the officer denied me because the address listed on my identity card doesn't match the address where I'm living now. He ordered me to get the signature and a copy of the identity card of someone permanently living on "Sekip Flat B3". So that's what the warning meant!

It shows how much an unclear wording can bring disaster. They should change it to something like "If the address on your identity card doesn't match the address written here, please bring a copy of the house owner's identity card and ask the house owner to write his/her signature on this paper". Wordy, but unambiguous.

Videofeedback - 2:34 PM 6/20/2006

In a holiday some time ago, I made a videofeedback with my brother Cadika. The images are unpublished and still resides on my hard drive. Because it takes so much space (around 300 MB), I plan to select some of the best, delete the others, and then put it online.

Explorer alternative - 12:07 AM 6/20/2006

Sometimes Windows Explorer can be as slow as hell. For example, when opening drive E, the folders inside will be listed instantly but the program stalls for some seconds because it is reading an "only-God-knows" information from the hard disk! Responsivity should be a file explorer's first priority! Sometimes I wonder, it's already year 2006 but a very basic program such as a file explorer can't even work properly!

A nice alternative is 2xExplorer. However the version I use is dated 2002. Need to find a newer version.

Notepad++ - 11:19 PM 6/19/2006

I'm now editing this BOAB using Notepad++. At last, a Windows text editor that supports both tabs and Unicode.

However, I'm having trouble launching an external application while giving the external application the file name without the extension. A use case:

Suppose I'm editing test.tex. To compile it into pdf, I need to run these series of commands:

latex test.tex
dvips test.dvi
ps2pdf test.ps

For that purpose I could create a batch file. The only problem is that I need to pass to the batch file the name of the file I'm editing without the extension (in this case "test").

Need to ask the forum. If that problem is solved, I could ditch ConTEXT for good. A non-Unicode compatible program (in other words, a program that shouts "I only use latin alphabets so I don't care about people who use other characters like Arabic and Kanji") by all costs should be boycotted.

PS: To insert a date into Notepad++, the shortcut key is Ctrl+F5.

Update:  I've posted the question here: http://sourceforge.net/forum/forum.php?thread_id=1521603&forum_id=331754
Word dump - 10:59 AM 6/19/2006

See the different date format above? That is because I'm using good old Notepad. Eventhough this text editor has no advanced features, at least it supports Unicode which is needed in this BOAB.

This word dump is from もうひとつの夜明け by 高橋瞳.

Kanji Kana English
夜明け よあけ dawn
キャンディ candy
まっしろ pure white
すきとおる to be(come) transparent
あまい sweet
まぶしい dazzling
うつくしい beautiful
どこか somewhere
とける to dissolve
なつかしい missed
何時か いつか sometime
さがす to search (for something desired, needed)
見つかる みつかる to be found
つぶる to close the eyes
かくす to hide
さけび shout
後ろ うしろ back
ふりむける to turn
ほか other (esp. places and things)
うまく well
行き場 ゆきば destination
ふかい deep
しずむ to sink
くちびる lips
かみしめる to digest
しか only
すべ means
見つける みつける to come across
ながれる to be washed away
おそれる to fear
夢中 むちゅう daze
にぎりしめる to grasp tightly
ひら palm
ひらく to open (e.g., a bank-account, festival, etc.)
教える おしえる to inform
しまう to do something completely
答える こたえる to answer
ため in order to
もう直ぐ もうすぐ very soon

This word dump brings my word count to 1178 (unmerged).

Will try Notepad++ - 6/19/2006 10:55:27 AM

No Unicode support is a known issue on ConTEXT and this bug will probably be fixed on 1.0. However there is no indication that 1.0 will be out soon so I will try Notepad++ which is also a free software.

Jacoto is DEAD - 6/17/2006 9:53:35 PM

To my dismay, the last version of Jacoto is same as the the one on Go Power CD (1.2.15). This means that there is no development for the last 1 year!

Kombilo has not been updated for a year also (sadly!), but at least it's pretty usable. Jacoto's functionality is very minimal and its user friendliness is negative.

I actually planned to do a mini review of the latest Jacoto version, however it now seems to be like beating a dead horse. A review is meant to improve a product, so if a product isn't developed anymore than it is quite pointless to review it.

The usefulness of unmounting - 6/17/2006 9:45:21 PM

In Linux, we have to manually unmount a floppy disk (mounting in modern DEs is automatic). This may seem troublesome but it is actually very useful since we have a methodical way of telling the OS that nothing is in the drive.

In Windows, it often happens that a random program checks the floppy drive for something. When there is nothing in the floppy drive, it is very annoying since the noise is awful and some programs halt when checking it. Most irritating is when the program refuses to give up and unendingly checks it (I then need to kill the rogue process or feed it with a real disk).

This problem is practically nonexistant in Linux.

Backup of BOAB - 6/17/2006 9:43:10 PM

After I upload boab.txt, I'll rename it to boab-[date].txt where [date] is the date I've uploaded. This way, the new boab.txt will be uncluttered yet I can still access my old BOABs offline.

Yet another BOAB (any better naming scheme?)

Saturday, June 17th, 2006 by Agro Rachmatullah

Compressing SGF files - 6/17/2006 4:51:01 PM

Tried compressing 523 SGF files using different methods (need to send it via email). The uncompressed size is 749 KB. Here’s the result:

WinZip 9.0 SR-1 normal: 360 KB
WinZip 9.0 SR-1 maximum (portable): 360 KB
WinZip 9.0 SR-1 maximum (enhanced deflate): 360 KB
7-Zip 4.42 normal (nonsolid): 269 KB
7-Zip 4.42 ultra (nonsolid): 269 KB
7-Zip 4.42 normal (solid): 140 KB
7-Zip 4.42 ultra (solid): 138 KB
WinRAR 3.42 maximum (nonsolid): 311 KB
WinRAR 3.42 maximum (solid): 136 KB

In a solid archive, all the files are treated as a continuous stream. It’s like tarring before compressing. WinZip only supports nonsolid archives.

In this particular case, WinRAR wins (2 KB less than 7-Zip). However I’ll choose 7-Zip because it’s free software :).

Searching in Kombilo - 6/17/2006 4:27:56 PM

Too bad that game info searching in Kombilo isn’t as powerful as SmartGo’s. In SmartGo, we can use both AND and OR for searching, while in Kombilo only AND mode is supported.

SGF in Explorer - 6/17/2006 4:19:17 PM

If details of an audio file can be shown in the Explorer shell (length, bit rate, etc), why not for SGF files?

Jacoto - 6/17/2006 4:18:36 PM

Tried Jacoto, a tool for managing lots of SGF files. What I tried was a very old version from Go Power CD and I’m really not impressed (a review is worthless since it is a very very old version). I’ll try downloading the newest version.

Exporting SGF using Kombilo - 6/17/2006 4:03:43 PM

My friend asked me to send him all of my Old Meijin kifu. Not a straighforward task since the requested kifu is not isolated on a folder.

Luckily separating the Old Meijin SGF using Kombilo is very easy. First, filter the game collection using Kombilo (position search, player name search, event search, anything you want). Then use “File” - “Copy current SGF files to folder” to copy all the SGF in the game list. What sucks is that we cannot create a new folder from the “Browse for Folder” dialog and the dialog doesn’t remember the last folder used.

GTK# for .NET not working out of the box - 6/16/2006 10:43:50 PM

To try running SharpJiten with .NET, I downloaded and installed GTK# for .NET. However running it yields:

Unhandled Exception: System.DllNotFoundException: Unable to load DLL ‘gtksharpglue’: The specified procedure could not be found. (Exception from HRESULT: 0×8007007F)

Need to ask the GTK# mailing list.

Offline boab - 6/16/2006 2:40:05 PM

realized now that I should have an offline copy of my BOAB. Afterall, they describe stuffs I’ve done or found. With the BOAB available, I don’t have to reinvent the wheel.
Right now I need the search keys for the Old Meijin but I can’t access it because I’ve uploaded the BOAB.

6 diagrams per pages - 6/16/2006 8:54:53 AM

I usually print pro game records using the format of 50 moves per diagram and 4 diagrams per sheet. The white numbers on the black stones are barely visible when the move count is 3 digits, so I am sceptical that the diagrams will be readable if I use 6 diagrams per sheet.

However I saw my friend print 6 diagrams per sheet nicely. I also tried it, and to increase readability I disabled coordinates (larger diagrams) and increased the printing quality (from normal to best). The result turned out to be very readable, even more readable than my previous printings (proabably attributed to the higher print quality).

Power failure! - 6/15/2006 9:11:36 AM

Yesterday, when I was playing a video file halfway through, I noticed that the framerate got jittery. When I couldn’t stand it anymore I took my earphone off and to my surprise, the PC speaker was actually emitting a constant noise. Noticing that something was wrong, I ordered Windows to shut down. In the process of shutting down, the constant noise changed into a sirene noise and the computer instantly went off.

There could only be one explanation: heat. I touched the CPU heatsink and unsurprisingly it is as hot as a heated frying pan! Did the CPU fan fail?

After waiting the heatsink to cool down, I turned the computer back on. With a flashlight I checked the CPU fan and it was working properly. Weird.

This morning, when Windows just booted, the motherboard made same constant noise. I checked the CPU fan and it wasn’t spinning!

I quickly unplugged the computer and checked all cables powering the fan. The culprit was found: a power cable has one of its pin displaced down so it didn’t touch its female counterpart. Correcting it was easy and after that things went fine.

Athlon XP doesn’t have a heat spreader, so if not for my motherboard’s “emergency off” feature it would have been fried. Newer AMD processors such as Athlon 64 are equipped with a heat spreader, so eventhough the fan fails the CPU would continue to run fine (albeit at a much lower performance).

Another BOAB

Tuesday, June 13th, 2006 by Agro Rachmatullah

Lazy programmer - 6/12/2006 10:44:41 PM

Once I saw an upperclassman editing a very large text file. It turned out that he was removing unwanted lines. The unwanted lines had a clearly defined pattern, but instead of making a program to remove it, he scanned the lines one by one.

He could program, but didn't use his programming skill. Sure, we don't need to make a program for every imaginable trivial task. However the text file which he edited was so large that the benefit of making the program would clearly outweight the cost of making it. A lazy programmer is not a programmer.

There are lots of small disposable programs on my disk. Some examples are:

  • A program to append a string to all file names on a folder (I once needed to rename hundreds of file)
  • A program to modify each line of a text file in various ways in which new modifiers can be easily added (the need to manipulate strings in a text per line happens really often)
  • A program to correct broken links created by a stupid program called WebCopier

That is because when I am faced with a repetitive task which can easily be programmed, I don't hesitate to make the program. I'm a strong believer that uncreative jobs are better left to machines, while humans better spend their time for creative endeavours.

SharpJiten 1.0 RC - 6/12/2006 10:12:01 PM


The program is essentially complete. On the screenshot you can see SharpJiten set to synchronize itself with the clipboard and additionaly only displays grade 1-3 kanji. When a bunch of kanji is copied from a Wikipedia article, the program updates itself and displays the relevant kanji.

What remains is tyding the code (throwing unused commented code, for example) and modifying the program to use an internal (embedded) EDICT instead of a separate EDICT file. Oh, and some days of bug testing to make sure that nothing silly happens.

SharpJiten is a memory hog - 6/12/2006 8:42:02 PM

SharpJiten is the name of the kanji dictionary program I'm building.

On the previous build, SharpJiten only loads some essential kanji info from EDICT. Those fields are the kanji itself in Unicode, (Japanese) readings, English meaning, stroke count, and grade info. This results on a memory footprint of around 26 MB.

However, EDICT has additional fields, more than what you can imagine. Some examples are SKIP code, various printed dictionaries' index, and Korean reading. When all fields are loaded, the memory footprint blows to 40 MB. As a comparison, Wakan requires around 37 MB and JquickTrans 14 MB. The memory usage of JquickTrans is amazing, considering that it is both a kanji and word dictionary.

The EDICT specification specifically states that any fields can be added at a later specification. SharpJiten will have a custom filter in which the user can specify arbitrary field to filter. This makes SharpJiten forward compatible with future versions of EDICT.

About the memory usage, I won't fuss over it. Deadline is approaching (when is it anyway?) and my priority is to have the program working. The only feature not implemented is the arbitrary field filter thing.

Yomiuri Meijin - 6/12/2006 5:38:01 PM

The Meijin is historically a title for the strongest Go player on Japan. Then the title was transformed into a prestigious tournament sponsored by Yomiuri Shimbun. The sponsorship was later took by Asahi Shimbun.

I have quite a lot of games from the old (Yomiuri) Meijin tournament. Here's the search result on the event tag:

Meijin (Yomiuri): 412
Old Meijin: 101

But of course there are some inapproriately/ambigously labeled SGFs:
9th meijin 1970: 2
meijin (yomirui): 1
meijin (yomuri): 1
1st meijin 1962 league: 3
4th meijin title match: 2
9th meijin 1970: 2
5th meijin title match: 1

Those labels are found by searching for "mejin" with the date 1962-1975.

So the total is at least 525.

Update: The total is not 525 but 523. Try to spot a mistake on the above BOAB.

sgf2tex - 6/12/2006 1:40:17 PM

I'm currently adopting Minue622's tutorial on Haeng-ma to Indonesian. While going to add a pro game example which is lacking in the discussion about iron pillar, I thought it was going to be really painful entering the move coordinates one by one to LaTeX. Therefore I created sgf2tex:


Here's a sample output:

cleargoban
black{q16,q4,q10,p15,q6,r3,r2,m4,l4,n4,o5,n16,r16,k4,j5,h5,g6,r11,r12,p6,p10,p9,g7,g8,g9,g10}
white{d4,d16,o17,o4,q3,p3,k3,m3,l3,n3,g16,r17,q17,j4,h4,g5,r10,q11,q7,q9,s9,f6,f7,f8,f9}
begin{center}
showfullgoban
{comment}
end{center}

The annoying thing is that the SGF format uses a different coordinate system than what most Go players (including client) are used to. Conventionally, the rows are numbered, starting from the bottom, 1 to 19 while the columns are labeled, from left to right, a to t. The letter i is ommited to avoid the confusion between capital i (I) and lower case l (as is "lamp"). Compare I to l and you will see that it really looks similar. The SGF format labels the rows from the top and using letters from a to s. The columns are labeled from left to right using letters a to s.

pdflatex bug - 6/12/2006 1:28:19 PM

Creating Go diagrams using the igo.sty LaTeX package and then compiling the pdf using pdflatex produces wriggly lines:


This is probably a bug on the very old pdflatex that I use, so I tried the more orthodox and roundabout method.

The first is to create the dvi using latex, then create the ps using dvips, the finally creating the pdf using ps2pdf. To my dismay, wriggly lines still exist!


You can see that the lines near the left egde are wriggly.

What works well is converting the ps to pdf using GSView:


Indexing is slow - 6/11/2006 1:29:01 AM

Extracted the 40 thousands or so games from MGS's web site. Then added those games into Kombilo. The whole indexing process took almost 2 hours on my supposedly-powerful 1.9 GHz processor!

Anyway, I did a search on games involving a historical Meijin. Here are the Meijins (from first to last) and the number of games in my new database:

Honinbo Sansa - 0 (the number of games in my old database is 0)
Inoue Nakamura Doseki - 9 (0)
Yasui Sanchi - 126 (8)
Honinbo Dosaku - 61 (37)
Inoue Dosetsu Inseki - 15 (0)
Honinbo Dochi - 25 (0)
Honinbo Satsugen - 13 (0)
Honinbo Jowa - 64 (0)
Honinbo Shuei - 227 (0)
Honinbo Shusai - 499 (3)

The new database is clearly superb!!!

The number of games on my old database is only around 7 thousands. An interesting obersvation is that searching for sanrensei on both databases takes the same amount of time (1.8 seconds).

Mnemosyne 0.9.4 - 6/10/2006 9:31:34 PM

Mnemosyne is a flash card program. You give it a set of question and answers, and the program will schedule those questions for you. In other words, it manages the process of memorizing lots of items. It is a must for anyone learning a natural language (English, Japanese, Arabic, etc) where thousands of items (vocabulary) must be memorized.

I replaced my aging 0.9.2 with 0.9.4. Nothing spectacular, just bug fixes for things that don't affect me. For the upgrade process, I backed up the .mnemosyne folder (Windows Explorer won't let you create files/folder starting with a dot btw), exported my 0.9.2 Mnemosyne data to an XML file, uninstalled 0.9.2, installed 0.9.4, and finally exported the XML file. Everything went smooth.

Deletion of the contents of boab.txt - 6/10/2006 9:28:13 PM

On my hard disk, a BOAB is stored on the file boab.txt. I will then bring the text file when I surf the net and post the contents to my blog. I've decided that after I post it, I'll empty the contents of boab.txt on my harddisk.

It would be great if my offline BOAB is stored on a wiki. The full history of the file will then be available. I'll try to install MoinMoin Wiki later on Dapper (MoinMoin Wiki is the wiki engine used for Ubuntu's wiki; Wikipedia uses MediaWiki).

BOAB

Saturday, June 10th, 2006 by Agro Rachmatullah

Don't know what a BOAB is? Read the last entry on this entry (hint, hint).

The numbering of free software projects - 6/9/2006 10:56:57 PM

I always thought version numbers as a decimal number. For example, 5.1 is less than 5.11 which is less than 5.2. So, if those 3 numbers are software versions, the idea that sprang on my mind is "5.1 is released first, then 5.11, then 5.2".

Of course I was shocked to know that free software projects (GNOME, Linux kernel, etc) don't think it that way. They reasoned that 1 is less than 2 whin is less than 11, so 5.1 comes before 5.2 which comes before 5.11.

Now, after getting used to the free software universe, I have come to like it more than my previous preference. You just need to change your point of view. Think of a book and think of the number before the dot as the chapter number while the number after the dot as a section number. For example:

"5.1" is analogous to "chapter 5 section 1"
"5.2" is analogous to "chapter 5 section 2"
"5.11" is analogous to "chapter 5 section 11"

Thinking that way, the sorting will make sense. When multiple dots are present (as in x.y.z.w), think about subsections and subsubsections.

You won't feel nervous again thinking that GNOME 2.12 is newer than GNOME 2.2.

My next computer stats - 6/9/2006 10:32:03 PM

RAM: At least 1GB (currently 512 MB). My current RAM is very insufficient, since on a normal session I open some IDEs (Visual Studio 2005 Express, SharpDevelop 1.1), some SDK documentations (.NET SDK Documentation, Monodoc), a media player, Firefox (browsers can be a crazy memory hog), dictionaries (English, Japanese), and still other programs (Go client, Go database, file explorer, image editor, etc). At this very moment, task manager indicates that 693 MB of memory is used. 512 MB isn't enough, Q.E.D.

Processor: AMD dual-core processor (currently AMD single-core). Programs are starting to get multithreaded, and it's thrilling to experience the speedup on a hardware that can actually run 2 threads at the same time. I'm especially watchful to the development of the multithreaded Go program Moyo Go Studio. Why AMD? Well, why Intel?

Hard disk: RAID 0 configuration (currently no RAID). Who likes to be bottlenecked by that sluggish piece of hardware? Oh, and the capacity should be at least 200 GB (2 x 100 GB).

Video Card: NVIDIA (currently NVIDIA). ATI is notorious for its bad driver support on Linux.

Monitor: LCD which supports 1280×1024 and at least 17 inch (currently CRT, 1024×768, probably 14 inch). My eye is tortured by looking at the monitor n hours a day. Switching from CRT to LCD should ease the pain. A larger resolutin support is needed because complex programs like IDE and Go database client has panels everywhere. A small resolution leaves an uncomfortably small space for the main panel. 17 inch is needed so that things at a large resolution won't look tiny (should be irrelevant on a vector graphic era).

Fan: A silent but powerful fan (currently noisy). The sound pollution emitted from my fan is unbearable. A computer is not a Harley. Noisy is not cool (pun intended).

Writer: DVD writer (currently CD Writer). DVD-Rs (the media) are insanely cheap right now. IIRC, with Rp. 4k you can get 4 GB storage. The perfect solution to backup trashes.

A powerful editor lacking 1 feature - 6/9/2006 10:23:24 PM

ConTEXT (why the crazy capitalization?) is my text editor of choice on Windows. It supports tabs, syntax highlighting, and most importantly user-defined actions. User-defined actions means that we can bind some keys (for example F9) to a shell command (for example to compile the file). This makes ConTEXT effectively a bare IDE for any task you can imagine.However, ConTEXT doesn't support Unicode. Yes, typing "watashi" on the IME yields ‚킽‚µ (hiragana) or Ž„ (kanji) on ConTEXT. That is pretty dumb, considering that it's now on 2006 and the idea of i18n (internationalization: i-(18 middle characters)-n) isn't anything new. I'll file a bug report on it.

BOAB: a neology - 6/9/2006 10:18:57 PM

BOAB stands for "blog on a blog", and this entry is an example of a BOAB. The idea is to blog anything interesting directly at home, and then uploading all offline blogs on 1 online blog entry. Since an offline blog entries will be a part of 1 online blog entry, it is a blog on a blog or BOAB.

The acronym BOAB doesn't come out of thin air. See FOAF.