HTML5 Mobile Development Cookbook review

The web is becoming mobile, major websites are creating a mobile version of their system and new sites are also starting out as mobile only first. Thus, I shall not be left behind and have recently finished reading the HTML5 Mobile Development Cookbook, over 200 pages of in-depth explanations, source codes and pictures of building various features for mobile browsers. This book is like an All In One book of tutorials and articles packaged together is proper sequence. Setting up test environment (not development environment), browser support for features and interacting with various phone OS APIs are some of the most notable topic.

I really loved the support for browsers such as opera mini and old Operating Systems such as Symbian. There is even a whole chapter on debugging on these systems and newer systems. Remote debugging  in javascript, html and CSS (If you consider it debugging with HTML and CSS). Performance testing on these platforms also stands out for me as I am more of an engineer and not specifically a designer. The book utilize a combination of local software tools and online tools for testing. They range from basic tools such as using Google Analyzer to more advance tools such as WireShark.

What I love the most about this book? They gave instructions on setting up your environment for major mobile devices, where to find the required files AND what desktop OS you can develop and test on. For example, testing in an Android emulator, the URL to download the emulator and what supported OS you can test on (Windows, Mac and Linux). I’ve had so much trouble in the past to find and set-up reliable test environments for mobile development. My designer friend Dwayne Samuels even took a look at the Table of Contents and already found a solution to a problem he is currently having (changing layout based on phone’s orientation).  I recommend all web front-end engineers and designers to have a look at this book.

Running ubuntu in full screen inside virtualbox

Install Guest Addition:

Detecting if user is idle, away or back by using Idle.js

Idle.js is a javascript API that can detect if a user is idle, away or back in a webpage. This library is independent of other libraries such as jQuery. It supports callbacks for when the user is idle and back and methods for setting the timeout. The main purpose of creating this library is to use it in a chat application to relay the user status back to the server.

API

There are 2 callbacks supported, onAway and onAwayBack, both of which takes no parameters. onAway is trigger whenever the there is no activity inside the webpage by the user for the length of the timeout specified. onAwayBack is triggered whenever there is an activity inside the webpage by the user.

One method exposed to set the timeout setAwayTimeout(int), which takes an integer of when to trigger the onAway event.

The constructor also accepts a configuration object with all of these methods.

Here is an example of usage:

Demo

There is a demo of this on on github here.

The project is hosted here.

Tags:

Why do companies recycle mobile phones?

I bet many of you, like me, also has many old phones tossed away in a drawer somewhere. You can actually trade in these phones for money (well, some phones that is). I recently found out there is a booming market in the UK where companies are buying cell phones from people (some may have to be in working condition and some will have to be at a certain age).  For example The O2 phone company will give you £29.00 ($4,000.00 JMD) for a first generation iPhone with scratches and general wear and tear. Just like with these cash-for-gold merchants, I’d rather find out the source, or what exactly they are doing with them (if a company buys your phone for x, there is a chance they are making 2x from it). So what do these companies do with these phones?

  1. Refurbish and re-sell. – Some companies may do this themselves or they will send them back to the manufacturers to be refurbished.
  2. Recycle – Yes, some companies actually do recycle the materials if the phones cannot be refurbished.
  3. Re-sell locally –  Some smaller companies will just sell the phone back for little profit
  4. Re-sell in the east – Larger companies will either refurbish or just sell the phones to eastern distributors in countries like China or Africa where there are many low communication and low income communities. The buying price is determined by the buying price in the East.

I cannot do #1 and #2, #3 will be a waste of time and #4 will probably cost me more money than what I’d get for my phones. I’d rather sell my phones to one of these companies rather than their source, money and time is saved when these companies do these kind of business in bulk.

How to use wikipedia during black-out day

I’m so disappointed in how wikipedia went about their so called ‘black-out day’ to protest against SOPA. Instead of a server side redirect, they used client side?

Turn Javascript off. In Chrome, you can browse to this settings page: chrome://settings/contentExceptions#javascript and enter http://en.wikipedia.org/ as one of the Hostname Pattern and set it to Block. Remove this tomorrow.

Use cached versions from google. Most of you will find wikipedia articles from google. Click cached and you will have access to that data.

 

Tags: