Tweaking WordPress Archive

I know it has been a long time since i’ve updated my English blog. I will start with something geeky.

I noticed recently some of the image links have been broken on my site. I’m not too sure whether it is because picasa/google photo change or WordPress upgrades that have been auto performed on these blogs(the latter seemed more likely).

I finally had time to fix some of these for Mom’s blog.. While getting her old photos to me to fix her site, Mom asked me if i could also change her archive pages to list all the blog title with links instead of paginated pages with a few full blog content on each. That should be easy i thought, clearly remember the same functionality i saw on blogger.com. Where user can click on a month on the sidebar and a list of blog title will expand under that month.

I went to the WordPress admin page looking for a setting checkbox to check. To my surprise, there is no such function. I started googling and realized that wordpress users have been asking/begging for such a feature since 9 or 10 years ago but there is still no official support!

Eventually i found a few ways that can be used to do what i want. Documenting them here in case someone else is looking for such a feature.

After getting a full archive page for Mom, i liked it so much, i updated both of my English and Chinese blog’s archives page as well.

1. a full archive page for Mom: Create a custom page template for Archive Index.
1.1 First the page template must has the following in its file. I think the most important is the “Template Name: ” line. It will be consumed by the WordPress Page creation UI, and it will use your mypagetemplate.php as a drop down that you can choose when creating a new page.

[php open tag]
/**
* Template Name: Full Width Page
*
* @package WordPress
* @subpackage Twenty_Fourteen
* @since Twenty Fourteen 1.0
*/

1.2 in the page template use wp_get_archives() with a filter to include dates along side the post title. per this discussion thread. wp_get_archives(‘type=postbypost’) function will give you a list of all your post title, but my mom wants a date next to each title, thus the filter.

2. My own Category Archive Page. Adjust category.php and make use Smart Archives Reload plug-in function to display a list of post title for one category. Per this discussion thread. except i didn’t add a content-archive.page and remove the content of the post and keep the title since i don’t like the pagination that method inherits. the function call i made to smart archives repload is

smart_archives( ”, ‘category_name=’.$category_name );

3.I also added an “All Archive” page for my own blog. But instead of using wp_get_archives(), i used Smart Archives Repload plugin again, but this time used its “format=both” arg since my blog has been around longer than mom’s. A giant list might seem too unstructured. So i make use the year and month block format. It also shows which month i didn’t blog (that’s how i realized i haven’t blogged that long here!)
The function call i used in the page template here is:

smart_archives(‘format=both’);

4. I’ve also created Child Theme to do all three above, it is surprisingly painless. and also ensures they won’t get overwritten once wordpress auto update itself again.

It seems fitting to start the re-blogging with a post that makes my Archive page looking better. It gave me some perspective on how long I have been blogging. Especially in today’s world, where so few still do. and even if they do, they do it in the most trendy site such as medium or tumblr. So why do i bother to keep tweaking this wordpress site? I think one reason is because i could do tweaks like this. I can fix things to my liking.

Then why haven’t I blogged for so long? Well actually I have been blogging, just not in English. I’m still able to find interesting blogs to read, interesting personalities to follow on the Chinese part of the net. But i haven’t been able to find the same in the English side. It seems everyone who used to blog in English are all busy twittering or slacking or somewhere i no longer can venture into… 🙁

I myself is just as guilty. So I will try to write more in English. We shall see. 🙂

A Satire of SF & One of NYC

Someone in the name of Peter Shih wrote “10 Things I Hate About You – San Francisco Edition” on Aug. 14th, last Wednesday.  I learned of its existence the next day on Twitter, where it was causing lots of anguish and harsh words. Shih tried to soften the tone of his article by adding a clause claiming it is satire, and also removed some of the most offending clauses, these all happened on Thursday.

I told ZM about this incident over the weekend. Today ZM sent me a Chinese news article talking about Peter Shih! and the Chinese news article also indicated that Shih has removed his essay and apologized! wow!

Apparently the Shih Storm is all over town (literately) and all over the news.

So i went back to reread the screen capture of Shih’s original article.  To be honest, quite a few items he listed are very true, such as how bad SF’s public transit is, how monotonous SF is comparing to any real city.  I remember commenting to friends after watching Billy Elliot on 2000, that it was so depressing to be born into a mining town and all you are expected to do is to be a miner. My friend Jennie at the time laughed at me, “and how different do you think the silicon valley is?”

What surprised me was Shih liked NYC, while complained about the various shabby elements in SF, such as transvestites, homeless, and unsafe areas.  I asked ZM, who lived in NYC for nine years, isn’t NYC even more dirty and dangerous and has more weird people than SF? ZM said NYC is larger and more segregated(gentrified?). Just like Shih said, an uptown guy doesn’t have to mingle with the shabby elements if he chooses.  But in San Francisco, such a compact city, everything is jumbled together. People like Shih couldn’t live in a bubble even when he has lots of money.

Shih is also correct about San Francisco’s nightlife (or the lack of).

