Wednesday, June 18, 2014

The Codebreaker Alan Turing

Alan Turing

Jun 7 2014 marks the 60th anniversary of Alan Turing's death.

All computer science students should know Alan Turing, he is generally known as the father of computer science. Alan Turing is a mathematician and computer scientist. The Turing machine created by Alan Turing for computing is the very first prototype of today's computer.

Alan Turing is a genius and a very smart mathematician, he helps the British and Alliance to decode the encrypted code from Germany during world war II. Winston Churchill said Turing make the single biggest contribution to Allied victory in WWII against Nazi Germany.

Alan Turing was prosecuted for homosexual activities in 1952, the British old society forbidden for such activities. He accepted the chemical injection (chemical castration) as alternative to prison.

Alan Turing died at 41 years old (year 1954), from cyanide poisoning. The incident was determined as suicide case, but his mother believed it was accidental. At year 2013, the British Queen granted a royal pardon to the code breaker hero who has contributed during world war II. Late is still better than none.

Reference:
Queen pardons wartime code breaking hero Alan Turing
Why Alan Turing is the father of Computer Science

Monday, June 16, 2014

A Day Out With Lowepro CompuDay Photo 250

This is just a simple review of the Lowepro CompuDay Photo 250 camera bag. This is not a new model, just happen that I got one to try out, I write a short review of it. I am not sure when Lowepro release this model, could be as early as year 2011.

I have used Lowepro Fastpack 200 before, but I should get the Fastpack 250, because Fastpack 250 is a notebook and camera bag. The Fastpack 200 just like Fastpack 250, but without the notebook compartment.

I like the Fastpack design, I can easily take out the camera from the side of the bag. If you think it is insecure, you may look for those camera backpack open from the back and not from the side.

I am looking for a bag for camera and notebook, I am eyeing on Lowepro fastpack 150, it is smaller but cheaper than fastpack 250. I happen to found another Lowepro bag which fit my needs, the CompuDay Photo 250.

By looking at the model name, you know this is a camera + computer bag, is used for a day out. After I have tried the bag, it is just nice for a day of casual traveling around the city. Before this, I was using a sling camera bag and another backpack for a sweater and a bottle of water.

Sling bag is not good for me. I pack everything in to this CompuDay Photo 250. After a day out, I am quite comfortable with it. This is what I packed into the bag, mainly a camera, a sweater, a 500ml water plus a few other gadget and accessories.

You can pack with plenty of things

The camera is placed at the side of the bag. Can fit in a full frame dSLR and a medium size lens (according to the sales). I am using it with a Nikon D90, it fit in tight with plenty of space for a larger lens.



The notebook compartment, I put in an iPad. It can fit in the 13-inch MacBook Air, or a 15-inch notebook.
Notebook compartment

More compartment

Rear view

Fit into the handle of the luggage. Not perfect, but it fits.

This is ideal for:
A casual day out. I will carry my dSLR more often with this bag.

This is not for:
If you are carrying extra lens, extra battery, battery charger. It still can fit in, but you may consider Fastpack 150 or Fastpack 250.

Lowepro website has a bag finder, help you to choose the right camera bag for you. I can find Fastpack 150AW, but unable to find this CompuDay Photo 250.

Note. This bag doesn't came with rain coat cover.

Saturday, June 14, 2014

Beatbox S10 Review

Beatbox S10

You should heard about Beats Electronics as Apple to acquire Beats for USD3 billion.


I only found out recently that I have a Beats product, a portable speaker model Beatbox S10.


This is a portable, battery powered, bluetooth personal speaker. Very similar with the X-mini speaker, but the Beatbox is much cheaper. Amazon selling at less than USD20.


Packaging.It came with a small box, contain the speaker and charging cable. Very simple packaging.


Bluetooth.Bluetooth connection is easy, but I experience some difficulties to reconnect to the speaker, after disconnect.


Standalone player.It use microSD as memory storage. Since the speaker use the same button to control the volume and skip songs, I have some difficulties to adjust the sound volume. Press and hold control the volume, press and release to skip songs.


Battery life.After used for some time, I find the battery quality is not so good as company with X-mini. I am referring the quality as play back time and durability. The battery is not replaceable.


Sound quality.Sounds good, but I am not sensitive, so not much comment.


Usability.It is heavier than X-mini speaker, but very portable.


Average comment. With the price USD20, is a good buy, but don't expect it to last very long.

Friday, June 13, 2014

Taipei travel card service with roaming

from flickr

Taiwanese travel card, the EasyCard company is aggressive. After the announcement of working together with Singapore EZ-Link travel card, EasyCard to work with Hong Kong Octopus travelling card. One travelling card can be used in 3 cities (Taipei, Hong Kong and Singapore) in the future.

The idea is like telco roaming. You can use local register mobile phone in other countries, with roaming feature enable. With the "roaming" service, travellers don't have to get extra travelling card when they go to other country. There should be some technical issue to be solved, but the technical issues are not that difficult compare with the business decision.

The travelling card can be used for city train system (LRT, MRT), busses, parking or even used as a cash card to purchase goods. The payment are normally micro-payment. Malaysia has Touch'n Go card, Singapore has EZ-Link, Taipei has EasyCard (悠遊卡) and Hong Kong has Octopus card (八達通).

