Wednesday, 25 September 2013

Done with GSOC

Last week's blog was written on Douban when Blogger editor wasn't working behind the Great Fire Zone. It's a brief summary on my four weeks' trip in Beijing. There are also some thoughts about managing a NGO.

This is the last week for the GSOC project. Thankfully, I managed to write a 20 pages documentation for the work I've done in these three months. Though it doesn't sound like a complicated project, there are quite a number of technologies being explored. Honestly, a right direction/instruction is somewhat more important than the actual coding. I'm grateful that my mentor Ashish gave me good suggestions on the importance of each sub project at the very beginning. This helped save a lot of time.

In this patient timeline project, we examined novel ways to create an environment to display a patient's medical records and medical history. There are three sub problems to address.

  • How to import the patient’s medical records
  • How to process the raw data and restructure the records data
  • How to render the data to the clients

After several weeks' trials and errors, we finally used bindaas server for data storage and database query interface. Node.js is served as the application server for data processing and user authentication. For data rendering, we use ejs template engine for clean templating and ajax for dynamic data rendering.

I've tried CodeIgnitor(a PHP Framework), Rails( a Ruby Framework) and Node(a Javascript Framework) for the application server. However, we finally picked Node since there is an official decent Javascript library for Medical Data Processing named BlueButton.js which can be used for data processing. The timeline data should be stored into the data server via Restful API after they are processed in the backend. Node.js is capable of handling JS scripts on both backend and front end. Thus it's a perfect framework for this project. Bindaas is a database middleware developed by Emory University which can handle database queries without concerning about the database management system types. The two reasons why we still need an application server instead of letting the client to directly communicate with the Bindaas API are 1. the Bindaas API requires a secure API_Key for the API queries. It is not safe to exposure the API_key in the client ajax calls. 2. there need to be some user authentication scheme in the whole system for the whole system to better store user related medical records.

The biggest challenge came when we want to render pieces of patient medical record data asynchronously in the client. Normally, a template engine updates a whole page after passing data from the controller. However, that would not be an efficient approach if the data come from different controllers&APIs. We need a better way to render sub pages piece by piece asynchronously without affecting the whole page. The first idea came into my mind was to use ajax since it's famous for asynchronous data transactions. However, my previous ajax experience told me that simply appending blocks of updated HTML data to a particular div tag results into dirty codes which is not elegant. There must be a better way! Luckily, we've found the ejs+ajax example . The biggest problem of asynchronously transfer data+clean code has been solved. That's quite a big progress.

There are some more stories about this project. e.g., the timeline data restructuring, design implementation, etc. For more details regarding the timeline project, please refer to the documentation.

Most of the skills were picked up at the spot, e.g., Node, Ejs, Bootstrap Grid System, etc. It is a very good learning experience. At least I'd say I'm twice more familiar with front end developments now. Personally, I believe that one right approach to better master a technical skill is to practise with real projects. I wouldn't say that I mastered node.js since I've only done with one small node project. However, I'm confident to say that I can build my own web projects with the web technics learnt along the way. Ruby on Rails(ror) is so far my most familiar web framework and Bootstrap is my most familiar css framework. Actually, I've done more than three ror small projects and three bootstrap 3 sub projects during the three months. It's really one of my most fruitful summers ever.

Bad things about GSOC. Maybe it's an individual case, but in my project, I am the only one who is in charge of the whole project(with mentor's help). That's more of a individual project than a group project. There is no peer monitoring or code collaboration, thus the whole project is not that tightly structured. I guess the whole project would be more interesting and efficient with collaborations between other developers. Another bad thing comes from my over commitments. I could have spent more time and energy in this project though there were unexpected important commitments during this short summer. Other than those, the GSOC program is really good for students-- a lot to learn, high mobility,good pay,etc.

It's good that I started to delete tasks and redistribute workloads. For instance, I trained a ruby developer for the CodeRobot company so that they can move forward without my involvement. I also guided another web developer to continue working with the CATS project in It's not self-boasting, but I did learned a lot this summer. I find it grateful :-) After the GSOC project officially finished on Oct 1st, I'll have only two commitments left next month-- one full-time web development with Prof. Anthony and one part-time backend development for Wanmen's content management system. Hopefully, I'll get to be more focused.


One lesson I notice among great people is that they normally read a lot! I should learn from them.

Another lesson I learned this week about losing weight comes from this BBC video. I started to practise the tips. Wish I can persist in long term.

Monday, 2 September 2013

Challenges are just getting started

