HTTP 2.0 Officially In The Works

October 9th, 2012

IETF had announced that they are officially working on the next version of HTTP – HTTP/2.0.

Credits: Twitter

HTTP which stands for “HyperText Transfer Protocol”, is the underlying protocol that powers all your web-browsing activities – Facebook, Google, Yahoo, etc, all run on top of the HTTP protocol.

The current version of HTTP – HTTP/1.1 – had worked very well for the past 13 years since 1999; however, as it was originally designed for the serving of small static pages, the protocol was not optimal for rich and resource intensive web applications. HTTP/2.0 seeks to address this and will use Google-developed SPDY protocol as its basis.

SPDY improves on the existing HTTP protocol through 4 main features:

  1. Multiplexing multiple HTTP channels through a single (TCP) connection.
  2. Assignment of priorities to HTTP requests so that the important ones don’t get throttled.
  3. HTTP headers compression
  4. Server push/hints

Credits: http://dev.chromium.org/spdy/spdy-whitepaper

Bookmark and Share

- Lem

Comparison of FREE Image Hosting Services

October 4th, 2012

Was thinking of starting a travel blog, and travel blogs being image-heavy (what kind of travel blogs/books would feature lots of text but few pictures? Oh ya, Lonely Planet guidebooks… hahaha), I would need to find a suitable FREE image hosting service.

I’m not familiar with image hosting services, so I did a quick research and have narrowed my search to the following 4 image hosting services:

  1. Picasa Web (picasaweb.google.com)
  2. Facebook Photos (www.facebook.com)
  3. Flickr (www.flickr.com)
  4. Photobucket (photobucket.com)

Evaluation:

I’ve evaluated the above 4 services based on:

  1. Free storage space
  2. Max image resolution/size
  3. Download Bandwidth
  4. Max video length/size*

*Note that I’ve added video length/size to complete the picture (pun intended).

Criteria Comparisons
Free storage space
Picasa 1024 MB. However, because photos up to 2048 x 2048 pixels and videos up to 15 minutes won’t count towards your free storage, the amount of free storage can be unlimited if you adhere to the above limits.
Facebook Unlimited
Flickr Unlimited, but restricted to 300 MB photo upload per month.
Photobucket 2 GB
Max Image Resolution/Size
Picasa Unlimited
Facebook 2048 x 2048
Flickr 30MB per photo
Photobucket Up to 5 MB each or 2048 x 1536
Download Bandwidth
Picasa Unlimited
Facebook Unlimited
Flickr Unlimited
Photobucket 10GB per month
Max Video Length/Size
Picasa Unlimited. Note that videos up to 15 minutes won’t count towards your free storage.
Facebook 200MB/10min
Flickr 150MB/90sec. 2 video uploads per month.
Photobucket 500MB/10min

Verdict

I’ve eliminated Photobucket because of its storage and download bandwidth limitations.
To a lesser extent, Flickr, even though it provides unlimited storage, it restricts the amount of photos that I can upload per month, so I dismissed it as well.

This left me with either Picasa or Facebook.
Either one of the two could have suffice, but I chose to go with Picasa as I find Facebook a little too personal (it’s psychological ;) ).

How about imgur, ImageShack, and TinyPic?

I had not included services such as imgur, ImageShack, and TinyPic, as these services are more inclined toward “fire-and-forget” type of image hosting, and provide little in the way of ownership, or photos organization. Their main strength lies in their fuss-free image uploading and sharing – most of these services don’t even require you to sign up with them – and are therefore perfect for the occasional sharing of a funny picture on a forum, but falls short if you require more control over your images.

Bookmark and Share

- Lem

WSJ Interviews I Can Has Cheezburger? Founder

September 28th, 2012

Interesting interview by WSJ Digits Live with Ben Huh, founder of Cheezburger Inc(or more commonly known as I Can Has Cheezburger?):

(Credits: The Wall Street Journal)

Bookmark and Share

- Lem

Facebook Tracks Your Searches!! – View & Delete Your Search History Via Activity Log

September 23rd, 2012

Should have seen it coming – Facebook has announced that it’ll be rolling out a new feature that will allow users to view their search history in their “Activity Log”. This implies that Facebook will be, or had even been tracking your Facebook searches (stalking someone??? ;) ).

