Thursday, December 30, 2010

TRON: Legacy

TRON: Legacy was one of the more interesting movies of 2010. The following are some themes which were explored and contains spoilers, so be warned.

References to the Christian religion
Kevin makes CLU in his image, just as God made Man in His image. Man rebels against God, just as CLU rebels against Kevin. Man was supposed to be perfection, just as CLU was supposed to be perfect in his world. In the Bible, Man tried to reach the heavens by creating the Tower of Babel; CLU tries to reach the outside world through the portal which is a beam of light shining skywards. The Light Transporter with its captured programs on board, serves as a metaphor for Noah's Ark.

References to Eastern philosophy, Taoism (duality), Sun Tzu's Art of War
Kevin does not engage in open warfare with CLU. When CLU tries to exert his "will" on the world, he upsets the cosmic harmony which runs counter to Taoist philosophy. When Kevin and CLU merge, the world ends because they are a natural duality i.e. Yin-Yang, passive (Kevin) vs aggressive (CLU), matter and anti-matter, male and female, so on and so forth. Thus it is meaningless to think of Kevin or CLU as independent forces of good or evil, for they are inter-dependent.

Biology & Evolution
Isomorphs are life-forms discovered independently and were not Kevin's (God's) creations. The existence of isomorphs are possible because organisms governed by simple rules are able to exhibit complex, non-random features (cellular automaton). When Quorra gets wounded she is restored to health by manipulating her "code", which is analogous to DNA/gene therapy (the movie even uses a double helix, duh) which repairs "damage" to the genes. Programs placed in the games are expected to "evolve" (self-modifying), with the best ones facing off against the champion Rinzzler.

Perfection
CLU's singular mission is to achieve perfection by ridding the world of imperfect beings. Most cultures place undue emphasis on youthfulness as perfection, which is why CLU appears as a human male in his prime. Even Quorra (played by Olivia Wilde with her nigh-perfect symmetrical features), except for her quirky hair-style and mysterious "tattoo" on her arm which marks her as an isomorph.

Wednesday, December 22, 2010

MINI Habitat Singapore does not perform Preventive Maintenance

Both the driver and passenger sun visor hinges on Eve's R56 MINI were worn and were close to breaking. The passenger-side was replaced under warranty while we were told that that we had to wait for the driver-side to be stocked, which would be outside the warranty period.

When we sent it back for servicing (for a leak from the oil filter), we were told we had to pay for the visor despite being assured that it would've been replaced at no cost to us.

Additionally, they told us that the engine mounts were worn and had to be replaced at about $1000, despite having no prior indication that they were due for replacement.

Download the audio where the service manager states clearly that MINI Habitat does not perform preventive maintenance.

http://dl.dropbox.com/u/2348098/MH3%20audio.mp4

If that does not sound ludicrous to you, then consider the implied message. e.g. if your MINI develops a crack on the windscreen, and as long as you can see through the windscreen and the elements do not hinder your driving, MINI Habitat will not replace it. Or maybe one of the brake rotors develops a severe crack from normal day-to-day driving and they do not replace it because technically it can still perform its function. Until it suffers a catastrophic failure and breaks, sending your car spinning into the armco.

Of course I understand parts exhibit accelerated wear-and-tear from atypical activities like racing, abuse or just plain high mileage. But Eve's car is driven daily on Singapore roads for work purposes. It's not like she's out to win the 24 Hour Le Mans. The other point that I'm unhappy about is that the wear on the engine mounts were undetected since the last servicing, which was about a month prior. Either it wasn't checked then or the wear significantly worsened since that time. Which is the more likely explanation?

My family has 3 Saabs which is also under Trans Eurokar but we've never had any problems with the workshop servicing. So let me make this clear: I'm not bashing Trans Eurokar.

As a customer, I have no complaints about the MINI. In fact I feel the car drives very well and is comfortable enough for long-distance touring. However the after-sales is worse than amateurish. At least with amateurs you're dealing with people who are trying their sincere best to solve your problems.

I will not recommend this car unless you have access to trustworthy professionals who specialize in it.

Thursday, November 11, 2010

Land of Lisp book review

Land of Lisp is an intermediate-level book that teaches Lisp by way of game programming. Interspersed with light-hearted illustrations, LoL is a real page-turner and is one of the most interesting programming books I've read. Important Lisp concepts such as macros, higher order functions and generic programming are clearly explained. One whole chapter is devoted to Lisp being applied to Domain Specific Languages, which is highly applicable and relevant to modern web programming. Along the way, the author also teaches fundamental concepts such as recursion (although not as much emphasis on this as compared to Scheme, for example), code reuse (the "Don't Repeat Yourself" principle), functional programming, closures, basic algorithms like MiniMax, depth-first search and a whole lot more.

