Wednesday, July 2, 2008

Old Blog Name Already Taken

I change my old blog name and URL just about 3 days ago, and today I found out they are already taken by other people. I am a little surprised at how fast this is happening. The old blog name is "Fei's Engineering Blog" and the URL was "fei-engineering-blog.blogspot.com". I thought they were odd enough such that no one would really use them, but obviously I am proven wrong. From the post of the new blog owner, it seems like he/she is not a pure English speaker because the language looks like Spanish to me. o_O

Anyways, good luck to the new blogger, and as a reminder to my friends and any other potential reader, my blog's URL is currently "jianfeiliao.blogspot.com". The name of the blog at this moment is "A newbie's level up journal", thought it might be changed later on.

UPDATE: Obviously the new blog under that old name is banned due to rules violations. Too bad I cannot use that URL again. -_-

Monday, June 30, 2008

Handle Chinese in Python while using Pydev and Pygame

I never really try to program anything that has to deal with the Chinese before, even though I'm a 100% Chinese. However, I recently came accross a problem of renaming some of my files, which have Chinese in them. I decided to write a little script to do the task in order to practice my Python skill. Very soon I encountered the unicode problem. After some searching and hacking, I was able to solve the problem. To avoid forgetting the solution, I put down this sample program as my note for future reference.

To display the string correctly in the eclipse console, set the encoding to UTF-8 under "Run Dialog => Common". Also in the project properties, set the "Text file encoding" to UTF-8.

# -*- coding: UTF-8 -*-

import sys
import pygame
from pygame.locals import QUIT

pygame
.init()

# This string contains both simplified Chinese and traditional Chinese.
unicode_string
= u'Hello Unicode String!简体!繁體!'
# Test the string in Eclipse console.
print unicode_string

# Must use a font that is capable of displaying Chinese.
string_font
= pygame.font.SysFont('simsun&nsimsun', 16, True, False);
string_surface
= string_font.render(unicode_string, True, (0, 255, 0))

# Display the string to the pygame screen.
screen
= pygame.display.set_mode((300, 40), 0, 32)

while True:
# Missing this event handle loop will cause the pygame window freezes somehow.
for event in pygame.event.get():
if event.type == QUIT:
exit()

screen
.fill((0, 0, 0))
screen
.blit(string_surface, (10, 10))
pygame
.display.update()


Sunday, June 29, 2008

Ready . . . Get Set . . . Go!

It's been a while after my last post. I was trying to keep up the posting as the summer starts, but didn't expect the blogger was blocked by the GFW of China. -_- Fortunately it's finally unlocked now, and I can access my blog again.

It seems like the Blogger has upgraded the system and added a bunch of cool new features. Therefore I figured I might as well give a new look to my blog, and I even changed the title and URL of the blog.

Since I don't really start looking for jobs until August, I have quite a long summer to spend. I think it will be helpful for me to learn something and probably do a project during this time. Currently I'm learning the Flex 3 and python, even thought they don't really go together. Also, an old article about making a game in a week came across me accidentally, and it really inspired me. I think I will try to do something similar in this summer.

After all, 1/3 of the summer has been gone, and I think I am getting ready. It's time to run.

Wednesday, April 2, 2008

Code Review: Informative Workspace Project

Since I am one of the developers for this project, I would like to dive right into what the weakness are for our system, because those are what really matter to me.

First of all, the current system, in short, is just a tiny bit more than useless. The reason I said it's almost useless is because the current system is very limited in terms of functionality, and it's totally a failure in terms of usability.

For the functionality, it only has a date picker that doesn't really do anything rather than allowing the user to pick a date (hell, so what!), and a tree that displays the structure of the system with some hackystat sensor data for the related members. (yeah, but in a totally ugly and sloppy way) And both of these don't even work for every project. The projects are all set, the user cannot create or delete any project. Heck, the user can't even have much interaction with the current system. We spent quite a lot of time getting the directories tree up, but it turns out that it's not even that useful for indicating the logical "whereabout" of the developers. The structure of the tree gives more information in terms of how the project is set up, and how the files are laid out. But this kind of information is easily obtainable from the project repository, and it's not something that you need to see 24/7. In other words, having that kind of information 24/7 in the telemetry wall is a little bit waste of resource.

