Tuesday, August 5, 2008

From Google Pages To Google Sites

I have made an online professional portfolio earlier using the Google pages creator. However, according to Google, they are no longer accepting new sign-ups for Page Creator because they have shifted their focus to developing Google Sites. More importantly, my portfolio site seems to be down for a long time now.

I tried the Google sites thing, but it doesn't seem like a good choice for a personal site, such as a portfolio. It's more like a wiki pages creator. Just as they said it on the homepage: simple, secure group websites. The design and functionality of it are more oriented for groups. The targeted users are more like a hobby club, a company website, or a team project site, etc.

I will probably still make a portfolio using the Google sites, since I really want to have a working one to meet my very-soon job hunting needs. But I guess I am more eager to have my professional portfolio somewhere else. Currently I'm aiming for the Google App Engine. I was thinking about to put up a Flex site on the GAE, but didn't get it working still. Plus, the Flex application size is greatly confined by the GAE size limit, which is not good. Now I'm trying to make it all python by using the Django framework, but I gotta learn this new framework from ground-up, and it's not like I know python very well either. Well, the programmers have to learn new thing almost every day, I think it doesn't hurt too much to have one or two more. :D

UPDATE: ok never mind, it's simply that I couldn't access the googlepages service in China. My portfolio is still sitting there (I'm back to the U.S.). You can view it from here.

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.

Monday, March 17, 2008

Hudson - My first impression of continuous integration

Things I learned about continuous integration that I did not know before
The Hudson is running on the CSDL telemetry wall since the semester began, and I kind of grab the idea of what it is doing by looking it so often since my project requires me to look on that wall every now and then. What I didn’t notice, however, is that it not only does compile and build the project, but also runs various QA tools, such as checkstyles, PMD, findbugs, JUnit, etc. Also I didn’t know that Hudson is so automated that once you set it up, you can almost forget about it. The features that Hudson offers are far more than I expected.

Problems I had to resolve in order to get the informative workspace system to build under Hudson
I have encountered various problems while I was trying to getting my informative workspace system to work under Hudson, but the real problem that took me quite a while to figure out was to make the system deploy in tomcat by Hudson. First of all, since the system is deployed in tomcat, it requires the tomcat to be running first. And since tomcat is using the default 8080 port, I have to somehow change the port for Hudson. (Well, actually now I think about it, maybe deploying Hudson in tomcat would also solve the problem.) Anyways, what I did was putting the "--httpPort=8081" parameter. However, changing the port didn't solve my problem. I still got the error of deploying the war file into tomcat, and it is a http response 505 error. After some googling, I guessed the problem was caused by the "C:\Documents and Settings" folder, which was the default home directory for Hudson to store a local copy of the SVN files. Since the way I deploy my war file is using ant script, and ant doesn't like the spaces, it simply refused to work. After I set up a variable HUDSON_HOME and points it to a folder without space, things went very smooth. (I still haven't set the emma up, but I was thinking to exclude it from my normal build routine anyways, so I will just leave it as it is for now.)

Update: Later I tried to create a new job with space in the name and the deployment also failed. This could be the original reason for the failure in the deployment. But since ant doesn't like space anyways, I would rather to keep things simple by eliminating both the spaces in HUDSON_HOME and in the job name.

Steps Philip has to carry out in order to get the informative workspace system running using the CSDL Hudson server
Other than setting HUDSON_HOME to a folder without space (which I assume is already been done), I don't see there are any extra steps needed for getting the informative workspace system running in the CSDL Hudson server.

Wednesday, March 12, 2008

Code Review: Visual Studio Hackystat Sensor Project

I have downloaded the setup zip file from the project site, and the installation process was pretty smooth and easy by following their installation guide. Since I am already a Hackystat user, the only external work I need to do is moving the sensorshell.jar file into the correct folder. After that, the sensor is working as intended, and the data is sent correctly by checking via the sensor data browser.

The sensor data types that are available right now are quite a lot. I simply used my visual studio for only 20 seconds (yes, only 20 SECONDS), and there were about 30 different sensor data sent. However, I doubt the usefulness of some of the sensor data types. For example, open and close files. I open and close files quite often without changing anything inside them, and with visual studio debug mode, it's very usual that it will open a file that's not-so-related to your project while you were caught with errors during the debug. For me, I usually close down whatever file that's opened by VS because I know 99% of the time that file isn't the cause of the problem. Therefore, recording data like closing a file doesn't hold any significance to me. Also, the data type of BufferTransition refers to the focus change of a window. From my own experience, switching among different windows is a quite normal and very often task while using an IDE. I am not exactly sure how this data type is is defined, but I am assuming it records whenever the user changes the focus from one window to another window. If that's the case, it would simply generate so many data with no real meaning. What I really want would rather be something like, the window has focus for a certain amount of time and the user is active during this period of time. This way it means the user has probably done something more meaningful in that particular window. Well, it's only my thought.

In terms of bugs, there is an overloaded problem about having more than one instance of VS will cause the sensor to malfunction. Also, the prompt of verifying the sensor has started doesn't show up when I open a solution file, which I assume is the more usual way of how the VS users start working on their project. Technically this isn't a bug, but it would be nice to confirm that the senor is working correctly.

For the testing, I can find two NUnit tests in the source code, but I don't know how to run them, and the developer guide doesn't mention that either. Hopefully they can provide some instruction on that in the future release. Speaking of the source code, the initial distributed version doesn't build successfully due to a null reference to the NUnit stuff. After consulting with Jared, one of the developers, he resolved the problem quickly and re-distributed another working version of the source code. Now only if the real world open source community can be this responsive, the world will be a much nicer place to live.

Overall, the team did a good job on building the sensor. It's functional and easy to install and use. I expect the team will create some sort of GUI interface to configurate the sensor later, and what I would like to see is something about choosing a project for the data that is collected for, just like the eclipse sensor. Because my project is building up something that is somewhat depended on that, I really like that feature to become available in the future.

Wednesday, March 5, 2008

Code Review: Ambient Device Project

The source code and powerpoint for the ambient device project.

Here is my review for the current code base of this project:

I. Passing the verify.build.xml
The verify functionality is provided, however, it fails on the JUnit. Although the team clearly mentioned this both in wiki and the presentation, I was not surprised by it. What really surprised me was its fail on the PMD violation:

C:\ambientHackystat-0.1.303\src\org\hackystat\ambientdevice\device\orb\AmbientOrb.java:20 A class which only has private constructors should be final

However, this is NOT the fault of the ambient device team. The reason for this is because I'm using the PMD version 4.1 instead of the version 4.0. Actually, there are some QA tools that I'm using are on the newer version, but PMD is the only one that gave different result. I wonder if it is a good thing or not to use the newer version, since we had the problem of using newer FindBugs before, and the newer version of Emma is still buggy from my experience.

II. Changing the orb's color
This is actually easier than I expected. Well, it still could be hard for a normal user without any technical knowledge. By changing the user name, password, device ID, and value for the color in the XML file, one can change the color by running the jar file provided with the modified XML file. From my experience, the time it takes to change the color can rage from 4 minute to 18 minute. Honestly, I have yet to see its practical usage if it takes that long to indicate any change. Also, I assume the team would provide a better interface later for changing the XML file, or otherwise they should start thinking to provide one.

III. Improvement & Suggestion
Since I'm still not fully understand the structure of the system, I don't think I can give too much suggestions on improving the design of the system. There are, however, somethings that can be improved easily. First, some comment explaining what the code is doing would be helpful. The whole system almost has no comment besides some mandatory javadoc comment, which isn't helping much. Also, from the schema, it seems like that all the triggers have a comparison attribute, which I don't think it's necessary. For example, a fail unit test can just return a value of false, instead of doing a comparison. (Well, I'm assuming that's what it's doign according to the schema)

IV. Top five biggest problem in the system
Here's what I found that is most problematic, although some of them are due to the device itself, not the programmers.
1. The color changing latency is way too long, which makes the device practically useless. Also, many color differences is hardly noticeable by human eyes.
2. Documentation is lacking. Not to mention the lack of comment inside the code, but also the lack of detail in the installation guide. For the purpose of a code review, the developer guide might be sufficient, but the installation guide should at least let people know what they can do by bringing up the server, or more precisely, what would happen by having the server up. I don't see that from the installation when I was doing the review.
3. There are too many unnecessary libraries included in the system, such as the derby, restlet, gwt.
4. There is no real "mesh-up" with the HackyStat framework for the current system. I can see some of the triggers are pulling data from the HackyStat sensorbase, but it doesn't seem like they are working right now for me.
5. Many JUnit testing cases still fail. But since this is only for the code review purpose, I would expect the team to fix them all later.

V. Summary
Overall, the ambient device team has done a pretty nice job of getting the orb to work. They already have the basic structure of their project setup, and what is left for them to do is to refine and put in more features to the system.

Monday, February 25, 2008

The REST Architectural Principle

After reading some articles about the REST architectural principle, I really think it is a very reasonable architecture, and I am a little surprised in the real world we somehow just don't do things in the way that they supposed to be done, also known as, the RESTful way.

Last semester when I was doing the
MyISERN project, the application was accessed through a serious of "action beans". Therefore, the URL is mostly something like /host/researchers.do, which is converted from the ResearchersActionBean. There are many problems with URL like this: one of the most common issues is that people cannot bookmark the page because the URL is always the same. Moreover, the URL does not represent the data on the page in a meaningful way.

Now since I know about REST, I would like to have my current
Informative Workspace project being RESTful. The idea of informative workspace is to make the software development process more transparent, and thus there will be many relevant data involved. The REST principle can provide a good way to represent these data in a more reasonable way. For example, we can have some URL like these: (well, with the assumption that the system is a web application)

host/projects/ambient-device/code-complexity
host/projects/iHacky/milestones/2008-02-20

Technically, REST refers to giving a unique URI to every resource, and URL is only a subset of URI. However, I believe the concept is the same. Through the composition of the URL, the user can have a better understanding of what data is being represented in the page. I believe the real problem would be how to represent all these data in a way such that they can be helpful to the development process.

On the other hand, the
SensorBase API pretty much obey the REST principle. For example, the resource is named using the URI specification: host/projects/owner/projectname. Also, it uses the standard HTTP methods such as GET, POST, and DELETE to control how the different data are represented, or, control how the different services are provided.

In terms of the
Project Viewer, it doesn't seem like it obeys the REST principle to me. At the moment, the URI does not give information owner of the project, as well as the projects. Also, the user doesn't have access to the other data of the project from the Project Viewer itself. (well, it does give the URI for the SensorBase and DailyProjectData, but it requires the users to enter it from the browser.)

Tuesday, February 12, 2008

How to build a simple survey using Google Docs

Today I discover the new feature of the Google Docs spreadsheet, and I think it would be cool to share the process with the others:

So first of all, you would need a Google account. Duh. Then now go to the Google Docs page and create a new spreadsheet. It will open a window like this:



You don't really have to put anything into the spreadsheet, unless you want to. The survey almost take cares it all. Now click on the Share tag on the top-right corner, you will see a prompt for naming the spreadsheet, and after that, you will see a window like this:



You can check the "Anyone can view this document at". It will generate a link to view the document. By doing that, you can let people to see the result without even publishing the document. But for people to view it without the Google account, you will still have to publish it. Then now check the "to fill out a form" option, and the page will become like this:



As obvious as it shows, you can now "start editing your form". A new window will show up, and you can edit the form in the several ways. Here's a sample one I just made:



After you done playing with the form, click the "choose recipient" button, and now you can specify who would like to survey:



Finally, click the "invite people" button, then you are done! The recipient will get an email with the survey and once they fill it out and submit, the answers of the survey will automatically transfer to spreadsheet, very neat, isn't it?



By now I hope you understant how to do it on your own!

Monday, February 11, 2008

First Impression of HackyStat

I do not know how much time I spent on this assignment because I did a little of it over the course of couple days. The time I spent each day ranged from 5 minutes to 1 hour. The reason that I didn't finish it in one time is mainly due to the overwhelming documentation. I had bad experience from open source software that has no detailed document, so I was happy to see that HackyStat provides such a fully detailed documentation. However, it seems to be a little tiring to go through all that material in one time.

Anyways, the installation of the eclipse sensor was a no-brainer. The GUI setting made it so easy that I got it working without really reading the tutorial. However, the ant sensor was a little more troublesome. First, it took me a while to figure out the double quotes for the ANT_ARG variable is unnecessary. Then the format of the sensorshell.properties file made me confused since it comes with a .txt entension, which turned out to be unnecessary too. Lastly, I couldn’t find the antSensorTest.build.xml at all, and the website seems to have no information about the whereabout of the file either. Although it took some time, I managed to solve all the problems at the end.

In terms of Three Prime Directives, I think HackyStat has done a pretty good job. It definitely accomplishes a useful task by gathering the software development data from the sensors; the detailed documentation helps an external user to successfully install and use the system, although it still can be improved; lastly, since this is an open source project, an external developer should have no problem to understand and enhance the system.

Overall, I feel the HackyStat is very impressive. However, there are some questions that I concern about the system, such as:
* Can the user change the account password? (there is no way to remember the default one!)
* How does it measure the data for a project? (share a same account would be odd)
* Does the data gather from the sensor really useful? (e.g. opened a file in eclipse doesn't mean much)
* What if there is no internet connection, would the services become not available? (that would suck!)

Hopefully, as my experience with HackyStat grows later in this semester, these questions can be solved.

Changing Perspective

I read this article few days ago. The main theme of the article is about what the life of a software engineer is like. It is quite interesting to me that the author considers programming as producing art, just like the poets creating poems. For a very long time, I believe coding is some sort of elegant work, but I never really think of it in terms of art. To me, arts are something like the Mona Lisa, or the Ninth Symphony.

As an ICS senior, from time to time, I would imagine myself becoming a normal programmer after graduation. Then all I do is coding, coding, and coding. 8 hours a day, 5 days a week. It seems like an endless cycle to me, and honestly speaking, I feel that absolutely boring. What if one day, our technology is so advanced, such that we invented some programming machines that can produce quality code as human? If that ever comes true, what is the value left inside a programmer like me?

After reading the article, I think it might be about the time for me to change my perspective of programming. Computer language is like a brush: if it’s in the hand of some incompetent persons, it is no more than a brush; however, if it’s in the hand of an artist, it can become the key to unlock the artistic palace. It is the person that determines what the product can be, either junk or treasure. The creativity of human can never be replaced by the machine. Therefore, there are always some values left inside me, and there would be always something that only I can do.

Someday, if people ever ask what I do, hopefully I can proudly tell them: I write programs, like the poets write poems.

And no, I don’t fix computers.

Monday, January 28, 2008

My First Professional Portfolio

I have just built my first professional portfolio. After this learning experience, I feel strongly that I am still not in the good shape of being a decent computer science professional.

The reason I had that feeling comes from the fact that I have almost literally nothing to say about my expertise when it comes down to a serious level. Although I have been an ICS student for almost four years, I barely had done something that is profound and significant enough that I would like to put down on my portfolio to show to the other people. I had written several C/C++ and Java applications, but those are merely for the course assignments and they hold no important value in terms of demonstrating my computer skills.

The only completed project that I finally put on the portfolio is the MyISERN project that I had been working for the last semester. However, even with such a project that I almost spent the whole semester on, I still feel like it is not good enough as a showcase product. There are still many things can be improved, or have done better. The other project that I put on is the Informative Workspace that I will be working on for this whole semester, and hopefully by the end of this semester it can become a project that I am proud to show to the other people.

Besides the projects, actual work experience that is related to the computer science field is another thing that I found myself missing. I had worked for a while before, but my jobs were totally unrelated to my field. I strongly felt the severe lacking of practical experience as well as the skills and knowledge towards my major.

However, things are not as bad as I mentioned after all. After doing my portfolio, I realized many of my weakness in terms of professional skills and knowledge, and I am more motivated to develop these weaknesses into strength in the future. I believe this is a good thing that I learned from building my first professional portfolio.