2007年3月6日星期二
Do u like coding?
But sometimes when I compare my program with these of top level companies in this area, I can clearly see that what I have made was very clumsier than theirs. And I can often see these ideas that I created had already been used in other programs years ago.
If something I was not best in the world and if there nothing new in it, what's the meaning of my job?
People write programs having the same functions again and again, why do they do that? Isn't it a waste of time and life?
2007年3月5日星期一
Once upon a time, I had a design.

Device Server would take in charge of manage all the devices. And Web Server is in charge of giving both the CS and BS User Interface.
The most import idea is how 2 physical servers communicate with each other and form a single system for the user. Sharing the load but giving an seamless to the user was our g
That's easy. Web Server 1 would behave just like a Client Software and do what ever the user want.
And I think it's really easy for our friend companies to create their own Client!
But it is all over, my boss doesn't like anything he could not understand.
TIPs for using utf-8 in TurboGears
------------------
Hi all, I'm from China and have recently been studying turbogears. I hope this will help people from countries where languages other than English are spoken. Please point out any mistakes. Each message will be short, but I will keep replying to this thread frequently.
TIP 1.
Better use utf-8 in kid files.
TIP 2.
If a column might contain non utf-8 characters, define it like this in model.py:
UnicodeCol(dbEncoding = "gb2312")
TIP 3.
You want to use standard widgets but you find it doesn't work with Chinese! Then you should:
- Add this at the top of your code: # -*- coding: utf-8 -*-
- Convert your source file to utf-8
- Add a u before any string that contains a Chinese character. (this third one is a must!)
TIP 4.
Something interesting. If you have ever tried the 20 minutes wiki tutorial, run it and type something like this in your browser's address box.:
http://localhost:8080/一些中文字符
Press Enter. As the page does not exist, you will reach the Edit page. Input some text and then save.
Oops! Something wrong happened but if you check the database you will see a new page has been added. This might be a bug, I will see if I have time to fix it.
TIP 5.
If you are using MySQL on windows, use MySQL-python.exe-1.2.2b1.win32-py2.4.exe or you will encounter big problems when you want to execute some SQL containing Unicode.
TIP 6.
If you are using mysql, change your dburi to this form:
sqlobject.dburi="mysql://username:password@hostname:port/databasename?charset=utf8&sqlobject_encoding=utf8
The first encoding tells MySQLdb what charset mysql should use, the second one tells sqlobject how to give MySQLdb a unicoded sql.
TIP 7.
Remarks on TIP 6.
When you're using mysql, you have to use byXXX functions like this:
user = User.byName(u'UserName'.encode('gb2312'))Unicode strings are not accepted. That's why you need to include sqlobject in your dburi.
That's definitely a bug of sqlobject.
If you want a fixed version, you should use CVS to get the latest version.
2007年3月4日星期日
My skills
- Grasp C language; 2 years of practical coding experience in C. Comprehend python and familiar with many famous open source projects based on python.
- Familiar with Windows application development with C# and Object-oriented programming. Know design pattern in C#.
- Familiar with VOIP (Voice over IP) and SIP (Session Initial Protocol).
- Familiar with LINUX environment, worked under Cygwin and Linux. Know VSS, CVS, and Clearcase mechanism;
- Familiar with common used Object-Relational DBMS, such as MS SQL Server, MySQL, Sqlite, and PostGresSql.
- Familiar with popular GIS and Web GIS development tools.
- Familiar with popular Rapid Web Development frameworks and open source web UI libraries.
- Quite familiar with VIM.
Current Position
Project Manager, lead a group of 7 programmers, participate in developing a really large IP surveillance system base on SIP, in charge of the Client Development.
Daily Work
- Resolve technique problems, both the entire design and practical programming problems.
- Project management: make plan, watch over the progress, training freshman.
- Give technique advice for other groups and products.
- Many general affairs, such as reporting to our Product Manager, communicate with customers, and so on.
- Think about future plans of our product.
Computer is never wrong.
I check his code and found that he misspelled a variable.
After that, I made some comment. "In my experience, computer is never wrong. It's always people who made mistakes. And that's why I decided to major in computer science. I thought the world is a unfair place, but in computer, 1 plus 1 is always equal to 2."
