Posted 2 months ago

Travelathon

Seeing as traveling has taken a backseat in my plans last year, I’m kinda looking forward to the places I’ve planned to visit this year and the next so far. They are not all exotic locations. There are some beach holidays, revisiting some cities and some exploring my roots.

Cities to visit in 2012:

  • Pulau Perhentian
  • Europe
1. Pulau Perhentian
Pulau Perhentian Besar to be exact. This one’s planned by the boys and girls of MCC (MyChubChat), and one I’ve personally been putting off since 2010. Pulau Perhentian is one of a group of islands located at the east coast of Malaysia. Nearby neighbours include Pulau Redang, Lang Tengah and Pulau Kapas. Its name ‘perhentian’ means ‘stopping point’ in Malay, referring to their longstanding role as a waypoint for traders between Bangkok and Malaysia. Historic and exotic, Pulau Perhentian, like Redang, is known for its turquoise blue waters, its protected marine park, fishing and water activities like snorkeling and scuba diving; all things I love to see and do. It’s quite amazing really, based on the pictures I’ve seen of that island so far. Reviews from fellow Malaysians of the island are ample and great; many emphasising the clear sea water, its rarely touched natural surroundings and the awesome seafood. Being the beach bum I am, this looks like the perfect getaway to relief myself from the stress of working in this mundane unexciting concrete jungle; i.e. Singapore.
2. Europe (The Big Backpacker)
I planned this trip a year ago, way before I incorporated Quuza Pte Ltd. It was initially scheduled for an end-2011 departure but work and financial constraints, have made me put this two-week trip on-hold. Backpacking around Europe should be fun. Here’s a sample itinerary of how the trip would roughly go:
I’m quite excited to revisit some of the European landmarks; e.g. Tower of London and Big Ben. And also visit some new ones like the Coliseum in Rome, Acropolis in Athens, Duomo in Florence, Mont-St-Michel in Normandy, Neuschwanstein Castle and more. Sleeping in a train to wake up in another city, experiencing life in the many different cities, immersing in their culture; it’ll be an amazing experience.
Travelathon 2013: The Prognosis, so far…
Much excitement awaits this and next year. I’ve even started toying around with cities to visit next year and I think I’m gonna toss in a city close to my roots; i.e. Surabaya. My dad for one has nagged at me, saying I still have cousins there. Also to visit is the quite-famous Mount Bromo. Following that, a flight to Jakarta to just absorb the bustling Indonesian capital, shop and indulge in the most amazing food. And last but not least, to stop by Bali for maybe a day or two, just because.
I’m also interested in visiting the Maldives, but that feels more honeymoon-ey and I guess I’ll probably visit there with my significant other when the time is right. Krabi is also on the top of my list, just for a short getaway perhaps, stock up on bags *wink*. Krabi’s amazing because it has both the tranquility and touristy spots all in one. From lounging at Ao Nang Beach and smoking a cigar while taking a sip of that Kenyan blend coffee in the evenings, to taking a trip to Phi Phi Island in the morning, and to shopping for Grade-A leather bags from Korea, Krabi has everything you need for a leisurely laid-back vacation. And to top it all off, 3G broadband there is pretty decent and cheap.
I’m still tossing around ideas for 2013. If you have a suggestion, feel free to comment down below. I’ll be glad to read and consider them. Be it Boracay, or Florida, I’m open.
Oh how I miss traveling!
Posted 3 months ago

imranajmain:

Come for my Ya Saya showcase in Singapore this 24th & 25th Feb at the Playden, Arts House. Tickets available at Badoque Cafe (Simpang Bedok), Spyke (Novena Square) or via email to info@imranajmain.com or sms/call to +6596560442.

Posted 3 months ago

imranajmain:

Don’t forget tomorrow #KitaGerek 8:30pm only on Suria

#KitaGerek

Posted 5 months ago

Sabai sabai… How is it that I have not seen this video till only recently?

Posted 5 months ago

Why is Android laggy, while iOS, Windows Phone 7, QNX, and WebOS are fluid?