This whole incident reminded me of the famous monologue delivered by Edward Norton in “25th Hour”.  ZM and I watched that movie in a little theatre off Union Square in NYC. That satire monologue was even more extreme than Shih’s “hate -list”, it was about NYC.  And while we were in that NYC theater, that monologue earned a standing ovation from the crowd. Everyone was clapping, laughing and cheering.

When i told ZM about 25th hour, his first reaction was real life is very different from the movies.  I made him read the monologue and suggested, “could it be possible that New Yorkers are more secure than San Franciscans?”  ZM contemplated a bit and reluctantly agreed, “maybe. Maybe because New Yorkers are a much more diverse group. While San Franciscan are mostly of the same type.”

I thought ZM had an excellent point. Basically we are back to monotonousness vs. metropolitan.  San Francisco has a limited categories of residents, while New York City has many. Going down the list of Norton’s 25th Hour monologue, i could safely say none of the guys listed in Norton’s list are watching that movie in that theater, or very few.  In other words, Norton’s list didn’t make a left-wing liberal a target, who is probably the target audience of that movie.

But Shih’s attempt at satire was met with a much limited audience as well as resources. He didn’t have much choice at who to pick on.  And whatever he picked on happen to belong to the group of people who is reading his publication.

I happen to love both cities: San Francisco and New York City. I wish San Francisco will grow into a real city some day, with great public transportation, a functional public school system, and the diversity of New York City, while keeping our great weather, interesting architecture, and our nice parks. I wish San Franciscan will become more secure and tolerant of people with different opinions. Next time when someone deliver a Norton style monologue about San Francisco, we can have the confidence to call it a “love letter”, give it a standing ovation, instead of threatening to chase him out of town.

Living without the Cloud

Trying to work from China is such a bizarre experience.  The Cloud I have been taken for granted simply doesn’t exist in China.  While on-site in our business partner’s office, we would be lucky to have minimum internet access (http/https). VPN was not allowed. So we are subject to the full brutal force of the Great Firewall. No Docs, Sites, Google+, Twitter, Facebook, flickr.com. Gmail is intermittent, trying to download anything from a gmail attachment is hit and miss. Search on Google was unbelievably bad.  We happened to be in Chongqing during the same week of the carefully orchestrate murder trial of Gu Kailai. As a result, the word “Chongqing” became a “banned” search keyword. Trying to search anything contains that word will result in “connection reset by peer” (classic indication you’ve been GWFed).  So i had to use Baidu even when all i wanted to search for is as political as a “good restaurant”.

One of the first thing i did was to purchase a Chinese SIM loaded with data plan. I have a Galaxy Nexus, and used to getting HSPA+ connectivity in the bay area on T-Mobile’s network. With a CMCC SIM, the best connectivity i got was Edge.  Then with the often blocked Google.com connection, i felt like i was dropped back to the days when one has to use modem dialup connection to the internet.  Everything became excruciatingly slow.

Eventually i got so sick of watching the little spinning wheel indicating the never ending loading process, I avoid using the internet all together when i’m not in the hotel wifi range.

I understood the value of native applications.  They  provide a semi-sane user experience and the illusion of connection to the outside world. I used off-line Gmail on my desktop, Gmail app and Google Reader App on my phones.

But overall, i felt a strange sense of isolation. The world in the Cloud faded into the distance. Even more interesting was i stopped using the Chinese sites that i now have full access to (there is a reverse Great Firewall effect you don’t hear people talking about, for Chinese site with sensitive contents on them, trying to access them from outside of firewall will also result in “connection reset by peer” error).  I couldn’t explain the reason. As if accessing the consolation price only intensified the feeling of isolation.

All the while, the Chinese society kept on bustling along. All these people were happily enjoying the limited internet without the strong sense of loss and withdraw that i was experiencing. Even more admiringly, there were people “climbing over” the Great Firewall on a daily basis, merely trying to get to all these trivial content that we have been taken for granted.

Now i’ve been back in the comfort of highspeed Internet connectivity of Silicon Valley. Everytime I heard people say the word “Cloud Computing”, I would shudder and remember that little spinning wheel on my phone while i was in China, and the despair I felt then.

Contacts Sync for iPhone

One major pain of changing mobile phone used to be the difficulty of contact syncing, until Android came along. We are all started building up our contact info in the Gmail Contacts. and switching phones requires zero effort to get the same group of contacts show up instantly.

Well, until you have to switch to an non-android phone. Noah has been chewing on my android so much that it finally gave in. Today i had to switch my sim back into the Iphone 3G i have been using around the house as a clock. I was so shocked to find out i had zero contact when i tried to call Gui this afternoon. Then i remembered iTune updated my iphone recently.

After being spoiled by Android for so long, i had no plan of entering my contact by hands back into a phone. So i found out about this: Macs inside Google: OS x.10.5.3: Sync Google Contacts.

Worked like a charm.

Writer’s Room and Its View

First saw the photo collection of writer’s room on douban.com.. From there I was able to trace the source at guardian.co.uk, where you could read what each writer has to say about his/her room.

