Tuesday, October 31, 2006

The funniest coding question

Found this on expert-exchange.com today:
hi all,

IntTemp = Int((255 * Rnd()) + 1)

I used above ASP.NET code. Problem is in " Rnd() "
Rnd() value is changing everytime.

What is the alternative for Rnd()? OR How will stop Rnd() value changes at everytime?

Thanks

Then someone responded with this:

change the 255 to a 0 and you'll get the same number each time.

Monday, October 30, 2006

I know someone from Wyoming?

I was just looking at my visitor tracking page and noticed someone from Wyoming has been visiting my blog quite often:

host-69-146-138-100.chy-wy.client.bresnan.net

Who are you?

Ooooh... What is this hot, shiney thing?

For those who see me a lot, I've been using the IBM thinkpad for work for quite awhile now. I couldn't really stand it anymore last week as it began to crash on me quite frequently. It was time for a new laptop!

Being the little wuss I am, I figured I should email my manager for approval to get a new laptop before I actually filed a ticket for it. I then spent the next 30 minutes proof reading it over and over to make sure that my request was a justifiable one (and it really was). I don't know why I was so nervous of sending out an email to ask for that, but maybe I just felt like I didn't deserve a brand new laptop? Maybe I'm just so used to using things until they became antique, like the P3-866mhz that I had had for over 10 years? Or, maybe, just maybe I was rejected in the past before at my previous employment when I asked for something that would make me a happier employer?

Whatever it was, I finally gathered up enough courage and pressed send to the email that I had drafted. In less than 30 seconds I got the response back going "Sure, I approve!" I really love my manager.

I immediately filed a ticket to request for a Macbook pro. Under the description of the ticket, I again explained the issues that I had been having with my laptop, and that I had gotten my manager's approval. The helpdesk person replied to my ticket and told me that I actually didn't even need manager's approval since I'm in Engineering. Wow! I should have asked for a replacement a long time ago then!

In just one day, the new macbook pro was delivered to me at my desk, with all the cool gadgets set up and everything. I have to admit I was a bit skeptical about this whole macbook thing since I'd never used a Mac before. But after spending the weekend with it, I am convinced that it is much much better than windoze XP. For example, it doesn't take over 5 minutes for the laptop to wake up after standby. It also connects me to wireless in less than 5 seconds every time I open up the macbook pro. It looks good, it is fast, it is REALLY hot. What more can I ask for?

Going back to this "no approval needed for a new laptop" thing. I really want to emphasize that it's simply awesome. I like the fact that the company goes out of its way to ensure that the engineers get whatever tools they need/prefer that will enable them to become more productive at work. Happy engineers -> write better code -> write better unit tests -> stay at work longer -> work at home more -> work faster -> blog more -> products ship faster. I am surprised a lot of companies out there still don't get that.

Thursday, October 26, 2006

NBC's "Heroes"

So I have been pretty hooked to this new TV drama on NBC called Heroes. After watching the first three episodes I couldn't help but realize the screenwriters of this drama are such geniuses. I mean, the fact that it's able to attract the mass audience by having heroes of different ethnicity and social background allow pretty much any viewer to relate to some of these characters one way or the other. For example, I can hear the dish of chips and salsa thinking "I think Pat should eat me... right now! I want to be eaten by Pat..." And then there's this other time where I would wake up in the morning and I'd have no idea where I was and what I had done during the night. But then I would see a bottle of vodka sitting right next to me on the floor. Anyway, you get the idea.

This weeks' episode revealed an extremely shocking motto: "Save the cheerleader, save the world."

So basically the rest of this entire drama will be hinged on a dumb cheerleader from Texas. FARK!!!

Sunday, October 22, 2006

One Month 'Til Vacation!



I think I'm going to set that image as my wallpaper at my workstation at work as well as my personal desktop. Don't you feel relaxed just by looking at the picture?? Oh man. I can't wait to go!

Some goals for my vacation
  • I will not get near anything that remotely looks like a computer.
  • I will make sure to even out my tan on my face.
  • I will eat at least 6 meals a day.
  • I will play at least four rounds of golf.
  • I will get no less than 10 massages.
  • I will sleep at least 8 hours a day.

Friday, October 20, 2006

I'm Easily Impressed

Sitting in the customer service lounge at the Stevens Creek Toyota Dealer as I am writing this blog, I look around and I see:
  • Two boxes of donuts
  • A soda machine
  • A coffee making machine (free of charge!)
Wow. They surely treat their customers quite well! Not only do they want you to eat the whole box of donuts and gain 20lbs immediately, they also top it off by offering free wireless internet access! Perfect for losers like me who go into withdrawal mode when I don't have access to the 'net.

I think I am going to start coming here every day, even when I don't need to bring my car in for a service. Hmmm... That's a thought...

Thursday, October 19, 2006

Can this be real?



Probably not. Google doesn't do pop up ads.

Trusty little car

Today marks a very special day.

(drum roll please...)

Ladies and gentlemen, my prius has finally reached 10,000 miles! Clearly, this is a significant milestone, and I would like to use this opportunity to thank my dear fiance, Anita, for making me drive all around the Bay Area with this car. We have traveled a long way in a little over six months! I am also quite proud to say that I am doing something to help slow down global warming. In just six months, I have saved over $685 in gas. Long live hybrid cars!


My love (besides Anita)



All of this will change in the next six months however. When my prius reaches 20,000 miles, I plan on doing the complete opposite!


Porsche 911 GT2... here.. I.. come! If I win the lotto, that is.

Monday, October 16, 2006

Poor NFL player