To be fair, Facebook is not the only one collecting your search history – Google had been too. Additionally, this information is private, and Facebook will allow you to delete your search history in your “Activity Log”.

Facebook Activity Log

Facebook Activity Log

To access your Activity Log,

  1. Go to your Timeline (click on your name in the top-left in your newsfeed/home page)
    Accessing Timeline

    Accessing Timeline

  2. From your Timeline, click on the “Activity Log” button near the top-right corner, but below your cover image
  3. To delete any item, just click on the small circle to the right of the offending item and choose “Delete”
Bookmark and Share

- Lem

RIPE NCC Down to Last /8 IPv4 Block

September 17th, 2012

A new milestone in IPv4 exhaustion history:

RIPE NCC, the Regional Internet Registry (RIR) for Europe, the Middle East and parts of Asia, has announced that it is down to its last /8 IPv4 block on 14 Sept 2012.

This makes RIPE NCC the 2nd RIR after APNIC (Asia Pacific Network Information Centre) to have reached their last /8 IPv4 block.

With 2 out of 5 RIRs having nearly exhausted their IPv4 address pools, this event highlights the imminence of IPv4 exhaustion and the urgent need for IPv6 transition.

Background:

The IPv4 address supply chain looks like this: IANA –> RIRs –> ISPs –> you, me and businesses.

So what happens when we run completely dry of IPv4 addresses? Well, not to panic! Those of us already allocated IPv4 addresses will function as we do today. However, new Internet users or websites will have to run on IPv6 – the new version of Internet protocol. Unfortunately, IPv6 wasn’t designed to be compatible with IPv4, so it may be possible that IPv6 users may not be able to visit IPv4 websites, and IPv4 users can’t visit IPv6 websites, unless some form of interoperability is implemented by either the user of the website. Some example interoperability techniques include dual stacks, and tunnelling – IPv6-in-IPv4 (e.g. 6-to-4, 6rd, protocol 41), IPv4-in-IPv6, IPv6-in-UDP (Teredo, TSP).

World IPv6 Launch Day Logo

Credits: http://www.worldipv6launch.org

Bookmark and Share

- Lem

Firefox 16 Introduces Graphical Command Line Interface

September 2nd, 2012

Firefox 16, currently in the Beta channel, will feature a new command-line interface that will allow you to control your browser as well as the webpage’s contents by typing commands into the command-line interface.

This command-line interface, known officially as “Graphical Command Line Interface (GCLI)”, can be accessed via the Tool -> Web Developer -> Developer Toolbar menu or using the keyboard shortcut “Shift-F2″.

Credits: hacks.mozilla.org

More details can be found in the video below from Mozilla:

Bookmark and Share

- Lem

CSS Margins and Paddings

August 22nd, 2012

A simple diagram to remind myself of how CSS margins and paddings relate to one another.

CSS margins and paddings

Bookmark and Share

- Lem

Cool! HTML5/Javascript Gameboy Color Emulator

August 13th, 2012

Saw this in TechCrunch – someone actually developed a functional Gameboy Color emulator using only HTML5/Javascript that could run in a browser without any plugins!

The link: http://gamecenter.grantgalitz.org/

Gameboy Color emulator

Bookmark and Share

- Lem

Newsflash: Facebook Now Support Subscription Payment Model

August 10th, 2012

Facebook has announced support for subscription payment model:

https://developers.facebook.com/blog/post/2012/08/08/subscriptions-now-available/

Credits: Facebook Developers blog

Bookmark and Share

- Lem

Unicode vs UTF

August 5th, 2012

I had previously attempted to write a short and simple intro to Unicode vs UTF, but it didn’t turn out too well (as in, it’s neither short nor simple ;) lol)… So I thought I should try again!

1. Unicode is a giant mapping table

Simply put, Unicode is a giant mapping table that maps an integer value to a character.

E.g. the number 65 -> “A”, while the number 19969 -> “丁”, and the number 12353 -> “ぁ”

The integer value is also known as a “codepoint” in Unicode-speak.

The Unicode is large enough to support almost known languages, and each supported language is allocated specific codepoint ranges.
The full set of characters can be found on Unicode.org’s code charts.

An screenshot of the Unicode CJK code table

