Python

How to work with MSSQL in Python on Linux

Actually, I like to work with SQLite or MySQL because they are so very easy to find and work with. However, sometimes we might need to work with Microsoft SQL. Working with MSSQL on MS Windows is quite easy. There are so many drivers on that platform. Unfortunately, I am living on Linux, Ubuntu Feisty Fawn, and my favorite programming language is [Python][]. As a result, I have to find a way to contact MSSQL through Python.

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.

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.

Performance improvement of Drupal 5 against 4.7

Drupal 5 has been released for a while. It comes with lots of changes in APIs as well as in the core engine. One of the reason to drive changing the core engine of Drupal is performance. If you remember the performance comparision of Ruby on Rails, Django and Symfony (read here) last year, the performance result was Django, Ruby on Rails and Symfopy, respectively. Django was outperformed because Python is generally run faster than the rest. Moreover, PHP is always the slowest one even with any kind of accelerator.

Anyway, Drupal may break above results. It's just a matter of time. Drupal 6 is one of the promising CMS I imagine.