Database or spreadsheet?
Sometimes we use spreadsheet to store data as table just like database. Especially the features provided like sorting and filtering. This allows us to look at the data easily without the knowledge of SQL (structured query language). Furthermore, we can add in the rows easily, do calculation using formulae, and also copy-paste the data to any cell. Comparing to database, the data needs to be filled row by row, this is the main drawback. This is why spreadsheet is easier to use.
Android game hacking
[Added 2012-10-16] Read this first: Quite a lot of readers asked me how to hack this game or hack that game. Sorry to say, I am not that expert in hacking those games, and I don’t have much time to play and hack the games. And what I shared here is only how to hack the games in general way, without permanent root the Android. So, if you are asking about a specific game, please find it on other channel. Thank you.
Rooting Android manually
In the previous post, I mentioned about rooting the Android emulator. Now, rooting the real Android phone is another thing, quite different from rooting Android emulator.
What is the main difference? In the Android emulator, once we “adb shell”, it is “#” as root. That is why we can remount the filesystem, and do whatever as root. In the real Android phone, once we “adb shell”, it is “$” instead of “#”. That is the main difference. That is why we cannot remount the filesystem or do whatever.
The Arch way of syncing script
I like FreeFileSync, a syncing utility. There are several reasons for me to consider it is a good syncing utility,
- Allows preview
- Mirror, destination exactly as source
- Update, update destination based on source, no deletion
- Sync, allows propagate deletion, detects conflicts.
- Delete to Trash can (or Recycle bin)
- Multiple pairs of folders
- Swap directions
- Allows to edit the direction of specific files, or ignore the files.
All the bold features are which I prefer the most, especially the last one. That means, after the preview (or comparing), I can decide to change the direction of the files to be copied, left-to-right or right-to-left.
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.
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.
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:
Prayer Clock 1.0.0
Finally I release the Prayer Clock with version 1.0.0. For the internal engine, there is not much change. For the deployment, I tried to make several changes.
Firstly, I am using autotools (autoconf and automake) for the project, so that it is easier for me to maintain the project. Because this project targets for cross platform. Yes, I learnt quite a lot of things about autotools, really nice to use.
Secondly, I continue maintaining the Debian package. Actually, I target on Arch Linux, but I found that Debian and Arch Linux is binary compatible (for my project, I am not sure for others). So, I use Arch Linux to package it in Debian using dpkg. And I also make the PKGBUILD for Arch Linux package build. I choose Debian (not RPM), because previously I used Ubuntu. Besides that, I also follow the freedesktop.org specification for the icon and desktop entry. As a result, after installation, we can run the application from the menu item (just like Windows start menu). Because of this deployment, I change the file hierarchy based on Linux/Unix, which I am not familiar about this before.
Catholic particular judgement in programming (for fun only)
[sourcecode language=“c”] int particularJudgement(State* state) { if(state->grace > state->sin) { if(state->punishment) { return PURGATORY; } else { return HEAVEN; } } return HELL; } [/sourcecode]