2. Unicode is NOT UTF – UTF defines how to represent a Unicode codepoint as a sequence of bytes

Unicode is NOT UTF! Unicode is NOT UTF! Unicode is NOT UTF!

This is a common misconception, and Unicode is often erroneously used synonymously with UTF.
While Unicode is a giant mapping table, UTF (Unicode Transformation Formats) defines how to represent a Unicode codepoint as a sequence of bytes.

UTF provides several encoding options, but the more common ones are UTF-8, UTF-16 and UTF-32, with UTF-8 being the de-facto standard:

UTF-X Description/Properties
UTF-8 Each character is encoded using 1 – 4 bytes.

This is the most efficient encoding form if the document contains mostly ASCII characters, as ASCII characters could be represented using only 1 byte. On the other hand, a Chinese character would require 3 bytes per character in UTF-8.

UTF-16 Each character is encoded using 2 or 4 bytes.

This is generally used if the document contains mostly non-ASCII, major languages such as Chinese and Arabic, as these could be represented using only 2 bytes for each character; In UTF-8, these character would have required 3 bytes.

Comes in big-endian form and little-endian forms.

UTF-32 UTF-32 uses exactly 4 bytes per character.

The easiest encoding form to parse, as it represents the code points directly. However, it obviously is not a space-efficient method.

Note that the encoding algorithms are not straightforward – e.g. in UTF-8, the first few bits of the first byte represents the number of bytes used to encode this particular character. More details could be found on Wikipedia.

3. Some UTF-8/16 Examples

Some UTF-8/16 encoding examples. Note that the pure ASCII string (Hello World!) uses less bytes in UTF-8 than in UTF-16, while the reverse is true for the Japanese text.

Original text Encodings (Hex)
Hello World!
UTF-8 48 65 6c 6c 6f 20 57 6f 72 6c 64 21
UTF-16 Big-endian 00 48 00 65 00 6c 00 6c 00 6f 00 20 00 57 00 6f 00 72 00 6c 00 64 00 21
UTF-16 Little-endian 48 00 65 00 6c 00 6c 00 6f 00 20 00 57 00 6f 00 72 00 6c 00 64 00 21 00
私は海賊王になる
UTF-8 e7 a7 81 e3 81 af e6 b5 b7 e8 b3 8a e7 8e 8b e3 81 ab e3 81 aa e3 82 8b
UTF-16 Big-endian 79 c1 30 6f 6d 77 8c ca 73 8b 30 6b 30 6a 30 8b
UTF-16 Little-endian c1 79 6f 30 77 6d ca 8c 8b 73 6b 30 6a 30 8b 30

4. Big-endian or Little-endian? Check the BOM (Byte-Order-Mark), aka FE FF

As mentioned earlier, UTF-16 and UTF-32 allows both big and little endian forms. So how can you tell if a document is encoded in big or little endian? It turned out that utf-encoded documents usually begin with what is known as a BOM (Byte-Order-Mark) that would indicate its endianness. The codepoint for BOM is 0xFEFF. If a document begins with 0xFE then 0xFF then it is big-endian, otherwise it is in little endian.
Note that the BOM will also be encoded using the respective UTF-X scheme, i.e. UTF-16 would use 2 bytes, while UTF-32 will use 4 bytes.

How about UTF-8? Strictly speaking, endianness is not applicable for UTF-8, however, the convention has been to include the BOM in order to indicate that this is a UTF-8 document. A Unicode-capable program would ignore the BOM.

The BOMs for UTF-8/16/32:

UTF-X BOM
UTF-8 EF BB BF
UTF-16 Big-endian FE FF
UTF-16 Little-endian FF EF
UTF-32 Big-endian 00 00 FE FF
UTF-32 Little-endian FF FE 00 00

5. FAQ

Q: Does Unicode mean that no other character sets are in use now?
A: No, other character sets such as GB2312 for Chinese and TIS-620 for Thai are still in use. Unicode is only a recommended standard, but not mandatory.

Q: Why is UTF-8 the de-facto standard over UTF-16?
A: The fact remains that the majority of documents on the Internet are in English (ASCII), thus it’s more efficient to encode these documents in UTF-8. Additionally, we should also note that HTML tags, Javascript code, etc, are written in English as well.

Bookmark and Share

- Lem