May 2002 Archives

Date Objects

| | Comments (0)

A colleague just came across an interesting aspect of working with Date objects in Java and JavaScript. In our code we instantiate a new Date object (defaults to today's date) and then conditionally set a specific year, month and day further on in the code. Not very interesting right? But hold on because the order you actually call the setYear/setMonth/setDay methods impacts the final result. For instance, take today, May 31 2002, and let's say the day you want to set it to is June 15 2003. Setting the year to 2003 works as expected. Setting the month to June causes some problems though. At the intermediate stage, before the day has been set, you are holding a Date object set to June 31, 2003. Java and JavaScript will automatically convert this to July 1, 2003. Then you finish setting the day and wonder why the displayed date is July 15, 2003.

On first thought it seems the quick fix is to just set them in the reverse order. But try going from June 15 2003 back to May 31 2002 and you'll see that you'll still have similar problems. In the end, the solution is to first set the day to 1, then set the day/month/year in whichever order suits you best. No rollovers or conversions will occur.

Bee Swarm

| | Comments (0)

I had the privilege of seeing a swarm of bees from my office window yesterday. Imagine a large cloud of bees milling around in an area about 30 feet in diameter. Over the period of about an hour it settled down into a ball about the size of a footbal attached to some vines over an arbor outside. I showed some people in the office and people were generally concerned about it.

"We should call Animal Services!"

 "No way I'm going outside!"

I tried to educate people a bit about swarming bees. How they are all doped up on honey and don't sting, and are only looking for a place to create a new nest. People weren't convinced. Nonetheless I enjoyed the experience. I went out later and took a look at the ball. I wonder how the Queen breathes in there!

I've only experienced it once before when I was living at home in Victoria. I was sitting with my mom in the backyard when this buzzing sound kept getting louder and louder. I looked up and the sky was a swarm of black dots. We went inside quickly and called a beekeeper for advice. He was very happy to come by and take care of it for us. He arrived within an hour and promptly used a stick to lightly dislodge the 'ball' of bees into a canvas bag. Put the bag in his car and went home to create a new hive. He told us that if the remaining bees didn't dissipate then he likely didn't get the Queen and to call him and let him know. They dissipated and we got a good story to tell.

Origami Boulder Company

| | Comments (0)

Check out the Origami Boulder Company. Excerpt from the site:

Origami, is Japanese art of folding paper. Boulder is round rock. Origami Boulder is wadded up paper! You understand now, dumbo? Then hurry up and buy wadded paper!

He even does 'custom' jobs as well :)


| | Comments (0)

The New Yorker : All I Really Need To Know I Learned By Having My Arms Ripped Off By A Polar Bear

And completely unrelated... but uses the theme in the title.. an excellent article about Pair Programming.

Laurie A. Williams and Robert R. Kessler : All I Really Need To Know About Pair Programming I Learned In Kindergarten

Test First Challenge

| | Comments (0)

I started working on this Test First Challenge last night. Very cool. Yeah yeah I know it is old.. and there are people's answers posted at the bottom, but I'm ignoring that and coding as it outlines. Gives me an excuse to test out JUnit which I hadn't used yet. I think I'm already addicted to the green bar. Click the button.. see the green bar. Click the button... see the RED bar.. fix code.. now see green bar. Ahhh. Nice. :)

Ebay ISS Trip Auction

| | Comments (0)

Heh.. EBay has a trip to the International Space Station for auction. It's sitting at $3,000,000 at time of this writing. Impressive! One of the most amusing parts is reading peoples bid-retraction reasons on the bid-history page. heh

I thought this was for 19 THOUSAND dollars.

Health prevents excitement of this nature

Copy Protection Cracked

| | Comments (0)

Reuters: 'Copy Proof' CDs Cracked with Pen
Too great. Some unhappy CD-buyers, after buying a CD with Sony's anti-computer-use technology, figured out that just inking the outside track with a dark marker allows for full access and usage. We get so caught up with the digital-side of protection and forget that we're still talking about a physical, tangible object here. Black out the part that is causing problems, and voila your reader ignores it. heh.

Weekend Movies

| | Comments (0)

This weekend I watched 4 1/2 movies. Vanilla Sky, Ocean's Eleven, Waking Life, K-PAX and Raising Arizona.

Vanilla Sky I thoroughly enjoyed -- but am told that the original Spanish version titled Open Your Eyes is much better. I was amused to find out that Penelope Cruz plays the same role in both movies. Bizarre. I'll see if I can find it at Midtown Video.

Ocean's Eleven was great. I had heard definite mixed-reviews on this one and think because of this I was perfectly primed to enjoy it for what it was. The plan was good.. the execution was good.. and it's always fun in a movie when you think you know what is going on.. then have your assumptions kicked around a few times.

Waking Life accounts for the 1/2 movie watched. I was in an overly-tired, hungry and depressed state when I started watching this, and the bizarre water-colour/expressionist-style after-effects they used on the film were too much for me to deal with. I was enjoying it but it hurt my brain at the same time. I'll watch it again another time.