Interesting.

Then i came across Norman Sherry’s description of Graham Greene’s writing room in Antibes, where he first interviewed Greene for the 3-volume biography of the writer.

The Main room of his flat was modest in size, thirty feet by twelve.  There was a bamboo sofa and two bamboo chairs. Above the sofa was an abstract (flowers) given to Greene by Fidel Castro. White bookshelves filled two walls, and on another wall was a muffin-coloured print of lunardi making his ascent in a balloon in 1789. Near the window a table performed the dual function of dining table and writing desk. There was a black and white television set, used mostly to watch the 7.45pm news from Paris. There were some personal touches – eight pictures  but no photographs – and if our living rooms are places which reflect our personalities, was Greene’s an accident or a calculated revelation of character?

I’m incliend to think it was neither – just a statement of what its inhabitant needed in order to live and to work. None of the trappings proclaim a successful writer, merely the basic necessities for writing and living – nothing superfluous, a statement of fact. As Greene wrote of Scobie’s room in The Heart of the Matter: “To a stranger it would have appeared a bare, uncomfortable room but to Scobie it was home.  Other men slowly build up the sense of home by accumulation… Scobie built his home by a process of reduction’.

Writing at his dual-purpose table, Graham Green faced into the light through a window which shows a fine view of the marina, a few yachts in the winter sun (it had stopped raining) and on the far side of the basin the low slung, immensely powerful sixteenth century Fort Carre, mountain-solid.

– The Life of Graham Green Volume I by Norman Sherry

It shows the limitation of a single photograph used by the Guardian series. Often to capture the setting of the room, the photo had to omit the view. And you would almost always “hear” bout that missing view from the writier’s writing accompanied the photo. Without the view, the room is incomplete. It doesn’t have to be a grand view, a garden, some greenery,  or even another apartment building will do. It is an outlet, a place thought could wander.

DNS Poisoning

This morning while waiting for shuttle, after checking work email, I made my usual rounds of douban.com, friendfeed, and twitter. Everyone of them was filled with angry rants in Chinese. Turned out GFW of China just blocked google at its entirety, not just search, but gmail, reader, docs, etc. The blockage lasted for 1~2 hours for some, but longer for others. Mobile was impacted too. Apparently Opera Mini came to the rescue for some nokia users (i wonder how that works?).

Later during the day, the word was out that it was “DNS Poisoning”. Interesting. In the past, GFWoC has always been using RST to cut TCP connections. So user will see “Connection Reset by Peer” error on their webpage. “DNS Poisoning” is a new tactic. GFWoC is stepping up its game!

DNS cache poisoning is a maliciously created or unintended situation that provides data to a caching Domain Name System server that did not originate from authoritative Domain Name System (DNS) sources. This can happen through improper software design, misconfiguration of name servers, and maliciously designed scenarios exploiting the traditionally open-architecture of the DNS system. Once a DNS server has received such non-authentic data and caches it for future performance increase, it is considered poisoned, supplying the non-authentic data to the clients of the server.
-via Wikipedia.org

When a single user does this, it is called a cyber crime.
What do you call a country systematically does this to its own people? Internal affair? or crime against (cyber) humanity?

Emotion vs. Logic

ZM downloaded an odd movie a couple of weeks ago, and we watched it with the Gui’s.

None of us bought into the argument of the movie. My comment was, this felt like a movie made by Google people, because it is so single-minded about being scientific, worshiping logic. Gui’s comment was, this made the same mistake that economists made about economy, both assumed people are rational beings, while in reality people are not rational at all.

Today i read this interesting article via Isaac’s FriendFeed – “Goodbye Google | stopdesign

Yes, it’s true that a team at Google couldn’t decide between two blues, so they’re testing 41 shades between each blue to see which one performs better. I had a recent debate over whether a border should be 3, 4 or 5 pixels wide, and was asked to prove my case. I can’t operate in an environment like that. I’ve grown tired of debating such minuscule design decisions. There are more exciting design problems in this world to tackle.

Later, there is a followup article “Apple Is a Design Company With Engineers; Google Is an Engineering Company With Designers“.

This is, I believe, why Google’s products (many of which are great and innovative—I remain a devoted Gmail fan, for example) will always fall short of achieving the emotional connection that people feel to an iPhone. There’s no one with real power there who has a good sense of what makes a product beautiful or when it feels “electric.” You can’t quantify that sort of thing through study or harness collective brainpower to coerce it—someone just has to know it when they see it.

I couldn’t make up my mind whose side to take.

Both methods have its merits, obviously, both companies are super successful. From the outside, one would think Apple would be more human more interesting and cooler. But if you ask me which company I would rather work for, i would have to say, Google.

Because being emotional and human has its drawbacks. Rationality and data-worship has the advantage of all democracy, sure, it is not as glamorous and couldn’t put up jaw dropping performance as a dictatorship or authoritarian government (think 2008 Olympic opening ceremony), but it has its nicety and peacefulness. It is reliable, reasonable, and repeatable.