Because the author assumes the reader has a basic grasp of his operating environment, setting up a Common Lisp implementation (editor/compiler) is not covered in detail. If that idea is too daunting for you, then you may wish to refer to the beginning chapters of Peter Seibel's Practical Common Lisp or David Lamkin's Successful Lisp as a starting point and come back to LoL when you're more comfortable with how things work.

All in all, I would say, "buy this book!". Highly recommended.

Thursday, October 14, 2010

Back to the Mac

On 20 October, Apple is going to let the world know what they have planned for OS X 10.7


My wild-ass guess is that Apple is going to let the apps from iOS run in a sandbox environment on OS X 10.7, which really shouldn't be that hard to do since development code runs on emulated iOS devices. This would broaden the reach of the iOS ecosystem and would effectively give Apple direct insight into how people are actually using their Macs, via analytics. It would then be able to serve relevant ads.

Wednesday, October 13, 2010

As seen on HN

1993: if
1998: "if" too slow; use "case".
2002: "case" too slow; use Boolean algebra.
2006: Boolean algebra too slow, use arrays & pointers.
2010: Who wrote this shit and what does it do? Rewritten to use "if".

By edw519.

Friday, October 08, 2010

Reasons for continued existence of 3GS

asymco's Horace Dediu has an interesting take on the continued existence of the iPhone 3GS; essentially it is still being kept around so as to "steer adoption of the iPhone 4".

The iPhone 4 is clearly better from a hardware angle, the only downside is price (natch). But I think the 3GS is still around to serve 2 main purposes:

1) Reduce supply pressure of the iPhone 4. Even as iPhone 4 production ramps up and months after its launch, there is still widespread shortage worldwide. Whereas a potential customer might be sitting on the fence with regards to a purchase decision, the existence of a 3GS provides a low-cost "gateway drug" to get into the iOS ecosystem of App Store, excellent web browsing experience etc.

2) Preserve value of the iPhone brand. Many new iPhone 4 owners have upgraded from n-1 (3G or 3GS) and the continued sale of n-1 by Apple itself means the depreciation cost of n-1 phones is minimized. Owners with carrier contracts can upgrade to the next n+1 device at minimal outlay of cash with the proviso of extended carrier contracts (24 months in this part of the world), which is not necessarily onerous outside of the US. This strategy allows the iOS apps inertia to snowball.

Wednesday, October 06, 2010

Speed Download and GameTrailers

If you ever wanted to download the QuickTime HD movies on GameTrailers, and if you have Speed Download, you're in luck. Just copy the following file, name it "gt.sh" or something, give it execute permissions (chmod 755 or whatever), then just run it in the shell with each raw GameTrailer URL HD link as the arguments.

If you don't have Speed Download, you can still use curl to download the files, albeit at a much slower speed; just change the last command to pipe back into /usr/bin/curl instead of sdcli.

Enjoy.

Tuesday, September 28, 2010

Blackberry PlayBook

So Blackberry has revealed its iPad competitor, the PlayBook. Without access to the SDK, these are some of my thoughts:

1) It's running on QNX RTOS or some flavor of it. QNX has a long history in the embedded space and it's nice to see that Blackberry management does not fall victim to the "not invented here" syndrome.

2) It seems the primary application platform will be Adobe Flash/AIR and Blackberry OS 6 as the secondary, maybe as separate mode. Probably that means developers will use the Adobe toolchain and write code in Actionscript, with a backend compiler based on LLVM targeting a VM which runs on QNX or is a module within the kernel, or even a hybrid.

3) Specs-wise it looks good. Power management is unknown however.

The PlayBook will only be launched in 2011... I think this is a credible iPad alternative. However my long term bet is still on iOS devices because Apple still has the edge on content delivery.

Monday, July 19, 2010

"Antennagate"

So the tech press and bloggers are offering their analysis and meta-analysis about "Antennagate".

Ignoring the fact that these dying publications' revenue model are based on selling more dead trees (or garnering more pageviews in the case of bloggers) and thereby have a vested interest in making mountains of molehills, let's concentrate on their reasoning ability (or lack thereof).

First, some numbers. Spencer Webb, who actually designs antennas for a living has done some independent measurements on his own, and calls out Consumer Reports on their flawed methodology.

From the article, Mr Webb makes some interesting observations, which I shall summarize and include some points of my own.

1) The iPhone 4 is markedly better than the iPhone 3GS at uploading/downloading if both phones are used without covers. Remember this.

