Browsing "CS3216"
Nov 14, 2011 - CS3216    4 Comments

What I have learnt in CS3216

CS3216 is really a life-change module. I have benefited from it much more than other modules, sincerely.

Firstly, let’s have a look at my expectations on this module before it started. I wrote in this post.

1, Building a software facilitating people’s life and work.

In both assignment 2 and final project, I think we made something useful. Although Prof. Ben does not buy the idea of Book Venue, I think it is useful. It provides a better way for NUS students to trade used text books. To my surprise, someone wants to buy our final project, YunReading. The actual price does not matter that much, after all, it proves that we can make something with value.

2. How to apply concepts learnt from school to the fast-changing IT world.

To be honest, this point is so abstract. My understanding is that the thinking process is more important than technical skills. One point I think will be important throughout my life is “Thinking about what the problem you are going to solve  before doing”. That will ensure the thing I am building will be of value to some extend.

3. How to work in a team.

After working in different teams with different friends, I do think I have learnt much from all of them. Sai gave me the ideas of self-learning, I learnt how to think and come out with ideas from Kenneth, Peng Jun’s insistence on what he believes in, Yao Long, Yin Yue and Xiang Xin’s good design, Ziwei, Yingbo and Aldrian’s good coding, and Shaohuan’s passion to work…

As for myself, I tried doing different things in each assignment, so that I can experience and learn as much as possible.  By the way, CS3216 has gives me the best team-working atmosphere ever.

4. How to think in advance.

This is really a long term process. I need to continue improving.

 

I did get some bonus from CS3216.

1, learning ability:

Now, I am confident on my self-learning ability, at least for computing related topics. I have the interest to learn more, and I roughly know how to learn, Googling, referring to what I know and reading APIs.

2, video making:

This is really exclusive one for me. I am relatively familiar with FInal Cut Pro X now. :-p

3, making new friends:

One point Prof. Ben mentioned really impress me, “CS3216 is more like a community”. I have never experienced such good atmosphere for a module. I remember I post a question regarding configure mail server in CS3216 group, quirky I received many suggestions.

We will not be strings in the future, I am sure. I do look forward working with these friends in the future, maybe in coming CS3217 (Can I reserve a seat now :-p).

Unlike other modules that force students to learn, CS3216 focuses more on thinking, and let students decide what to explore. This is what education should be.

If you want to make a deference in your life, you should take CS3216. Unfortunately, you don’t have chance, hahaha! I made it.

Nov 14, 2011 - CS3216    No Comments

Some thoughts about CS3216 final lecture

During the past two days, I slept a lot, really a lot. While lying in bed, I was thinking a lot, too.

Here I am writing some of my thoughts on the topics Prof. Ben talked during the last lecture on CS3216.

(i) The world today as we know it is broken

Actually, I am not worrying about the Greek Crisis. I think this is an inevitable stage on the developing of European Union. The crisis will not break down EU, but make it more united.

Germany and France have the ability to save Greece and other countries, and they will save Greece at the end. None wants to see UE breaks up. What they want is asking Grace to pass give up (partially or completely) financial powers to EU. This will be the way in which to dealing with other countries (e.g. Italy, Span…).

So when the crisis ends, EU is economically and finically united. Later, the same same process will happen in military and politics, resulting in a true united Europe that have the ability to fight against US and Russia…

(ii)self mastery

