Binary Tree November 16th, 2007

Binary tree is important topic in computer science, especially in data structures field. The important characteristics are fast insertion, retrieving sorted data rapidly. Binary tree can be described like this. Every node has two leaves nodes. One or both of these two leaves nodes maybe be empty or using computer science terminology, null. Some people like to call these two leaves nodes as children nodes. Every binary tree has one root node. So there is no ambiguity for choosing starting point. After that you will have two choices every time you want to continue your journey traveling down the tree, except when the child leaf is empty or null.

We can use binary tree as efficient data structures for sorted data. When sorted data is implemented with binary tree data structures, we can rapidly store sorted data and rapidly retrieve sorted data. If you learn C/C++ and Pascal, most likely you will encounter lesson sorting data using binary tree. In C/C++ the node is implemented with struct with three fields. The first will be holder for value/data. The second and third will be pointer to this struct type data. In Ruby you can use Struct or Class as node. You don’t have pointer in Ruby but you use object reference as replacement. Most likely you will not use binary tree as data structures for sorted data in Ruby. But there are some cases that make binary tree suitable for data structures in Ruby.

Read the rest of this entry

Goodbye Firefox November 14th, 2007

I have been Firefox user for a long time. Maybe four years. Maybe I have used it since 0.8 version. Why did I choose Firefox as my main browser? Maybe I was opensource supporter. Maybe I liked the logo. Firefox is tremendous platform. You can install many extensions and themes. There are many useful extensions like Firebug, Web Developer, Swift Tab, Flashgot.

But right now I have to say goodbye to Firefox. The main reason is its sluggishness. It often lags. Sometimes it freeze. Sometimes you can not close the tab. Most of the time, it is not responsive. I can not tolerate this anymore.

So good bye Firefox. So what browser do I use? Internet Explorer is out of competition. It is Opera. The performance is superb.

What do I miss from Firefox in Opera?

Flashgot? Opera built in download manager is superb. It can resume very well not like Firefox. Sometimes after stopping download, resuming is not an option anymore. You must restart the download. If I have to download the big files, I just use download manager directly.

Firebug and Web Developer? Okay, these are the tough one. Opera has Developer Console. The function is similar with Firebug. But it is still in alpha phase.

Foxmark? Nah, I failed to use Osync. I got many errors. But Opera 9.5 supposed to have this feature built-in. Okay, I wait it.

No doubt. Firefox is more popular than Opera. It means there are some websites which display perfectly in Firefox but not in Opera. Okay, I tolerate this. Just like I tolerate website which display perfectly in Internet Explorer but not in Firefox when using Firefox.

Programming Languages Popularity In GnomeFiles.org November 7th, 2007

GnomeFiles lists apps (in source & binary) created for the GNOME X11 environment and the GTK+ multi-platform toolkit. All bindings, wrappers & their apps are welcome. I got that definition from Gnomefiles website. I am a software developer. It is normal for me to curios the programming languages popularity in GnomeFiles. A long time ago, I sent email to Eugenia, the admin of GnomeFiles. I asked why not put programming language attribute in project page. With that attribute, people can know what language binding is the most popular. She answered that it is not relevant to put programming language attribute for GnomeFiles website. The GnomeFiles website is for end users not developers. At that time she told me the most popular language binding is Python to answer my curiosity.

Time passed by. I decided to find out the programming languages popularity in GnomeFiles as opportunity to practice Common Lisp. My way to find out the programming languages popularity in GnomeFiles as you can see has many flaws. I use 1333 applications rather than full numbers, 1898 applications. I am too lazy to hunt down all applications. To find out what programming language the application uses, I extract the requirement part of application web page. The requirement usually tells us about programming language they use. For example, if the requirement tells us that it depends on gtkmm library, it means it uses C++. But there are applications using C++ as programming language but not use any binding. It uses pure GTK+ toolkit. My query will put these applications as C programming language applications. There are other flaws too. But I can tolerate with these all flaws.

Read the rest of this entry

Getting Wet With Common Lisp November 7th, 2007

I have developed something with C, C++, PHP, Java, Ruby, Python, Delphi, Javascript from the first time I learned programming language. I am quite familiar with those languages. But I want to developed something with programming language which is very “different” with those programming languages I have mentioned. Those programming languages use algo-like syntax. There are Erlang, Haskell, Lisp, Scheme for very “different” programming languages camp. I choose Lisp or Common Lisp as first very “different” language to explore. Yes, in my colleague years, I have learned and developed something simple with CLIPS. But the programming language is constrained to expert system. I want to use very “different” programming language to develop something general. There are many reasons I choose Common Lisp as first very “different” language to explore. One of them is Eric Raymond. He said this:

“Lisp is worth learning for the profound enlightenment experience you will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use Lisp itself a lot.” from http://www.catb.org/~esr/faqs/hacker-howto.html

Read the rest of this entry

Getting Wet With REST And Rspec (BDD) November 6th, 2007

REST and BDD are hot topics in software development. So I want to get wet with these topics. So I learned and surveyed from the internet. Okay, I think I get it. To make it practical, I try to apply these topics to Rails. The newest version of Rails (1.2.5) has support for REST. As for BBD, you have to install Rspec Rails gem.

I decided to make a simple clone of my theatre website. I develop front end only. There is no admin interfacte. I just want to learn about REST and BDD not to develop functional website. But maybe later I will add the admin interface.

Read the rest of this entry

From Linux To Windows XP November 6th, 2007

I have been using Windows XP full time for two weeks. It’s been so long time since I was Windows XP full time user. Maybe it has been four years. I have to tell you again that I am forced to use Windows XP because Linux does not support HSDPA USB Modem ZTE MF620. Somebody will say it’s my fault that I bought unsupported hardware. But sometimes you just don’t have luxury of choice. I move to a new place. I live in apartment which does not have internet connection. So you must find it from outside. The only practical solution is to use 3.5G wireless internet connection. Using cable based internet connection is not practical because I plan to move from this apartment. Using cable based internet connection means long term customer. Using parabola based internet is semi-practical. I don’t feel safe to put the parabola outside apartment. You can not move parabola as you like. Using 3.5G wireless internet connection only needs a small modem. Just plug to your computer then you can surf. It’s the most practical solution at this time with my condition. The only provider for this connection gave me the unsupported modem in Linux. Very nice.

Read the rest of this entry