Mar 23, 2012 - Computing    No Comments

PHP Notes

  1. By default, mod_rewrite is not enabled in apache2, Ubuntu. Use this command to enable it:

sudo a2enmod rewrite

Then reload apache configuration file:

sudo /etc/init.d/apache2 reload

2. After running sudo apt-get remove XXX to remove a package. The following command is needed to remove all leftover files:

sudo apt-get auto remove

 

Mar 8, 2012 - iOS    1 Comment

Make Free Calls on iOS

Here some softwares I use on iPhone to make free phone calls. They are not like Skype, requiring both parties to install the software. Instead, you can call any landline or mobile phones directly, using these softwares, which is really good since my parents are only familiar with phones.

Wewe:

It was good when it provided with 60 minutes free call per day, but now it drops to 30 minutes — 0000-1800: 20 minutes, 1800  - 2400: 10 minutes.

 微微的免费网络电话政策的具体要求是什么?
-时间要求:微微免费网络电话拨打每天都可以使用30分钟,具体时长为0:00~18:00点之间可免费网络电话拨打20分钟,18:00~24:00点之间可免费网络电话拨打10分钟,邀请对方加入微微,微微免费语音视频通话无限制。
-地域要求:微微免费网络电话现在支持免费拨打中国,美国,加拿大,印度,新加坡等国家,其它国家微微正在努力开通,建议您推荐对方安装微微,这样 可以享受不受时间限制的免费通话和信息收发。

2 maaii:

 I use this one most nowadays. It gives out 1.9 USD everyday, which is equivalent to 100 minutes call.

Nov 17, 2011 - Apple, iOS, Mac OS X    No Comments

iTunes accounts without credit card info are disabled in China

Early today (2011-11-17), Apple customers in China found problems buying free apps from iTunes. All of them are using iTunes accounts without credit information.

Picture is from internet

When people are buying free apps in iTunes, they are asked to update their account information. If they refuse to do so, they will not able to purchase.

The accounts with credit information or Apple gift cards are not affected.

Apple currently accepts Visa, MasterCard and American Express. However, credit cards are not widely used in China, and many people’s credit cards are issued by UniPay. Thus, this action will affect many Apple users in China, the second largest market, accounted for 16 percent of Apple’s fourth-quarter sales, or about $4.5 billion.

It is unseen what Apple will do next. I will keep updating on this.

[Updated] Now the China Appstore supports Chinese accounts to top-up. The cheapest price of Apps is 6 CNY, 0.95 USD.

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 22, 2011 - CS2101    5 Comments

Post 3

Time flies, here we are at the final phase of this semester. It comes the time, oral presentation three(OP3), to present our product, QuickDo, to tutors and our fellow friends. At this time, we are spending most time fine-tuning it, while less time thinking about the presentation. Although in real life presentation skills matter, a good product worth 10 thousand words.

 

We have been through two presentations this semester. After learning from the mistakes we made in the last OPs, we now are familiar with most of the presenting skills and we are sure we can fully use them in the last OP. While we are preparing OP3, one question jumps into my mind: how are we positioning ourselves and audiences? Are we “acting” selling the product, or are we sharing what we have learnt with others?

 

If we are selling, I will ask myself:”Would you buy it if you were a user?” The answer is obvious. There are numerous calendar clients or todo managers, and I am using Google Calendar, Apple’s iCal and the new Reminder. I also tried Things and Fantastical. All of them are quite good, and they satisfy Jim’s needs. Especially Fantastical, a new calendar application in mac, is just the right one Jim should use and the one we are trying to make QuickDo like. I remember at the beginning survey of CS2103, I wrote “I want to build something that can facilitate people’s work and life”. At this stage, I would like to say this project is a failure, based on the criteria– what problem does it solve. A product will definitely fail if its developers don’t use it or don’t believe in it. Moreover, the audiences are also selling the same kind of products which might be better than ours. Having this kind of attitude, how can  I be confident on the stage selling this product?

 

If we are exchanging ideas, the difficulties we have been faced with and what we have learnt by solving the problems with other developers. I can say about the bugs and shortages of our product, and discussing and seeking advices from others. In this situation, I am telling the truth of the product, instead of saying it is perfect as a salesman. However, the discussion on techniques is supposed in CS2103. In CS2101, we are doing business–selling, thought I do not like it very much. This is life.

 

We have do it, then we are going to do it well. The product is like our child, and we will think it is better than the others even if it has some bugs. The presentation will be a show time to present the features, and I believe I will perform well.

 

PS: This is the last post that my teammates will definitely read, and they may not visit my blog in the future. So I will take this chance to express my appreciation to them. Thanks for your helps and I do enjoy the time with you. I apologize for any unsatisfying work I did. Good luck to your coming exams, and all the best for your future study and life. Hopefully we can work together in the future, too.

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 11, 2011 - Apple, iOS, Mac OS X    No Comments

iCloud has been opened for non-developers

iCloud, Apple’s clouding service, which is supposed to be released on October 12th, now is opened for non-developers! You can just login with you Apple ID.

Below is what Apple says about iCloud:

iCloud stores your music, photos, documents, and more and wirelessly pushes them to all your devices. Automatic, effortless, and seamless — it just works.

You can go there to learn more about it.

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!

Pages:123»