Self mastery( is in the tradition of Chinese culture. However, it has not been in Chinese people’s attention for long time. All of the attentions are paid materials: increasing GDP in the national level and making more money in individual’s focus.

We have (seem to) strong economy now, but we are really weak in culture! what a shame! We have lost the meaning of Chinese! I am so sad seeing what is happening in my motherland.

(ii)Social mobility

I don’t think it is necessary in a society where resources are equally shared among individuals. However, governments need to ensure there is chance, if not equal, for every member to succeed/get resource.

I don’t think the situation in China is that good. Those born in rural areas hardly have the chance to get good education as those born in rich area. People fall behind because of their birth, and it is hardly for them to catch up. Those have strong family background can easily find good jobs: being cicil officials or working in national companies; if they want to run own businesses, they can easily borrow money from banks, or raise funds.

I think Singapore is doing well in this, at least every student can get education of same quality.

Oct 23, 2011 - Apple, CS3216, iOS, Mac OS X, MISC    No Comments

How much of iPhone’s increased price will go to Chinese workers?

Yesterday, Apple Online Store in 22 countries, including Singapore started to take reservation of iPhone 4s, which is supposed to be in stock from 28 October onward in these countries. While checking on Apple Online Store, I found the price is S$ 948, while the iPhone 4 was S$ 888 when it came out last year.

I was a bit surprised, since I was expecting the price be lower. That is because the USD depreciates a lot in the past year, so if the price in US stays the same as last year, it should decrease in term of SGD. That happened to the new MacBook Pro, MacBook Air and iPad 2. The price of iPhone 4s, with 2-year plan, stays 199USD, so I made an assumption that the price of contact-free should keep the same.

As the title indicates, I am not writing to complaint the increase of price. Actually, the price does not matter to me, since I am not buying iPhone 4s. What I am wondering is how much of the increased price will go to Foxconn, and finally to the Chinese assembling workers.

Last year, there were 14 suicides in Foxconn, Apple’s main manufacture, factory in China, and a new one happened on 15 October 2011. It is believed those workers decided to end their life because of the long-hour working time but very small wage. This website lists out some of the salary receipts, which shows the basic wage is 980 CNY (195.65 SGD), working 10 hours everyday per month with 2 days off. With more than 100 hours overtime, their wage can reach to 1800CNY(360 SGD). While the property price outside the main city of Shenzhen, where locates one of Foxconn’s largest factories, is more than 10,000CNY per meter square. The exact compensation to the victim’s family is known, but some says Foxconn’s policy is 100,000 CNY; and some workers would like to suicide to “make money” than to work.

We may blame Foxconn abusing workers, however, we should not ignore Apple. A report shows, “Apple only pays £3.99 to manufacture a £600 iPhone”.

That does not only happen in Foxconn, but its 14-jumps drew the attention. In fact, not only Apple, but also many other companies such as Dell, HP, Motorola are doing the same way: paying very little to factories in China to assemble their products.

There is none caring about the workers. The officials want to attract more foreign companies to increase GDP which will contribute to their political “score”, so they will not set the salary baseline as low as possible; the companies will only pay workers the minimum wage, stated by laws, to maximize their revenue. This is what globalization does, making the rich richer, the poor poorer!

Many people in other countries are complaining that Chinese have taken their jobs. But they never think about that the Chinese will never ask for such low price if they can have a better life. If you have shoes to ware, you will not chose to bare foot.

I remember in the last meeting with Steve Jobs, Obama praised Apple for its great products, and asked Jobs to create more jobs in US or even produce the products inside US. If Apple does so, what will the price of iPhone be? 2000USD?

The low-price Chinese products have been contributed to good live standard for the people over the world for a long time. This is surely going to change. Be prepared for the increasing price. And I do hope more of the increased price go to the workers, who is at my age and many are even younger than me.

Oct 18, 2011 - CS3216    1 Comment

Provisioning for a Million Eyeballs

This is my first time being so late for a post. Last week was not easy for me. I had too much work(coding) to do. I stayed up until 4am every night. Then I was sick, and still have not fully recovered yet. Now I am at the rehearsal of Eusoff Hall Talent Time, on duty for AudioWorks. I am using the iPad writing this post, for the first time I find it is useful.

As usual, last lecture was also very useful, especially for me, a webmaster. Some of the topics are still beyond my scope now, like multiple servers, load balancing. But I do have thought about some others, and even done some work on them. Here I would like to share some points.

Loading time for website
As social networking is playing a important role in our daily life, many websites have the social plugins, including Tweet, Facebook Like, to make the sites more wide-spread. For some well-known reasons, people in China, my who contribute the second most of the traffic for my site, cannot access either Facebook or Twetter. When they are visiting my site, the page keeps loading, to get the plugins, for more than one time, but ends with error messages. I thought it was really bad user experience. So I tried to look for way to remove/hide those plugins for them.
What I did was writing some php code, to get IPs of the visitors, and to locate their country based on the IPs. If you navigate to here, you should see your country. If not, please drop me a message, so I can debug. It sounds easy, but I did have some trouble doing it, and I will write another post later to share that.

Caching of reloading
How good if this lecture had been before our first assignment!
In our first assignment, The Claw, I really did some naive things. To check if a user is logged in, we connect to Facebook on every page! Based o. Other conditions: it is a flash game and the server is at Virginia, the loading time for our app is really long! If we were doing it now, we would consider these and could do better.

Application and database logging
Only after our app in assignment one was hacked and I failed to trace the log of database, did I realize how crucial it is to log. Also, days ago, I fixed a serious bug on my Mac, by reading the log.
However, for most of the time, I find logs are really hard to find and harder to read! Some of them contain binary codes, low level language as well as English… Anyway, we need not only read but also write log in the future.

I just hope I can fully recovery soon, so that I can be dedicated to all my works. Everyone, do take care of yourself!

Oct 9, 2011 - CS3216    2 Comments

Final Project — Be MAD

Time flies so fast this semester! It is now the final phase before I wake up. As for the final project, we really what to make a different, making use of what we have learnt so far. We may not change the world, but as long as we can change a little for some people, it is good enough.

  • What is the application we are going to build?

Basically, it is going to be an online book reader, which is built with HTML5 so it can be used in various platforms, desktops/laptops, tablets, and mobile phones, in depending of what operating system the devices are using. This idea came when Shaohuan and I were meeting a startup in NUS. The company has 5000 books, and we wanted to make use of (sell) them, in a nice way. Later we realized we might not dependent on this company. Rather than making an app for the company, we would better make it for users. That is we will make users have access to more books than the company has.

  • What are the problems we are going to solve?

There are quite many book reading applications. They more or less have these two common problems:

1), Many people will read on deferent platforms in different conditions. For example, they will read on desktop/laptop at home, but read on phones when they are on bus/MRT. The problem is that the reading progress is not the same in different devices. Users have to spend time locating where they stopped reading.

