Wednesday, January 31, 2007

[sql] Using Coalesce to Glue Row Results Together

Found this trick today by accident! What a find. I have been wanting to know how to do this without using cursor for a very, very long time.

declare @UserList varchar(100);
select @UserList = coalesce(@UserList+',', '') + UserID from account where UserID like 'Bob%';
select @UserList;

This would return the comma delimited list of UserIDs, that all start with Bob.

Sunday, January 28, 2007

[outing] Jason's birthday

When: Saturday 2007 January 27th
Where: House and Carbon
Who: Jason, Jessica, Laura, Josh, Nik, Stu, Twin, Spencer, CC, Renzo, Ray, John, Ivy, Julie, Bert, Pierre

- Costco, TJs, Albertson
- Who needs a mallet? Pound it with garlic press!
- Linguini with lemon butter sauce, topped with pounded-thin-chicken pan-fried in butter, diced bacon, sliced mushrooms, sliced artichoke heart, and capers
- Risotto with portobello and porcini mushrooms, gobs of butter, and grated parmasen
- Lamb chops with herbs
- Vietnamese and chinese spring rolls
- Oreo cheesecake
- 99 Berries and 88 Tunnel
- "It's just turbo sake!" "No, it's like sake strained through dirty underwear!"
- 10 shots for $50
- CC and Nik clothes swap

Saturday, January 27, 2007

[outing] Vinum Populi

Where: 3865 Cardiff Ave, Culver City CA 90230
When: Friday, 2007 January 26
Who: Daryl, Nat, Pierre

- Free once for me
- 0.68, 1.08, 1.17, 2.20, 5.23, 8.23, 22.87!
- Pick a number between 1 and 20
- Go around and count 18
- Musical chair
- This one's got complex flavors!
- We got the cards down to ZERO!

[outing] Busby's

When: Thursday, 2007 January 25
Who: Gray, Zee, Eric, Pierre, Alan, Marco, Rita, Johnny, Renzo, Ray, Kevin