Andrew Munn

This post will attempt to answer that question. 

However before I jump in, a couple disclaimers. First, I am a 3rd year undergraduate software engineering student. I interned on the Android team, and +Romain Guy who was responsible for much of the hardware acceleration work in Honeycomb, reviewed some of my code, but I was not on the framework team and I never read the Android rendering source code. I do not have any authoritative Android knowledge and I cannot guarantee what I say here is necessarily 100% accurate, but I have done my best to do my homework. 

Second, I’m interning with the Windows Phone team starting in January, so it’s possible that this post will be unconsciously biased against Android, but if you ask any of my friends, it’s really hard to shut me up about Android. I have more Android t-shirts than days of the week and I’d rather give away my Macbook than my Nexus S. The Googlplex is like a second home - I’ve slept there on more than a few occasions to the dismay of startled janitors (and if you ever get a chance to visit, the banana french toast at Big Table Cafe is to die for). If anything, I’m probably biased in Android’s favor.

Finally, any opinions expressed in this article are solely my own and do not represent those of any past or future employers.

With that out of the way, lets dive right in.

Dianne starts off her post with a surprising revelation:

“Looking at drawing inside of a window, you don’t necessarily need to do this in hardware to achieve full 60fps rendering. This depends very much on the number of pixels in your display and the speed of your CPU. For example, Nexus S has no trouble doing 60fps rendering of all the normal stuff you see in the Android UI like scrolling lists on its 800x480 screen.” 

Hun? How can this be the case? Anybody who’s used a Nexus S knows it slows down in all but the simplest of ListViews. And forget any semblance of decent performance if a background task is occurring, like installing an app or updating the UI from disk. On the other hand, iOS is 100% smooth even when installing apps. But we know Dianne isn’t lying about the potential CPU performance, so what’s going on?

The Root Cause

It’s not GC pauses. It’s not because Android runs bytecode and iOS runs native code. It’s because on iOS all UI rendering occurs in a dedicated UI thread with real-time priority. On the other hand, Android follows the traditional PC model of rendering occurring on the main thread with normal priority. 

This is a not an abstract or academic difference. You can see it for yourself. Grab your closest iPad or iPhone and open Safari. Start loading a complex web page like Facebook. Half way through loading, put your finger on the screen and move it around. All rendering instantly stops. The website will literally never load until you remove your finger. This is because the UI thread is intercepting all events and rendering the UI at real-time priority.

If you repeat this exercise on Android, you’ll notice that the browser will attempt to both animate the page and render the HTML, and do an ‘ok’ job at both. On Android, this a case where an efficient dual core processor really helps, which is why the Galaxy S II is famous for its smoothness.

On iOS when an app is installing from the app store and you put your finger on the screen, the installation instantly pauses until all rendering is finished. Android tries to do both at the same priority, so the frame rate suffers. Once you notice this happening, you’ll see it everywhere on an Android phone. Why is scrolling in the Movies app slow? Because movie cover thumbnails are dynamically added to the movie list as you scroll down, while on iOS they are lazily added after all scrolling stops.

EDIT:[Several people (+Chi-Ho Kwok and +Brent Royal-Gordon especially) have taken the time to explain some mistakes I made in my description of iOS. The fundamental distinction between Android and iOS rendering I identified still stands, but I made some over simpliifcations in my description of iOS because I wasn’t familar enough with the workings. I’ll let +Brent Royal-Gordon explain:

“The iOS description here isn’t quite accurate. There are several things at work:

1. Compositing and previously set-up animations—all the stuff that involves the Core Animation rendering layer tree—do indeed happen on a background thread. 

2. Drawing new content into Core Animation layers and setting up their animations happens on the main thread. This is the same thread that user interface actions occur on.

3. In naively written code, all developer-written code would occur on the main thread. However, Apple provides very easy APIs (Grand Central Dispatch and NSOperation) to move things into system-managed background threads. In iOS 5, you can even declare that a Core Data (object-relational database) context cannot be used directly on the main thread.

All that stuff you noticed—the way images aren’t drawn into lists while you’re scrolling, the way WebKit rendering stops when the system is tracking a touch—isn’t inherently built-in by a mechanism that pauses the world when a finger is on the screen.* It’s deliberate behavior painstakingly implemented by the developer of each individual app.

This is not a technical difference; it’s a cultural difference. Good iOS developers don’t ship software until it runs at something near 60 fps while scrolling and tracks touches almost perfectly; good Android developers do. 

* This isn’t strictly true: the main thread is put into a special mode during touch tracking, and by default, certain callbacks are delayed in that mode. However, a lot of other things, like loads from disk or network activity kept completely on a background thread, are not paused; nor is anything automatically paused during momentum scrolling. The developer has to explicitly delay those things.” ]

