Using Python as the most powerful calculator
Once I was looking for “expression calculator”. The expression calculator is different from normal calculator like calc.exe, which cannot use variable freely as algebra. But the expression calculator, we can predefine a variable with a value, then evaluate the variables in algebraic expression. It is very useful. My favourite expression calculator is SpeedCrunch.
Then, recently, I want to test a math function in SpeedCrunch, but this is impossible, since expression calculator can only define the variable, but not define a function. I remembered the title of Python Tutorial, “Using Python as a Calculator”. Yes, expression calculator, with ability to define function, then Python will be the one.
Comic Downloader alpha stage
I wrote several Greasemonkey userscripts. However, the Javascript has its own limitation for security reason, especially when a website uses scripts from cross domain. As a result, Javascript cannot get the information, and my userscript fails to work. Therefore, I start another project, in order to solve the cross domain problem using Python, and targeted on Linux (Ubuntu).
The current development stage is alpha, and targeted only on one website, since the other websites I frequently visit still work with Greasemonkey userscript. The alpha stage of Comic Downloader is currently work in command-line. GUI feature will be added in future with PyGTK. Currently, the command-line is able to solve my problem for offline comic reading.
Running Mono (C#) pre-compiled by Linux in Windows
Finally, I success to run Mono with GTK# pre-compiled by Linux in Windows.
Firstly, make sure Windows is installed with
With the above installation, one can run the Mono application normally. I failed previously because I didn’t install GTK# for .NET.
However, when I run the application, there is a console window, which is annoyance. Thus, build the Mono application with
C, C++, Java, Python, Mono (C#)
Cross-platform programming language, is still a little bit far away from me. Recently, I ported Prayer Clock to other programming languages. One of the reasons is to learn more programming languages, another reason is trying to solve the cross-platform problem.
C and C++, my most preferred language(s), with the help of GTK+, can perform well in Windows and Linux. But I didn’t tried on Mac OS X. This is because it needs to be compiled on the OS, rather then cross-compilation. That is why, I ported it to Java before. Though Java claims be WORA (write once run anywhere), yet running in different OS might produce “some” problems, such as minimize to system tray in Linux. And, running on Mac OS X also does not minimize to the system tray as expected.
GMail HTML Basic Enhancement in Opera
I just found that Opera 10 can also use Greasemonkey script, but it is actually User JavaScript. Therefore, I tried to use GMail HTML Basic Enhancement. But failed. This is because one needs to enable User JavaScript on HTTPS protocol first.
To use the User JavaScript, first set the folder based on this article, and remember to restart.
Then, at the address bar enter “opera:config”, search for “User JavaScript on HTTPS”, enable it. Yeah!
Joomla : CakePHP = Windows : Linux GCC
The followings are only my personal opinions.
Joomla!, a very popular CMS (Content Management System). Easy to use, a lot of extensions, free to download. Yet, not all the extensions are free. Some are commercial extensions. Some commercial extensions allow you to download for limited days of trial. Easy to install, easy to use. A lot of people like it.
On the other hand, CakePHP, not a CMS but only a web application framework (I mentioned CakePHP in this post because this is the only web application framework I used, I haven’t tried about CodeIgniter or Ohloh). Comparing CakePHP with Joomla isn’t quite appropriate because they are not same category. But for me, both of them are PHP and used to develop websites.
SVN - programmers' needs
Since my programming experience started from Microsoft Windows, SVN is a term I frequent see yet unfamiliar.
As a programmer, I need to backup my source code whenever I modified the existing source code. If I have any problem, I can restore to the runnable source code. Backing up the coding by using zip or others compression tools is not effective or effecient.
SVN can help to backup all the revisions of the source code. Not only that, it helps to solve the problem if a project involves several developers. Any conflicts of the coding will be detected. SVN can also be used individually.
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.
JPrayer Clock awarded by www.FamousWhy.com
I never thought that JPrayer Clock will be awarded. But this is interesting. The “Famous Software Award” from www.FamousWhy.com gives me more motivation for the open source software development. Good!
GMail Basic HTML Enhancement 1.1 update
GMail Basic HTML Enhancement enhances the GMail Basic HTML with “select all” and “select none” feature.
I just updated GMail Basic HTML Greasemonkey script version 1.1. This is because previous version the script works only on Firefox, but not Google Chrome. Now, I managed to use another way to solve the problem, so that the script now can even works on Google Chrome.
