RSS Feed

Category Archives: personal

From Ubuntu to Xubuntu on HP Mini

Yes, again. HP Mini 1000 series, small screen, lightweight, RAM is not big. I like Ubuntu Desktop Edition, though there is Ubuntu Netbook Remix, it is not my favourite. Because I use the netbook just like a desktop, got a lot of developers’ tools, GIMP, etc.

Ubuntu, using GNOME as the desktop environment. I like GNOME because I like GTK+. I like GTK+ because I like C programming. Then, I read an article about Xfce, which is more lightweight thant GNOME. Which is also using GTK+. So I tried it.

No need to reinstall Xubuntu, just install xubuntu-desktop package from Ubuntu repositories, then you can taste the new desktop environment.

Everything runs well. Good, nice, really faster. Nautilus is replaced by Thunar, though Nautilus is still there, I can still run Nautilus. But Thunar is the default file manager. One can replace other default application by right click a certain file type, then choose “Open with other application…”, choose your favourite and set as default. Then, the file type will be associated with the application.

One of the biggest drawbacks is customizing the menu items. Unlike Ubuntu, Xubuntu cannot edit the menu items unless editing the XML files. Another drawback is, if want to add launcher at the panel like GNOME, I need set it manually, because Xfce cannot right click the menu items to add as launcher.

Since I installed gmrun, it is good enough to let me enter the command rather than choosing the items at the menu bar.

There is another drawback which I just found. The default VNC server (vino) cannot works on Xfce. Therefore, needs to use x11vnc from commandline. But, still enjoying it!


sed, awk (gawk), and Perl

As a programmer, I like the Unix commands “find” and “grep”. They are too good. “find” to find the files recursively based on file name, file type, etc, then execute command towards the files.

“grep” is even more better, when I want to find some words in the source code, and I can use regular expression. Combine “grep” with “sed”, one can perform search and replace.

However, when I want to search and replace for multiple patterns, “sed” will be difficult to be used. One can write a shell script to perform the task. But “awk” (or GNU awk) will be a better solution for me. Write an awk script, can search and replace easier, and awk script allows to use variables.

But, “awk” is not good enough. “awk” is difficult to perform search and replace with regular expression that needs backreferences and lazy quantifier. To do these tasks, Perl is the best!

Yes! I never thought that Perl is that good. Because for me, using Perl to do web development is more difficult than using PHP. Using Perl to write an application is not better than using C/C++, because it is an interpreted language, not compiled language. But, if using Perl as a programmer’s tool, it is good for everything. Recursive file renaming with regular expression and recursive search and replace with regular expression, I can only solve these two tasks with Perl script.

(Though I was taught to use zsh to perform recursive file renaming with regular expression, but now I think Perl script is powerful enough.)

How do you think?

Visual sensory and audio sensory are the two most frequently used sensory systems. However, thinking is a very subjective process, because each one of us has different perceptions towards the stimuli in our environment. And,  some people are right-brain thinking, and other are left-brain thinking. Some people think logically; other creatively.

I am thinking about this question, because I tried to search the information from internet, but cannot find what I want, may be I used incorrect keywords.

I would like to discuss how do I think. I personally think “verbally”. That means, when I think, there are words in my head. The words I mean is something like sound, not the text. So, I believe that I have a high intrapersonal intelligence. Because I can communicate with my own in my head.

And when I discuss this idea to my brother and sister, and friend, they feel that I am weird. Really? I don’t think so. I thought that, everyone of us has linguistic ability. So, when we think, we will automatically think verbally, and using our own mother tongue language. For example, my mother tongue language is Mandarin, so even in my dream, I also speak Mandarin. So, that is I assume that why when we think, we will think verbally.

But, after I discussed with them, I just found that, there are people who think visually. Because I asked them, “How do you think if you plan what to eat tomorrow?” They said, there is no word in their head, just visual information. I guess, may be just like a video or a static image. But when I asked further, “How do you imagine ‘tomorrow’?” Since I think verbally, there is a word “tomorrow” in my head. And this “tomorrow” is so semantic and abstract, how do this “tomorrow” represented in visual information?

My friend told me, there is no “tomorrow” in the visual thinking in her head. So, I feel so weird about this visual thinking.

Actually, I can also think visually by using imagination. But my primary thinking method is verbal way. So, how do you think?

Review of Wubi input method and Cangjie input method

I learnt Cangjie input method before. Difficult to learn, difficult to memorize. Give up finally. Cangjie input is target on Traditional Chinese characters.

Recently, I tried Wubi input method, which is target on Simplified Chinese characters. Compare to Cangjie, it is easier to learn, easier to memorize. Not because the poem, but the rule of stroke layout on the keyboard is systematic. And I am learning Wubi 86 version.

So, using these input method, I can type the Chinese character without knowing how to pronounce the word. It is an alternative input method I think I need to learn.

If you are interested, visit this link to learn:

Try out Ubuntu, Wubi, and Portable Ubuntu Remix

Ubuntu, in my opinion, is a great Linux distribution. There are several ways to let you try out Ubuntu. After download the CD, I can burn it to the CD and boot from the CD. I can try Ubuntu as a LiveCD. I can also boot it from a USB pendrive like a CD.

When installation, I can create a new partition on my harddisk. I can install it on the logical partition and boot from there. Unlike FreeBSD, which needs to be installed on a primary partition. Not only that, I can also install Ubuntu side by side with the same partition with other OS (such as Windows). This is special.

Besides, the CD image download from Ubuntu website contains also Wubi. Which I can install the Ubuntu from Windows (however I failed to install on Windows 7). Installing with Wubi will create a file and the file will be assumed as an OS itself. Then, one can choose to boot into Ubuntu installed by Wubi when the computer started.

But if one does not want several OSes on a computer, he/she can try Portable Ubuntu Remix. You can run Ubuntu on your Windows. But the TRES version requires about 4GB after extraction. (I tried to use “sed” command through Portable Ubuntu to do some operations on my computer, it fails.)

It is worth to try out.

Trying out

Posted on

After trying WordPress from, and using the x10Hosting, I really attracted by WordPress. That is why, now I am trying, because the PHP hosting is not good enough for my expectation.

I am still thinking about, which one is suitable for me, Blogger or WordPress.

My experience of web development

Posted on

In web development, one should not maintain the data structure concept (C programming) for web application, such as PHP web application. But should use the OO (object oriented) concept. So that, the object created by PHP is easily to be used/re-used. Besides that, though the web development includes interface, it do not bear the same concept like system applications (application software developed by language such as C or C++, or Java).

Web application’s interface is displayed using HTML. And web applications use a different environment from the system applications, because web environment renders from page to page. However, a system application, there is no page, all the data are stored in the memory of the application. Thus, storing the data from one page to another page in web application is difficult, especially when we are using procedural paradigm.

To make the web coding portable from one page to another, OO is the best concept. Otherwise, the coding needs to be written and written in every page. As a result, all the webpages (HTML pages) become the requirement of the web application. Consequently, editing the source code will be exhaustive, and a application is difficult to be reused.

So, one needs to bear in mind that, the web environment, i.e. HTML, is only the environment just like an OS. The application we built using PHP is only a small application, which uses HTML to display to the user. The whole application can be placed in any HTML page. Even more, more than one PHP applications can be placed in one HTML page. Thus, one needs to focus on the PHP application as an object itself during web development.

Bookmark and Share