Malaysia Touch'n Go card can be used for parking, toll, LRT, Monorail, RapidKL bus, KTM train and ERL Train (train to KL International Airport). Touch'n Go card is not used for other payment system. In other countries like Hong Kong, Taipei and Singapore. The traveling card can be used as

Is convenience for consumer to travel by 1 card. As the travelling card can be used as payment card and cash card, there is still a lot of potential with travel card.

Reference:
悠遊卡搭香港八達通 有譜了

Thursday, June 12, 2014

University of Malaya to stop issue hardcopy certificate?

Just read a news reported that University of Malaya (Malaya Universiti) has implemented the e-Scrolls digital certificates, will stop issued the official hardcopy of the certificate for the graduates. The students can apply the official certificate by paying certain amount of processing fees.

I always support using the information technology to simplified our work, but the university should always produce an official copy for the students. Is not the time for 100% using electronic documents yet. The processing fees for getting a official certificate should be reasonable.

Is good that the owner can printed out their own certificate. Most students will like to keep a copy of the official certificate. Most companies and university will not accept the electronic certificate, it troublesome for the graduates to apply job or further studies.

If you win the FIFA World Cup, you will like to keep the trophy and not just the photo of the trophy, right? I really hope they are not going to implement this that soon, think twice or more than twice.

Reference:
Oriental Daily.  马大以电子文凭取代纸本文凭 一纸文凭50令吉
Sinchew. 馬大7月起發電子文憑‧索紙本文憑須付費50

Tuesday, June 03, 2014

Apple WWDC Keynote 2014 Summary

This is just a dummy guide for WWDC14 keynote.

WWDC 2014 keynote is about preview of Mac OS X 10.10 and iOS 8.

Mac OS X 10.10

It will be name as Yosemite (Yoo-se-mee-tee). It will be available for free (the previous version Mavericks is free too).

What's new?
- Change the graphic user interface, more iOS look and feel. Integrate better with iOS too. Changes includes notification centre, spotlight move the the centre of the screen and more.
- iCloud works more like Dropbox, can sync as a folder on OS X.
- Safari browser with better performance in speed.
- Desktop can pick up phone call to your phone. (More than just picking up phone calls).

iOS 8

- QuickType with improved auto correct and prediction typing.
- iOS get into enterprise market.
- Share account with family members. Will asked for permission when purchase using the same credit card account. (A simple but good implementation)
- Improvement and localisation for China market.
- HealthKit for health application, HomeKit for smart home application.
- A new programming language, Swift. Swift can use existing Objective-C/C runtime.

Every time Apple introduced new software platform, there is a long list of improvement and added features. New iOS will be expected as new iPhone will came out every year. I don't expect Apple refresh the desktop OS (Mac OS X) so soon. The improvement on software like Safari browser and performance will be welcome.

Full keynote is available on Apple website, or you can take a look at WWDC 2014 keynote in 10 minutes.

Another good summary from The Verge YouTube channel.

Saturday, May 31, 2014

Apple To Acquire Beats Electronics

Apple to acquire Beats Electronics for USD3 billion, the largest purchase after NeXT in 1996 (for USD429 million). Beats co-founders Jimmy Iovine and Dr. Dre will join Apple.

Apple has been criticised for not having any break through products after iPad. In another words, Apple has no interesting product yet under after Tim Cook as CEO.

Apple has acquired many companies during pass few years, but are smaller company with advance technology and potential talents eg. P.A. Semi, Placebase, Siri, C3 Technologies etc. From here you will notice Tim Cook's strategy different from Steve Jobs.

What type of company is Beats Electronics that worth Apple to dig out USD3 billion from their pocket? Beats Electronics produce audio product which co-founded by Jimmy Iovine and hip-hop producer Dr. Dre (Andre Young).

The marketing line for the Beats Electronics products is "People aren't hearing all the music, ... with Beats, people are going to hear what the artists hear ..." Beats has earphone, iPod docking speakers, bluetooth portable speaker (and more). Beats' product normally label with "beats by dr. dre".

Beats founded at year 2006. In year 2011, Taiwan mobile phone manufacturer HTC acquired 50.1% stake of Beats with USD309 million. Later HTC sold their shares in Beats, the deal make Beats value at USD1 billion. HTC invest in Beats to use Beats technology in their mobile phones.

Those early products from Beats are manufacture by Monster. You will notice a lot of the Beats products are label with Monster. In year 2012, Monster break-off with Bears as contract end, and becomes a competitor of Beats.

Beats also works together with HP. HP use Beats Audio system in HP notebook, it can be identified with red character with black colour background. HP has a dedicated page for its Beats Audio products (check here). Will Beats Audio still be using at HP's notebook after Apple's acquisition? I doubt it. Altec Lansing (or other speaker companies) should be benefited from this.

Beats has a portable mini speaker product manufacture by China, the beatbox S10 series. The beatbox looks like the X-mini portable speakers, but much cheaper. The beatbox makes X-mini speaker just an over priced product. If X-mini don't improved, it going to be killed by beatbox soon.

