Profile cover photo
Profile photo
Wei Teh
Wei's posts

Post has shared content
It's beautiful...
Credit to Shaun L!

Setup Saturday/Sunday! TAG Battlefield in a picture of your setup for a chance to be featured.

Post has shared content

Post has shared content
#AndroidDesign   #ADiA  

Android Design in Action: Notifications + Design Process with Alex Faaborg is now available on YouTube! Check out the full show below.

Additionally, our guest host +Alex Faaborg has agreed to answer a few questions so if you have a question relevant to this week's show, post it in the comments here.

Post has shared content
2 Women chatting in office.. 

Woman 1:" I had a fine evening, how was
yours.. ??
Woman 2:" It was a disaster.. My husband came
home, ate his dinner in 3 minutes and fell a sleep..
How was yours.. ?? .

Woman 1:" Oh it was amazing! My husband came
home and took me out for a romantic dinner.. After
dinner we walked for an hour.. When we came
home he lit the candles around the house..It was
like a fairy tale! .

At the same time, their husbands are talking at

Husband 1:" How was your evening.. ??
Husband 2:" Great.. I came home, dinner was on
the table, I ate and fell asleep.
What about you ??

Husband 1:" It was horrible. I came home, there's
no dinner, they cut the electricity because I forgot
topay the bill; so I took her outfor dinner which
was so expensive that i didn't had money left for a
We walked home which took an hour and when
we got home i remembered there was no
electricity so I had to light candles all over the

Moral:" Presentation does matter.. No matter what
the reality is..

Post has shared content
For the non french-speaking people interested in my talk on "Android UI Design Patterns in practice" given two weeks ago at +GDG Lyon Android , I made an english version :

And the source code is available here :

Post has shared content
Android Developer Lab+ last week had a deep dive in to the MapView API. If you missed it, you can catch it at ADL+ 2012-12-13 - Maps API V2

Post has shared content
Big History Project
(TED talk - April 2011)
David Christian: The history of our world in 18 minutes

Backed by stunning illustrations, David Christian narrates a complete history of the universe, from the Big Bang to the Internet, in a riveting 18 minutes. This is "Big History": an enlightening, wide-angle look at complexity, life and humanity, set against our slim share of the cosmic timeline.


Post has shared content
You know you're a Floridian if...

Socks are only for bowling. 

You never use an umbrella because the rain will be over in five minutes. 

A good parking place has nothing to do with distance from the store, but everything to do with shade. 

Your winter coat is made of denim. 

You can tell the difference between fire ant bites and mosquito bites. 

You're younger than thirty but some of your friends are over 65. 

Anything under 70 degrees is chilly. 

You've driven through Yeehaw Junction.

You know that no other grocery store can compare to Publix. 

You know that anything under a Category 3 just isn't worth waking up for. 

You dread love bug season. 

You are on a first name basis with the hurricane list. They aren't Hurricane Charley or Hurricane Frances. You know them as Andrew, Charley, Frances, Ivan, Jeanne, Wilma, Irene, Cheryl, Rita, Mary, Alison 

You know what a snowbird is and when they'll leave.

You think a six-foot alligator is actually pretty average. 

'Down South' means Key West.

Flip-flops are everyday wear. Shoes are for business meetings and church, but you HAVE worn flip flops to church before. 

You have a drawer full of bathing suits, and one sweatshirt. 

You get annoyed at the tourists who feed seagulls. 

A mountain is any hill 100 feet above sea level. 

You know the four seasons really are: hurricane season, love bug season, tourist season and summer. 

You've hosted a hurricane party.

You can pronounce Okeechobee, Kissimmee , Withlacoochee , Thonotosassa and Micanopy. 

You understand why it's better to have a friend with a boat, than have a boat yourself. 

You were 25 when you first met someone who couldn't swim. 

You've worn shorts and used the A/C on Christmas and New Years. 

You recognize Miami-Dade as 'Northern Cuba.' 

Post has shared content
So here's the random trick of the day: say you decided to finally upgrade your monitor due to a random discussion on G+, but it turns out that you haven't upgraded your desktop in a while, so you're stuck with single-link DVI.

And the fancy new monitor is a 2560x1440 one that requires dual-link DVI to drive it, so says the documentation in big letters. What do?

Of course, you could just try to find a HDMI cable, since I suspect the machine is still new enough that it happily does HDMI at pixel frequencies high enough that it would all work fine. But you're a lazy git, and you can't find a cable anywhere. And by "anywhere" I mean "lying right there on my desk, not under a pile of paper".

So rather than waste your time with trying to find hardware you may or may not have, just say "hey, I'm not playing games anyway, so why not just drive that thing with a single DVI link at 30Hz instead of the 60Hz it wants. It's going to buffer the data somewhere to see if it needs to stretch it anyway". 

And if you are that kind of lazy git, here's what you do:

Step 1: calculate the VESA timing modes for 2560x1440 at 30Hz. You could do this by hand if you were a real man, but we already covered the whole "lazy git" part. So use the "gtf" tool (no, that's not random noise, it means "Generalized Timing Formula", it's part of the VESA standard for how the pixel signal timings are supposed to look like)

Running "gtf 2560 1440 30" spits out the following lovely turd, bringing back bad memories of X11 config files. There's a reason we don't do them any more, but people still remember it, and get occasional flashbacks and PSTD:

  # 2560x1440 @ 30.00 Hz (GTF) hsync: 43.95 kHz; pclk: 146.27 MHz
  Modeline "2560x1440_30.00"  146.27  2560 2680 2944 3328  1440 1441 1444 1465  -HSync +Vsync

Yeah, G+ will completely corrupt the formatting of those two lines, but for once it doesn't really matter. It looks like noise regardless of formatting. It's not meant for human consumption.

Step 2: tell 'xrandr' about this mode by just copying-and-pasting the numbers that gtf spit out after incanting the magic words "xrandr --newmode 2560x1440". So the command line looks something like 

   xrandr --newmode 2560x1440 146.27 2560 2680 ...

which will quietly seem to do absolutely nothing, but will have told xrandr that there's a new mode with those particular timings available.

Step 3: tie that mode to the list of modes that the HDMI1 output (which is what is connected to the DVI output, which you would have figured out by just running "xrandr" without any arguments what-so-ever) knows about:

xrandr --addmode HDMI1 2560x1440

Again, absolutely nothing appears to happen, but under the hood this has prepared us to say "yes, I really mean that". Lovely.

Step 4: actually switch to it. This is where the monitor either goes black, spectacularly blows up, or starts showing all its pixels the way it is supposed to:

xrandr --output HDMI1 --mode 2560x1440

Ta-daa! Wasn't that easy? Never mind what the manual says how you should use this monitor, we have the technology to do better than that. Or, in this case, worse than that, but whatever.

Now, obviously any sane person would ask himself why the GTF calculations aren't something that 'xrandr' just knows about, and why this isn't just a single command to say "please switch that output to 2560x1440@30". Why all the extra steps?

The answer to that question? I have absolutely no idea. Graphics driver people are an odd bunch. 

Post has shared content
Programmer Interrupted

The most thorough study to date that uses a variety of techniques to gauge the cost of interrupting a programmer:

subvocal utterances
tracking eclipse and visual studio typing frequencies/patterns.

High level takeaway:
A programmer takes between 10-15 minutes to start editing code after resuming work from an interruption.

When interrupted during an edit of a method, only 10% of times did a programmer resume work in less than a minute.

Definitely worth reading.
Wait while more posts are being loaded