2) When both phones are held in the so-called "death grip" (full grip), the iPhone 4 on average is still better than the iPhone 3GS, but with a greater variance as compared to the 3GS. In other words, you may or may not get worse performance in a full grip.

3) What this means is that if you're a current iPhone 3GS owner and have never had problems, it's likely you will not experience problems with the iPhone 4 either, even with a full grip.

4) Assuming that cell tower reception is poor, changing to a half-grip or simply not bridging the iPhone 4's antenna gap may be able to improve the situation significantly. This is what Steve Jobs meant to say.

5) Since the press has decided to make an issue out of it, Apple decided to give out free bumpers up and refund the cost of bumpers for those who bought them, until 30 Sep.

6) With regards to "analysts" jumping on the "less than 1% delta vis-a-vis iPhone 3GS per hundred dropped calls" data point and thereby claiming Apple is playing the numbers game, remember point 1. The iPhone 4 has better reception than 3GS, which means where you could not even make or receive calls with a 3GS, an iPhone 4 can, albeit with a weak signal. Would it be such a surprise that the call subsequently gets dropped?

As can be seen, the large majority of the charges are not backed up with good reasoning whatsoever.

As to why Steve Jobs appears to be defensive about all this, have you ever questioned a Japanese salesman about his company's product quality? You might as well insult his mother. Same thing here.

Monday, July 12, 2010

LeBron's move to Miami

OK so LeBron's going to Miami. Charles Barkley thinks it's a bad move. Bad move? Charles is a compulsive gambler, meaning... he doesn't make rational decisions.

How often does an opportunity present itself where 3 of the most promising young players are on the same team? The last time there was such a powerful trio would be the 60s Lakers of Elgin Baylor, Jerry West and Wilt Chamberlain.

Let me put it this way:

Suppose you have an offer to start in the All-Star Game. Suppose this position is permanent. Would you turn it down for the sake of "loyalty"? Or to "prove a point", that you can "go it alone", be a "man's man"?

Basketball is still a team game. You take every opportunity you have to win it all. That's all that matters at the pro level. Anyone that says otherwise is either plain jealous or hypocritical. Recreational basketball is a different story altogether.

These guys are aiming for the stars. It's an experiment that just might make the NBA interesting for me again.

Wednesday, July 07, 2010

Cause of DBS's banking failure?

DBS, one of the largest banks in this part of the world, experienced massive outage of its online banking and ATM facilities on Monday.

The timing of the failure is interesting, because 5 July 2010 does not seem to be a significant date. So what could've caused the problem?

I have no inside information but the following:

1) The payment card industry (PCI) has data security standards (DSS). Version 1.2 of the standard called for the switchover from SSLv2 to SSLv3, on 1 July 2010.[1][2][3]

2) According to the CNA article, the bank discovered the problem at 3 am. As it turns out, 3 am is exactly 99 hours from midnight, 1 July 2010.

My conjecture is that the terminals have a "heartbeat" and would attempt to connect to the back-end systems on an hourly basis, but would be unable to do so since the protocol switchover happened on 1 July 2010. The data structure logging the re-connect attempts then ran into a buffer overflow when 4 am rolled around since 99+1 = 100.[4] If this exception is left unhandled then it would cause the system to halt.

If this was indeed the root cause of failure then the band-aid fix would probably require a reconfiguration of the terminals to use SSLv3 or TLSv1.2. The real solution is to improve test coverage and perform a code review. At the operations level DBS would have to audit its processes to ensure compliance in future.

[1]http://www.pcicomplianceguide.org/pcifaqs.php#18
[2]http://blog.zenone.org/2009/03/pci-compliance-disable-sslv2-and-weak.html
[3]http://www.rapid7.com/vulndb/lookup/sslv2-enabled
[4]The offending data type is probably a numeric fixed-point packed decimal declared to 2 decimal places, a.k.a. PIC 99 in COBOL.

Tuesday, June 22, 2010

More FUD / linkbait

Mashable and Consumerist are reporting that evil Apple is tracking your every move just because you are coerced into agreeing to the new iTMS terms.

First off if these journalists actually did their work they'd realize that Apple has an opt-out page right on the agreement itself that allows you to opt out.

Secondly, Location Services are required for things like the GPS to work. When Location Services are in use, you will see an arrow cursor on the top right of the screen. You can disable Location Services by going to Settings>General>Location Services. If you're really paranoid, then switch the device to Airplane Mode, in which case there will be no network connectivity of any sort.

Friday, April 23, 2010

Microsoft and Apple quarterly results

Microsoft's 3Q results
Apple's 2Q results