After than earphones and speaker, Beats has online music streaming service, Beats Music. There are analysis saying that Apple acquire Beats to improve its music business, especially the online music streaming service.

Is Beats audio device good? It "looks good and sounds good", the Beats audio speaker is "loud and clear". Does Beats worth the USD3 billion? Let's see how it goes.

Thursday, May 29, 2014

Which Lens Will You Buy for USD1K Budget

If money is not an issue, you may buy all the lenses you like, because every lens has its own style and character. If you are given a USD1,000 budget, which lens you will buy for the Nikon dSLR?

Information for the dSLR beginners, USD1,000 may not enough for you to buy a good lens. Luckily there are so many Nikon lenses, which came with difference prices and functionalities. With the limited budget you still have few choices of the Nikon lenses, good enough to fit in our needs.

For Nikon full-frame (D4, D4S, D700, D800, D600/D610) camera, you may buy a 28-300mm. One lens for all, is convenience for traveling.

For myself, I like to shoot portrait, I may spend a little bit more on the 85mm. These will be my choices:

1. Nikkor 50mm f/1.8G. About USD 200-220.
The 50mm is cheap and nice, good for portrait and low light. A must, even for beginners.

2. Nikkor 85mm f/1.8G. About USD 500.
Nikon has a 85mm f/1.4G, but the price is three time more than the 1.8G version. There are some slight difference between these 2 lenses. The pricy 85mm f/1.4G make 85mm f/1.8G looks a good buy. If you are not too into portrait, you still can use the 50mm 1.8G and skip this lens as well.

3. Nikkor 70-300mm G. About USD 140.
Since I still want to shoot animals or birds outdoor, not much budget left. I will choose this in-expensive zoom lens.

About the Nikkor 70-300mm f/4-5.6G, this is the older version. It has no auto-focus, not VR (Vibration Reduction). I also doubt that is still available on the market, as there is a version 2 available. I heard 2 of my friends told me they have bought it (the old version) and sold it, they don't like the lens.

Since the lens has no auto-focus, you need to manual focus if you use it on D40, D60, D3200 or D5300 series. The successor is the Nikkor 70-300mm VR, with auto-focus and VR, but it cost 3 times (about USD600, still cheap) more.

For landscape and scenery lovers, you need a wider lens with 50mm. My choices are:

1. Nikkor 50mm f/1.8G. About USD 200-220

2. Nikkor 24mm f/2.8 D. About USD 360.
or the newer
Nikkor 28mm f/1.8G. About USD 700.

3. Nikkor 70-300mm G. About USD 140.

For Nikon DX (eg. D3200, D5300, D7100 etc.) users. These are my choices:

1. Nikkor 35mm f/1.8G DX. About USD 200.
This is another cheap and nice prime lens like the 50mm, but this is for DX cameras only.

2. Nikkor 18-55mm DX
Normally this is the kit lens, it has a few version, DX, DX II, VR. The latest will be 18-55mm VR II, cost about USD 250.

3. Nikkor 55-200mm DX. About USD 250.

DX lens is cheaper, for DX cameras only. With the budget extra, you might want to get the 50mm f/1.8g, which will worked like a 85mm on DX cameras.

What will be your choices for a USD1,000 budget?

Tuesday, May 27, 2014

Virtual Machine on ARM CPU

The 2 virtual machine software (VMWare and Virtualbox) that I know runs on Intel x86 architecture. This sounds reasonable, as most popular operating system software runs on x86. Windows, Linux, Mac OS X (10.5), Solaris are all available on x86 cpu architecture platform. Simulator for ARM like armware is in working process, new virtual machine software for ARM should be coming soon too.

What is a virtual machine? What is it use for? Virtual machine (VM) is a software platform which simulate the computer hardware (cpu, memory, hardware storage and I/O etc.), to allow different operating system running at the same time on the same machine. VM simulate as many standalone computer hardware on a single machine, as long as you have enough hardware resources to support it.

Simulation software are normally slow and use a lot of resources. As hardware technology improve, and price getting cheaper and cheaper, a newer personal computer machine is much more powerful than an older server.

As virtual machine software technology improve from time to time, the performance of the software running on virtual machine is closer to the software performance running on native platform. The using of the virtual machine software came with many advantages.

There are many advantages with using virtual machine. With virtual machine, you can run a different operating system software on the same machine. For example, you can setup 2 operating system on the same machine, 1 for development, another 1 for testing. You can easily setup the software environment on the virtual machine by backup, copy and restore the VM image. With virtual machine, testing and server management are much easier.

Current iOS and Android runs on ARM cpu platform. As mobile environment getting more popular, ARM cpu are getting more powerful and more popular too, improve with multi-core and moving to 64 bits. Apple is pushing its mobile cpu to 64 bits with A7 cpu, other competitors like Samsung and Qualcomm will follow as well.

AMD is trying very hard to include ARM cpu in their hardware platform (read here), not sure AMD is pushing ARM into their server platform. There are rumors that Apple is testing ARM cpu for their notebook actively.

CPU performance is not the only benchmark, power consumption is the area where ARM cpu out perform the Intel cpu. Apple notebook will equipped with ARM cpu, sooner or later, then a virtual machine for ARM will exist.

