Programming

Web Application and Weapon

I have a chance to think about developing web application and a question just popped in my mind. Actually, programming looks like fighting in a war which we are going to move forward to the goal. There are so many obstacles along the way. However, just like in the war which we have a set of weapons, we have libraries, frameworks and systems instead. The question is what weapon such each library or framework or system look like in the war.

Caution! Below are just my intuition so read at your own risk and don't trust me.

wxPython - A Simple Application

A thread at Codenone has been discussing about how to programming with Button in wxPython. In conclusion, there were 2 questions.

  1. How to fire an event to a specific button whenever Return or Enter key is pressed?
  2. How to specify TAB order to TextCtrl?

In fact, I have never developed GUI program for so long. I guessed as follows.

  1. Set the button as default.
  2. Specify tab index.

Above answers are just partially correct.

Greatest Common Divisor

One of the most popular definition in mathematics is the Greatest Common Divisor or GCD. If i am not wrong, I studied about GCD in primary school or secondary school after I learned division. At that time, I don't know why I need to use GCD other than for calculating Fraction. Actually, GCD is used so often in high-level mathematics and computer sciences. Since it is very popular, there are many approaches for finding GCD of given numbers.

New theme for healthy eyes

According to my previous post regarding my eyes, I have already changed my desktop theme to Neutronium for a while. It works so great. As a plus, I get an hour battery life from my laptop without optimizing anything else. Cool! To promote this healthy eyes campaign, I have also changed theme of this site to be more eyes-friendly like you might see right now.

IP to Country 1.0 and Search Keywords 1.0 have been released

I have contributed 2 modules and a translation at Drupal such as IP to Country (drupal.org), Search Keywords (drupal.org) and Thai Translation (drupal.org) for a year. However, it seems I forgot to release such a stable release. I apologize for this missing piece. It is because I am too familiar with development but not releasing and I have no exact plan for next release. Thanks to the issue posted today to point me out about this missing piece.

Django: FloatField for newforms

I'm trying to develop something using Django because it must be cross-platform. The easiest solution for cross-platform application is web-based application. Since I have just started and the document recommends me to use newforms instead of the oldforms. The concept of newforms is to define fields in the form for later validation and rendering the form in various formats and styles. However, the current implementation of newforms is in very early state (I guess) so there are so many missing pieces. For example, I would like to have a float field which automatically validates the input to be a valid floating point number. So I have to implement it myself.