So, you know there are football games out there developed by Electronic Arts that are caleld "John Madden NFL football 200x" each year? Basically, inside the games each player is given ratings on different categories that represents how good of a player you are in the game. This NFL player, named Ethan Albright, was rated the worst player in the game.



Apparently Ethan Albright is a little bit ticked off by it, and so he wrote an open letter to John Madden and CC'd Electronics Arts. It was the most awesome letter I've ever read in my life.

Sunday, October 15, 2006

No driving for the next 6.15 years

I made a two furniture purchases^H^H^H^H^H^H^H^H^H *INVESTMENTS* today. After some estimation afterwards, I realized that I need to make up for the money I spent by not driving to work for the next 6.15 years. Here's how I got this number:

round trip commute to/from work: 20 miles
cost of a gallon of regular gas: $2.7
average miles per galon on a prius: 44.5
Rough estimation on the purchase: $1941.84

$1941.84 / $2.7 * 44.5miles / 20 / 5 / 52 = 6.15 years

Dear reader: if you consider me your friend, please spare me a ride to/from work each day for the next 6.15 years.

Investment #1:



Investment #2:

Thursday, October 12, 2006

The perfect Gmail picture

Today for whatever reason I got really tired of looking at my gmail picture.

"I need a new Gmail picture!" I said to my cubemate at the office. "Can you find a picture of me that I can replace my current one with?"

(5 minutes later...)

"Hey! I found one! Sending it to you now."

With great anticipation, I opened up the attached picture that he sent me an email and here's what he sent me:





It feels great to find out my training sessions at the gym has finally paid off.

Wednesday, October 11, 2006

spam sushi rules

They are having a Luau at work here today for some reason. I got to enjoy an unlimited amount of spam sushi on top of all the other good Hawaii BBQ goodies. I think I have eaten about 15 pieces of spam sushi so far, and there are still four pieces sitting right in front of me here at my desk.

I'm really full and I don't know if I can really finish them. Looking at the four pieces of spam sushi, I notice the two of them that are closer to me are screaming "don't eat me!! don't eat me!" whereas the remaining two pieces in the back row are going "eat them you mofo! stuff yourself! yeah!!!!!!!!!!!!!"

Oh great. I think I'm starting to hallucinate

Thursday, October 05, 2006

Oktoberfest rules

To celebrate Oktoberfest, they made german beer available here during lunch time as well as german hotdogs. I'm on my second beer right now, and I need to pee really badly.

I have been beaten

I always thought I was cool for memorizing Pi up to the 20th decimal place... until I saw this article today:

TOKYO A Japanese mental health counselor recited pi to 100,000 decimal places from memory on Wednesday, setting what he claims to be a new world record.
However, I bet he has trouble memorizing girls' phone numbers.

codesearch is launched

I've always wondered how many lines of "hello, world" code there are out in the world. Now I can find out via Google codesearch. Go check it out!

Tuesday, October 03, 2006

Before and After

I came upon this old picture taken 11 years ago while I was cleaning up my computer.

Comparing that with a recently taken picture, it is safe to conclude that while my eyes have barely changed in size, my head and my upper body have increased by a factor of 5. My legs don't seem to have changed, either.

Before


After (The guy on the left)




Tight calves

Last weekend was quite festive for me. For those who talk to me often, Will's wedding is this coming Saturday and I was selected to be his best man (or the first one who answered his phone call). I've known Will for like 11 years, and I think I know him very very well. At least that's what I thought.

First off, Will is NOT a party person. He does not drink, he does not go clubbing, he does not do anything. Back in the College days, he would goto sleep, wake up, drink a can of coke, sit in front of his desk, and play video games all day. He would never go to any parties even if his life depended on it.

So it came somewhat as a surprise last Thursday when I asked him, just out of courtesey, whether or not he would want a Bachelor party before the wedding. His rely was "Aren't you supposed to be organizing this?" Uh oh! Hot dog!

I quickly gathered all his friends' phone numbers and began calling them the following day in the hopes that we could pull off a last minute Bachelor party for him last Saturday. Luckily, 50% of them could make it.

We went to broadway in SF and stopped by some bars and clubs. Will actually had a great time! (pictures will be posted later). He was very buzzed after drinking about 2 oz of Corona, and during the rest of the night all he wanted to do was to drink more.

Hmmm.. Oops. I'm halfway done with this blog and I still haven't mentioned why the title of this blog is "Tight calves." Ok here goes:

Midway through the night Will decided that he wanted to eat. We all walked from one side of broadway to the other side, where China town is located. We sat down, grabbed some food, and the majority of his friends decided to go home afterwards. Will didn't want to go home yet, and so we decided to try to take a Cab back to Dennis' apartment on King street to play some pool and just chill.

Unfortunately, it was around 1:30am, which means that's when EVERYONE in SF was leaving the clubs. It was pretty impossible to get a cab.

So what did we do? We decided to start walking back to his apartment! At 1:30am in the morning! Fortunately, a miracle happened midway through our journey, and we were able to get a cab by the time we got near Market street.

We ended up staying up til 4am, and I didn't get back home until 5am. Had to wake up early the next morning to drive my parents to Oakland to hang out with Anita's parents.

To make the long story short, I woke up Monday and my legs were SO tired. So I immediately signed up for a table massage at work. When I went in for the massage, I told the massuse that my calves are really tired from walking all weekend. I told her to focus on them and she did so.

At the end of the massage, she's like, "Oh your calves ARE really tight. Particularly your left calf." I am really confused by why my left calf would be tighter than my right. I mean, it's not like I went to play basketball or anything where I would dunk off of my left leg.

So for those of you out there - Can you please explain why my left calf was tighter than my right?

Thanks.