Saturday, May 03, 2014

The Evolution of Homepage

Since we have world wide web, every personal and companies want their own homepage, for branding and marketing. A the beginning, we create our own homepage with html.

In web 2.0, we do blogging. Blog updates from time to time, it is more interesting than the static homepage which only update quarterly or once a year. The micro-blogging expand blogging to the mobile world.

Later we build "fan page" as our homepage on Facebook, as Facebook has a community base users. It is more effective to have a fan page as the homepage.

Now in the mobile world, we don't create html homepage. We create mobile apps for branding and marketing. So what's next?

Wednesday, April 30, 2014

Submit Income Tax with LHDN website

You should have submitted your personal income tax by today. If you have not submitted, you have one more change to submit by electronic form before 15 May 2014. (Read here)

If you are new to LHDN e-filing, you need some help to register an electronic account with LHDN.

Once you have the login access (means the username and password), you can access to e-filing:
1. Desktop.
2. Mobile site.

I suggest your last submission for the income tax filing should be done on desktop version, as the mobile site didn't allow you to save the filing as a PDF file.

If you just want to get things done and doesn't want to keep any record, you can complete the filing from both website.

The good:
1. The e-filing has improved from using PDF file to html website filing.
2. They even have a mobile friendly site (since 2012, refer tweet here).

The bad:
1. Can't save PDF file if submit from mobile site.
2. Once submitted you can not access the record anymore. That means, if you don't save the PDF file right after you have submitted, you can't do that anymore. I will prefer e-filing open up to 7 years of record to be accessed.

Saturday, April 26, 2014

Impact of Internet technology to publishing industry

A few weeks ago, I have blogged about the impact of Internet technology to movie industry (refer here, Chinese blog). This time I am going to take it one step further, the Internet impact to music, TV broadcasting, printing and publishing.

Let's start with audio. The iPod and iTunes has changed the music industry. Consumers don't buy music CDs, they purchase music from online store. Consumers buy music online with single songs, not the full album. The podcast is a Internet offline broadcasting through iPod (or mp3 devices), audio streaming services like Pandora take one step further, live audio broadcast through Internet. This is the pass.

This similar things happen to the TV broadcast industry. Video streaming services (eg. Netflix, YouTube) will threaten and changed the existing TV industry. The TV series "House of Cards" was premiered on Netflix, not on the traditional TV broadcast channel.

In traditional publishing industry, many book store has closed down, losing their business to online book store like Amazon. The Washington Post, one of the oldest newspaper, sold to Jeff Bezos (Founder of Amazon.com) in year 2013, after a tremendous in year 2012. Not just for newspaper industry, same thing will happen to magazine and book publishing. The publishing business will never like before.

Friday, April 18, 2014

365 Millions Traffic Information Failed

The Malaysia ITIS (Information Transport Information System) has failed with RM365 millions, now need another RM200 millions to revive the project. The project was started in year 2002 by the federal government to solve the congested traffic issues.

I do not have the full details of what ITIS trying to do, to solve the traffic issues. I don't ITIS will includes the traffic light control system. It is just a real-time traffic monitoring system. I have blogged about the ITIS website many years ago, check here.

The system failed for many reasons, some can be summarise as "vandalism and obsolete technology".  It was reported that only 30 cameras out of 1000 plus cameras are working. What a shame.

I look back my own post back in year 2008. I think providing real-time video online is just a waste of bandwidth. Photos should be good enough, even a text-base traffic status is good enough for the drivers, a status of smooth, moderate or heavy traffic.

If what was doing the pass is not working, the related parties should redesign another solution for the traffic monitoring system. If it doesn't came out with a better solution, another RM200 millions is just a waste on the project. Adding alarm system to the CCTV cameras is not a good solution.

Out of idea? Take a look at Waze. Waze is a community base mobile apps which navigate the drivers. Waze show drivers the route to the destination, and it can avoid heavy traffic if possible. Traffic monitoring system is already on the smart phones.

Reference:
Guan Eng: Additional RM200m on failed transport system waste of public fund
Failed Traffic Surveillance, theStar

Monday, April 14, 2014

From Hong Kong movies to technology 2014

香港電影敗給非法光碟,非法光碟又敗給了 BT...

第33屆香港電影金像獎頒獎典禮,昨晚順利落幕。王家衛導演的“一代宗師”,十四項提名,最終獲得了十二個獎項。包括了最佳電影,最佳導演,最佳女主角等,成為最大的贏家,是本會的亮點。

整個頒獎典禮,不過不失,沒什麼精彩之處。當中有一段,主持人提起在十幾年前,許冠文先生在金像獎頒獎典禮一段經典的棟篤笑內容。當年翻版影碟猖獗,扼殺了香港電影的生存空間。



後來翻版光碟又敗給了非法下載。而最新的潮流,使用者也懶得下載了,使用串流技術 (video streaming), VOD (Video On Demand), 直接在互聯網上觀看影片。

拜科技所賜,像是高速的光纖網絡,影音的壓縮技術,互聯網的盛行,平易近人的平板電腦,人們可以很容易地觀賞影片。互聯網上的影音服務如 YouTube, PPStreamTV, PPTV, Netflix 等都已經越來越成熟。

