Wednesday, May 27, 2020

Compile libgrowl Java 2020

Compile libgrowl Java version




Introduction


Notification is an important software system.

libgrowl is a Java library to send notifications to Growl, there is a C implement libgrowl as well. libgrowl is an open source library.

If you do not have a Growl installed, you can install Growl for Windows, Growl 1.3.x for Mac OS. Growl 2.x is not free anymore, it was selling USD3.99 on macOS App Store.(Is now available free on App Store again). If you don't want to pay for it, you can install the binary from third party (check here), or try to compile one for yourself.

Refer to this blog to download the pre-compile binary http://blogs.umb.edu/michaelbazzinott001/2014/09/21/growl/

libgrowl on Sourceforge and Github


libgrowl sends notification to Growl through network connection, the GNTP network protocol. libgrowl was first hosted on sourceforge.net (by bananewazen) https://sourceforge.net/projects/libgrowl/, later it was mirrored to different Github repositories.

https://github.com/feilimb/libgrowl some said this is the original mirror.
https://github.com/sbower/libgrowl this was modified with maven build.

To compile the libgrowl is a very good practice for Java beginners.

Compile


libgrowl (feilimb)



$ git clone https://github.com/feilimb/libgrowl
$ tree libgrowl
libgrowl
├── build
│ ├── build.xml
│ └── libgrowl.jar
└── src
└── net
└── sf
└── libgrowl
├── Application.java
├── GrowlConnector.java

$ cd build


ant compile and ant jar will do the job

What if you don't have ant and want to do it manually?