But what i couldn’t decide is which method produces better product. Or whether Google’s obsession with consensus means death by committee, or the grave for creativity?

i can’t think of evidence of either. Just like what Doug Bowman said in his original farewell message. “I can’t fault Google for this reliance on data. And I can’t exactly point to financial failure or a shrinking number of users to prove it has done anything wrong.” Sure, Google’s product couldn’t “achieving the emotional connection that people feel to an iPhone”, but the appeal of Google’s product is its utility, its usefulness. A lot more people needs tools that work than the tool that looks cool, right?

but it sure is nice to look cool too…

still debating…

——Update an hour later—-
Started reading Doug Bowman’s twitter. It is the best twitter stream i’ve ever seen. suddenly i understood why i had been so against twitter before. The many @blahblah reply drives me nuts. It made twitter stream completely unreadable, for person who is not that “blahblah”. One thing i like about Blog was the fact you could browse back and read about a person’s way of thinking, views, and interests, like a novel or a collection of essays. Twitter sprinkled with all these random @blah reply always broke that continuity. And the fact i care about author A’s thoughts doesn’t mean i would care for all of her friends’ thinking too… But Doug’s twitter has very few such interruption, which made his twitter stream enjoyable to read.

saw this from him, and i think i start to lean toward his side.

# Argh! Visual design by committee NEVER works; you end up with mediocrity every time. When will my colleagues learn this?5:07 PM Oct 17th, 2008 from twitterrific

A recent experience at work, trying to put together a presentation by committee also had the same effect. design by committee is similar to doing things follow a process, guarantees mediocrity. but what about teamwork? and when everyone pitches in, result is always better than my doing it on my own?!

torn.

——Update six hours later—–
Was talking to Gui about this over dinner. She has read the original farewell msg, but she didn’t see the other one about Apple versus Google. When i told her my thoughts on democracy versus dictatorship. She laughed, “what democracy? isn’t the difference between Apple and Google really just the difference between the founders? Steve Jobs versus Larry and Sergey?”

Good point.

Cities and Ambition by Paul Graham

I first read Paul Graham’s essay “Cities and Ambition” a while ago. I loved it so much I remembered distributing to all my friends and got into a high energy discussion with my sister, both violently agreeing with Paul Graham’s assessment of many cities in his essay.

Today the link showed up again on douban.com, and I read it again. Still love it. Can’t believe i didn’t blog about it the first time around.

Great cities attract ambitious people. You can sense it when you walk around one. In a hundred subtle ways, the city sends you a message: you could do more; you should try harder.

The surprising thing is how different these messages can be. New York tells you, above all: you should make more money. There are other messages too, of course. You should be hipper. You should be better looking. But the clearest message is that you should be richer.

What I like about Boston (or rather Cambridge) is that the message there is: you should be smarter. You really should get around to reading all those books you’ve been meaning to.

When you ask what message a city sends, you sometimes get surprising answers. As much as they respect brains in Silicon Valley, the message the Valley sends is: you should be more powerful.

That’s not quite the same message New York sends. Power matters in New York too of course, but New York is pretty impressed by a billion dollars even if you merely inherited it. In Silicon Valley no one would care except a few real estate agents. What matters in Silicon Valley is how much effect you have on the world. The reason people there care about Larry and Sergey is not their wealth but the fact that they control Google, which affects practically everyone.

Here is one where my sister couldn’t agree more about berkeley. She should know, she lived there for 10 years.

I’d always imagined Berkeley would be the ideal place—that it would basically be Cambridge with good weather. But when I finally tried living there a couple years ago, it turned out not to be. The message Berkeley sends is: you should live better. Life in Berkeley is very civilized. It’s probably the place in America where someone from Northern Europe would feel most at home. But it’s not humming with ambition.

even though sis is thoroughly disappointed at Berkeley being so lack of ambition, it actually sounds like the ideal city for me. In my mind, San Francisco/Bay Area is largely that way too. At least the part of the bay area that matters to me, they are all sending me the same message “live better.” yay!

I found the following couple of paragraph intriguing.

A city speaks to you mostly by accident—in things you see through windows, in conversations you overhear. It’s not something you have to seek out, but something you can’t turn off. One of the occupational hazards of living in Cambridge is overhearing the conversations of people who use interrogative intonation in declarative sentences. But on average I’ll take Cambridge conversations over New York or Silicon Valley ones.

A friend who moved to Silicon Valley in the late 90s said the worst thing about living there was the low quality of the eavesdropping. At the time I thought she was being deliberately eccentric. Sure, it can be interesting to eavesdrop on people, but is good quality eavesdropping so important that it would affect where you chose to live? Now I understand what she meant. The conversations you overhear tell you what sort of people you’re among.

Although in real life, I don’t have much dependency on eavesdropping. Maybe cuz i’m a rather anti-social person, i find interesting/passionate conversation with a couple of close friends a lot more satisfying, which is more essential to me.

Here is the message from LA.