今天到電影院的人潮有回流的現象,可是以出租影像起家的百視達 (Blockbuster LLC), 卻因為敵不過 Netflix 等競爭者而關門大吉。

電影業者應要改變思維。iPod, iTunes 的出現對唱片業的影響己是前車之鑒。 在軟體,硬體,網絡,服務都已準備就緒之,就只是欠缺臨門一腳(我不知道是那一腳)。要是業者們還不醒覺,受影響的豈只是電影者而已。

Thursday, March 27, 2014

WebCamp KL Internet of Things

WebCamp KL is LVL KL now
WebCamp KL changed it's name to LVL KL (Level up KL?), each speakers has 18 minutes to talk.

The kickstart for 2014 event is on 27 Mar, Internet of Things (IoT). The speakers are Ikhwan, Mike Smith, Swee Meng, Calvin Tee, Chern Shue and Sathyvelu K.

Below is my version of the summary. I pick up those content that I like, and add-on a little bit.

What is the Internet of Things (IoT)?
Connect all devices, other than PC and mobiles to the Internet. Common examples are TV, refrigerator, less common example is temperature sensor to report temperature to the internet.

Ikhwan shares what he saw at Mobile World Congress 2014. The use of NFC, sensors used in cars, and android wear.

How can we build our own IoT?
Swee Meng brief on the hardware available like Arduino, Raspberry Pi, BeagleBone etc. Calvin Tee shows a live demo on remote control the room lighting through network. The lighting device is build with Tiny85 chips (which cost $2 USD only), can be programmed with Arduino software.

What is Arduino?
Arduino is a low power microcontroller, it connect to sensors, can be easily programmed by Arduino Software. Arduino is open-source platform, the hardware circuit design is freely available. It means anyone can use the design and manufacture their own arduino.

Use Arduino to build Segway


Arduino vs Raspberry Pi
Raspberry Pi is a low cost credit card size PC board. It doesn't have hard disk, but use SD card as external storage for OS system and data. Raspberry Pi can be used as a microcontroller like Arduino, to connect sensors, but many people use it as a PC eg. make it into a media streaming box.

The different for me is, Arduino is much simpler, but it is slightly more expensive than Raspberry Pi. For Arduino UNO, the cheapest you can get is about USD29, but it doesn't come with ethernet port. Raspberry Pi price is USD25 for version A, USD35 for version B.

BeagleBone Black vs Raspberry Pi
BeagleBone is a low cost, credit card size pc board like Raspberry Pi, BeagleBone Black price is close to Raspberry Pi (still a little bit higher). BeagleBone is open hardware, but Raspberry Pi is not.

Personally I still prefer Raspberry Pi as it has a better software support. Raspbian is a debian linux optimize for Raspberry Pi hardware.

ATtiny85
ATtiny85 microcontroller is from Atmel. You can program ATtiny85 with Arduino Software like you are programming with Arduino. ATtiny85 is very limited compare with Arduino, but very much cheaper as well. ATtiny85 is about USD $2-$3 compare with Arduino UNO cost USD29. As the lighting device shown by Calvin Tee, he just need a ATtiny85 will do.

How to shrink an Arduino project to ATtiny85? Refer here.

How IoT apply to our life?
Sathyvelu K. shows us the Nest thermostat.



Some of you might already heard of Nest, it was created by Tony Fadell, the engineer who created Apple iPod. Google acquired Nest for 2.3b USD in January 2014.

Superpedestrian
Copenhagen wheel is superpedistrian now. It is a rear bicycle wheel, it works together with your smartphone apps. It learns how you cycle, and the electric motor will kick in automatically when you cycle uphill.



I find this interesting, it doesn't change a lot to the existing system, but with little modification, it improve with today's technology. But I doubt the Copenhagen wheel can be easily installed on all bicycle.

Thermostat and bicycle is not that common in Malaysia here, and people already done it. What else we can do here?

Home appliance
Chern Shu gave a good example. Many household installed with alarm system, many have auto gate as well. But the auto gate system don't talk to the alarm system.

I think you can build a "Nest" for alarm panel, or build a TV set top box as the hub of all the home appliance devices.

What was missing?
What was missing in the IoT talks? No one talks about protocol. When you connected all devices together, they need to communicate with each other. How your alarm controller knows the auto gate has open for more than 5 minutes? You need a protocol, a protocol like MQTT-SN.

Wednesday, March 19, 2014

How youtube works on LG SmartTV

Youtube sure works on Smart TV, as long as your smart tv build in with youtube function. Input text with your smart tv controller is a pain, by pointing the soft keyboard button one after another.

While following the Malaysia airlines MH370 missing news. I am trying youtube on a LG Smart Tv. I notice how youtube works on LG smart tv. Instead of input your name and password through the software keyboard, you login the youtube on LG smart tv with mobile phone (or desktop).


When you login youtube on LG smart tv, the system provide an access code, and ask you to access https://www.youtube.com/activate‎. You activate your device (the smart tv) with the access code provided on the web. The LG smart tv will automatically login for you.

Finally someone has made the process right.