Microsoft's net income over 12 months was about US$4 billion. Apple's was US$3 billion over a QUARTER. And this is the period before iPad was available for sale, whereas Windows 7 has been out on the market for some time.

Tuesday, April 13, 2010

Adobe should learn from Apple

So there's a huge flap about Section 3.3.1 of the new iPhone 4.0 SDK agreement. The summary is that Apple doesn't want Flash on the iPhone and set out in legal language to prevent it from getting onto the platform, and a lot of other 3rd party tools are receiving collateral "splash" damage.

The takeaway from this is that Adobe really should've learned one of the operating principles at Apple: secrecy. Do not pre-announce products. It could've developed the iPhone-target feature furtively and sprung it as a surprise announcement on CS5 launch day. Of course Apple still wields veto power over app approval in the App Store, but by then it would have to be on the defensive and contend with irate Flash developers. Adobe would've made money from sales of CS5 and rightfully lay the blame on Apple.

Of course, if Adobe pursued this strategy, the losers would be developers, so it pays to do one's homework. Not everyone who insists on freely-available (as in: free of any entity's control, freedom to tinker, gratis etc), development platforms or languages is entirely insane.

Thursday, April 08, 2010

Nicholas Carr writes about The iPad Luddites

Nicholas Carr writes about The iPad Luddites.

If it were possible to reach as far back as the introduction of the GUI, I'd be willing to bet that the same thing was being said by people who were most familiar with the CLI.

"What is this GUI thing? What is it good for? What can it do that can't be accomplished by the CLI?"

And it would be wise to see how that played out. And the more rational among us would see that there would be certain situations where a CLI or a GUI and now a touch-based interface would be the appropriate means to accomplish certain tasks.


Wednesday, April 07, 2010

iPad and content

Scott Rosenberg thinks the iPad is the equivalent of the CD-ROM in 1994 for the media industry. In summary he thinks the iPad, while a nice device hardware-wise, is not going to revitalize the media businesses that the iPad is (supposedly) pitched at.

I disagree and here are my reasons why.

Optical drives i.e. CD-ROM/DVD-ROM/VCD/Super VCD/BD-ROM and their ilk have been around a long time. They continue to hold vast quantities of useful content, and free and commercial software are still primarily distributed using them. Content owners/producers were able to extract value from this tight integration between the content itself and the physical media. In other words, MS Word or Adobe Photoshop, for all intents and purposes, IS the CD-/DVD-ROM that came in the box. The requirement of a valid serial number is tangential to all this.

Three things conspired to change the situation rapidly. First, better computer hardware meant that it was now possible to transcode content from one medium to another in a reasonable amount of time. Second, user sentiment and pressure began to grow for mobile and unfettered consumption of media regardless of the underlying device. Third, the unabated development of the Internet into a low-cost distribution network with relatively cheap access fees pretty much ensured that there would be a ready audience of customers who were ever-ready to consume, and store, previously unimaginable quantities of information. Thus the content was forcibly divorced from the media upon which it existed, and there was much gnashing of teeth.

The knee-jerk response was Digital Rights (Restrictions?) Management. The content owners disregarded the mathematicians and insisted on initiating a war that could never be won. True enough, we are currently in a pitched battle and after years of expensive litigation, there is still no clear victor.

And this is where the iPad fits in. The iPad really is a compromise; it is a ceasefire treaty offered to both parties. iPad serves up content in a few ways. The obvious way is through web browsing as it is conventionally practiced. Aside from the lack of Adobe Flash, Apple effectively has no control over how the Internet is experienced by the vast majority of the population. The second way is through the App Store. Applications acquired through the App Store can be paid or free. Either way, additional content can be purchased through the App Store. It is essentially a frustration-free subscription model that can be processed in the form of micro-payments over an arbitrary length of time, yet the end-user is still able to influence the terms of consumption. The fact that iTunes Music Store is the #1 source of music in the US means that this model is not only workable, it is the winning formula.

Because only iPad runs iPad software, technically speaking, iPad does mean "vendor lock-in" and CD-ROMs "all over again", but only for content meant to be consumed on iPad. The fear-mongering pundits are claiming it’s the end of the world because they know an iPad-optimized app will beat any run-of-the-mill-browser-based one, in terms of native features, responsiveness etc, and so posit a false dilemma. You are either an iPad developer or you are not and thus you are morally reprehensible because, via a series of non-sequitur arguments, you are somehow causing the Internet to be restricted.

But as explained earlier, iPad really offers choice. Choice for the content owner/producer, and choice for the consumer. And that is why I think iPad really does have the potential to change the media industry for the benefit of both parties.