Other Reasons

The fundamental reason Android is laggy is UI rendering threading and priority, but it’s not the only reason. First, hardware acceleration, despite Dianna’s reservations, does help. My Nexus S has never been snappier since upgrading to ICS. Hardware acceleration makes a huge difference in apps like the home screen and Android market. Offloading rendering to the GPU also increases battery life, because GPUs are fixed-function hardware, so they operate at a lower power envelope. 

Second, contrary to what I claimed earlier, garbage collection is still a problem, even with the work on concurrent GC in Dalvik. For example, if you’ve ever used the photo gallery app in Honeycomb or ICS you may wonder why the frame rate is low. It turns out the frame rate is capped at 30 FPS because without the cap, swiping through photos proceeds at 60 FPS most of the time, but occasionally a GC pause causes a noticeable “hiccup”. Capping the frame rate at 30 fixes the hiccup problem at the expense of buttery smooth animations at all times. 

Third, there are the hardware problems that Dianne discussed. The Tegra 2, despite Nvidia’s grandiose marketing claims, is hurt by low memory bandwidth and no NEON instruction set support (NEON instructions are the ARM equivalent of Intel’s SSE, which allow for faster matrix math on CPUs). Honeycomb tablets would be better off with a different GPU, even if it was theoretically less powerful in some respects than the Tegra 2. For example, the Samsung Hummingbird in the Nexus S or Apple A4. It’s telling that the fastest released Honeycomb tablet, the Galaxy Tab 7.7, is running the Exynos CPU from the Galaxy S II.

Fourth, Android has a ways to go toward more efficient UI compositing. On iOS, each UI view is rendered separately and stored in memory, so many animations only require the GPU to recomposite UI views. GPUs are extremely good at this. Unfortunately, on Android, the UI hierarchy is flattened before rendering, so animations require every animating section of the screen to be redrawn.

Fifth, the Dalvik VM is not as mature as a desktop class JVM. Java is notorious for terrible GUI performance on desktop. However, many of the issues don’t carry over to the Dalvik implementation. Swing was terrible because it was a cross platform layer on top of native APIs. It is interesting to note that Windows Phone 7’s core UI is built in native code, even though the original plan was to base it entirely on Silverlight. Microsoft ultimately decided that to get the kind of UI performance required, the code would have to be native. It’s easy to see the difference between native and bytecode on Windows Phone 7, because third party apps are written in Silverlight and have inferior performance (NoDo and Mango have alleviated this problem and the Silverlight UIs are generally very smooth now).

Thankfully, each of the five issues listed above is solvable without radical changes to Android. Hardware acceleration will be on all Android phones running ICS, Dalvik continues to improve GC efficiency, the Tegra 2 is finally obsolete, there are existing workarounds for the UI compositing problems, and Dalvik becomes a faster VM with every release. I recently asked +Jason Kincaid of +TechCrunch if his Galaxy Nexus was smooth, and he had this to say:

“In general I’ve found ICS on the Galaxy Nexus to be quite smooth. There are occasional stutters — the one place where I can consistently get jitters on the Galaxy Nexus is when I hit the multitasking button, where it often will pause for a quarter second. That said, I find that the iPhone 4S also jitters more than I had expected, especially when I go to access the systemwide search (where you swipe left from the home screen).”