2), There are two ways to getting books: downloading from the internet and reading offline, and reading online. The problem for the former one is that users have to store a copy in deferent devices. As for the later one, users cannot be able to read, or the loading time is rather long when the internet access is bad, like when they are on MRT.

A HTML5 clouding application can solve both of the problems mentioned. It can store the bookmarks and user settings in the cloud (server), and synchronize among all devices. SO the users will not feel any deference when switching devices. Also by making use of the application cache of HTML5 to store whole of part ion of the books the users are reading to their devices, users can even read without internet connection.

  • What are the challenging?

1, How to prevent people from stealing our books, especially the copyrighted ones? There are two proposed solutions: drawing the text in canvas and disable selecting and coping. Drawing the text in canvas can make the display more beautiful, but it definitely needs much processing power, so the application may crash in mobile devices! Disabling the selecting and coping functions are simpler, and IVLE uses this way for taking quizzes. Thus I think we are going to implement the second solution

2, How do we deal with different phone screen sizes? This is quite challenging, since there are huge number of deferent phone screen sizes, and most phones can switch in portrait and landscape views. My idea is to come out with two basic designs: for portrait and landscape views. Then use responsive web design, to make the application adjust itself to suit deferent screen sizes.

3, What about non-smart phones without supporting HTML5? We don’t have enough time to consider that situation since most of the people and Prof Ben are having smart phones. We can support there phones by just displaying the text without having fancy UI. That a future work.

  • Some more thoughts

I think we’d better reduce use of javascript. Javascript runs on the browsers, and using it too much is not a good way to clouding applications. Clouding programming is to run on the server and return the results to clients. Also, running javascript requires good CPU that not many mobile devices have a good one. I have a basic layout here, which uses javascript to remove the redundant elements when it is viewed on mobile devices. It is tested well on desktop browsers. However, I can really see the lag when I use iPad to view it. The best mobile device, iPad, has the lag. I really cannot image what will happen if I use a another device.

I have imba teammates who have high skill of programming and responsibility. It is fun to work with them and I am sure we can be MAD–make a deference!

Oct 7, 2011 - Apple, CS3216, iOS    5 Comments

Mobile Safari Rotation Bug

It may not be appropriate to call it a bug, but it is a problem I am faced with.

The scenario is that I am building a web application, the link is http://www.huqiangty.com/lab/layout.html, which should resize based on the size of browser. I use javascript to detect the window size:

winW = window.innerWidth;
winH = window.innerHeight;

Also I add resize() event to the window object:

$(window).resize( function(){

//Here I will re-detect the size of the window, and then change the size of the container.

})

It works as expected in desktop browser. While I am testing on iPhone and iPad, the problem comes. It is fine when I open the page with iPhone/iPad vertically, and when I rotate the devices to horizontal view. If I rotate it back vertically again, the code “window.innerWidth” gives “wrong” result.

I suspect this is because of zooming in safari, because when zooming in twice, then window.innerWidth becomes half. It is likely safari use zooming to adjust contents when rotation happens.