$ cd libgrowl/build
$ javac ../src/net/sf/libgrowl/internal/*.java ../src/net/sf/libgrowl/*.java
⇒ no class files?


No class files? class files were generated in the source directory.

$ cd ../src/net/sf/libgrowl
$ java GrowlConnector
Error: Could not find or load main class GrowlConnector

$ java net.sf.libgrowl.GrowlConnector
Error: Could not find or load main class net.sf.libgrowl.GrowlConnector

What happen???

There are many ways to solve the above issue. This is how I do it.
$ cd libgrowl/build
$ javac -d . ../src/net/sf/libgrowl/*.java ../src/net/sf/libgrowl/internal/*.java
⇒ net/sf/libgrowl net/sf/libgrowl/internal
$ java net.sf.libgrowl.GrowlConnector localhost "libgrowl" "libgrowl" "Test" "Hello, world."
(Show Growl notification)

libgrowl (maven)


Maven is a software to build software lifecycle, it will download the necessary dependency from the Internet. It is supposed to make it easier to compile a bigger project, might not be in this case.

Note: The maven software lifecycle $ mvn clean compile test package

I am compiling on macOS Mojave.

$ git clone https://github.com/sbower/libgrowl
$ cd libgrowl
$ mvn compile
⇒ error

I am using Java 8. Compile with deprecated warning, but still able to generate 1.5 binary
$ javac -source 1.5 -target 1.5 HelloWorld.java
⇒ with warning.

But the maven 3.6.3 doesn't support 1.5 binary. My lazy quick fix, change the version in the pom file.

$ edit pom.xml
Change compiler source and target from 1.5 to 1.8

<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>

$ maven package
⇒ error, test not pass.

I just remove all the test cases. After successfully compile, try test the new compiled software following the testing session below.

Testing


Test Growl


You must have the Growl software installed to test. Optional: you can use the command line growlnotify to send notification to Growl.

If you are on macOS, you can install the growlnotify using homebrew.

$ brew install growlnotify

Test libgrowl


$ java -cp ./target/libgrowl.jar net.sf.libgrowl.GrowlConnector "host" "app name" "notification name" "title" "message"

$ java -cp ./target/libgrowl.jar net.sf.libgrowl.GrowlConnector localhost "libgrowl" "libgrowl" "Test" "Hello, world."
or
$ java -cp libgrowl.jar net.sf.libgrowl.GrowlConnector localhost "libgrowl" "libgrowl" "Test" "Hello, world."


Wednesday, May 20, 2020

Hardware Growler Fork Notification Software 2020

Hardware Growler Fork Notification Software 2020




Introduction


Growl is a notification software for macOS (Mac OS X), it looks nice and configurable eg. display location, duration stay on the screen. Growl is available on Windows systems as well. With Growl, you can have a universal notification system for application.

Growl started when there was no good notification system on Mac OS systems. Notification Center was included in Mac OS X 10.8 Mountain Lion in 2012. Growl can send notifications to macOS Notification Center.

Early days of Growl. A few Mac OS software bundle Growl with their software, eg. Adium, Dropbox, Adobe CS5 etc. Some users are angry because these software just install Growl on their system without them knowing it. Later Adobe made an announcement about it, here, https://blogs.adobe.com/deployment/2010/05/growl_installation_with_adobe.html.

Hardware Growler



Hardware Growler is a software that sends notifications (to Growler) when users plug in or unplug a device in the system.

Growl 2.0


Growl started as a free, open source notification software, but it started to charge USD3.99 on macOS App Store with version 2.0. Growl is licensed under BSD, so it can be used for commercial and close source.

Growl and Hardware Growler fork


Since Growl (and Hardware Growler) is open source, someone has mirror and fok the software. Now it can be found here:

https://github.com/pranav-prakash/HardwareGrowler-NC

I am not sure how to compile the above software. When I load it with Xcode (10.13.1), it warn me about 32 bit, so it may not works with macOS 10.5 Catalina.

This following Hardware Growler has been modified to send notification direct to macOS Notification Center. This software is small and easy to compile. https://github.com/cirrusj/HardwareGrowler. I have tried it on Mojave + Xcode 10.13.1.


$ git clone https://github.com/cirrusj/HardwareGrowler
$ cd HardwareGrowler
$ make
⇒ build/Debug/HardwareGrowler.app


Then run the HardwareGrowler.app, you can move/copy to /Application[/Utilities] folder.
I tried this on macOS 10.14 Mojave, it works.

If you just want the binary for Growl 2.0, you can check the blog here http://blogs.umb.edu/michaelbazzinott001/2014/09/21/growl/

Sunday, May 10, 2020

The Incomplete Jump Start VS Code Tutorial 1

The Incomplete Jump Start VS Code Tutorial for Beginners

Part 1: General



Introduction


This is a tutorial guide for beginners, a jump start to learn VS Code. It is based on an older version of VS Code, to be installed on older machines and software, eg. Mac OS X 10.9 Mavericks and 32bits Linux system.

VS Code (Visual Studio Code) is a lightweight programming editor. VS Code is positioned between a text editor and an IDE (Integrated Development Editor).

VS Code is an open source software developed by Microsoft! Written in TypeScript (JavaScript), available for Windows, Mac, Linux, all the 3 major platforms.

VS Code is getting popular recently (these few years), as an alternative to Eclipse.

Installation


Users can download the latest version from VS Code website https://code.visualstudio.com/Download, or older version from updates.

OS X 10.9 Mavericks


The working version is 1.35.1, it can be downloaded from https://code.visualstudio.com/updates/v1_35, direct link for Mac.

Linux (Debian)


Raspberry Pi Desktop, 32 bits only. Download the 32 bits deb file from here (https://update.code.visualstudio.com/1.35.1/linux-deb-ia32/stable). To install

$ sudo dpkg -i code_1.35.1-nnn_i386.deb

You can load VS Code from RPi > Programming > Visual Studio Code, or from shell command
$ code

Configuration


Disable update


The first thing I do after the download is disable the auto-update. The later or the latest updates doesn't work on my older system. The auto-updates just download and didn't check if the update version works on the system.

Code/File > Preferences > Settings > (search "update mode") > update: mode (v) none

Note: disable internet connection before configure, to prevent auto-update.

General Usage


Command Palette


You may need this command palette to issue commands, eg. restart VS Code. The shortcut is (Cmd/Ctrl+Shift+p). Or from menu, Code > View > Command Palette.

Restart VS Code


Exit the software and relaunch, or use Command Palette: [Developer: Reload Window], to restart the application.

The Layout



Sidebar

On the left side, there is a sidebar with icons. From top down, the icons are Explorer(files), Search, Version control (Git), Debug, Extensions. The bottom is the Manage icon.


Explorer

Beside the sidebar, on the top is the workspace, directory and files.


Files editor

Upper right is (file) content display.


Output

Lower right is output and error messages.

Sidebar



Explorer Icon.To access workspace, folder and files.


Search, this is very common icon.


Source Control, the default is Git.


Extensions. Install extra extensions here.

The bottom left icon is Manage, can access "Command Palette" here.

Working with VS Code


Workspace


The workspace in VS Code is virtual. A workspace is a collection of your working projects, you can add in different project folders into the workspace, save the workspace as a file.

Searching in the workspace goes through all the files in the workspace, even if they are located in different project folders. You can always remove the project folder if you are not working with it.

Create a project


You can try with python, php, C or Java. I am using Java as an examples here. The easiest way for me is to create a project folder from the terminal, and add the project folder in VS Code workspace.

$ mkdir test_java

In VS Code, click on Explorer icon (sidebar), right click on the workspace area, add folder to workspace. Choose the test_java folder.

Create a new file HelloWorld.java under test_java folder, edit the file, and save it:

public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, world!");
    }
}

Install extension: code runner



Extensions: Search code runner

Install Java Extensions Pack by Red Hat, Java Extensions Pack by Microsoft or just simply use the code runner extension.

Click on Extensions icon (sidebar), search "Code Runner", and install.

After installed, restart VS Code.

1. Normal exit and relaunch VS Code, or
2. Command Palette (Cmd/Ctrl+Shift+p), search [Reload Window].

Right click on the HelloWorld.java, "Run Code". Results will be displayed at output.


Output

Part 1 end. To be continue...

Thursday, August 29, 2019

Java Example Compare Poker Card Value

Compare Poker Card Value

Introduction

To demonstrate the power of object oriented programming, I write a Java program to compare the value of 2 poker cards, using inheritance.

For normal card, from small to large 2 3 4 ... 10 K Q K Ace, eg. 2 of diamond < 3 of diamond For big2 game, 2 is the biggest value, 3 is the smallest. 3 4 5 ... Q K A 2, eg. 2 of diamond > 3 of diamond

I do not create 2 different classes for normal card and big2 card, but inherited the big2 card from normal card (standard card). Many of the properties of the 2 classes are the same. New big2 card comparison can be created with little code added to the new class.

To simplify the program, I do not shuffle the cards, just use the first 2 cards for comparison. You can modified to compare 2 random cards.

class Card { … }, class CompareNormalCard use Card.

class BigTwoCard extends Card { … }, class CompareBigTwoCard use BigTwoCard.

Card.java


$ edit Card.java
class Card {
    private int id; // 0-51, id and value are the same for normal card
    protected int f, v; // f is diamond, club etc, v is 0-9TJKQA
    // use protected because the value was referred inside sub class

    Card() {} // constructor

    Card(int n) { this.setId(n); }

    void setId(int n) {
        this.id= n%52; // id not >= 52
        f= this.id/13; // pre-calculated for getValue(), to save time
        v= this.id%13;
    }

    int getId() { return this.id; }

    // value and id are the same for normal card    
        int getValue() {
        return this.id;
    }

    // return same value==0, this card smaller -1, this card bigger 1
    int isCompare(Card card) {
        if (this.getValue()>card.getValue())
            return 1;
        else if (this.getValue()<card.getValue())
            return -1;

        return 0;
    }

    // for display as D2 DJ DQ DK DA, C2 CJ ...
    // D2 is 2 of diamond
    String getString() {
        int f; // suit 0-Diamond, 1-Club, 2-Heart, 3-Spade
        int v; // 0-2, 1=3... 8=T 9=J 10=Q 11=K 12=A
        String pattern, number;

        f= id/13; // duplicate in setId(). f is protected, can be changed, but id is private
        v= id%13;

        switch(f) {
            case 0: pattern= "D"; break;
            case 1: pattern= "C"; break;
            case 2: pattern= "H"; break;
            case 3: pattern= "S"; break;
            default: pattern= "x";
        }

        if (v>=0 && v<8)
            number= "" + (v+2);
        else if (v==8)
            number= "T";
        else if (v==9)
            number= "J";
        else if (v==10)
            number= "Q";
        else if (v==11)
            number= "K";
        else if (v==12)
            number= "A";
        else
            number= "0";

        return pattern+number;
    }
}



CompareNormalCard.java

$ edit CompareNormalCard.java
public class CompareNormalCard {
    public static void main(String[] args) {
        Card card1= new Card(0),
        card2= new Card(1);
        String symbol;

        if (card1.isCompare(card2)>0)
            symbol= ">";
        else
            symbol= "<";

        System.out.println(card1.getString() + symbol +
            card2.getString());
    }
}


$ javac CompareNormalCard.java && java CompareNormalCard
==>D2<D3
Note: Diamond 2 is smaller than diamond 3

to be continue...CompareBigTwoCard.java

Wednesday, August 28, 2019

Raspberry Pi Desktop Connect Bluetooth Mobile Internet

Is easy to connect bluetooth mouse to Raspberry Pi Desktop, but connect to mobile phone Internet via Bluetooth keep failing. I am using an old Nokia phone for testing.


Choose Bluetooth > Devices...


I am not sure why I have 2 Bluetooth icon on the taskbar. I have added another Bluetooth applet program. These 2 Bluetooth program works slightly different. (note: I suspect is lxplug-bluetooth?)



Select Bluetooth phone



Select (x)Network Access Point



But connect to the service fail!

I am sure the phone and Bluetooth service is working, as it works on other OS. After search on the Internet and read a few tutorial, still can't make it works.

Finally is just a little setting that I miss out. This is the solution:


Choose Bluetooth > Local services...





Enable (x) Network Access Point(NAP)



Select Nokia phone and (x)Network Access Point


Now it works!!

Just the Bluetooth on my device is too slow. It takes much longer time to load.

Friday, August 23, 2019

Install PostgreSQL 10.2

Install PostgreSQL 10.2


Introduction

Even I know much better of MySQL than PostgreSQL, I still prefer PostgreSQL. PostgreSQL is easier to be compiled and less dependency issue. I have successfully compile PostgreSQL on older system, as old as Mac OS X 10.6 Snow Leopard.

Compile and install

The easiest for me is use homebrew. PostgreSQL 10 data format is not compatible with version 9, so backup before you install PostgreSQL 10. The data may be in /usr/local/var/postgres

$ brew install postgres
...
$ cat /usr/local/var/postgres/PG_VERSION
9.4

If installed before backup or upgrade the old database, try
$ brew postgresql-upgrade-database

Setup and startup

To start PostgreSQL
$ pg_ctl -D /usr/local/var/postgres [-l /tmp/postgresql10.log] start
$ pg_ctl -D /usr/local/var/postgres stop

Note: I will prefer to use /usr/local/data/postgres directory.

You can use environment PGDATA=/usr/local/var/postgres
$ pg_ctl -l /tmp/postgresql10.log start

If there is no database in PGDATA directory
$ initdb -D /usr/local/var/postgres
$ cat /usr/local/var/postgres/PG_VERSION
10

Using postgresql

$ psql [ <database> ] [-U <user>]
$ psql postgresql
psql (10.2, server 10.1)
Type "help" for help.

postgres=#\q (quit)

Note: Seems like my database is created by PostgreSQL 10.1? To check version => select version();

Default database is postgres. You should create another user and database for development or testing purpose. The progress is not covered here.

Tuesday, June 05, 2018

Friday, June 01, 2018

All Nokia Android Smartphone Will Be Updated

HMD confirms that all Nokia smartphone will be updated to the latest Android P version. Even the lower end mobile phone like Nokia 1, 2 and 2.1 which run the Android Go will be updated as well.

HMD Global is the company who own Nokia mobile.

Android Go is the lightweight Android for lower end mobile which has 1Gb ram or below.

news from hardware zone

Tuesday, May 29, 2018

Apple Butterfly Keyboard Issue

The 2016 butterfly keyboard (or the scissor) suppose to be a better design as claimed by Apple. But there are many cases reported that the new keyboard is having issues, especially the space bar.

Petitions to request Apple replace defective keyboard

Friday, May 25, 2018

iPhone 6 Bending Issue is Known by Apple

Apple claimed that iPhone 6 bending is not an issue. (read here, 2014 news)

Not true. Apple knows that it is an issue. read here.


Wednesday, May 16, 2018

Compile Raspberry Pi Desktop Linux Kernel

Compile Raspberry Pi Desktop Linux Kernel



What is Raspberry Pi Desktop? Raspberry Pi Desktop is Raspbian OS, a Debian Linux specially made for Raspberry Pi. The desktop version is a port on x86, made it a lightweight desktop OS. (Note: RPi is an ARM platform)

Since RPi Desktop is Linux. This is a simple tutorial on how to compile Linux kernel.
There are many reasons why you need to recompile the linux kernel, but before you compile, you should know that recompile kernel need a lot of hard disk space (10Gb) and long waiting time (4 hours, depends on the machines).

1. Prerequisites to compile kernel
1b. Update firmware
2. Download the source
3. Kernel configuration
4. compile
5. install

Prerequisites



# apt-get install git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc


Update firmware



# rpi-update (update firmware and kernel source?)


Download kernel source


Original Linux kernel from http://kernel.org/, Raspbian kernel source can be git clone from git://github.com/raspberrypi/linux.git. The clone size (with history) is quite large (about 3-4Gb), to save time and disk space use shallow clone (git 1.7 or above).

$ cd /usr/src
# git clone --depth 1 git://github.com/raspberrypi/linux.git (about 1.5Gb)
(The version I get 4.14.37.)
# cd linux; make nconfig
(or you can use the old # make menuconfig)

Configuration


The is the most difficult part, different machine, different user may need different configuration. The configuration will be save as .config file. There is a copy of the kernel config in /boot/config-. Can use it as a reference.
There are few thousands of items to be configured, I don't know all of them.
Compile
After configuration.

# make bzImage
# make modules
# make modules_install

(This will take a long time, may be 2-6 hours)

Installation


# make install

This will copy the kernel image to /boot directory, create the initrd image and update grub bootloader.
After this you can reboot, see if you can boot the new kernel successfully.

Sunday, February 11, 2018

Compile PHP PostgreSQL undefined symbol lo_lseek64() error

Upgrade PHP with PostgreSQL connect support


My php installed on OS X doesn't have PostgreSQL connect support, I need an upgrade.
$ brew install php56 --with-postgresql [--with-httpd]
doesn't work for my, so I try to compile manually from source.
Download the source from php.net. For PREFIX, you can set it to your preferred location, the /usr/local/Cellar location is used by Homebrew.

$ ./configure --prefix=/usr/local/Cellar/php/7.2.2 --with-pgsql=/usr/local/Cellar/postgres/10.2

This compile successfully, but I am not replacing the old php on the system, the apache always load the old php version. I need libphp.so (libphp5.so or libphp7.so) for apache to locate the new php.


$ ./configure --prefix=/usr/local/Cellar/php/7.2.2 --with-pgsql=/usr/local/Cellar/postgres/10.2 --with-apxs2=`which apxs`
(apxs command is from Apache)
This fail.
There are 3 groups of undefined symbols

1. undefined symbol _lo_lseek64()
- error from PostgreSQL, some issue with the configuration, I link it to libpq.a to solve.
2. undefined symbol _SSL_XXX
- link openssl-1.1, which is an older version on my system
3. Disable GSSAPI on Postgresql
- $ brew edit postgresql, delete --with-gssapi
- $ brew reinstall postgresql

You might not experience all the 3 issues.
How to link the missing library?
$ edit php-7.2.2/Makefile
For a quick hack, I just add in MH_BUNDLE_FLAGS =
either -L/usr/local/Cellar/postgresql/10.2 -lpq or /usr/local/Cellar/postgresql/10.2/lib/libpq.a
openssl
-L/usr/local/Cellar/openssl@1.1/lib -lcrypto -lssl
or
/usr/local/Cellar/openssl@1.1/lib/libcryptio.a /usr/local/Cellar/openssl@1.1/lib/libssl.a

My system is Mac OS X 10.9 Mavericks, Homebrew. I have tried compiling php-5.6 and php-7.2, both seems ok for me. I try php7.
$ ./configure --prefix=/usr/local/Cellar/php72/7.2.2_13 --with-mysqli=/usr/local/Cellar/mysql/5.6.25/bin/mysql_config --with-pdo-mysql=/usr/local/Cellar/mysql/5.6.25 --with-pgsql=/usr/local/Cellar/postgresql/10.2 --with-pdo-pgsql=/usr/local/Cellar/postgresql/10.2 --with-apxs2=`which apxs`
$ cp libs/libphp7.so /usr/local/libexec

$ edit /etc/apache2/httpd.conf
# LoadModule php5_module libexec/apache2/libphp5.so
LoadModule php5_module /usr/local/libexec/libphp5.so
LoadModule php7_module /usr/local/libexec/libphp7.so

$ sudo apachectl stop
$ sudo apachectl -M
...
rewrite_module (shared)
php5_module (shared)
php7_module (shared)
hfs_apple_module (shared)
Syntax OK
$ sudo apachectl start
$ curl http://localhost/php/phpinfo.php
()

PHP Version 7.2.2

PostgreSQL Support enabled

Friday, June 02, 2017

A Complain to Maxis Auto Upgrade


Is so much different in Maxis center of today and compare with 9 to 10 years ago.

About 10 years ago, I walk in to Maxis center, check for any offer for cheaper package than the 30 per month that I was having. Might not be something cheaper but may be more free calls. The attendance was so nice, help me to scan through my bills, so that he can suggest a mobile package for me.

I recall, even Digi has a similar service at that time, they advertised that mobile subscriber can go to their service center, their expert will find out what is the suitable package for the subscriber.

My mobile package is very old, is so old that the Maxis center people there don't even know there is such a pakcage, until they check through the computer. They told me the call rate is expensive, is not available anymore. They also told me that under rule and regulation, they have to keep the package as long as there are subscribers still subscribe to it. It make sense for me.

The Maxis expert (I am not sure he is the expert, but he do his job quite weell) scan through my bill and told me, even though my existing call rate is more expensive, but with my using habbit, the package that I was subscribing is the cheapest for me.

I keep using the 30 per month package. Later there are some better (sound better) packages like Surfmore 30. Same price, but with more (300(?) minutes) free calls. I was busy and lazy to walk in Maxis center to change my subscription package. I am happy with my existing package as long as it doesn't exceed my budget.

Recently Maxis 'upgrade' those old packages to a new one with added price. You can read from the discussion forum in lowyat.net here. They give extra data, but the price will generally increase from 30 to 38.

I walk in to Maxis center to file a complain. My argument is:
1. Maxis shouldn't change my package without my approval. Maxis argue that it is an upgrade.
2. Maxis can add in data for my subscription package, but Maxis shouldn't increase the price.

The customer service refuse to file a complain for me, until I told him that the Maxis CEO apologize last year which results from some unhappy customers. They promise to call me back and they didn't.

I look back to last year (April) incident again. As Maxis give special offer to those who want to opout from Maxis and switch to other mobile service provider for better package. Those loyal customers with Maxis for many years were not given the offer. When customer call in for the offer, Maxis reply is only selected customers are given for the offer.

The post about the incident came out on the social media, Maxis try to ignored it, and is like snowball getting bigger and bigger. You can read the story from here and here, Malaysians are angry with Maxis. You can find many other related posts.

I summerize a few points from the post, what went wrong:
1. Too much of delay for an official response
2. The solution provided misses the main complain completely
3. Attempts to explain things from the telcos point of view (and not at the customer point of view)

After 12 months time, I experience the same things. Not much improvements.

I look at the live video from Maxis (here), the Maxis CEO Morten (Morten Lundal) appearred to be impatient and not sincere at all.

Thursday, October 06, 2016

Solve Rails Native Compile Issue

I seldom blog about issue on Windows, because I don't really have a Windows machine with me. This will be an exceptional case that I show how to solve a Rails' native compile issue.

If you see an error from Rails on Windows system, something similar like this

c:> gem install son
...
ERROR: Error installing json:
ERROR: Failed to build gem native extension

The reason is, gem try to build native library to improve performance, but it was not able to do it on your Windows system.

The easiest is to install DevKit from http://rubyinstaller.org/downloads/. The DevKit will be installed at c:\DevKit. Just take note which DevKit to be installed, 32 bits or 64 bits.

Set Windows system PATH environment:
Control Panel > System > Advanced system settings
System Properties > Environment Variables > (Select Path and Edit...), add a new Path
c:\DevKit\bin

start a new command prompt (cmd):
c:> gem install json

You should be able to install json now.

Wednesday, August 10, 2016

Qualcomm bugs exposed nearly 1 billion Android devices

Qualcomm snapdragon cpu is a very popular ARM based SoC CPU used by many Android devices.

These are some of the popular mobile phone which use snapdragon:

Samsung Note 7, Snapdragon 820

OnePlus 3, Snapdragon 820

HTC 10, Snapdragon 820

Reference:

Qualcomm bugs expose nearly 1 billion Android devices to exploits, Extreme Tech.

Wednesday, June 15, 2016

Fighting with Ruby on Rails on old Snow Leopard


Finally I give it a try for Ruby on Rails. The first thing I want to do is install Ruby on Rails. According to the tutorial, I need ruby 1.9.3, then using ruby gem to install rails 2.3.2.

This is not a tutorial, but just show what doesn't works for me. You might not able to get you solution here.

There are a few ways to install Ruby on Rails on Mac OS X:
1. Use Gem on OS X system.
2. Homebrew
3. RVMß (this works for me)

Homebrew

Since then gem version (1.8.7) is a bit too old, I use homebrew to install.
$ brew install ruby
The gem came with ruby, use gem to install rails. Before install rails, I disable ruby document.
$ edit ~/.gemrc
install: --no-rdoc --no-ri
update: --no-rdoc --no-ri
gem: --no-ri
gem: --no-rdoc

$ export GEM_HOME=$HOME/.gems
$ export PATH=$GEM_HOME/bin:$PATH

This suppose to be the way, unfortunately I can't get homebrew to compile ruby on OS X 10.6.

Compile from source

I try to compile from downloaded source, both ruby-2.3.1, ruby-2.3.0 are unable to compile successfully on my OS X 10.6.3. So I compile ruby on another machine with OS X 10.9 Mavericks, and copy the binary to OS X 10.6. The binary can't execute properly.

This really drive me crazy.

I try to use the system gem to install rails, but since the gem version is too old, it can't install the later rails.

RVM, Ruby Version Manager

Try Install ruby on rail with rvm version 1.27.0
$ curl -L https://get.rvm.io | bash -s stable --auto-dotfiles --autolibs=enable --rails
OR just install ruby
$ curl -L https://get.rvm.io | bash -s stable --auto-dotfiles --autolibs=enable --ruby
Ok
Finally the RVM works. The binaries installed in $HOME/.rvm directory

Note:

After some time later, I try to install ruby with homebrew again, and it works! I don't know what changes or configuration I have done.

$ ruby -v
ruby 2.3.1p112
$ gem -v
2.6.4
$ rails -v
4.2.6

Tuesday, June 09, 2015

How to create embedded Java 8

What is embedded java? Embedded Java is not J2ME (Java Micro Edition), is a normal java runtime in smaller size, suitable to be installed in embedded system.

Normal Java runtime is about 80-100Mb in size. The compact embedded java can be as small as 11Mb.

Started with Java 8 (or 1.8), Java use jrecreate to generate embedded java for specific target platform. The targeting platform is for ARM Linux and x86 Linux. It can be generated on a host with Linux or Windows (prefer to have 1Gb or memory?).

My target platform is DNS-320 with fun_plug hack. It is an ARM cpu (ARMv5TE with soft floating point), 128Mb ram (Yes, is 128Mb). You can create target for Raspberry Pi (with hard floating point).

You need a Java (JDK or JRE) on the host system. After generated, you can just move over the embedded JRE to the target platform.

Download Embedded Java from Oracle technical network.

For my case here, I use:

Embedded Java 1.8, ARM v5 with soft floating point (ejdk-8u33-fcs-linux-arm-sflt.gz).
OpenJDK 1.7 on Debian (32-bits), and build it on Debian 7 runs on Virtualbox VM (on Mac OS X).

Debian$ sudo apt-get install openjdk-7-jre



Extract embedded java 1.8

Debian $ export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-i386
Debian $ export EJDK=<target directory>
Debian $ cd ejdk1.8.0_33
Debian ejdk1.8.0_33 $ bin/jrecreate.sh --profile compact1 --dest compact1-minimal --vm minimal
Building JRE using Options {
...
target: linux_arm_sflt
vm: minimal
runtime: compact1 profile
debug: false
keep-debug-info: false
no-compression: false
dry-run: false
verbose: false
extension: []
}

Target JRE Size is 10,837 KB (on disk usage may be greater).
Embedded JRE created successfully

The size is 11Mb.

Debian$ du -sh compact1-minimal/.
11M compact1-minimal/.



I write a HelloWorld java to test.

$ cat > HelloWorld.java <<-EOF

public class HelloWorld {
public static void main(String args[]) {
System.out.println("Hello, world!");
}
}
EOF


$ javac HelloWorld.java
⇒ HelloWorld.class
$ java HelloWorld
Hello, world!


I move the hello world program and compact1-minimal to my target platform (the ARM Linux) /opt/java/ejre-1.8.

arm$ export JAVA_HOME=/opt/java/ejre-1.8
arm$ export PATH=$JAVA_HOME/bin:$PATH

arm$ file HelloWorld.class
HelloWorld.class: compiled Java class data, version 49.0 (Java 1.5)

arm$ java -version
java version "1.8.0_33"
Java(TM) SE Embedded Runtime Environment (build 1.8.0_33-b05, profile compact1, headless)
Java HotSpot(TM) Embedded Minimal VM (build 25.33-b05, mixed mode)

arm$ java HelloWorld
Hello, world!

Now you can create an embedded java 8 for Raspberry Pi.

Sunday, May 03, 2015

Touch'n Go Dormant Card Issue

A few years back Touch'n Go given out a lot of free cards to the public, as a promotion of the Touch'n Go card, now they changed their strategy.

If your Touch'n Go card has not been used and top up for more than 12 months time, the card will be dormant (or suspended). Once the card has been dormant, you are not able to activate the card, the remaining amount can be claimed. Touch'n Go company will charge you RM5 as the processing fees, and it takes months time to get back the money.

The reason given by the company why they need to deactivate the unused card because their server performance is affected by those unused cards.

  1. Why TNGSB needs to deactivate dormant card?
    1. There is quite a number of dormant or inactive Touch 'n Go cards in our system. These dormant cards have caused unnecessary load that prevent the system from operating optimally, thus affecting our service level to all active users. By deactivating these non-active cards, we will be able to streamline our system to improve system efficiency and to provide good services to all our customers.
By today's standard, a few millions cards is not really a big issue for server processing. If the company can not handle the few millions cards, do you think they can handle millions of dollars?

If you compare the smart card policy with other Asian countries like Singapore, Hong Kong, Taiwan or even China. All smart card in these countries can be activated easily, even you have stop using it for more than 12 months time.

Is not all bad move done by Touch'n Go company. They have done something better as well. They have migrated to a new web system. The old e-statement website is not working anymore. You need to register again with the new website (https://tngportal.touchngo.com.my/), you can only manage 1 card with the original website, but now you can manage more cards with the new website.

I don't think server processing is an issue. As a promotion for the Touch'n Go card, the card should be able to be reactivated as needed. This is just a policy issue for a lame reason.

Friday, April 10, 2015

My 2 cents on Apple Watch 2015

Apple is going to offer it's first smart watch, Apple Watch for their employee at 50 percent discount. May be Apple don't expect the Apple Watch sell very good in the market.

I am not too worried about the sales figure, Apple always has a group of fans and buyers. Let's wait till the next Apple event for the sales report.

I am going to talk about 2 things that I feel not right for Apple Watch.

I do not have an Apple Watch to try out, I just base on what I saw on the web.

1. Target Audience

Apple designer Jonathan Ive claimed that, "The Swiss watch industry is in trouble." (read here). Look at Apple Watch price range from USD400 to USD15,000 (here).

For lower price range Apple Watch, it may affected those quartz and electronic watch, especially those with some sport features like Suunto, Casio etc.

For the high price market, Apple has Apple Watch Edition series which cost more than USD10k. Since most people are not going to wear 2 watches at the same time, I don't think they will dumped their Rolex watch for Apple smart watch.

For a smart watch with additional function, the older smart watch will be outdated very soon, after Apple came out with new hardware and software.

2. The Watch Face

For me, the watch face is the biggest design flaw. The watch face must be round, not other shape. There are square, rectangle or diamond shape watches out there, but majority are still round in shape.

The moto360 looks like a better design in this category.

Conclusion

Apple Watch could be a fashion, but it will not be a classic, for now.

Reference:
Apple to offer Watch to employees at half price, CNet


Sunday, April 05, 2015

A college math professor's April Fool prank 2015

How could I miss this. A math and computer science professor, Matthew Weathers make a video prank in his math class.



↵ Use original player
YouTube
← Replay
X
i



YouTube here.

This is not his first time prank in his class.

Who says no one has humor in computer science?

Friday, April 03, 2015

The New MacBook 2015

The new MacBook 2015 is not a MacBook Air or a MacBook Pro, it is 12-inch notebook, with retina display, it is even lighter than MacBook Air.

There are a few things you may need to know about the new MacBook:

1. Retina Display

12-inch retina display, with resolution 2304x1440. Is about 225 dpi.

2. Fanless

The new MacBook has no fan. It is just 5 watt power, really low power, that's why it doesn't need a fan.

3. Only 1 Adapter Interface

There is only 1 adapter, USB-C for charging, input and output. So you can't plug in the external storage and charge the notebook together, but you can get an external adapter, just pay more.

4. Other

The keyboard. Apple change the keyboard design from traditional scissor mechanism to butterfly mechanism. According to Apple, for older keyboard design, you need to hit the centre of the keyboard button, the new butterfly mechanism keyboard is more stable and more responsive.

5. The Apple Logo

The luminous Apple logo was replaced by a chromed Apple Logo. This is the least important, but this is not so “Apple-style” or “Job’s style". 

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 的出現對唱片業的影響己是前車之鑒。 在軟體,硬體,網絡,服務都已準備就緒之,就只是欠缺臨門一腳(我不知道是那一腳)。要是業者們還不醒覺,受影響的豈只是電影者而已。