K-PAX == The Fisher King? Definitely some similar themes with these movies. I enjoyed it regardless, and it made me want to see The Fisher King again since I don't really remember the plot. I have to admit though, that whenever I see Jeff Bridges in a movie now, I expect him to start whining "Hey, man... I'm the dude... not Lebowski!". Hehe..

Stephen Jay Gould dies

| | Comments (0)

Reuters: Harvard Paleontologist Stephen Jay Gould Dies

I dyed my hair an nobody noticed. heh. Apparently my hair already was 'Dark Brown'. No pics. Sorry.

Yahoo Insider

| | Comments (4)

Dr. Dobb's has an interesting synopsis of the types of attacks and abuse that Yahoo has to deal with on a regular basis. Everything from mass-spam to screen-scraping to credit-card scams to bot-detection. Light on the details but still an interesting read.

Google new logo

| | Comments (0)

Google is getting a new Logo... but Dang, I thought it was a call for submissions!

Freeway Art

| | Comments (0)

In Artist's Freeway Prank, Form Followed Function :: Nice story with some good video documentation about a guy named Richard Ankrom who took a confusing highway sign into his own hands and added additional signs and letters. It took 9 months before it was discovered -- and only because a friend leaked the story.

Toilet Sensors

| | Comments (1)

The washrooms at my office have little sensors to figure out when to flush the toilets and urinals. I hate them. Bad bad design that likely had hardly any user-testing (too embarrassing?). Anyway... you are sitting there doing your business... then you finish.. pull off a nice strip of toilet paper... lean forward a bit.. and SWOOOSH... the toilet flushes.. spraying your nether regions with a faint dusting of poo-particles. This process repeats for as many times as you go back for more paper. Tear. Lean. Swoosh. Wipe. Tear. Lean. Swoosh. Wipe. Anyway... I can't be the only person whom this happens to.

New Office

| | Comments (0)

My company changed location recently. We used to be right near the corner of First and Trimble which is somewhere near the border between Santa Clara and San Jose. Total tech-ville there. Closest food was a yucky strip mall. Now we're located right across the street from Valley Fair mall. A very active area around here with lots of restaurants and stores and people and cars. People actually live around here. Very nice.

Pet Peeve

| | Comments (0)

Major Pet Peeve: Website logins that have the "I Forgot My Password" link before the Login button in the tab-order. I don't use the mouse to login if I don't have to.. so on these sites I typically finish typing my password, hit tab then the enter key and sit staring at the "Forgotten Password" page. Yuck.

Quake Area

| | Comments (0)

Here is a "Did you feel it?" map showing the surrounding area effected by the quake. I am firmly in the SHAKING=LIGHT/DAMAGE=NONE category (thank god).


| | Comments (0)

NyTimes: No Injuries Reported in California Quake :: I can attest to that! I was one of the non-injured. A good rumble felt though. One of the far and few between instances where some deep level primal instincts start to kick in. Lots of small ones I can handle... hopefully won't experience one of the bigger ones.


| | Comments (0)

Was contacted by someone I worked with a few years ago (Hey Gord!). He mentioned he checked out my weblog. Cool. Much more appealing to write publicly when you know someone is reading it :)

5k Contenst

| | Comments (0)

The 5k website contest is here again. Didn't get a chance to do something last year but will make the time in the coming weeks. Always impressive to see the creativity that comes from well specified rigid constraints.

Wedding Weekend

| | Comments (0)

Back again, all. Busy weekend. Went back to Canada for 5 days (Thursday to Monday) for 2 weddings. The two weddings planned for this year were conveniently scheduled to be on the same weekend yet on different days. Excellent! :)

We had a very good time. A little rushed but very enjoyable. I forgot how beautiful Canada is. Really. One of the weddings was out in Sooke, about an hour drive from downtown Victoria. It was at a wonderful little bed and breakfast right on the rugged coastline looking South to the olympic mountains in Washington. The mountains were stunning. A long line of purple-blue snow-capped teeth rising from the ocean. The nights were impressively clear and the lights in Port Angeles were clearly visible across the water. Night sky filled with stars. Milky Way clearly visible. We were home ;)

No Linking!

| | Comments (0)

Dallas Morning News: (via Scripting News) "If you operate a Web site and wish to link to this Site, you may link only to the home page of the Site and not to any other page or subdomain of us." 

The above quote is interesting.. but so is this one:

"...and not to use any data mining, robots, cancelbots, spiders, Trojan horse, or any data gathering or extraction method in connection with your use of the Site."

Interesting because they are restricting search engines like Google from indexing their site, and don't even provide a robots.txt file to stop them. A definite breakdown in communication between the company lawyers and their tech people. Nothing new there though.

About this Archive

This page is an archive of entries from May 2002 listed from newest to oldest.

April 2002 is the previous archive.

June 2002 is the next archive.

Find recent content on the main index or look in the archives to find all content.