Friday, March 19, 2010

Where is the moral outrage at Google App Marketplace?

Some very outspoken and prominent developers[1][2] are openly lambasting Apple for having a "closed developer ecosystem" that is "detrimental to the fundamental God-given right of 'freedom'" with the iPhone App Store, yet Google gets a free pass with the Google App Marketplace.

Here are some policies of the Google App Marketplace Program:

The Google Apps Marketplace Program Policies play an important role in maintaining a positive experience for Google Apps vendors and users. These policies also help us curb abuses that threaten our ability to provide this service. We ask that everyone abide by these standards so that we can all enjoy the Google Apps Marketplace. Violation of these policies may result in the denial of Google Apps Marketplace access, disabling of your application, removal of your listings from the Google Apps Marketplace, being blacklisted from uploading future listings, or deletion of your Google Account. These policies may change at any time, so please check back here from time to time.
The rest of it is pretty much legalese boilerplate that is no different from what the App Store asks of you as a developer i.e. no illegal/objectionable/offensive/infringing material.

BTW to get listed as an app vendor, you have to pay a non-refundable US$100, about the same as being on the iPhone Developer Program. Actually it's worse than the Apple App Store cut.
In general, we ask to share revenue on the total amount your customer ends up paying you for your application and related add-ons. Exactly which revenue is subject to revenue share?

1. Revenue from software installed into Google Apps, whenever they begin paying you (e.g. after any free period).
2. If you charge on a recurring basis, we ask that you share revenue on a recurring basis.
3. Revenue from items that are priced per unit of usage (e.g. per GB, per minute, etc)
4. Revenue on upgrades to your product, including:
1. Plan upgrades, like Standard to Premium
2. Additional users
3. Feature upgrades, like additional GB of storage
Note that these are additional fees above what you already pay for when using Google App Engine which has already factored the computation/storage costs for the application instance based on usage. In essence this policy states clearly that you are allowing Google to stiff you twice. And you have no avenue for objection because, according to the opening clause, you must abide by the policy or your app might be pulled from the Marketplace.

So what is exempt from "revenue" share? One thing jumps out. Ad revenue. But if you go down this path, you are playing right into Google's game because you have very little control over how and what ads are going to be shown in your app. It might very well be an ad from a competitor.

So how is it that the Google App Marketplace and thus by induction Google itself any more "free" as compared to iPhone as a platform?

[1] http://www.tbray.org/ongoing/When/201x/2010/03/15/Joining-Google
[2] http://diveintomark.org/archives/2010/01/29/tinkerers-sunset

Friday, February 05, 2010

Why Flash will never be on the iPhone or iPad

Since his return to Apple, Steve Jobs has been played out twice in public. The first time was when IBM dropped the ball with PowerPC. The second time was when Eric Schmidt was on the Apple board and started getting ideas about Android and world domination. Steve is not going to allow Adobe to do the same thing with the iPhone and iPad.

If you understand this, then you will understand why Apple developed its own A4 chips to power the iPad, has its own stores and datacenters, its own mobile advertising company etc. Apple wants to control 100% of its destiny, as any business should. How many corporations can say that today, with widespread outsourcing in the name of "shareholder value"?

Steve Jobs is an angry man. And because he is rich, he cannot be swayed by the promise of money.

Be afraid, be very afraid.

Friday, January 29, 2010

About iPad

Pundits pitting the "netbook" versus the iPad are totally missing the point. Yes, a "netbook" has more ports, cameras, built-in SD card slot etc. But the iPad is not meant to be compared with a full-fledged laptop, just as a "netbook" is not meant to be compared with a full-fledged laptop. A proper laptop would be far better at conventional computing tasks then either of these devices.

Can a "netbook" or even a laptop do something like Brushes? A Wacom Cintiq 12WX alone costs more than the iPad.

The iPad runs iPhone software. For a user, this means instant-on, fast and responsive apps that you know and love on the iPhone/iPod Touch.

From an ideological perspective the iPad runs on Mobile Safari which offers the best web surfing experience on a mobile device, so most web apps are covered. Look at web usage analytics for mobile devices. iPhone OS devices account for a far larger proportion than their actual market share. It doesn't have Flash support, but it does support HTML5.

If it were available 2 years ago, I would've bought it for my mom instead of the Macbook Air she has now.

That's what the iPad is. It is a Macbook Air-killer. It does everything the Macbook Air does, but with a smaller form factor and much lower price without all the pitfalls of traditional computers such as weekly security updates, viruses etc.

So the summary is, if you were never in the market for a device like the Macbook Air, even at the reduced price of US$499, then you would not be interested in the iPad.