In mobile and PDA, the 4 basic apps are calendar, contact (address book), todo list and notes (memos). In smart tv the basic apps should be video (youtube), photos (flickr, picasa etc), music (iTunes?) and ... let the smart tv vendors figure out the rest.

Thursday, March 13, 2014

Rocky Byun balance a notebook on rock

This is just for fun.

Rock balancing is an art. Rocky Byun is a rock balancing performer, he can balance a notebook like this:

Rocky Byun balance a notebook

This is not an illusion, but you need a lot of patient and practice.

Rocky Byun is so good that he appear in the promotion video for Seoul tourism. He was invited to Dubai for performance too.

The Seoul balancing expert
http://www.youtube.com/watch?v=MEcVOZiK4i4

Rocky Byun Dubai performance
http://www.youtube.com/watch?v=0pgBGLicsQQ

Saturday, March 08, 2014

Tutorial Simple makefile and automake

This tutorial is to help beginners a quick start on Makefile and automake.

Introduction

Before we started using makefile, this is how we compile program every time after we changed the program:

$ vi hello.c
#include
int main()
{
printf("Hello, world!\n");
return 0;
}

$ cc hello.c -o hello

If you have more than 1 source file:

$ cc hello.c foo.c bar.c -o hello

If you have some compiler parameter:

$ gcc -Wall -g -O2 hello.c foo.c bar.c -o hello

You get what I mean. Even with the help of readline (with doskey like) function, compilation will be a pain. When your project is getting complicated, you need makefile to help you to do the job.

Makefile

This is how a simple Makefile looks like:

$ vi Makefile
# This is a simple makefile

Program = hello

all: $(Program)

hello:
    cc hello.c -o hello

$ make [-f Makefile]

cc hello.c -o hello

Makefile is collection of rules. The rule looks like this:

target: dependencies
[tab] system command

The white space before the command is tab. If you encounter error *** missing separator. Stop. Change the white space to tab before the command.

When you type make command. The make program look for all: target, which depends on hello. If the file hello is not there or out dated, the command for target hello will be executed.

Note:
There are more features for Makefile like implicit rules and internal macros, but not cover here.

Automake

Different unix system may use a different C compile, different parameter option for the compiler. For example, gcc has a -Wall option but Sun Workshop C compiler don't have -Wall option.

The Free Software Foundation (FSF) created an automake software tools to generated Makefile on different unix system. The configure script which will detect the system setting and generate the Makefile accordingly.

How to generate configure script?

Step 1:
Crete these 2 files:
1. configure.ac
2. Makefile.am

To generate configure.ac
autoscan -> configure.scan -> configure.ac

$ autoscan; mv -i configure.scan configure.ac
$ vi configure.ac
AC_INIT([helloworld], [1.0.0])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([hello.c])
AC_CONFIG_HEADERS([config.h])

# Checks for programs.
AC_PROG_CC

AC_CONFIG_FILES([Makefile])
AC_OUTPUT

Note:
If you are using configure.in, it is old. The new version use configure.ac.
If system complain no config.h.in. Just create 1. $ touch config.h.in

$ vi Makefile.am
bin_PROGRAMS = hello
hello_SOURCES = hello.c

Step 2:
Before you continue further, make sure you have automake and autoconf software installed.

$ aclocal
$ autoconf
$ automake --add-missing --copy --include-deps

Makefile.am: error: required file './AUTHORS' not found
Makefile.am: error: required file './ChangeLog' not found


The software should install the missing files. If it still complains some missing files, just create it manually. You might want to have your own COPYING and INSTALL file.

$ touch AUTHORS ChangeLog
$ automake --add-missing --copy --include-deps

$ ./configure

checking for a BSD-compatible install... /usr/local/bin/ginstall -c
...
config.status: creating Makefile


$ make

gcc -g -O2 -o hello hello.o


Automake is much more powerful that what I have shown you here. This is just to show you a very simple way to quick start a Makefile or automaker.

Thursday, March 06, 2014

Apple CarPlay runs with BlackBerry QNX platform

Okay, Apple's CarPlay which announced earlier, is not just an iOS software, but it runs together with QNX infotainment system in the car. It is confirmed by QNX’s Paul Leroux (read here). Apple is listed as one of the partners of QNX. (check here)



What is QNX? Many users and consumers know little about QNX, especially before BlackBerry acquired QNX in 2010 to build BlackBerry's tablet. QNX is a unix-like operating system (or should I say POSIX?), it is small and fast. There are sources saying that QNX is just about 100k lines of source code. QNX has been there for many years (since 1980s), so it was proven that QNX is stable.

QNX is a real-time operating system as well. Real-time means the system will response in expected time frame. Since QNX is small and fast, it was used in embedded devices, a good example will be network routers. I heard QNX was used in nuclear plant system as well.

Back in year 2000s, QNX release a demo version of their software which can fit into 1 (or 2?) 1.44Mb diskette. The system includes the OS, a GUI (like X-Window) and a browser which works on an Intel platform. It doesn't matter for today's environment as mobile phones and embedded devices storage are counted by gigabyte, but it is a breakthrough at that time as the Palm PDA is 16Mb (not gigabyte) in size.