For the usability, I didn't realize it's such a great trouble to modify the code until someone aims me about the problems he encountered while tackling the code. I have to agree, it's simply lame. Things that seem to go without saying for me could be quite meaningless to people who didn't write the code. Even with the comment, there is not much help. Not to mention that the comment for the system right now is not sufficient at all. The idea to push back the implementation of a GUI for the user to customize the account information and such is proven to be wrong. It is almost a necessity from the view point of the users.

Finally, when it comes down to the point that is the system actually useful or not, my own opinion is that given the vision of the system - to give an overview of the project - this system should be very useful. However, the current system certainly doesn't fulfill this vision. The poor representation of the member status and the over-usage of the screen estate are major problems right now, and it is obviously not the correct way to go. Professor Johnson recommended the usage of JTreeMap. Although the idea of it seems very amusing, the implementation of it doesn't really fit into the current system. I can almost feel the the big change of the system is coming along. Well, hopefully it is a good one.

Wednesday, March 19, 2008

Code Review: iHacky Project

I did my review by following the installation guide from the iHacky project site. The process is so easy because I already have a facbook account and hackystat account. The actual usage of the application is pretty much the same as what the team demonstrated during the class time, and there's really nothing much I found useful at the moment. So far, the only useful bit of functionality of the application seems to be the searching for the peopl who use the same tools as me. (On a side note, when I tried the search, the auto-complete feature didn't work for me. Is there any special steps required to trigger it?)

In terms of the source code, since I have literally no knowledge of PHP, I can't give too much comment on it. However, I do see the lack of QA tools used for the project. The team should at least provide a way of building the system, so that the project can be actually applied in the telemetry hudson.

In terms of documentation, the installation guide should probably specify that the user must be login into facebook before they actually click the link to the add the application. Also, I don't understand why the application cannot be found within the facebook application search, because that was the initial way I tried to find the application, and I believe that's how most people will look for an application in facebook.

In terms of usability, there are quite a lot of problems exist in the current system. First of all, in the profile, the user is required to enter their hackystat account info. However, there's no way to change this info after it's been set. Also, I tried with another account with false hackystat info, the system didn't detect that. I suggest the team to add some sort of authentication mechnism on this. Second, the tools tab, as the Hong said, should be integrated into the profile page. Then in the profile page, the tools should have link on them or near them that the user can simply click on the link and find the people who are using the same tool. Third, the team tag seems to belong the projects tag. I don't really see the reason of separating them. Also, in the projects page, I personally don't really need the "default project". Maybe a link to create new project in hackystat can be included here. Lastly, I don't know what the invite tag is for.

Honestly, the system right now has very very limited actual usage. Instead of trying all sorts of different ideas, I think the team should be focusing on one particular feature and keep working on it to make that feature become actually useful. The tools is one of the good features to work on for now. By enabling the user to edit the tools they use, and finding other people who use the same tools, are something good to know. Also, besides what tools are used, I would also like to know the information on how frequent the tools are used, when was the tool used last time, etc. The hackystat sensor could provide all these information easily. Right now, only the projects information comes from hackystat, and it's not something that useful for me. Also, the whole class is suppose to have this system installed by now, so the team could use us as their initial users base. After all, facebook is all about community connection, but the system is only been used internally by the 3 developers right now.

Overall, the iHacky team is on a good start for the project. From the developer guide, I can see how hard it is for them to get their project up on facebook and running, and they are using PHP, which is something that they are not familiar with. Right now things are set, I'm expecting them to provide something more insignful and useful in practice in the next milestone.