Puthick’s Companion Notebook

Online notebook for computing related stuff on the Internet collected by Puthick

Archive for May, 2008

Cleanest car – Honda Civic Gx

Posted by puthick on May 26, 2008

Honda Civic Gx runs on Compressed Natural Gas (CNG), containing mostly methane (CH4). Burning natural gas is less polluted than petrol making Honda Civic Gx even cleaner than Toyota Prius according to 2008 Greenest Vehicles. Honda Civic Gx (USD 25,000) is likely to be more affordable than Toyota Prius (about AUD 50,000) since it does not rely on the fancy battery technology. Using CNG in vehicles is common for buses and industry vehicles.

Although Honda Civic Gx is a perfect vehicle in terms of economic and environment, it is not available in Australia. In my perception, the Commonwealth Government of Australia does not have the courage to make Australian household cars less reliant on petrol. They are talking about excise and GST on petrol without mentioning the use of natural gas in vehicles. Sometimes because the November 2007 federal election, the Howard government introduced rebate for people who convert their cars from petrol to Liquified Petroleum Gas (LPG). Since the engine was designed for petrol, it is perfect for LPG. It would be foolish to buy a band-new car and covert it to LPG. Now the new labor government and the opposition have no mention about this type of vehicles running on natural gas, which can be better than LPG.

Other people to blame is of course the Oil companies. They are making a whole lot of profit when the oil price is rising since people need cars to carry not only themselves but also other stuff. I think in Australia, oil companies are blinding the government of this development of Honda Civic Gx. Australia has significant amount of natural gas deposit making CNG is an alternative fuel during a transition time before a renewable fuel is found for cars.

Links:

Honda Civic Gx in Australia

Posted in Misc | Leave a Comment »

Past Interviews with Donald Ervin Knuth

Posted by puthick on May 19, 2008

Donald E. Knuth is a legendary figure of the open-source community. A number of people in the community regards him as god of computer programming. He is the author of the multi-volume “The Art of Computer Programming”.

I found two interview transcripts with him.

http://www.informit.com/articles/article.aspx?p=1193856

http://www.advogato.org/article/28.html

Posted in Misc | Leave a Comment »

I love GNU Emacs

Posted by puthick on May 8, 2008

I started using GNU Emacs or Emacs in 2004 when I went to the ANU. I love it ever since. I will you why Emacs is the best text editor I ever used. Emacs keyboard commands are really efficient. I split window at a fraction of second, copy and paste from one window onto another without moving my hand away from the keyboard. I don’t have to remember every variable either in the same file or in a different file. I can split the window into 2 panels and open the file that I need to know the variable name while writing a new file. It is even better when text-based Emacs can do the same thing. Text-based Emacs becomes handy when I need to do these things remotely via ssh which is far more efficient than vnc. Most of the times servers don’t run in graphic mode. Vi cannot deliver these functionalities that Emacs can. Vi is good at small update or creation job while Emacs can do heavy work over an ssh connection. Emacs supports C, C++, Perl, Python, Java, Ruby and of course Lisp indentation. It can convert indentation tab character in spaces and vice versa.

Emacs is a simple tool but more efficient than most Integrated Development Environment tools. I need to learn and master one tool for every language I will have to learn and use rather a dozen of them. GNU Emacs is not only available on GNU Linux but Microsoft Windows and Mac as well. So, one tool will be the job for many languages and many platforms. So why not. It makes my life a lot easier.

Even though Emacs is efficient, it can be a bit tricky to understand the keyboard commands. “C” and “M” for pressing and hold Ctrl and Atl keys. Fair enough, C for Ctrl but what about M. M is for Meta key in Macintosh, which is equivalent to Atl in PC. These command reference cards below are from “Learning GNU Emacs” book.

Posted in Programming | Leave a Comment »

Positive thinking when debugging

Posted by puthick on May 8, 2008

I have been doing wxPerl which is a Perl GUI interface to the cross-platform wxWidgets for quite some time now. When browsing through wxWidget documentation (http://docs.wxwidgets.org/2.8.4/wx_debugstrategies.html)

begin{quote}

Positive thinking

It is common to blow up the problem in one’s imagination, so that it seems to threaten weeks, months or even years of work. The problem you face may seem insurmountable: but almost never is. Once you have been programming for some time, you will be able to remember similar incidents that threw you into the depths of despair. But remember, you always solved the problem, somehow!

Perseverance is often the key, even though a seemingly trivial problem can take an apparently inordinate amount of time to solve. In the end, you will probably wonder why you worried so much. That’s not to say it isn’t painful at the time. Try not to worry — there are many more important things in life.

end{quote}

It reminds me of words I have read somewhere I cannot recall them precisely. One phrase says “The first time you try something, it seems very difficult. When you continue to do it, you will feel that you won’t be able to do it. However, if you keep on trying, the day will come when you can do it with great ease.” I read this in a Reader’s Digest article about an illiterate Thai lady trying to read and write Thai on own from her daughter’s school books. At the end, she could read Thai newspaper and write letters to her daughter.

Another quote I read somewhere in a programming book says that “Half of a programmer life will be spent on correcting his or her own mistakes.”

If you have a problem to debug, you are half way through. The other half will be done sooner or later and you probably have done it before.

Posted in Quote | Leave a Comment »

Hello World

Posted by puthick on May 7, 2008

This is my hello world post. Every programmer including myself must have done it many times for every new programming language they learn.

Posted in Misc | Leave a Comment »