QNX runs on many hardware devices includes Intel and ARM (which is more than enough). BlackBerry bought QNX to build their tablet (and mobile platform). The BlackBerry tablet failed, but QNX is still strong in some embedded devices, eg. car infotainment system (the car dashboard).

Now it make sense that Apple CarPlay works together with BlackBerry QNX. QNX is stable and proven as a real-time system, needed to monitor the various status of the car. QNX is strong in car infotainment system. Apple iOS as a feature rich system (eg. Siri voice interface), can just plug in and work together will QNX infotainment system as a good match.

Saturday, March 01, 2014

Tutorial: Create fonz fun plug package for DNS-320 NAS

What is fun_plug?
fun_plug is a (hacking) script which will be extracted and executed after the DNS-320 (and other similar NAS) booted. The fun plug package by Fonz which includes the telnet sever, allow user to telnet to the NAS, and use it as a server.

It is safe to install fun plug. Delete the fun plug files, the modification is gone.

funpkg and slacker
funpkg like dpkg, it is a package installer. You can use funpkg to install and remove software. Slacker is the software management tool with (a text-base) user interface.

$ funpkg -i helloworld.txz # install
$ funpkg -r helloworld # remove

There are many ready packages to be downloaded and installed. Refer here.

If the packages are not available, you might want to create you own fun plug package.

Create fun plug package
You need to install fun_plug (0.7), gcc, binutils and other packages (list of software for compile environment refer here).

Once you have setup the compilation environment you are ready to go. Take a hello world example.

$ tar xzvfp helloworld-1.0.0.tar.gz
$ cd helloworld-1.0.0
$ [CFLAGS=""] ./configure --prefix=/ffp
$ make
$ DEDSTDIR=/tmp/helloworld make install

$ cd /tmp/helloworld
$ ls
ffp/bin/ ffp/lib/
$ makepkg
makepkg <name> <version> <release>
$ makepkg helloworld 1.0.0 1
==> /tmp/helloworld-1.0.0-arm-1.txz
$ funpkg -i /tmp/helloworld-1.0.0-arm-1.txz
helloworld installed.

gcc compiler option for DNS-320
I get this from Internet.
CFLAGS="-march=armv5te -mtune=arm926ej-s -msoft-float -mfloat-abi=soft -fno-tree-sink -O0"

DNS-320 cpu is ARM926EJ. ARM926EJ implements the ARMv5TEJ technology.

What is soft float and hard float abi? Hard float abi is a vfp floating point register to process floating point. In Debian Linux define armhf is refer to ARMv7.

Saturday, February 22, 2014

Tutorial: Create Unofficial Midnight Commander package for Debian 7.x

This is a quick hack on how to create debian package using Midnight Commander as an example. The Midnight Commander version that I am using here is MP version. The MP version is without glib dependency.

Midnight commander MP version get from here.
Update 2023: older link above is not exist anymore. Try this link.



I am using version 4.1.40pre9.

$ tar xzvfp mc-4.1.40-pre9.tar.gz
...
cd mc-4.1.40-pre9/
mc-4.1.40-pre9$ ./configure --prefix=/usr

checking whether make sets ${MAKE}... yes
checking for gcc... gcc
...

mc-4.1.40-pre9$ make
mc-4.1.40-pre9$ make DESTDIR=/tmp/mc install
mc-4.1.40-pre9$ cat > control <<-EOF
Package: mcmp
Priority: optional
Section: utilities
Installed-Size: 45
Maintainer: fuyichin <fuyichin@gmail.com>
Architecture: i386
Version: 4.1.40-pre9
Description: midnight commander
this is more powerful version without glib.
EOF

Create the debian package:
mc-4.1.40-pre9$ install -d /tmp/mc/DEBIAN
mc-4.1.40-pre9$ install control /tmp/mc/DEBIAN/.
mc-4.1.40-pre9$ dpkg -b /tmp/mc mc-4.1.40pre9.deb
mc-4.1.40-pre9$ ls mc-4.1.40pre9.deb
mc-4.1.40pre9.deb

mc-4.1.40-pre9$ sudo dpkg -i mc-4.1.40pre9.deb

Thursday, February 20, 2014

Facebook to acquire WhatsApp in USD16 billion

Finally WhatsApp is ready to sell for a price. In the 16 billion deal, 4 billion are in cash. According CNET WhatsApp monthly active users more than Facebook, in terms of growing rate since they start up. This is not truly fair comparison as both company started at different time. In simple word, WhatsApp is growing fast, For Facebook, WhatsApp is rival. By acquiring WhatsApp, Facebook increase their user base and one thing less to worry about.


Photo from flickr

Does WhatsApp has a business model? Yes, the first year is free, but the subsequence subscription fee is USD1 per year. WhatsApp is just a small size company with 55 employees now. WhatsApp has more than 400 million monthly active users.