The big thing in LA seems to be fame. There’s an A List of people who are most in demand right now, and what’s most admired is to be on it, or friends with those who are. Beneath that the message is much like New York’s, though perhaps with more emphasis on physical attractiveness.

Last but not the least, Paris and London. I’ve actually seen more bookshelves (full of books) in Paris than in any other city (granted, i’ve never really visited anyone in Boston, so i don’t know what the bookshelves density is like there.)

Paris was once a great intellectual center. If you went there in 1300, it might have sent the message Cambridge does now. But I tried living there for a bit last year, and the ambitions of the inhabitants are not intellectual ones. The message Paris sends now is: do things with style. I liked that, actually. Paris is the only city I’ve lived in where people genuinely cared about art. In America only a few rich people buy original art, and even the more sophisticated ones rarely get past judging it by the brand name of the artist. But looking through windows at dusk in Paris you can see that people there actually care what paintings look like. Visually, Paris has the best eavesdropping I know.

There’s one more message I’ve heard from cities: in London you can still (barely) hear the message that one should be more aristocratic. If you listen for it you can also hear it in Paris, New York, and Boston. But this message is everywhere very faint. It would have been strong 100 years ago, but now I probably wouldn’t have picked it up at all if I hadn’t deliberately tuned in to that wavelength to see if there was any signal left.

Stuff White People Like: #106 Facebook

This is hilarious:Stuff White People Like: #106 Facebook.

For a brief period of time, MySpace was the site where everyone kept their profile and managed their friendships. But soon, the service began to attract fake profiles, the wrong kind of white people, and struggling musicians. In real world terms, these three developments would be equivalent to a check cashing store, a TGIFridays, and a housing project. All which strike fear in the hearts of white people.

White people were nervous but had nowhere else to go. Then Facebook came along and offered advanced privacy settings, closed networks, and a clean interface. In respective real world terms, these features are analogous to an apartment or house with a security system/doorman, an alumni dinner, and a homeowners association that protects the aesthetics of the neighborhood. In spite of these advances, some white people still clung to their old MySpace accounts. That was until they learned that Facebook started, like so many things beloved by white people, at Harvard.

Within a matter of months, MySpace had gone from a virtual utopia to Digital Detroit, where only minorities and indie bands remain.

Belle de Jour on ShowTime

New Yorker: WORKING GIRL, A British take on the world’s oldest profession., by Nancy Franklin.

“Secret Diary of a Call Girl,” an eight-episode blast of summer heat from Showtime that started last week, … It was based on a book called “The Intimate Adventures of a London Call Girl,” which was written by a high-end prostitute and was itself an outgrowth of a blog, called “Belle de Jour: Diary of a London Call Girl,” whose success then engendered a newspaper series in the Telegraph, called “Belle de Jour’s Naughty Notebook,” and led to another book, called “The Further Adventures of a London Call Girl.” The TV series is now shooting its second season over in England, and has already been renewed for a third. All this enterprise, which is almost Disneyesque in terms of the length of its chain of monetization—the only thing missing is a theme park with kinky rides that cost five hundred dollars an hour—is the product of someone whose identity is open to question. There’s been speculation in the British press that Belle, who has never revealed her real name and is now retired, is an impostor—that is, that she was never a prostitute, and may even be a he.

Stuff White People Like

This is hilarious: Stuff White People Like.

Similar to many people who left comment on the site, my first impression was this is more a list of “stuff yuppies like.” But then if you think about what makes into the trend that yuppie follows, white people do have a lot to do with it. Besides, it is more fun this way.

My favorite line so far is in #27. Marathons

Also worth nothing, more competitive white people prefer triathlons because Kenyans can’t afford $10,000 specialty bicycles.

Don’t Know Much About Economy

911 got me interested in politics. The months followed the event, I read everything i could find about US foreign policy and politicians involved. I was tracking news like an addict on a daily basis. I remember when I went on my trip to South America in April 2002, what bothered me the most before the trip was how limited the internet access would be during the trip, i was worried to interrupt my news reading habit every morning.

The current financial crisis of the US got me interested in economics. One of my co-workers thought i got myself into day-trading cuz I started to watch every move of the market and keeping track of quite a lot of various informations that might influence the market.

Since i’m in the middle of the knowledge absorption phase, it is hard for me to step away from all these chaos and say anything semi-interesting. But what I could say at this point is that I’m very impressed with Mr. Bernanke so far. And I’d like to read more about him, including that famous paper of his on the Great Depression.

To share something i just found and it was interesting: NYT Oct 26, 2005: At the Fed, an Unknown Became a Safe Choice

A couple of books by Bernanke that’s probably worth reading:
Essays on Great Depression
Inflation Targeting: Lessons from the International Experience

(to be continued…)

Library Stairs!

Someday when I can afford a victorian little house, this is what I want for my stairs up to the attic!
From London:



The flat occupies part of the shared top floor of an existing Victorian mansion block. Our proposal extended the flat into the unused loft space above, creating a new bedroom level and increasing the floor area of the flat by approximately one third. We created a ‘secret’ staircase, hidden from the main reception room, to access a new loft bedroom lit by roof lights. Limited by space, we melded the idea of a staircase with our client’s desire for a library to form a ‘library staircase’ in which English oak stair treads and shelves are both completely lined with books. With a skylight above lighting the staircase, it becomes the perfect place to stop and browse a tome. The stair structure was designed as an upside down ‘sedan chair’ structure (with Rodrigues Associates, Structural Engineers, London) that carries the whole weight of the stair and books back to the main structural walls of the building. It dangles from the upper floor thereby avoiding any complicated neighbour issues with the floors below.

More at apartmenttherapy

Windows, the New Blonde

Ever since the beginning of 2008, i’ve rid myself of Windows from both home and work. I didn’t miss it at all until a couple of days ago when a partner’s program only runs on Windows, neither Linux or Mac works. 🙁

And it is the first time that I read a Windows Joke without feeling the slightest self-pity. 🙂

No, Windows is not a virus. Here’s what viruses do:
1. They replicate quickly. … Okay, Windows does that.
2. Viruses use up valuable system resources, slowing down the system as they do so. … Okay, Windows does that.
3. Viruses will, from time to time, trash your hard disk. … Okay, Windows does that too.
4. Viruses are usually carried, unknown to the user, along with valuable programs and systems. … Sigh.. Windows does that, too.
5. Viruses will occasionally make the user suspect their system is too slow (see 2) and the user will buy new hardware. … Yup, Windows does that, too.

Until now it seems Windows is a virus but there are fundamental differences: Viruses are well supported by their authors, are running on most systems, their program code is fast, compact and efficient and they tend to become more sophisticated as they mature.

So Windows is not a virus. … It’s a bug.
via Thoughts from the spotless mind

Sis’s comment turned out to be a even better punch line.

Hah! Wrong! Viruses and bugs are FREE. But you have to pay for windows. 😉

Web Form Design Best Practices

It was not a very sexy title for a Tech Talk. But i was curious and it turned out to be an interesting talk. Little things that used to seem (to me) just a pure style preference actually would make a big difference in user experiences.

Luke Wroblewski is a free lance web designer and he worked on multiple redesigns for Yahoo and E-Bay. So he had real world data to back him up.

Here are a few things that I found interesting from his talk:

1. Top, Left, Right Aligned Form Labels
Top aligned form layout is the fastest. User takes the least amount of time to fill these up. So it is best for simple/familiar informations. If you want user to stop and think when filling out the form, then depends on how much time you want the user to take, use either Left Aligned (Slowest) or Right Aligned (in between of Top aligned and Left aligned)

2. Identify optional versus required fields
Minimize the special mark and notations to indicate a field is optional or required. So if there are more required fields than optional, then mark the optional field instead. Keep all the special mark in one vertical line (end of the input field box on the right, for example) so user can single out all the different fields in one glance

Leave out optional field all together. Don’t make it harder for users, no one likes filling out forms in the first place, keep it short.

3. Form Flow
Try to imitate real life conversations, for example, if you go in to the bank to ask for a loan, the clerk will engage you in a conversation first, why do you need a loan, what kind of loan, etc. He won’t start by asking for your name, gender, userid, etc.
Take a look at Yahoo’s new Sign in page for some idea on how people are adapting to this new approach.

And here is the complete presentation in pdf format: Best Practices for Web Form Design

Why is MSN so popular in China?

I’ve often wondered how did MSN become so popular in China all of sudden.

One example to look to is Microsoft, where its MSN China site is a joint venture with Shanghai Alliance Investment, a major city investment firm run by Jiang Mianheng, son of former Chinese President Jiang Zemin.

Microsoft’s China business mainly took off after that particular partnership was forged, Yu noted.

via The Reuters

So that is why! :O

Leonard Cohen

I liked The Street from Leonard Cohen when i heard it on NPR earlier this year. As mentioned then that i didn’t find more of his poems that i liked. But after reading this interesting review from Orpheus: Poet with a poor voice, he quoted the lyrics of Joan of Arc that i really like. So I found some more interesting lyrics on-line: The best of Leonard Cohen. Note to self, when searching for good stuff in the future, try append “Best of” to the query. 🙂

Joan Of Arc

Now the flames they followed Joan of Arc
as she came riding through the dark;
no moon to keep her armour bright,
no man to get her through this very smoky night.
She said, “I’m tired of the war,
I want the kind of work I had before,
a wedding dress or something white

to wear upon my swollen appetite.”
Well, I’m glad to hear you talk this way,
you know I’ve watched you riding every day
and something in me yearns to win
such a cold and lonesome heroine.
“And who are you?” she sternly spoke
to the one beneath the smoke.
“Why, I’m fire,” he replied,
“And I love your solitude, I love your pride.”

“Then fire, make your body cold,
I’m going to give you mine to hold,”
saying this she climbed inside
to be his one, to be his only bride.
And deep into his fiery heart
he took the dust of Joan of Arc,
and high above the wedding guests
he hung the ashes of her wedding dress.

