Friday, April 23, 2010

Java's Language discrimination against Nepali

I will let following code and it's output do the talking:

System.out.println ("Korean testing: ");
Locale locale = new Locale("ko");
System.out.println("DisplayName in current locale:" + locale.getDisplayLanguage());
System.out.println("Display Name in Native: " + locale.getDisplayLanguage(locale));

System.out.println ("\n French testing: ");
locale = new Locale("fr");
System.out.println("DisplayName in current locale:" + locale.getDisplayLanguage());
System.out.println("Display Name in Native: " + locale.getDisplayLanguage(locale));

System.out.println ("\n Hindi testing: ");
locale = new Locale("hi");
System.out.println("DisplayName in current locale:" + locale.getDisplayLanguage());
System.out.println("Display Name in Native: " + locale.getDisplayLanguage(locale));

System.out.println ("\n Nepali testing: ");
locale = new Locale("ne");
System.out.println("DisplayName in current locale:" + locale.getDisplayLanguage());
System.out.println("Display Name in Native: " + locale.getDisplayLanguage(locale));

Here is the output:
Korean testing:
DisplayName in current locale:Korean
Display Name in Native: 한국어

French testing:
DisplayName in current locale:French
Display Name in Native: français

Hindi testing:
DisplayName in current locale:Hindi
Display Name in Native: हिंदी

Nepali testing:
DisplayName in current locale:Nepali
Display Name in Native: Nepali
What the heck?? I understand that Nepali is not as widely spoken as other languages that are shown above but given that you can show Hindi in "Devnagiri script" and Nepali also shares the same script, why would Java not apply that to Nepali as well? Do I smell discrimination here? ;-)

Just for curious mind, this came up when I was trying to see why Nepali is not written as नेपाली in "Change Language" dialog box in GateIn.

Monday, April 12, 2010

Tips when adding extra memory to your laptop

I recently got a new Lenovo T500 that had 2G RAM into it. I installed 32-bit Fedora 12 on it which worked flawlessly, even dual monitor. Then I got an extra 2G RAM which meant that I needed to open laptop case to install it. It gave me some jitters given that I have not unscrewed any laptop before. The last time I did something close to this was way back in 2000 when I put extra hard disk into my Dell Desktop to have dual boot with Windows ME and Red Hat Linux 6. Fedora was not born then.

I followed T500 hardware maintenance manual at http://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles_pdf/43y6630_04.pdf, rushed to Radioshack to get screw driver for 14 mm screws and with some fiddling, snapped the thing in its slot. Reboot and

[prabhat@eejot ~]$ more /proc/meminfo
MemTotal: 3057360 kB
MemFree: 2192648 kB
Buffers: 45864 kB

What? Should not MemTotal be somewhere close to 4194304 kB? Then I come to know about PAE, did a 'sudo yum install kernel-PAE', reboot and Voila. Now I see

[prabhat@eejot ~]$ more /proc/meminfo
MemTotal: 4013920 kB
MemFree: 2397700 kB

which looks much better. Thanks Matt for pointers. :-)

Thursday, April 1, 2010

Saga of Lawn Mowers

My wife and I bought a house in November last year. We are slowly getting used to all chores that come with buying a house. Since we bought it towards the beginning of winter, I did not have to worry about mowing my lawn. Now that winter is already over and Texas summer has already announced its arrival, I need to start taking out weeds, mowing our lawn and watering it.

For mower, I tweeted and facebooked asking opinions of my friends. Not surprisingly, I got good feedbacks with both gas and electric motor getting equal and majority of votes and couple going for reel mower which I did not even know that it existed. A reel mower does not have an engine and it's run by your sweat and blood and that sounded promising to me. I finally got one on last Monday from Lowe's and it looks like it does its job well. Assembly required about 20 mins. I have 30 days to return it which means it has to pass my tests at least two more times and I hope that it lasts longer. Now let's come to the main point:

  • Having a gym membership and not been there for past 6 months -> Waste of Money
  • Buying a reel mower for $100 and cancelling gym membership -> Sweet and you do the math.
  • Buying a reel mower and enjoying the outdoor -> Very sweet
  • Buying a reel mower and doing tiny bits to help the environment -> Priceless