Last year there was a rumour that Google and WhatsApp in talk of acquisition, but WhatsApp has denial that (refer here Won't sell-out to Facebook or Google: WhatsApp). WhatsApp never need to worry about money, they were funded 8 million by Sequoia Capital, should be enough for them to operate for some time.

There is a story of how Koum and Acton co-founded Whatsapp. Koum and Acton working in Yahoo before the co-founded WhatsApp. Both of them applied job in Facebook but rejected. Read the story here.

Note:
Rumor saying that Google offered 10B for WhasApp.

Saturday, February 15, 2014

Tutorial: Install MySQL with Homebrew on OS X

Normally this is how I install MySQL.

1. Download MySQL binary
2. Extract the binary, I put it at /usr/local
3. Create database
4. Set root password
5. Startup and shutdown

The instructions are for unix like system, even for Mac OS X.

With homebrew, it could be event easier. (Note: Homebrew is a third party software management tool for Mac OS X)

1. Make sure homebrew is working.
$ brew update
$ brew doctor

2. Install MySQL
$ brew install mysql

(mysql command will be installed in /usr/local/bin directory)

3. Create database
Make sure /usr/local/bin is in your PATH environment.
$ mysql_install_db [--basedir=/usr/local/Cellar/mysql/5.6.15]

Without the base dir, the system response with error can not find my.cnf file. The version number of the mysql could be different in your system, mine is 5.6.15.

4. setup my.cnf
$ vi /usr/local/Cellar/mysql/5.6.15/my.cnf
...
# These are commonly set, remove the # and set as required.
basedir = /usr/local/Cellar/mysql/5.6.15
datadir = /usr/local/data
port = 3306
server_id = 1
socket = /tmp/mysql.sock
...

This is my configuration, you might have your own settings, especially for datadir.

5. Startup and shutdown
$ mysql.server start
Starting MySQL
. SUCCESS!


$ mysql.server stop

6. Create root password
$ mysqladmin -u root [-h localhost] password 'new-password'

Once you have your root access to mysql, you can create other users and databases. Note: You need to start mysql server to change the root password.

Saturday, February 08, 2014

Upgrade PHP with homebrew on OS X

I am new to homebrew, whatever I shows here is just my experience with homebrew, might not be the best practise.

Homebrew is similar with Fink and MacPorts, is just a software management tools to install third party software, especially open source software on Mac OS X. It install the software into /usr/local directory, which will not replace your system software.

Update to the latest system if possible. Later system may have a better support, homebrew just download the binary if it is available on your system. Which save you time. I use homebrew on my older system, it download and compile the software, I encounter error and retry and retry...

These are the steps to update php with brew, I refer the steps from the internet:

$ rm -rf ~/.pearrc # remove existing PHP/PEAR config files
$ brew update
$ brew upgrade
$ brew tap homebrew/dupes
$ brew tap josegonzalez/homebrew-php
$ brew install freetype jpeg libpng gd zlib openssl unixodbc

$ brew install php55 # or php53

It takes a few minutes if binary is available.
I experience some issues on my OS X 10.6.2 with 32 bits CPU. I have php 5.3.1 on my system, but the PHP composer need 5.3.2 or above.


Issues with freetype

$ brew install freetype
builds/unix/ftsystem.c:246: error: 'Cannot_Open_Resource' undeclared (first use in this function)
builds/unix/ftsystem.c:369: error: 'Cannot_Open_Stream' undeclared (first use in this function)

Manual compile freetype works! From http://www.freetype.org/download.html. I compile freetype-2.5.2:

$ cd freetype-2.5.2
$ ./configure
$ make
$ sudo make install

$ brew install php53 --ignore-dependencies freetype --without-apache

Please take note, the php I installed doesn't works with Apache web server. Finally I have my PHP 5.3.28.

$ php -v
PHP 5.3.28 (cli) (built: Jan 22 2014 18:27:26)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies

Friday, January 24, 2014

30 years of Mac

This year mark the 30 years for Apple Macintosh.

When Apple first launch Macintosh, it starts with the 1984 commercial, which mimic the George Orwell's novel, 1984. In George Orwell's 1984, the people are controlled by the 'Big-Brother'. George Orwell has another novel named Animal Farm, which sounds more interesting to me.

In the 1984 commercial, the ads says, "why 1984 wouldn't be like 1984". At that time, the PC industry was lead by IBM personal computer.

Apple Macintosh is a big leap for personal computer, it features using of mouse pointer and graphic user interface on a 128k ram computer!

Mac OS System 1

Mac OS X 10.9 Mavericks

There is an engineer, Jeff Keacher use his 27 years old Macintosh plus to connect to the Internet. It is very slow, it takes a few minutes to load a html page, but it still "works". You can read how he do it here.

The Mac hardware and software are so much different from the original Mac. Some of the look-and-feel of Mac OS has not been changed, for example the menu bar of the application is always on top of the desktop not on the application windows (as in Microsoft Windows system).

What I can say is classic remains there!

Happy Birthday Mac!

Tuesday, January 14, 2014

U Mobile UMI package 2014

U Mobile just changed their UMI package:

UMIdatavoice(max)SMS(max)
UMI 18250Mb25mins(50)25mins(50)
UMI 281Gb50mins(100)30mins(60)
UMI 381Gb150mins(300)30mins(60)
UMI 482Gb100mins(200)30mins(60)

What have changed? Take UMI 28 as example, data increase from 500Mb to 1Gb, but voice has reduce from 100 minutes to 50 minutes, the maximum accumulated voice minutes has been reduced as well.