It was deep into his fiery heart
he took the dust of Joan of Arc,
and then she clearly understood
if he was fire, oh then she must be wood.
I saw her wince, I saw her cry,
I saw the glory in her eye.
Myself I long for love and light,
but must it come so cruel, and oh so bright?

Bird on the Wire

Like a bird on the wire,
like a drunk in a midnight choir
I have tried in my way to be free.
Like a worm on a hook,
like a knight from some old fashioned book
I have saved all my ribbons for thee.
If I, if I have been unkind,
I hope that you can just let it go by.
If I, if I have been untrue
I hope you know it was never to you.

Like a baby, stillborn,
like a beast with his horn
I have torn everyone who reached out for me.
But I swear by this song
and by all that I have done wrong
I will make it all up to thee.
I saw a beggar leaning on his wooden crutch,
he said to me, “You must not ask for so much.”
And a pretty woman leaning in her darkened door,
she cried to me, “Hey, why not ask for more?”

Oh like a bird on the wire,
like a drunk in a midnight choir
I have tried in my way to be free.

So Long Marianne

Come over to the window, my little darling,
I’d like to try to read your palm.
I used to think I was some kind of Gypsy boy
before I let you take me home.
Now so long, Marianne, it’s time that we began
to laugh and cry and cry and laugh about it all again.

Well you know that I love to live with you,
but you make me forget so very much.
I forget to pray for the angels
and then the angels forget to pray for us.

Now so long, Marianne, it’s time that we began …

We met when we were almost young
deep in the green lilac park.

You held on to me like I was a crucifix,
as we went kneeling through the dark.

Oh so long, Marianne, it’s time that we began …

Your letters they all say that you’re beside me now.
Then why do I feel alone?
I’m standing on a ledge and your fine spider web
is fastening my ankle to a stone.

Now so long, Marianne, it’s time that we began …

For now I need your hidden love.
I’m cold as a new razor blade.
You left when I told you I was curious,
I never said that I was brave.

Oh so long, Marianne, it’s time that we began …

Oh, you are really such a pretty one.
I see you’ve gone and changed your name again.
And just when I climbed this whole mountainside,
to wash my eyelids in the rain!

Oh so long, Marianne, it’s time that we began ..

Godwin’s Law

Heard of Godwin’s Law for the first time today:

On newsgroup and internet discussion thread, whenever “Nazi” or “Hitler” is brought up, “the thread is finished and whoever mentioned the Nazis has automatically “lost” whatever debate was in progress.”

Haha, we should apply this on all Chinese BBS! Could’ve saved so many wasted bits and bytes.

dance!

Supposedly there was a conference once, where the YouTube’s founders were supposed to give a speech. While setting up their talk, they showed this video as an filler. When they cut it short to make their speech, the audience expressed dismay, they want to finish watching the video! 🙂 Now you can watch it and find out why:

It is a very well made video. And it seems to have the power to seduce people, “get on the road again! Go see the world!”

Adorable iGoogle Theme