So there you go, the Android lag problem is mostly solved, right? Not so fast.

Going Forward

Android UI will never be completely smooth because of the design constraints I discussed at the beginning:

- UI rendering occurs on the main thread of an app
- UI rendering has normal priority

Even with a Galaxy Nexus, or the quad-core EeePad Transformer Prime, there is no way to guarantee a smooth frame rate if these two design constraints remain true. It’s telling that it takes the power of a Galaxy Nexus to approach the smoothness of a three year old iPhone. So why did the Android team design the rendering framework like this?

Work on Android started before the release of the iPhone, and at the time Android was designed to be a competitor to the Blackberry. The original Android prototype wasn’t a touch screen device. Android’s rendering trade-offs make sense for a keyboard and trackball device. When the iPhone came out, the Android team rushed to release a competitor product, but unfortunately it was too late to rewrite the UI framework.

This is the same reason why Windows Mobile 6.5, Blackberry OS, and Symbian have terrible touch screen performance. Like Android, they were not designed to prioritise UI rendering. Since the iPhone’s release, RIM, Microsoft, and Nokia have abandoned their mobile OS’s and started from scratch. Android is the only mobile OS left that existed pre-iPhone.

So, why doesn’t the Android team rewrite the rendering framework? I’ll let Romain Guy explain:

“…a lot of the work we have to do today is because of certain choices made years ago… …having the UI thread handle animations is the biggest problem. We are working on other solutions to try to improve this (schedule drawing on vsync instead of block on vsync after drawing, possible use a separate rendering thread, etc.) An easy solution would of course to create a new UI toolkit but there are many downsides to this also.”

Romain doesn’t elaborate on what the downsides are, but it’s not difficult to speculate:

- All Apps would have to be re-written to support the new framework
- Android would need a legacy support mode for old apps
- Work on other Android features would be stalled while the new framework is developed

However, I believe the rewrite must happen, despite the downsides. As an aspiring product manager, I find Android’s lagginess absolutely unacceptable. It should be priority #1 for the Android team. 

When the topic of Android comes up with both technical and nontechnical friends, I hear over and over that Android is laggy and slow. The reality is that Android can open apps and render web pages as fast or faster than iOS, but perception is everything. Fixing the UI lag will go a long way to repairing Android’s image.

Beyond the perception issue, lag is a violation of one of Google’s core philosophies. Google believes that things should be fast. That’s a driving philosophy behind Google Search, Gmail, and Chrome. It’s why Google created SPDY to improve on HTTP. It’s why Google builds tools to help websites optimize their site. It’s why Google runs it’s own CDN. It’s why Google Maps is rendered in WebGL. It’s why buffering on Youtube is something most of us remember, but rarely see anymore. 

But perhaps the most salient reason why UI lag in Android is unacceptable comes from the field of Human-Computer Interaction (HCI). Modern touch screens imply an affordance language of 1 to 1 mapping between your finger and animations on the screen. This is why the iOS over-scroll (elastic band) effect is so cool, fun, and intuitive. And this is why the touch screens on Virgin America Flights are so frustrating: they are incredibly laggy, unresponsive, and imprecise. 

A laggy UI breaks the core affordance language of a touch screen. The device no longer feels natural. It loses the magic. The user is pulled out of their interaction and must implicitly acknowledge they are using an imperfect computer simulation. I often get “lost” in an iPad, but I cringe when a Xoom stutters between home screens. The 200 million users of Android deserve better.

And I know they will have it eventually. The Android team is one of the most dedicated and talented development teams in the world. With stars like +Dianne Hackborn and +Romain Guy around, the Android rendering framework is in good hands.

I hope this post has reduced confusion surrounding Android lag. With some luck, Android 5.0 will bring the buttery-smooth Android we’ve all dreamed about since we first held an HTC G1. In the mean time, I’ll be in Redmond working my butt off trying to get a beautiful and smooth mobile OS some of the recognition it deserves.

Credits

