My rules of thumb for using multiple programming languages
Since I know multiple programming languages: C, C++, Python, PHP, Perl, Java, C#, I would like to share about my rules of thumb to choose which language during the development. So, when do I use these languages?
When doing the web development, I will definitely use PHP. It is easy to configure with Apache and MySQL.
When doing the text processing, cleaning the unwanted text, search and replace, I will definitely use Perl, because of the power of regular expression it provides. However, if the search and replace pattern is simple, then I will just use “sed” command or “awk” command.
CJK fonts in Wine and also works with IBus input
CJK (Chinese, Japanese, Korean) fonts in Wine was really troublesome for me. Today, I have solved it totally. Before explaining the solution, just to say about the system environment I am using.
Arch Linux
wine 1.3.37
winetricks 20111115
ibus 1.4.0
ibus-pinyin 1.4.0
ibus-qt 1.3.1
ibus-table 1.3.9.20110827
ibus-table-extraphrase 1.3.9.20110827
ibus-table-wubi-git 20110410
Problem
I have installed all the fonts using winetricks with allfonts. I have also used winetricks to set fakechinese, fakejapanese, fakekorean. But none of these tricks work fine on my Wine.
My Pomodoro
Do you know Pomodoro technique? I like this technique, which can make me work more productive. That is why, I installed tomate in Linux. It is a very simple application with only a click at the system icon (tray icon). However, there is no way for me to customize “tomate”. So, I tried to write my own Pomodoro application with GTK+. Now, let me share about my recent programming experience.
From C to C++
I love C language, as it is a low level programming language comparing to C++, Java, Python, etc. Yet, it is more portable than assembly language. The C functions allow shared library to be used by other application written by other languages. How good it is! That is why I like writing libraries, functions, command-line, instead of designing GUI (graphical user interface). Because designing GUI involves usability engineering, user experience, and user centred design. That means, developing GUI application should study about the targeted audience. However, I wrote the programs for myself only, I am the user.
TinyMCE plugin: inserttab
I wrote a small plugin for TinyMCE, to solve the “tab” problem. This is because, in the TinyMCE editor, whenever I press “tab”, it will navigate, instead of insert “\t” in the editor.
After some understanding with TinyMCE API, then I wrote this plugin.
Usage:
- Add the inserttab plugin button to the toolbar, in the HTML Javascript. This will show a button with “\t” image in the editor.
- Click the button to enable the feature.
- Then, whenever we press “tab”, if it is preformatted text, then it will become a real tab, “\t”, else will be filled with “ ”.
- To turn off, just click the button again.
The plugin is BSD license. It can be downloaded here.
Accidentally rename a currently downloading file
This was a small problem I faced, just to share how I solved it.
I was downloading a large file with JDownloader, around 700MB. But while downloading at around 600MB, I renamed the file (with extension “.part”) in the file browser. I didn’t notice it, until I finished downloading the file. Then I have 2 files something like this:
My_target_file_name.part 628647283 original_file_name.avi 734171136
From here, I knew that I renamed the file “original_file_name.part” to “My_target_file_name.part” during the file size was 628647283. But JDownloader continued to download the file until finish at 734171136 size.
The way of data recovery
Beginning
Recently, I accidentally dropped down my 320G USB external hard disk. This make me very sad. Because I got some precious data in the hard disk. The hard disk is unable to be detected on Windows 7. Then I tried to connect with two USB ports to provide more power to the hard disk, hopefully it was detectable. Yes, it was detected. Then I immediately used
[code] CHKDSK /v /f /x f: [/code]
Favourite web development frameworks
There are a lot of frameworks available for web development. For PHP, there are Zend Framework, CakePHP and CodeIgniter. I also tried Joomla! before, learn about the Joomla framework, but, it is really troublesome. In my opinion, Joomla! is user friendly, but not developer friendly.
I tried CakePHP. It is better than Joomla, for a developer. But the Acl control provided is really difficult to learn. The “Bake” seems useful, but editing the generated files is also a pain. The MySQL database is also not highly customizable. I totally agree to a post in Stack Overflow:
Ubuntu 11.10 is released, but I am still using Arch Linux
Yes! This is a great news, Ubuntu 11.10 is released. And it was my favourite Linux distribution. The usability and easy to use, let me convert from Windows user to a Linux user.
Then, I changed from Ubuntu to Linux Mint. Actually there is no big differences from Ubuntu and Linux Mint, because Linux Mint is derived from Ubuntu. But the philosophy of Linux Mint is focusing on the usability design. Yes, I like the green colour, because it is natural. Mint installation disc contains some proprietary software. That means, offline installation of Linux Mint is more complete, because I do not need to download the proprietary packages through internet after installation.
My new blog: Favourite Apps
I created a new blog and maintain with my sister. The blog is about our favourite applications, and the review for those applications. Therefore, this blog might not have any post about the applications in future.
Managing contacts and calendar
I am always looking for a good solution (not a software, but a solution) to manage all my contacts and calendar. Actually I separate both of them, even they are under PIM (personal information management).
I was using an excel file to manage all my contacts. But we know, a file is different from an application, the interface is not usable, and I had the difficulty to find the contacts that I want.