I have come up with two solutions: 1, disable the zooming function of safari, because zooming is not very useful for the app I am building. I found some tips on this, but they did not work. 2, storing the size of browser window, and changing the size of container using the stored value. That means, I need to hand it in both mobile and desktop browser, since users can resize the window in desktop browsers which can have infinitely different window sizes.

I am still working on this. Any suggestion will be much appreciated and I will post the solution after I solve it.

Sep 27, 2011 - CS3216    4 Comments

Review of Assignment 2 & others

Assignment 2

Finally, assignment is done! However, I am not quite satisfied with what I have done. To be honest, I did not do much in this assignment, although I planned to do more at the beginning. I was so excited about HTML 5 when we started to work. Since I did, not well, the database part in assignment one, I wanted to do something else in this project. I started building a photo uploader, which was a small part in our original plan. I used and wanted to use the fantastic features of HTML5: dragging and dropping to select photos, drawing the photos in canvas, editing photos and storing data in local cache. It was fun until we changed our plan, making my photo-uploader not needed anymore and unfinished. For our new idea, I found I could not do much. I did not contribute as much as my teammates did, I felt down.

HTML5, looks beautiful

As a makeup language, HTML5 can present content very nicely. It runs on different platforms. It is beautiful to view, but painful to code. It runs across platforms, but it is not supported the same way across browsers! I started coding the photo uploader in Chrome. Later I found it was not very convenient to debug in Chrome or Safari, then I shifted to code in Firefox. Surprisingly, the code did not work in Firefox. When it worked in Firefox, it did not work in Chrome again! As a programmer, I need to come out with a set of code for every browser. How many browsers are there? IE6, IE7, IE8, IE9, IE10…

Case study 2:

I think this case study is very relevant to us. It is really normal change ideas along the way, like many team did in assignment 2. That happens mostly because teams are faced with some ignored difficulties, but not because of better new ideas. But die die don’t change more than one time! With all the previous in vain, people will feel depressed. (夫战,勇气也。一鼓作气,再而衰,三而竭)