- Ding the waitress (we didn't win. she was too fast)
- "This stacker game is rigged! You can never get past Minor Level!"
- "Er did you guys see this button that says Continue to Major Level?"
- Two dogs and a pen
- Korean rice cake, mayonaise, playtex, stuffed animals, sardines ...
- Battle bumper pool
- Is that really Johnny?
- Bubble hockey and foosball

Sunday, January 21, 2007

[code] CSS cursor attribute

Useful cursor attributes (mouseover text below to see cursor changing)

- cursor: pointer;
- cursor: crosshair;
- cursor: move;
- cursor: wait;
- cursor: help;

[code] Using Javascript to hide / unhide

init:function MarkSection () {
/* Hide target */
var HideTarget = document.getElementById('HideTarget'); = 'none';

/* Add onclick function on trigger to hide or unhide target */
var TriggerTarget = document.getElementById('TriggerTarget');
TriggerTarget.onclick = function() {
var HideTarget = document.getElementById('HideTarget');
if ( == 'none') { = 'block'; = "url('TargetOn.gif')"
} else { = 'none'; = "url('TargetOff.gif')"
} // end: onclick function
} // end: if guidebody
} // end: function

addEvent(window, 'load', MarkSection.init)

function addEvent(obj, evType, fn){
if (obj.addEventListener){
obj.addEventListener(evType, fn, true);
return true;
} else if (obj.attachEvent){
var r = obj.attachEvent("on"+evType, fn);
return r;
} else {
return false;


Saturday, January 20, 2007

[muse] Product and Project Management

Pierre and I were talking about interviewing questions -- What is Product Management? What is Project Management? What makes one successful in these fields? My thoughts:

1. Know your customers better than they know themselves
- No product or project exists without customers. Know who they are.
- Customers have goals. Know what success and failures mean to them.
- Customers have strengths, challenges, processes, constraints, preferences, history ... Learn them all.

2. Know your resources better than they know themselves
- No product or project exists without resources. Know who they are.
- Resources are scarce. Appreciate them.
- Resources have strengths, challenges, processes, constraints, preferences, history ... Learn what works for your team (and not just what works for you)

3. Transform all efforts of your resources, into all successes of your customers
- Know what are "needle movers" for your customers at all time.
- Make sure the efforts of your resources go into the "needle movers".
- Manage changes introduced by the "needle movers", to customer success.
- Tell your resources about the customer success.
- Shampoo. Rinse. Repeat.

Tuesday, January 16, 2007

[log] Installing TWiki on Bluehost

Installed twiki on my bluehost account tonight. As always, the general installation instruction misses small but critical steps --- but I guess bumming around and debugging until things worked is what makes this fun (and then rm -r the whole thing and doing it again just to make sure I could really do it).


> [FTP TWiki-4.0.5.tar to home dir]
> cd ~
> gunzip TWiki-4.0.5.tar
> mkdir public_html/twiki
> cd public_html/twiki
> tar xvf ~/TWiki-4.0.5.tar

Setup .cfg and bin files
> cp bin/LocalLib.cfg.txt bin/LocalLib.cfg
> [Edit LocalLib.cfg change $twikiLibPath to /{full path}/twiki/lib]
> [Add .pl extension to all executable files in bin]

Set read permission on pub files
> cd pub
> chmod -R a+r *

Set configuration options
> [Bring up twiki/bin/ in browser]
> Under "General Path Settings", fix paths listed in {PubDir}, {TemplateDir}, {DataDir}, {LocalesDir}
> Under "General Path Settings", {ScriptSuffx}, enter .pl
> Under "Security Setup", uncheck {UseClientSessions} (CGI:Session Perl module not yet available)
> Under "Security Setup", {LoginManager}, select TWiki::Client::TemplateLogin
> Under "Security Setup", {AuthScripts}, add .pl to each of the files in the list

Request to install CGI:Sessions Perl module
> 1:19 am Emailed bluehost support to install CGI::Sessions Perl module. (Else template based login does not work)
> 6:33 am Bluehost support emailed with confirming that the module has been installed
> [Bring up twiki/bin/ in browser]
> Under "Security Setup", Check {UseClientSessions}

Fun diversion. Thanks to hints from

[fable] Good news, bad news

Once there was a man who bred horses. One day, his best stallion ran away -- no where to be found.

His neighbors heard the news, and came by to give their condolences. But the man wasn't a bit bothered, "It's okay, may not be so bad".

Two weeks later, the stallion returned to the ranch, and bringing with him, the most beautiful mare that anyone had ever seen.

His neighbors heard the news, and came by to give their congratulations. But the man wasn't a bit excited, "Well, it's not necessarily a good thing ..."

A month went by, the man's son grew very fond of the mare and rode her everyday. One day, the mare suddenly turned mad and threw the son off her back, breaking both his legs. The injury was so bad, that it would take months to heal.

His neighbors heard the news, and came by to give their condolences. But the man just shrugged it off, "We'll see, may be good news yet". The neighbors thought, "He really lost it this time!"

Three months later, a war broke out. Soldiers were everywhere, drafting young men into the army. Everyone knew that new recruits going into the army, were almost certain to get killed. And everyone feared for their sons.

When the soldiers showed up at the man's doorstep demanding for the son, they saw that the son could barely walk. They sneered, and left.

The man watched them as they rode away. This time, he was all smiles.

[outing] Special weekend by Pea

Saturday Jan 13th
- Sushi Zho
- Monk fish liver, abalone, oyster, butterfish, scallop, needle fish, jellyfish, octopus, squid, clam, amaebe, hamachi, toro, albacore, japanese mackerel, spanish mackerel, red snapper, unagi, salmon, uni, orange clam ....
- Pierre: 28. Wandy: 17. Amex: 220.
- "You don't drink?"
- Resistance: Fall of Man -- Completed: 1
- "I killed the Stalker!"

Sunday Jan 14th
- Lunch at Yong Huh
- Curse of the Golden Flowers (Awesome crazy tragedy)
- Snakes on a Plane (Boring until the snakes finally got going)
- The Lady in the Water (I loved it. Pierre loved that it was over)
- Learning about the Menendez brothers

Monday Jan 15th
- Aquarium of the Pacific -- Three thumbs up (if I had three thumbs)
- "Punch the right confirmation number!"
- "Grapefruit" the giant octopus, key-chasing seals, three-inch close up wiht shark
- Lunch 'n Bowl at Gameworks
- Mathgeek vs Jakncoke
- 3-0-0-X
- Kid in next lane: "You are not kiddin' me!"
- Bought 24g nano cube with viper and glass cover from Jim's Exotic Fish
- Dinner at Yamashiro
- Oyster shooter
- Beef tataki with micro arugula
- Chicken strips with crispy rice coating
- Dragon roll that looks like a (cute) dragon
- Raggae roll with jerk shrimp and plaintain sauce
- Darth vader roll
- Vanilla custard cake

Saturday, January 13, 2007

[log] UCLA vs USC Men's Basketball

The game flow graph tells all. What a great game.

Friday, January 12, 2007

[fable] Father, Son, and Gold

One of my favorites that I heard a long time ago:

The middle son of a a wealthy businessman in the country-side, got arrested in the city and punishment by death.

The father got the news, prepard a cart of gold, and summoned the youngest son to go into the city to make bribes that he knew, for sure, would save his son.

But the eldest son came forward and begged to go instead. He insisted that his brother is too young to do the job. After a lot of pleading, the father finally gave in.

Days later, the eldest son returned with much of the gold --- and the dead body of the middle son.

The father simply said, sadly, "I knew this was going to happend ..."

"What do you mean?"

"I wanted the youngest son to go, because he grew up in wealth and wouldn't have any hesitation with giving away all the gold", he said, "But the eldest son, he grew up when we were poor, and I knew he was probably going to try to save money where he thought he could ..."

Wednesday, January 10, 2007

[tool] TiddlyWiki

Amazing what one can do in 200K worth of Javascript code. One-page-wiki-on-my-desktop. A great productivity tool that also makes for great bedtime reading ...

[tool] Live PR

DC: Toolbar PageRank: PR3 (3/10) Cached: Yes
DC: Toolbar PageRank: PR7 (7/10) Cached: Yes
DC: Toolbar PageRank: PR3 (3/10) Cached: Yes
DC: Toolbar PageRank: PR3 (3/10) Cached: Yes
DC: Toolbar PageRank: PR3 (3/10) Cached: Yes

PR from a nice list of google servers.

Sunday, January 07, 2007

[outing] Brunch and Party

When: Saturday, 2007 Jan 6th
Where: Brunch at King's Hawaiian
- 3-meat omelette
- really, i am not going to get char-siu fried rice today
- whatever happend to pluto?

When: Saturday, 2007 Jan 6th
Where: Adam's 30th Birthday at Ivar
- killer parking spot
- do you want some pizza?
- entertainment by josh

Friday, January 05, 2007

[log] Fiesta Bowl: Boise State vs OU

- I was so sure OU had lost
- I was so sure Boise State had lost
- I was so wrong on both counts
- Hook and Ladder
- Statue of Liberty
- And a marriage proposal?

Wednesday, January 03, 2007

[outing] New Years Eve

When: Sunday, 2006 Dec 31st
Who: Alan, Maureen, Steve, Erin, Pierre and me

- Ham, meat balls, sangria, patron, cazadores
- Baby jesus shots
- What the hell is in the 12 days of xmas? 5 golden eggs!
- New Year's cheers with Baby Patrons in Abe's Liquors parking lot
- Paying for excessive celebration the next day
- Prank calling about production issues
- Finding out the next day that there really were production issues