Nov 192009
 

I’ve made some progress, I want to write it down here so that I can follow up tomorrow (actually, today):

  • Python is not that easy, but it is not that difficult, I’ve decided to use wsgi plus web.py to do my web development, I think wsgi is the right way to go, but web.py is still a question mark – I picked it up just because it is simple
  • Tuned Apache configuration to make it support wsgi/web.py, actually I was thinking of finding something else which will be lighter, I still need to do some more research on that but since I’m using wsgi so I don’t think changing web server will affect anything, other than deployment.
  • I found a place to host subversion, freely. Using version control can easily track changes, and remote repository will make sure my stuffs are safe. Free service does not guarantee 100% reliability, but thinking of I have local copy already, it’s acceptable
Nov 172009
 

Here is the deal – I decided to drop PHP and moving to Python, so that I can spend less time on dealing with less-supported PHP (in this nosql wave), I’ve removed PHP from all dev/test environments and wish I won’t come back later.

Actually I’ve made PHP works, but I’m just not feeling well as not many people are using PHP and it seems hard to seek help whenever needed. Also, seems setting up Python with Apache (through wsgi) is not that difficult. It could be a good chance to lear Python as well, though I did some PyS60 a while ago (for Jabber on E90).

BTW, I’ve upgraded all Fedora instances (3 of them) to Fedora 12, so far so good.

Aug 212009
 

I didn’t post anything here in the past couple of days as I was busy on pys60 stuffs, pretty fun and made progress.

Here are some issues I solved or partially solved (say, work around), some of them may look stupid to experience S60 or Python developers but thinking of I’m new to both …

  1. Access point selection, old version used to ask for selecting access point once it’s trying to establish connection to server. Some articles saying by import btsocket module as socket will solve the problem, but actually it does not work. The right solution is using the new feature from pys60 1.9.x (I believe this is the right version), that is, socket itself not support set_default_access_point, which is similar to btsocket’s method in same name, but taking name of the access point (the string) as the parameter which is actually more convenience than btsocket
  2. It seems loading time is really long (well, depends on how many modules to be loaded), so put something like a appuifw.note(“something”) at the very beginning, just after one import appuifw (remember don’t import all other modules) is much more user friendly
  3. combo in Form is way too hard to use, you have to have access to the combo value through form object, which is not convenience at all
  4. e32dbm … support string ONLY, and better encode/decode everything with utf-8, otherwise it will be all sort of problems to sync up the encoding.

There are some other minor findings such as different between list (it’s an array!!!) and a map. However, I’m still having problem in dealing with UI, at this moment I want to have a tab with two text boxes, one for showing the conservation (in and out messages), and the other one used to input message. I haven’t got any ideas how to make it, so far. It seems Canvas is the direction, but output text with line wrapping is way to hard to do to me.

I will post things here once I get any progress, but I would like to guess that won’t be significant in near future.

Aug 172009
 

Hey, I’ve made good progress on E90’s IM (jabber client).

There are two threads that I’m currently working on, one is UI stuffs that I got everything from a book, the other one is XMPP protocol that I got information from xmpppy project’s sample (and yes, I’m using this project now as it seems to have minimum external dependencies). UI goes well, though I haven’t done anything in real yet, and I just made some good progress with XMPP protocol – I’ve been able to log into my test accounts and send/receive messages.

Now I need to speed up the UI progress as I need some basic UI so to make things working smoothly (such as now I have to shutdown my handset to quit the test program, which is SUPER ugly). I will check around and if there is nothing useful than that, I will register a new project on sourceforge, and wish this becomes my second product-level project (1st one is the mail alert but I’m no longer using it).

Aug 082009
 

Now … Python time again, since it seems to be the easiest way to develope some leisure stuffs for my new E90.

So here are things to be installed:

  • ActivePython for Windows, at this moment need to use 2.5.x
  • ensymble for Windows, I’m using 0.28 (for Python 2.5)
  • openssl for Windows, remember download openssl.zip
  • pys60, current version is 1.9.7, this (the sis file) is for installing to my handset