iGoogle (http://www.google.com/ig) just launched a new feature, “Select Theme”! (http://googleblog.blogspot.com/2007/03/personality-goes-long-way.html)

But google wasn’t just catching up with yahoo with all the fancy color/font, etc. It is css alright, but it is dynamic. The background and the entire color scheme of the page changes throughout of the day. From sunrise to sunset, moon rise to moon set. The header background changes, and as the header image gets darker or brighter, the rest of the page’s color changes with it.

It is such a simple idea in css. Yet, no one has done it until now.

What’s more, in addition to check for your local time, igoogle skin also checks for your local weather! Too bad the bay area is always sunny nowadays.

Isn’t that strange? Because i want to satiate my desire to see a stormy header image, I’m now wishing for rain… or maybe i can trick igoogle to think i’m in, say, Chicago?

Out of curiosity, armed with firebug, i checked out the actual css. One of the bloggers commented that this seems to go against normal Google design. Colorful photos means more bandwidth/machine resource. Turned out the images were very light weight. Take cityscape for example, the header was a tile that kept on repeating in an outer <div>, and then there is a small gif positioning sun/moon/bicycle on top of the tile in an inner <div>. the gif doesn’t repeat. So simple! yet, so brilliant!

Of course all the geo location/weather checking happens on server side, whenever the page is called. Not sure how google did it, there is really no need for fancy AJAX. A simple php script will do, in onload(), just calculate current time based on the zip code user has selected, and do a document.write to insert the correct css file name. Whoever designed all this is truly a genius. 🙂

Use Gui’s words, they don’t need to bother with weather checking for the bay area. 🙂 there you go, another chunk of bandwidth saved.

I stole the tile and gif from their various css files, and built the following test page. Next step is to write that simple onload script to insert the correct css on the server. 🙂 Exciting!

The Dream of the Great Firewall of China

Yesterday evening we found out that none of the Chinese websites are reachable.

ZM said maybe the fiber-optic cables are broken? I thought that was too drastic. But i don’t want to believe it is some kind of sick joke that the Great Firewall of China is playing. “Experimenting of cutoff all communications? because it can?” I tried our usual trick at playing mouse and cat with GFWoC, unplug our DSL modem and plug it backin, in the hope of getting a new IP. It usually works when we couldn’t reach one particular site. Never had to deal with the situation when all the sites are down.

Turned out ZM was correct. The 7.1 and 6.7 earthquake hit Taiwan also damaged 6 out of a dozen fiber optic cables lieing in the southern China sea. What’s amazing is that each cable is only 2/3 of an inch in diameter, that is only 1.67 centimeters!

It is fascinating that such a thin cable could carry so much data from continent to continent. It is amazing that all of them would be laid in exactly the same location. I guess no one thought of putting in a disaster recovery plan for that. Considering the funcky geological formation the area has…

We will see how long it will take for the rest of world to reach China, or vise versa. Meanwhile, everyone maintaining GFWoC could go home and have a peaceful New Year. Nature did a much thorough job for them.

On the other hand, maybe when the fibers are finally repaired, the entire China netizens would have learned how to use Proxy? thus rendered GFWoC useless? One can always dream. 🙂

We shall see.

What is BGP?

Geek Alert.

When I was in my first job, I worked with a bunch of networking nuts. This is the real network that wires computers together, not those virtual ones where you go look for a date. I was more into software and web dev than networking, but they tolerated me and let me tag along. One of them, R, a well-respected mgr, once had a chat with me and said that most of the areas in today’s tech world are somehow connected. All you need is to know one area really well, then you pretty much can branch out anywhere, and won’t have much trouble understanding them quickly. He himself started with networking the OSI seven layers, and haven’t had any trouble since.

I remembered that. Now I think i started to feel the benefit finally.

Was talking to one of the network guys at my current company the other day, and he mentioned “BGP”. I had to stop him in mid-sentence to ask, “What is BGP?” He was a little shocked at my ignorance, “Border Gateway Protocol, it is how we announce our route to the rest of the net.” “Ah! I see.” The truth is I did understand. But i don’t think he believed me.

I later looked it up on Google anyway just to confirm what i think i understood was correct. Border Gateway Protocol. Then i found something else that’s interesting. There is a firefox plugin, called Blogger Web Comments for Firefox. Every page you go to, on the lower right corner you will see a little icon indicating whether any blogger has commented on this page. I haven’t been using it much, but today i got curious. Which kind of geek will comment on “BGP”?

There turned out to be a lot of them. One of them is particularly intersting. It’s title is “Geek’s Secret Life”,
http://secretgeek.wordpress.com/2006/01/17/efficency-of-large-corporations/

In this article, he said, “…My personal opinion is of course that it’s too difficult for H. (who probably doesn’t even know what bgp is or stands for).” heehee. I’m glad at least now I’m slightly more geeky than this H.

The Inner Life of a Cell




There is an eight minute long animation video on this page:
Cellular Visions: The Inner Life of a Cell
. It renders the microscopic world in 3D. The result was gorgeous and fascinating. It is hard to believe that all these busy activities are happening right now inside each cell of our body! Harvard is now showing this short anima to every freshman on the Biology intro class. If I were shown this on my first day of college, I might not end up in the world of computers. 🙂

Sin City

I’ve been indulging my fascination with Sin City – “Las Vegas” – ever since my weekend trip.

It probably all started with a casual comment from my friend B while we were leaving Wynn. She was wondering when will the gardeners of Wynn have a chance to care/move/replace flowers/plants in the botanic garden at Wynn. Because during the day, it was full of tourists, at night it was full of gamblers/drinkers/party-goers. She concluded that it must be around dawn. As she reached her conculsion, we reached the front door and the door man opened the door for us. So i thought, these are the people who really know the stories of the city. All the behind the scene gossip about casino owners, celebrities and in general the real life behind this non-stop show that we see.

So I’ve been googling like mad since my return. First on blackjack rules, the statistics, the basic strategy. Then on designers/owners/developers of the casino/hotels that i liked: The Venetian, Bellagio, Wynn.

I want to know who made these places and which kind of people they are. I want to know who work and live here, and which kind of people they are. I wasn’t disappointed. Came across a couple of good residents view of Vegas, one in Chinese, one in English.

Turned out that Mirage, Treasure Island, Bellagio and Wynn are all designed/build by the same guy: Steve Wynn. He seemed to have an obsession with water.
The Venetian owner is a different guy: Sheldon Adelson, who happened to be the number 3 on the richest American list on Forbes.com.

It is truly an intersting place, that’s full of colorful characters.

Tipping

This is fascinating!
What do we know about tipping?

– Tipping is less prevalent in countries where unease about inequality is especially strong.

– The more a culture values status and prestige, the more likely that culture will use tipping to reward service.

– Tips are higher in sunny weather.

– Drawing a smiley face on the check increases a waitress’s tips by 18 percent but decreases a waiter’s tips by 9 percent.