Parts of this post was inspired by this reddit comment by ddtro who explained the UI thread and real-time issue:
http://www.reddit.com/r/Android/comments/mztwk/facts_and_fiction_about_android_graphics/c358f0x

This explanation of Android versus iOS UI compositing on Hacker News by Corun was illuminating:
http://news.ycombinator.com/item?id=3310475

Information about Android’s historical roots taken from In the Plex by +Steven Levy and Steve Jobs by Walter Isaacson
Posted 5 months ago

Merry Christmas to all Christians and a Happy New Year to all :)

Posted 5 months ago

So true!

Posted 5 months ago

Laughter is really contagious haha… And this seems like so much fun!

Posted 5 months ago

how to lose $2400 in 24 seconds (by Kurtis Hough)

Posted 5 months ago

Because that one’s mine! :(

pleatedjeans:

am I the only one who does this?

Posted 5 months ago

Kodiak bear waves again!

Posted 5 months ago

#NotoriousKIM #RIPLilKim mattchew03:

Since nobody else had, I took it upon myself to make this. #NotoriousKIM #RIPLilKim

Posted 5 months ago

Graph Rank: Just Another Proof That Facebook Should Be Boycotted

stoweboyd:

A former CTO was briefed on ‘Facebook’s advertising strategy’ (although it’s not clear by who) and suggest that they are up to no good:

Anonymous via Betabeat

If you logged onto Facebook yesterday, perhaps you caught a link at the top of the News Feed that read: “About Ads: Ever wonder how Facebook makes money? Get the details.” The answers provided some context on the news that starting in January, Facebook will start integrating a type of ad, called “sponsored stories,” that display your friends faces next to content they have “liked” in larger-sized ads your News Feed mix. “Facebook makes its money from showing you ads,” the company told consumers yesterday and with the ramp up to its spring 2012 IPO, the social network is getting serious about that endeavor.

In what seemed like an unrelated move, in September, Facebook announced a brand new type of profile called Timeline, where your whole personal history is laid out by month-by-month, all the way back to your birth. At the time, Facebook described it to consumers as a chance to: “Share and highlight your most memorable posts, photos and life events on your timeline. This is where you can tell your story from beginning, to middle, to now.” By the end of this year all 800 million plus Facebook profiles will have been converted to this new interface.

What most users don’t know is that the new features being introduced are all centered around increasing the value of Facebook to advertisers, to the point where Facebook representatives have been selling the idea that Timeline is actually about re-conceptualizing users around their consumer preferences, or as they put it, “brands are now an essential part of people’s identities.” 

The name itself is cleverly designed to conceal the fact that your profile no longer arranges information chronologically. Yes, things are laid out by year and by month. But, when it comes to what’s displayed to your social circle at any given time, other metrics, including direct payments to Facebook itself, will now influence the ranking and placement of stories. This payola will be a crucial part of the graph rank, the new metric for placement that the social network uses to determine what appears on your profile.

“Graph Rank” is a complex and non-published algorithm, but we know direct payments to Facebook and app/user popularity are important parts of the ranking. The newest thing is no longer on top. There is a rough month-by-month sort, but within the month it’s graph rank, not chronological order, that determines placement.

So, Facebook is selling our memories — outr timeline — to advertisers. When users scroll back in their timeline the weighting of what was most important to us back in December 2011, say, will be based on advertising dollars, not something intrinsic to our lives, or the social weighting of the interactions we had with friends. 

Everyone should simply stop using Facebook. It’s been obvious for years that they could care less about it: we are an ore that they are mining for money. We are not people to them, except to the extent that our human qualities provide a way to exploit us.

Posted 11 months ago
I told myself that if I didn’t care, this wouldn’t have hurt so much - surely that proved I was alive and human and all those touchy-feely things, for once and for all. But that wasn’t a relief, not when I felt like a skyscraper with dynamite on every floor.
Jodi Picoult, Handle with Care (via makelovetothemoon)
Posted 11 months ago

mrajmain:

The 100 Hari Acoustic Tour - Imran Ajmain & Friends. More at http://www.imranajmain.com/100hari

(Source: imranajmain)