Install pys60 to handset is pretty straight forward, except you may have to deal with certificate, etc. – check those Symbian forum please, I don’t think my solution is the best (allow to install any software and don’t check certificate at all).

Now, install ActivePython on Windows box by following instruction, then create a directory for ensymble (let’s say C:\Ensymble), unzip the openssl.zip to that directory (all 3 files in total), and then the ensymble_xxx.py – I changed the name to ensymble.py so that I need to type less whenever I want to use it. As the last step, put C:\Ensymble to your environment variable PATH.

After everything’s done, let’s try the first Python application for Symbian – pick an open source application from PyS60 Application Directory, and build it. I was using Magic Video as my first test, download the py file, put it somewhere and then run:

ensymble.py py2sis –uid=0x98765432 –appname=”MagicVideo” –caption=”Magic Video” –version=1.0.0 magicvideo.py magicvideo

you will get a .sis file in the current directory and that can be installed to handset.

Remember use uid >0x7fffffff, I didn’t pay attention to the warning message on the screen and this costed me almost half an hour to figure out why the application cannot be installed.

Jun 142009
 

It seems godaddy supports PHP only so I’m thinking of stop learning Python for now even it has better framework. There are some widely used PHP framework that I can take to deploy to godaddy, which is more convenience.

Currently I’m comparing Zend, CakePHP, and Symfony. I guess I won’t try Zend as it sound like too old, and does not support application generation. People mentioned CakePHP lack os real model support, while Symfony is sort of too complicated to start with.

I will focus on CakePHP and Symfony, I get a feeling that I will stick with CakePHP without any reason, but sure I will do serious research on Symfony as well.

Again, I will post my findings here.

Jun 112009
 

I’m trying to study Django more, this needs to get rid of the limitation of running test locally.

I was doing port forwarding and then I thought, “anyway I will try deployment later on, why not just start the trial from now?”

So, I started looking around, of course first thing came to mind is mod_python with apache httpd, but my Ubuntu has lighttpd running already (I have no idea when and why I deployed it), and then I thought, “yea, apache httpd is way too heavy, let me try lighttpd”.

It turned out lighttpd is not perfect in administration though it may get me some performance gain. I have to launch fastcgi by myself, and in a real production environment it means I need to write some monitoring (parent) process to make sure the fastcgi server is running for all the time.

Anyway I make django running on lighttpd, there are some URL mess and I still haven’t figured everything out, it seems django+lighttpd prefer application-per-domain instead of application-per-URI, I will check more to see if it is the case or not.

Jun 102009
 

I got template not found etc error while playing with Django, and obviously my turtorial material is not up to date.

Symptom is described here:

http://sam.bluwiki.com/blog/2008/07/django-error-while-importing-urlconf.php

“If you’re getting it, it’s likely you updated to the latest Django SVN release, and haven’t upgraded your admin site’s configuration.”

and the solution link is on the same page, which, in short, add following lines to urls.py:

from django.contrib import admin
admin.autodiscover()

and uncomment this line:

(r’^admin/(.*)’, admin.site.root),

that’s it …

Jun 022009
 

Just started doing some Python stff, and since it will be used to for small site or quick prototype, I decided to try TurboGears which is seems to be a promising framework.

Pity Ubuntu packaging of TurboGears is broken, per bug, Ubuntu was packaging python2.5 files in the 2.6 package.

Yuck, have to wait till they fix it as first, I’m not in a hurry, second, I’m not familiar with whole stuff so I may mess up the system.

I can still play with Python though, take it as a generic scripting lanage such as Perl and PHP, do some command line stuffs.

May 202009
 

Boss asked me check out Google’s App Engine, and said that’s cool and could be the direction that we are going to move to, though we may only serve internal customers.

I’m still playing with it – I’m not familiar with Python no Java, and I don’t like them too much, but I can try.

Is grid/cloud the right thing to go? Doubt, but since there are so many experts take it seriously as future, let’s assume it is the direction. It may like “open system”, or “client servr”, or “3-tiers achitect”, or “go web”, or “virtualization” – all these words used to be fancy or cool, but later on they just become our daily life in development. ๐Ÿ™‚