It's my first month working with real projects(my real, I mean something that's going to be used by the public). It's so different from school projects. Every detail matters, from the backend logic to the page buttons. These two weeks, I worked closely with two talented designers, one from a well-established startup company named Umeng Analytics and another doing his own startup after quitting a mobile gaming company named HappyLatte. I know the first designer,PJ, in a hackathon. He is really talented, should be the best designer I've ever worked with so far. I persuaded Prof.Tung to send me to Beijing to work with him on the first prototype and it turns out to be a right decision. He is not only good at design, but also good at UX. He reads a lot. He already came up with a wireframe of the project. Next week, he's going to finish designing the first round of UI design(around 15 pages). The market price for a very good designer is around 5k RMB(1k SGD)/page, however, as his friend, he only charged us 5k RMB for the whole design in the first iteration. We'll go through another iteration in 1-2 months and we'll need his help again. It's not his designs that really teach me most, but the discussion about the project as a product. There are a lot of user interaction needing to be considered. As a developer, I focused too much on the functionalities. However, the values that the product brings to the user&how the user interact with the system is somewhat more important. I also became more familiar with bootstrap&css after writing the wireframe out.

The other designer, Pine, works part-timely with a mobile app and an online code-teaching website. The code-teaching startup came from the same hackathon two months ago. The founder decided to continue with the project and borrowed money from his relatives/friends in Taiwan. He recruited the designer to help move this project forward. I thought I could have some spare time to help him. However, it turns out that I don't have enough time for him since I have more important commitments. To give him a helping hand, I spent a day working with the designer to make the homepage out. I have to say that a good designer is really important. Pine was a software engineer when he was in college. However, he successfully shifted his career to be a web/mobile designer. That's so amazing. He is good at multi-tasking. He recommended a time-management software named TimeCop to me. I've been using it for two weeks and it works very well.  He also shared about some management tips, like using 15min daily scrum meeting in startups, how to work remotely&using trello for project management. Some tips are really useful. I have used trello in CS3216/3217 before, however, I didn't make full use of it. These two weeks, I've been using trello a lot in managing my own timings&projects.

I really need to be more focused. Besides Prof.Tung's project, I still haven't finished GSOC yet. This week, I also work very hard on the front end of the GSOC project. I'm really thankful that GSOC really help force me to learn a lot of new things. To accomplish certain goals, I have to pick up certain skills very fast. Perviously, I only know PHP as a backend language. To find the best framework for the GSOC project, I quickly learned Rails, Node.js, embedded javascript,etc. To fulfil the requirement of making use of a database middleware developed by the GSOC organization, I have to redesign the whole system to make the project modules nicely connected. Unfortunately, I personally has got some other commitments that I didn't put my full time into the project. I could have learnt more, maybe become a Node.js expert or backbone.js expert, however, what I've done are quite superficial, except that I really become more familiar with rails after doing some small projects in this summer.

Last week, I talked with another mobile game developer, who I personally respect a lot. He is about the same age as me and he has been working with his own startup for quite a few years. His company mainly works with mobile games, mostly on android platform. Some games are copied from iOS apps. He is a funny guy and I feel very happy communicating with him. Though I didn't really worked with him before, he is one of the most talented developer I've ever met with. He gave some suggestions on how to move my project forwards, how to do marketing as a tech guy and how to survive as a startup. One of his thoughts about how to create a small&beautiful company really brightened me. "When your company reaches to a state where the next big thing in a certain field can only happen in your company, then that's the moment that your company can really take off." For instance, it is instagram who make photo sharing on phones so easily. Why it's instagram, not some other teams? Even though it is not a big deal to make a voip app, however, why it is Tencent Wechat that sweep the whole China? So to make a killing app/website, you'll need to prepare hard for the moment to come.

Another sharing comes from a iOS developer about her company's most popular app. Her company is a tech company initiated by an American, a Norwegian and a Malaysian. They stated doing iOS app in a very early age(>4 years ago) and the base is Beijing. The target users are mostly overseas. Their most popular app is somewhat violet. However, people love to spend money on the product, especially those from the middle-east. When in public holidays, the Muslim sometimes love to spend lots of money on the games.  Among the global users, 30% revenue comes from Singapore, while only 20% comes from the US. That's an interesting phenomenon.  What's most interesting about her sharing is the leadership style of her bosses. These few days, her company has 10+ employees been kicked out, mostly senior engineers. The Malaysian is very good at managing tasks/people, while the American is very good at brainstorming. Most employees love the Malaysian boss because he is very clear in mind of how to manage the teams. However, the American don't know how to manage all these people. The cofounders sometimes argue with each other.The malaysian cannot stand the American any more. and moved out of the team and started his own business. After the malaysian moves out, the company cannot manage well any more. The American guy thus he recruited a professional manager to manage all these people, which turns out terribly bad. Most senior engineers quizzes the job because they are not well respected by the new manager from Shanghai. It's not stress that make the project move forward, but more on timing.