For school projects, people matter. People feel happy doing what they believe in, and can do well. So the best way, i believe in, to make decision is not either to have powerful leader, nor basing on vote, but to come out with an agreement. This is the ideal result, which means hardly to archive. In real situation, someone has to sacrifice, mentally or physically. Who is the one? I am :-( .  Some friend says I am easily to give up my ideas. Actually, I don’t give up, but I leave them for the future. I will get whatever I want, unless it is proven I really could not. I need to power up myself, and that why I am here in CS3216.

Sep 24, 2011 - CS3216    No Comments

A Day of Projects

Waking up at 9am, Li Shaohuan, who has the same birthday as mine, and I visited a two-year-old start-up in NUS. The co-founder is a nice guy. We talked about the projects they are doing, and some ideas we have.

Later they went to a child care center at Toa Payoh to test the temperature-taking machine they sold to that center. We followed them to see whether there is anything we can do for the child care center, to enhance children learning experience of to ease teachers’ work.

To me, that temperature-taking machine is not that awesome(I will not talk about any details here to protect their trade secrets). It only saves the time for teachers writing down children’s temperature in the log. What can really interest me will be a machine requires no extra work for people to use. I do think they can improve it.

In the child care center, I just noticed two laptops in the office. According to the principle, they have a interactive whiteboard, which is their most advanced teaching tool. So it seems we cannot help them at this stage. With out hardware, we can do nothing.:-(

While on the way, we talked about SEP and NOC, in some point of view I never thought about. My view is that SEP is a wasting of time: you cannot learn well or play well, while you can gain some useful experience and skills doing NOC. To my surprise, he did not think high of NOC either. “You can not learn much useful ting, since the companies will not let you touch the core technology.”, which I think is quite reasonable. I also agree “university is the best time for a man to make a difference, when you have not much pressure form family”, and “If you really interested in doing start-up, start doing in year2 or year3, at least try it”. I like to talk with older guys, listing to their experiences and opinions. They may not always right or applicable for me, they provide me with other ways of thinking.

Our second project is almost there, thanks to the handwork by my teammates, and it is so sweet working with them, Ziwei, SXX, and Yaolong.

I just spent one and half hours finishing my CS2010 Problem Set. I do like algorithm, but I could not find much time on it.

Ending of recess week, but we still have not started coding for CS2103 project. Oops, we need to hurry up!

Sep 18, 2011 - CS3216    2 Comments

Case Study: GetHelp

Honestly speaking, I had no idea of UI designing before taking CS3216, nor do I have any sense of designing. I read two articles, Identifying conflicts in a UI design and A Summary for User-Interface Design Principles , before analyzing the UI of GetHelp. I would try to apply some of those principles to this case study.

Who the users are

This is the most important point to think about when building an application. All the functionalities and UI should be decided based on this point. For GetHelp, there are two categories of users: those need help and those offer help. Based on the design of “homepage”, it seems the developers mainly focused on the help-seekers. Help-seekers can find it easy to ask for helps. But help-providers, the contributors of this app, may feel difficult to find the projects that they can help.

My suggestion is putting the “overview” at the “homepage”, where there are mainly three sections: the helps are being needed, recently solved helps, and the leader board.

Consistency

The consistency includes two parts: being consistent with the system, Facebook platform in this case; and being consistent within the app itself.

This app is quite consistent with the external platform, Facebook. It uses the same font and font color as Facebook. That makes users fell smooth transition from Facebook to this app.

However, it is really bad regarding the consistency within the app itself. The top buttons are not consistent. It is reasonable if the developers want users’ focus paid to “Badget”,” Stats”,”Profiles”,and “Invite”(I will discuss this later). It is really unacceptable that the positions of “overviews” and “recommendations” change in different pages. Moreover, the bottom of ”Badget”,” Stats”,”Profiles”,and “Invite” are hidden by the middle pad in “project page”, in figure 3.

Features and focuses

Developers definitely want users focus on the features of their app. In GetHelp, the top right buttons, ”Badget”,” Stats”,”Profiles”,and “Invite”, do attract my attention. However, are they all the features? At least, I don’t think “Profile” and “Invite” are important for me when using this app.

When creating a new project, the red button, “call for help”, draws more attention than the detail information, which is in grey. Also since the “call for help” is just behind the text area of adding title, it is likely users click that button after typing title, without filling detail information. It seems all the check boxes are selected by default. It makes me feel very confused how I can select both “ask all friends” and “pick some friends” and the same time.

My suggestion is putting the button”call for help” below the detailed information. Making the color of the detailed information brighter. Hiding the SQL query information, which is of  no meaning to users.

Navigation and visualization

From the given screenshots, I could not find out how to navigate to “project” page, figure 3. That may just because not all information is given. But I do think a hight of current tap should be added, like “Profile” in figure1. Thins can users have a clear idea when they are.

Sep 14, 2011 - CS3216    2 Comments

VSee Talk

It was so good a experience to listen to a talk by Mr.Milton, founder and CEO of VSee, an up going started-up company. I do think he is a nice man. I like his smile, gentleness, and the personality of half-friend-half-teather. He is a successful man, also dedicated programmer, making me feel close.

 

Tough way to success.

VSee was started in 2003, getting it first check in 2009. Six years is really a long time most start-up cannot survive for. I has asked myself if I can insist for such a long time, and the answer was no. I cannot “waste” such time. I cannot bear pressure from family, not any finance. I cannot image how sad my parents would be when others were saying”XX cannot make money, even if he had studied aboard in one of the top universities!” It is true I am looking for quick money, but is not money itself.

Actually I am OK with working 7 days a week. Since semester began, I have just been outside campus twice: going to IKEA to buy a sofa for EusoffWorks, and going to Chinatown for volunteering work this evening.

There is really not easy way to success. I like the motto of my high school “Choosing No.7 High School is choosing a tough way to success”. I remember the slides of railway tracks Prof. Ben showed to us in the last lecture of CS1101s. I admit I am a coward not choosing CS2020. Anyway, I am here in the journey of CS3216. I am not sure if I will be successful, but I do choose the tough way.

Learning is everywhere

As Confucius said “Three people are together, there must be one you can learn from”(三人行,必有我师焉, sorry about my translation. Actually three should be translated as many). We can learn something from people around us. The biggest problem for me is forgetting what I learn. :-( . I think the only solution is doing, doing, doing… When I am about to give up, reminding myself to pushing for one more day, one more week, until it becomes a habit.

I did not realize the importance of replying emails. I have been replying the mails directed to me these days, sometimes just a word “noted”.

Long-distance relationship is good for workaholics 

What you need to do is making a phone call for half hour every day. Even you can call her, while doing other things. Compared to in-campus relationship, which requires seating, shopping, moving…., long-distance relationship is both time and money efficient, O(K) where K is a constant.

Pages:12»