Monday, February 28, 2005

Blog Month Is Over

Yea! Blog month is over! There is much rejoicing. I think I proved my point: You can do anything for a month. And a month is about as long as I can do this. I almost didn't make it, but I pulled through. The time really adds up. I spent 40-60 minutes each day writing a blog. And it takes probably 20 minutes of thought time to find a subject and some days I couldn't find anything interesting.
 
I actually did become a much better writer. You might now believe that, but I started with the bar very low and now it's a little higher. I don't think my proof reading skills got any better because my blogs are full of typos and wrong words, but it's certainly easier for me to write now. At the beginning of the month it was really slow and I suffered through forming each sentence. I learned how to just keep writing and not spend so much time on picking each word. Just keep writing. Just keep writing...
 
 
I beat my goal of 20 words per minute. I actually hit 30 words per minute one day. I'm pretty sure that I can't get much higher than that without speeding up my typing. That's about as fast as I can go and still fix some typos and proof read the blog once.
 
I missed two days this month. That's why the chart only goes to 25. The other missing day is today because I made the chart already and I'm not done with the blog.
 
Do you like that chart up there? Excel sucks at making pretty charts by default. I ending up making the chart in Excel as a new sheet. I changed all the fonts to about 18 points. I got rid of the ugly background gray. Boy is that a bad default. I changed the diamond points to circles and made them a little smaller. And here's the important part, I took a screen shot of the chart and pasted it into Photoshop. I resized the image down to 400 pixels wide. That gives it a soft, antialiased look that I like in charts.
 
Outlook is the best way I found to post to Blogger. If you set the default email font to Times New Roman 12 point it will post the blog without any <font> tags. Font tags are annoying because it screws up the formatting in Blogger and also in the RSS feeds. You also need to uncheck the "send pictures with messages" box in the HTML composing options. This makes it so that the images don't get attached to the email and posted once in the middle of the blog and once at the end. I just save the images to my webserver downstairs. This was the easy way I found to host images.
 
Well, my dedicated readers, this is my last daily blog. This is actually a good thing for you because now I can blog when I actually have something interesting to say. I'll try to blog about 4 times a month. The best way I've found to read blogs is with www.bloglines.com. That's a website where you can put all the RSS feeds for all your blogs. Then you only have to check with Bloglines to see who has posted new blogs. That's way easier than polling each of your favorite blogger's sites.
 
If you want to start your own blog the best place I found to do it was www.blogger.com. That was the only free blog website that I found where the default template wasn't completely ugly.
 
Later dudes.

Sunday, February 27, 2005

Photo Storage and the Zen of Carpet Purchasing

Photo Storage Solved
 
Well, I think I finally solved all my photo storing issues. I now have two 200 gig hard drives in two different computers. I copied all my photos and made all the directory names consistent. I also put all my documents and code on the new hard disks too. At 4:30 AM tonight it will copy all the new files from one hard drive to the other. I was able to write a simple batch file that will copy the files with the xcopy command. I used the following command:
xcopy d:\ \\Beige\datadrive /C /D /E /Y
This will copy all the files from one computer to the other with: continuing on errors (/c), only copying new or changed files (/d), recursing subdirectories (/e),  and automatically overwriting files (/y). I put the batch file in the Windows scheduled tasks. One interesting thing to note: You have to check the "only run when logged in" check box on the scheduler. Otherwise it doesn't work on XP when you don't use a password to log in. It just silently fails when you don't check the box.
 
I made it write the output of the copy command to a file so I can look and see if it worked. That way I can tell if it's actually copying the changed files. So the whole batch files is:
date /t >> CopyDataDriveResults.txt
xcopy d:\ \\Beige\datadrive /C /D /E /Y >> CopyDataDriveResults.txt
The Zen of Carpet Purchasing
 
I went to Home Depot to purchase carpet for Marny's house. We torn out the carpet last weekend because of a not-so-pleasant septic tank issue. Taking my Dad's advice we looked into why it was backing up before we replaced the carpet. They ran a camera down the hole and found that the pipes were misaligned. They didn't think that it was going to backup again before they fix it, so it's ok to replace the carpet.
 
The best thing I did was get the Home Depot 1-2-3 of Flooring. The book told me that it way too hard to install the carpet myself. That was kinda my hunch. You need a few special tools and seeming the carpet sounds like you aren't gonna get it right on the first try. Home Depot will install the carpet for a reasonable price. Purchasing carpet at Home Depot was a fascinating experience. This nice man helped us fill out the paperwork and schedule a measuring appointment. It took him about 15 minutes to fill out the one page form and type it into the computer. Then he had to call the automated Home Depot appointment scheduling place on his phone. After he finished with that we realize that we put our home address on the form and not Marny's home address. D'oh! Chris was with us and he said, "I accidentally sent flowers to myself once. I wondered why they wanted me to enter my address on the form twice..." He said he ending up taking a picture of them for Julie. Ha. Anyway, so after screwing up the form and the appointment, the nice man had to start over from scratch. Yea. 15 more minutes waiting.
 
Lindsey apologized for the long wait to the Indian lady behind up who was waiting very patiently. She said, "It's ok. This is Home Depot. Waiting is what you do here.  I order a kitchen counter top once from Home Depot. We had to come in three days in a row and wait three hours each time." I started to feel bad for her but then I figured that she had read the same Zen book that I'm reading. She wasn't mad at us or at the nice man because were are all together the same being and it's silly to get mad at yourself. I think I like it when other people Zen at me. When we got up to leave, she said to the nice man, "I just have a simple question." Ok, now I feel bad for making her wait.
 
The appointment is Tuesday. Then about three days after that they will come back and install the carpet. It will be nice to have this all done.
 
 

Saturday, February 26, 2005

My blog saved me $450

So I was talking with my Dad on the phone the other day. We were making plans to go up to Tahoe and then he mentions that's he's sorry my computer died. He suggested that maybe it was just the power supply and not the whole computer that was broken. I'm like, "Huh? How'd you know my computer was broken?" Turns out that my dad reads my blog. I think my whole family reads my blog. Hi Mom! Hi Kira and Kailey! Hi Aunt Connie!
 
Anyway, so I looked around and tried to find another computer that has a matching power supply. The size of power supplies hasn't changed recently but it seems that every few years they change the plugs on the mother board. They recently added a square 2x2 plug which supplies extra power to the video card. All the new snazzy video cards take so much power they need a special extra power cable on the mother board. The last two video cards I got also need a direct connection to the power supply because the juice from the bus wasn't enough. Seems like this issue is getting solved in two ways. But the point is that most of my older computers that I would have liked to swipe the power supply from don't have the right connectors. Luckily my second Wow box had the correct plugs so I could test if it really was the power supply that was broken.
 
I was able to get the computers close enough so that I could plug the power supply into the broken computer without taking everything apart and sure enough the computer turned on. That made me happy. Thanks Dad! Now I only needed to buy a $50 power supply and not a $500 computer. So today I went to Fry's and picked up a power supply and my computer is all good again.
 
I priced computers on Dell when I though that I might need to buy one. You can get a reasonable computer without a monitor and a non-gaming video card for $500. Man computers keep falling in price. I figured I could move the video card, monitor and memory from my dead computer over to get a WoW class machine. But turns out I don't need to do that.
 
So with all that newly saved money I played Texas hold-em. We had a poker tournament here last night. I got cleaned out. I lost all 4 four games. I was down $9 for the night. $2 dollars for each game I lost and $1 for my bet with Jeff. Jeff bet me 10 to 1 odds that Jason wouldn't show up. I didn't think he's show up either, but 10 to 1 odds? I couldn't pass that up. I even offered Jason $5 to come, but he wouldn't do it. Turns out Jason is a father now and well, fathers pretty much can't go out to poker nights. Don't they make baby sitters and wives anymore? We had 6 people last night of which 0 had kids even though most of the people we invited have kids now. Maybe we should have a poker/kid's play night...

Friday, February 25, 2005

San Franciscoing

Lindsey, Jeff and I are thinking about moving to San Francisco. We might actually do it this time. The two really big reasons we haven't gone yet are:
  • There weren't any reasonable apartments available.
  • The commute to Mountain View is really long for Lindsey.
So Jeff and I checked out a place last night:
 
 
The place we were going to look at is one of the two units in that nice green and mauve house. I like how so many houses in San Francisco have a lot of style even if though the colors are a little funky. We had an appointment to check this place out but the guy never showed up to let us in. Man, that sucked. Don't worry though, the trip wasn't a total waste because afterwards we when bar hopping with Marc.
 
We'll have to arrange another appointment this weekend because the specs on this place are so much better than any thing else I've seen. From it's listing:
  • Good location. Near stuff and freeways.
  • "Mansion-like"
  • 3 Bedrooms, 3 Baths
  • Remodeled
  • "Designer kitchen"
  • 3 wood-burning fireplaces
  • 2 car garage!!
  • 2500 square feet!!
If those things are even vaguely true this place is awesome. 2500 square feet? What, are they counting attic space? Every other place we've seen is so small. We peeked in the window and the 2 car garage is tandem. That's annoying, but that's the city.
 
It's on a temporarily dead-end street so the traffic shouldn't be too bad. The street is closed because they are building the new 101 on-ramp on Octavian. I assume the construction will be going on for a year so it will be a dead end street for that long. One year is as long as I've committed to living in the city. The plan is to live in San Francisco for the year and then regroup to figure out what to do next. I think the commute or the bums might get to me. But hey, maybe it will be loads of fun.
 
Jeff and I are going to carpool together. The plan is for both of us to stay at Blizzard North for a least a year. I don't mind commuting nearly as much when there's somebody to talk to. Jeff and I commuted together from Sunnyvale for a while and that wasn't too bad.
 
Lindsey's commute was troubling me. But I made an excel spreadsheet to calculate her driving times. She goes to dance lessons all the time, so her driving schedule is pretty complicated. One of her instructors teaches in San Francisco so she actually drives up there a lot anyway. So with this spreadsheet I figured out an amazing thing. She'll actually drive about 2.5 hour less a week if we move. This is possible because Google has a shuttle from San Francisco. It has a stop at the Civic Center, Dolores at 280 and Monster Park. When did they change the name of the ballpark? Anyway, that place isn't quite walking distance from the Civic Center when you are carrying a laptop in heels. So I figure Lindsey will drive to Monster Park and take the Google shuttle from there. The shuttle is wired and is on the company LAN so Lindsey can work with her laptop. One day a week Lindsey will have to drive to Google so she can go to a dance lesson. If she can manage that schedule she'll be driving less, at work for more hours, and able to home sooner on the non-dance nights.
 
I think we might make it this time.

Thursday, February 24, 2005

Almost New Hard Disks

I broke my computer. I've never completely broken a computer before. I've had hard disks die. I've had video cards go all funky. But last night I completely broke it.
 
I was installing my new hard drives. I was all expecting to blog about my snazzy new photo storage, but I didn't finish the install. This was my plan. I purchased 2 200 gig hard disks. One goes in an older computer and the other goes in my main computer. I put all my photos, music, and docs on the new hard disk. Then I can copy the data over to keep the hard disks in sync. I was planning on finding a way to use xcopy or something that would only copy the new or changed files. Then I could setup a scheduled task to copy the files each night. Then when one hard disk failed, I didn't loose all my data.
 
I put my first hard disk into the old computer. Did you know that computers get mad when you put a disk bigger than 137 gigs in them? Man these stupid computer people. Every few year hard disks blow away the size limits. You'd think that after the first few times the people would have wised up and said, "Ya know, I think we should make the limit be 1 billion billion gigabytes." But instead they said, "I can save 10 bits! Wahoo. Who's ever gonna make a hard disk that's over 137 gigabytes?!?" So the hard disk manufactures have to solve this problem. You have to run a disk manager program before you install the hard disk. Then shutdown the computer and install the new disk. Turn on and run disk manager again and it tell you I can only do 137 gigs. Hmmm. I rebooted to look through my bios settings since the manual said something about bios. No luck. So then I ran disk manager again and now it asked if I would like to enable the 200 gig feature. Wahoo. It then did a quick format and partition and stuff and all was good. I think that after the hard disk is installed you need to reboot because it put its magic in the boot sector.
 
A happy note on new hard disks. They solved the jumper problem. You don't need to set jumpers on hard disks any more. The IDE plug has a black connector for primary and a gray connector for slave.
 
I copied all my photos and music over to my new hard disk. My plan which worked well was to copy the data to a new hard disk first then install a second hard disk in the primary computer. This way if anything went wrong I always had the data on a least one computer. Yeah, that was a good call.
 
So then I tried to install the hard disk in the new computer. I put it in and turned the computer on and nothing happened. D'oh. No fans, no lights, nothing. Then I opened it up and spent the next 1.5 hours trying to get the computer to do something. When I plug the power cord in I get a little LED on the mother board, but that's it. I checked all the connections. I removed the new hard disk. I removed the video card. I tried to shortcut circuit the power button since I thought I might have broken the switch. I removed the mother board looking for screws. Here's a little bit of genius. There are screws for the motherboard under the CPU heat sync. You have to remove the CPU to remove the mother board. The CPU is in a ZIF socket so it has a lever. You can't operate the lever when there is a heat sync on the CPU. So you have to pop the heat sync of the CPU to reinstall it on the mother board. Yeah great. Now if my computer were working I have to find some heat sync paste to reattach the heat sync. But my computer still isn't working. I broke it. So my guess is that it's the mother board. Can you buy a replacement mother board from Dell? Well I guess I'll figure that out today. I might just buy a whole new computer because I'm not sure exactly which part is broken. By the time I buy and motherboard and CPU I doubt it's much cheaper than a whole new computer. Fun, fun.
 
 
 

Wednesday, February 23, 2005

Wedding

So I have a problem. My friend is getting married on Saturday, May 21st. I kinda want to go to his wedding. E3 is the 17th - 20th. My company is taking me to E3. So I could skip out of the last day of E3 and fly from LA. Oh, the wedding is in Hawaii. And Lindsey's birthday is on May 26th. It seems silly to go to Hawaii late on Friday only the catch the wedding on Saturday. I wouldn't get to see my friend at all except during the ceremony. And I'd probably have to fly to San Francisco to pick up Lindsey to fly out. I pretty sure that I don't want to go to Hawaii alone. May I could make a vacation out of it. Ok, how's this for a plan:
  • Flight to LA on Monday.
  • Go to E3 on Tuesday and Wednesday
  • On Friday, either I flight to San Francisco or Lindsey Flights to LA, which ever makes more sense in the non-sensible airline fee way.
  • Still on Friday, we flight together to Hawaii.
  • Go to the wedding on Saturday
  • Spend the week in Hawaii
  • Take Lindsey out to a fancy Dinner on her birthday
  • Fly home Sunday
Lindsey and I are already going to Hawaii in October. I suppose that will be Kawaii and this will be Honolulu. Those are like two totally different places right?
 
Weddings are totally whacked. The couple throws the biggest party of their life and invites all their friends from all over to come. Friends fly in but the couple is totally busy the few days before because of planning everything. Then they get married in a really peculiar but traditional ceremony. The couple leaves on the honeymoon not really getting to see their friends that have flown in from all over.
 
Allow me to propose a more reasonable thing to do. Get a sufficient number of witnesses together including a few family members and a few friends. 8 people in total will do. In plain clothes have a justice of the piece sign a marriage certificate in front the witnesses. Put on ring. Go on a honeymoon. Now a month later plan to have an awesome week long party that ends in you wearing a tux and wedding dress and getting really drunk.
 
People ask me why I don't get married. It's because I don't want to have a wedding. A traditional wedding sounds one of the most excruciating experiences. I don't like making decisions, and I'd have to spend 6 months making silly choices like the frosting on my cake. I don't like wedding cake. Lindsey would have to find something blue. Huh? I don't get it. Weddings are really odd. I don't like being the center of attention in large groups. I usually say that if people have been doing something for a long time it's probably a reasonable thing to do. But spending $20,000 to have a painful 6 months leading up to an even more painful day is a bit over my limit.
 
I understand that you should have a public ceremony in front of family and friends to make the marriage legitimate. That's logical. Maybe you need to throw a party to convince enough people to come.
 
I don't really have a reason to get married. If I wanted to have a child soon, I'd certainly get married. If I was going to purchase a house with Lindsey I'd probably get married too. But since I'm not going to do either of those things soon, what's the point of getting married?
 
 
 

Tuesday, February 22, 2005

Tomato Sause and Pancakes

Lindsey and I made a tomato sauce last night. Man, there are a lot of bad recipes for tomato sauce. We've try this three times now and each one was hardly eatable. Last nights was the Good Eats Tomato Sauce that Alton always brags about. It was way way too much work for something that was not good. Does anyone know a good tomato sauce recipe? I want to keep at this until I find one that's as good as the stuff in a jar. Here are things I think I'm looking for in a tomato sauce:
  • No carrots! Tomato sauce is supposed to taste like tomatoes, not carrots. Tomato sauce is supposed to be red. Carrots make the sauce taste like carrots and orange.
  • Not sweet. Sweet is not a feature I like in tomato sauce. All the sauce I've done have ended up sweet, partly because we've tried to rescue the bitter sour taste by adding a little sugar. Not a good move.
  • Use canned tomato. This is a personal thing. I don't like tomatoes, but I love tomato sauce. I think real tomatoes have bad flavors that get broken down in the canning process which makes them ok. "Fresh" is not feature I want in sauce. It should be stewed.
  • Less than 1 hour. If this is going to be a recipe that we are going to do more than once, it really can't take all day. Last night's tomato goo took 3 hours. If I find a fast recipe I can make it on a week night.
Anybody have any ideas?
 
Lindsey also made some pancakes yesterday. We've been working and the recipe for a while now and she stumbled across a key breakthrough. We've tried a dozen or so recipes and Alton Brown's is the best. Apparently he has the best and worst recipes. I like bullets, so here is list of things I've figured out about pancakes:
  • Pre-made dry ingredients. Alton says you can pre-make the dry ingredients, but we've never been on the ball enough to do that. It's fast enough to make anyway.
  • Dried buttermilk. Buttermilk is too hard to keep on hand so we use dried butter milk. My sister found this stuff and it's great to always have butter milk on hand. It seems to be in the dried milk section of the store, not the milk, buttermilk, butter or baking section.
  • Always whip egg whites. We have an egg separator which make that a mindless operation. Mindless things are always good in the morning before the coffee's set it. We have an electric eat beater which takes about 60 seconds to whip the eggs. Key things here are to but the whites in a medium sized bowl and tip the bowl so you get a flowing action with the beater. You don't really need to move the beater until they are almost done. Use the highest setting on beater because it will take all day on the low setting.
  • Mix the batter enough. Everyone tells you to go light on the mixing. Don't over do it because it can make the pancakes rubbery, but it takes more than 10 turns of a spatula to fold in egg whites. Give it a good whipping.
  • Lindsey's breakthrough: Chop the chocolate chips. We used to use minichips because the regular sized ones are too big. But yesterday we ran out of minichips and only had the big ones so she put them in our electric spice (coffee) grinder. (Don't tell Jeff that his spice grinder is covered in chocolate.) Chopped chocolate chips make little veins of chocolate run through the pancakes without a lot of gooey parts. I think I'll try the cheese grater next time to get long thin pieces of chocolate without getting to much dust.
MMMmmmm pancakes....
 

Monday, February 21, 2005

Living Zen

I'm reading a book about Zen. It's Nothing Special: Living Zen by Charlotte Joko Beck. It was recommended to me by one of my coworkers. Well now he's an ex-coworkers because he needed to sail with Flag Ship Studio. Anyway, he said that his life was influenced by the ideas in this book. Now, this guy isn't much of a hippy so I was interested in what he saw in Zen.
 
I'm not done reading yet, but it's very interesting. I'm curious about the Zen. I didn't know exactly what it was before. I thought it was a religion, but it's more of a philosophy of life that is compatible with many religions. They are fascinated with sitting. They spend years sitting. I always thought they tried to empty their mind and relax when sitting, but it's actually quite the opposite. They sit to think about the problems in their life. Sitting allows them to critical analyzes their life and plan what do to in the future. I spend a lot of time walking and doing the same thing. I think they'd all be in better shape if they walked and thought rather than sat to think.
 
The book is full of metaphors. Life is like a river and we are all whirlpools in it. Sometimes trash flows down the river and ends up in your whirlpool. It swirls around in it for a while and then moves one. It's important the your whirlpool isn't stagnant because then it will be gross and grow algae. I'm not really sure what this metaphor is trying to say, but I think I like it. Maybe it's saying we should be hard-skinned and go with the flow. Well that's easy. Maybe I can be a Zenner.
 
We all have baseboards. This metaphor kinda lost me, but it seems important. Apparently when we are having problems we plug into our baseboards, kind of like pulling in a lamp. When a young child has a problem, he might through a temper tantrum. This is just him plugging in. It's a way to deal with an uncomfortable situation. Once you're a good sitter you learn to use your baseboard less and this is a really good thing. I believe the idea is that you shouldn't use a pre-canned emotion to deal with a situation. You should sit and think about it before you do anything.
 
The goal of being Zen isn't what I though it was. It's not about being peaceful and bliss. It's not supposed to be fun or comfortable. It's supposed to be joyful. You get joy by bringing harmony and growth to everyone. If you are in a situation that is a little uncomfortable for you but it brings harmony to others then you are doing well. You are suppose to find jobs, relationships, and everything that maximizes the amount of harmony and growth you can give to others.
 
Does anyone that's reading this blog know more about Zen than I? Am I getting it right? I'm not quite sure what harmony is. Hopefully this book will tell me. Anyway I'm enjoying the book. It's very well written and it is teaching me about something that I know very little. Owmmmmmmm...Owmmmmmm...

Sunday, February 20, 2005

Pirates!

I played Sid Meier's Pirates the other night. That game is really fun. It doesn't totally seem like you are having fun when you are playing it. It actually seems kinda of simple. When I'm playing I feel like there's nothing to the game and I'll quit soon, but I keep on playing. That's interesting to mE how they keep my attention without totally drawing me in.
 
You always have 3-5 easy things to do. When you're in the city you need to talk to the governor, go to the saloon, sell stuff with the merchant and see if you can upgrade your ship. Each of these tasks usually takes about 30 seconds so you do them all at each city. At each point in the game you have a limited number of options but each one is easy.
 
I think this would get boring after a while. I like easy games and all but I need more than that. So occasionally one of your simple tasks turns into something bigger. Sometimes when you talk with the governor, he introduces you to his daughter. And his daughter can invite you to the ball. Boom, now you are in a dancing simulation, stumbling around trying not to look like an idiot.
 
Once I sailed into a port and it said that I couldn't enter because it wasn't a friendly port, but did I want to sneak in? Well, sure! Sneaking sounds like fun for a while. So I snuck in and found the governor. I did it first try. Oh yeah. Go me. I'm so good at this game I do every thing on the first try. Anyway, I convinced the governor that I would help him out. Boy, was he a sucker. I mostly just sank his ships.
 
Sailing a ship is kind of fun. I like exploring and finding places. And when I sail by another ship I can attack it. The camera zooms in and you have a pirate battle. You can fire a few different types of canons. You can end it by sinking the enemy ship. That's actually not the best thing to do because you don't get any of their loot. So you usually want to board the enemy ship. Sometimes they surrender on the spot. Sometimes you have a sword fight to win. And you know what... I always win. I haven't lost a sword fight yet, or a ship battle for that matter. I think I know why I like this game. I like winning. Winning, fun. Losing, not fun.
 
I think if this game had a little more depth it would be awesome. It's a really good game as it is. I have fun playing but I feel a little shallow. That's kinda the opposite feeling that I get from playing Wow. Then I'm not really having fun, but I feel like it's a deep game.
 
Ok, I've said all I want to about Pirates, but this blog is still a little short. I went to prom last night. I rented a tux and everything. Ok, it wasn't a real high school prom, but a prom party. It was a blast.

Saturday, February 19, 2005

My Photo Importer

I wrote a program to import my photos. With all my searching, I didn't find anything that did it the way I want. With my own program I can do anything. I've kinda been looking for projects to combine my two hobbies: programming and photography. This seemed like a fun thing to do this afternoon.
 
Here's my first version. It lets you specify:
  • Import directory
  • Destination Directory
  • Folder to create
The import directory defaults to "f:\". The destination directory defaults to my pictures directory. I had to make the dialog box really wide, because some brainiac at Microsoft though it was a good idea to put my pictures in a directory like this: "C:\Documents and Settings\Tod\My Documents\My Pictures\". Way back in the day it was "C:\My Pictures". If you left it up to me I'd make it: "C:\Tod\Pictures". Long paths and paths with spaces suck. The "folder to create" defaults to "Photos_Feb_19_2005" with the "Photo" part highlighted and with the focus. I can type something like "San_Mateo" and press enter and it will start copying the files to "San_Mateo_Feb_19_2005". That's the directory format I decided on.
 
My program will search through all the subdirectories under the import directory. My 20D camera is silly and makes lots of annoying subdirectories that I don't want to pay attention to.
 
It renames the files as it copies them. The source is like "IMG_1234.JPG". This filename is bad because:
  • the extension should be lowercase
  • it's not unique, because I have two cameras that use this format and the number space is going to wrap.
  • it doesn't sort well when we go out and use two cameras at the same time. I want it to sort by picture taken date. Last modified date would work, but when you rotate the image that date changes. I could use the EXIF picture taken date, but that makes the directory sort slowly and also not all image viewers will sort by that.
The file format I choose was date-time-index. So "IMG_1234.JPG" taken today at 9:18:24 AM would turn into "050219-091824-1234.jpg". This is a reasonably short file name that will sort correctly and is unique. (ok, if I take my two cameras and shot at exactly the same time when they are on exactly the same index number I'll get a collision, but I'll chance that.) It's easy to find the corresponding original file because it keeps the 1234 part.
 
When my program copies the files, it creates the new directory with a "favorites" directory under it. This is where I later will copy the files that I like so I can find them quickly.
 
If there are any raw (.cr2) files in the import directory it will create a subdirectory called "raw". It will try to find the matching jpg file and use the last modified time from that so that the file prefixes will match. The last modified time is a few seconds off between the .jpg and .cr2.
 
There's still a few things I want to add to my importer:
  • Directory browsing buttons for import and destination directories.
  • History in a combo drop down for import, destination, and folder edit boxes.
  • A cancel button.
  • It doesn't keep drawing after it loses the focus or something. Yeah fun, drawing bugs.
  • Auto-open directory before it starts copying so I can open them in an image view before it's done.

Thursday, February 17, 2005

Yesterday I wrote about my experiences playing Wow. I though a lot about exactly why I wasn't having fun. This is my hypotheses and experiment.
 
I think there are two types of activities that you do in WoW:
  • Mindlessly killing monster
  • Planning what to do next
The UI in WoW is very good for the killing monsters part. There are lots of buttons and timers and things to do. Walking up to monsters and trying not to get an add is mindlessly interesting. However, the UI for planning is insufficient. I'll go as far as to say that WoW would be 5x higher on my entertainment scale if it had tools that helped me figure out where to go next. The current tool is the quest log which has many problems, but most are easy to fix.
Quests should never expired. Why do they do this? This only makes me lose the sense on completion. There is no reason to not allow me to do low level quests. I like easy things. Why not keep the experience full too? It's not like you can game the system and get extra experience.
The quest log shouldn't have a limit of twenty. Why can't I always put all the quest in the log? Well, currently because the quest log UI can't handle them.
The quest log needs a lot more UI. Grouping by designer-chosen area is not good. Not showing all the quests as once is not good. I'm not exactly sure how to make a better UI, but here are my requirements:
  • It needs an Inbox so I can see want I'm working on.
  • It needs some sort of folders. I like gmail's label system.
  • I want to see all my completed quests to get a sense of accomplishment.
  • I want to see on the map where to go next for all the quests. Searching is not fun.
  • Each quest should probably have an icon associated with it.
  • I want the know the rough time it will take to do quests, and it I can't solo them.
  • I want a suggestion for a reasonable quests to do next.
  • The UI should probably be full screen like the map.
Actually my quest log mostly does exist. It's called thottbot. It even tells me about quests I don't yet have. So last night I tried playing WoW with the improved quest log.
So I sat down and start playing WoW. First thing was to open my thottbot quest log and spend ten minutes determining my path for the evening. I found the four quests I wanted to complete and mapped a walking path. Now after playing WoW for ten minutes, I booted the game and logged in. Since I knew exactly where I was going, walking wasn't too bad. I accomplished my quest goals without putting to much thought into it during the action. I just turned off my mind and killed monster. That was fun.
So my experiment as a success. I like separating the mindless parts from the planning parts. That mental transition is difficult and it was nice to only do it once.

Wednesday, February 16, 2005

Image Viewers

I've tried out a bunch of image viewers for previewing my photography. None of them are perfect, but some of them are very good. I think the quality of image viewers is directly related the popularity of digital pornography.
 
Microsoft Viewer. This program is actually ok. It's the one you get by default when you double click a file or when you right click and pick preview. It's very fast. It doesn't understand the tag in jpgs that says "you need to rotate to view". They obviously know about this stupid problem because they added a rotate button. They only thing that is usually for is looking at your personal digital photos. But you never want to press that button because it doesn't remove the tag from the jpg, so when you view it in another viewer it auto rotates the already upright image and it's sideway again. This program doesn't go full screen, which after doing this for a while I've decided is the best way to preview photos. You really want to see as much detail as possible. You can zoom in on the photo, but the controls are awkward.
 
I still haven't found a viewer that has good controls for zooming. You need to do this to check focus. This is what I want:
  • One button to zoom to 100%, centering the image
  • One button to return to full screen
  • When zoomed, I want to drag the Adobe way, with a hand cursor  (Scroll bars are too hard to use)
IrFan. This program is really popular and really good. I think it might win as my main viewer after I give a view more an honest try. The enter key toggles full screen mode which is perfect. You can set it up so that is shows f-stop information and the like, even in full screen. Ctrl-H will zoom to 100%, but it centers on the top left. It render really quickly, but it doesn't cache the next few image. So you look at black for like 300 milliseconds when you switch between photo sized jpgs. Even the built in Microsoft Viewer caches the next image. If you press F8 then 1 it will copy the image.
 
I think that I'm going to copy the images that are good. The ones that are like 1 in 10 in quality. A lot of viewer have rating systems, but I'm worried that it will tie me to a viewer and then I can't switch because I lose the culling. It's also nice to have a directory of good images to view quickly that is separate from all the unculled images.
 
Picasa. Wow this program has a lot of UI. Hopefully it will get Googlified and lose all the annoy UI now that they are owned by Google. This program has a lot going for it. It's the faster viewer. It views all images instantly. It isn't really directory based, so by default it shows you all your recent images. It's got a number of really bad problems. First of all, get rid of the velocity based scroll bars. Why does everybody reinvent these things? It's like what a geek would come up with if he had do make a UI. They suck. They are pretty much the less efficient most annoying way of scrolling. Picasa has a full screen mode, they call it "slide show". It's ok but doesn't have a zoom. It has a labeling mechanism, but I'm not sure where that data is stored so I don't use it. It has a special label that is called "starred" which is nice just like gmail. That's nice, but I'd rather an easy copy method.
 
Photoshop CS. They added a lot of features to the file browser that almost make it an image viewer. It doesn't really go full screen and it's way too slow.
 
ACDSee. We had this at work and the license manager made it too slow to boot so I got a bad impression from it. Recently I've been trying the demo at home at it seems pretty good. It's fast, except when viewing raw camera files. I think I want the JPG in the made directory and the raw files hidden in a raw directory. This way they never show up in a viewer, but I can get them if I do advanced images processing. It has an easy to use copy command which is nice. It's got a rating system, but it's in a proprietary database. It's $50, so it's not free like all the others. Assuming that you purchased Photoshop for other reasons. But it has a good image importer that I might end up using too.

Playing WoW

I finally got around to playing World of Warcraft again last night. That game has so much going for it. And so much going against it. I really want it to be fun but so much of it isn't any fun at all. I think that my problem is that I'm trying to play it but only really investing half of the energy needed to play. I want to go run out and knock things silly with my mace. I could do that over and over again. It has all the things I need for that: good graphics, good sound, random rewards that feel better than they are. However I feel like I need to spend a lot of time figuring out where to go and what to do. I need to do a lot of things that aren't directly advancing my character but more like planning to advance my character. Where should I go next? I really don't know now. I have a full quest log. It's always full. That's really annoying. One of the things I want to do is minimize the quests in my log. That's fun. That's a sense of accomplishment for me. But no. I have like 40 that should be in my log and it grows faster than I do them. I hate dropping them off the bottom but that's really what I need to do. I think that's because I always play in rest state so I'm advancing in the game at a faster rate than the designers planned for. Anyways so last night I ran up and down a new area that I'd never been before, Stonetalon Peak. I thought it would be fun to explore, but it's really not. There are random areas that are too hard to run through. I'm ok with areas being too hard for be but the way you figure this out in WoW is by running in and dying. There's nothing on the map that makes it look hard. You have to mouse over a monster and subtract your level from his level. Actually the best was to explore an area is to look on thotbot or some other website. Yeah, great. I should be playing the game in web browser. That's the only way I've found to play Wow without running back and forth. Man running is really boring. I spent a lot of time last night running. I thought it would be interesting to see and new area. Nope. I really should have spent the ten minutes on thotbot to plot my quest order and look at the map so I didn't run all over the place looking for something interest. Attention Me. There will never be another interesting thing in WoW. Ok, that's probably a little harsh. Interestingness per hour is probably like .5 at level 20 in Wow. To give that number a scale West Wing is like 100. Going for a walk is like 10. Reading one of my crappy magazines 2. Playing Pirates... I'm thinking 500 once I get my hands on that game. Hey Wyatt, can I borrow your copy? Are you still playing?

Monday, February 14, 2005

50% Through Blog Month

Today is exactly half way though my blog month. Let's see how I've done so far:
 
Date
Minutes
Words
Words/Minute
2/1
150
701 
4.6
2/2
70 
504 
7.2
2/3
67 
615 
9.2
2/4
37 
579 
15.6 
2/5
58 
645 
11.1
2/6
49 
562 
11.5
2/7
33 
575 
17.4
2/8
48 
706 
14.7 
2/9
36 
545 
15.1
2/10
44 
680 
15.5
2/11
57 
831 
14.5
2/13
55 
1010 
18.4
 
And here's a graphs of my writing speed over time:
That makes me happy. I'm getting faster at writing. I did miss a day though. D'oh. Well, I wrote a really long one the next day to make up for it.
 
The hardest part of writing so much is finding interesting thing to write about. I dread writing because it's hard to find topics. I find that I spend some time on the day before trying to find something interesting. I think that I should do interesting things just so that I can blog about them. Once I'm writing I'm ok. That's actually cool because when I started the actual writing part was difficult. Now it's easy to write the words, just hard to find the subjects. I think the quality of my writing has gone down a little over the time. I don't spend enough time formulating my arguments or working on awkward sentences.
 
Emailing to post my blog seems to have broken. I dunno, it worked for most of the days and then it failed all of a sudden with no errors for the last 3 posts. It's really hard to post emails because they have line breaks in them and blogger puts <br> for line breaks which means that the paragraphs are all funny spaced. So I have to remove all the newlines in the email by copying the source html to a program that can delete newlines. Word and Visual Studio can do it. In Visual Studio I need to enter "regular expression mode" which is annoying because the next time I run a find operation it's still in regular expression mode which isn't what I want. Well, I changed the email address on blogger so maybe that kicked it enough so email posting will work. Wish me luck.
 
I use Word to count the number of words in my blog. I copy and paste the text to Word and then go file->properties->statistics. That part is actually really fast. I like that Word boots instantly.
 
I'm looking forward to the end of this month. Writing blogs everyday is too much. I think it's good for my writing speed, but the blogs aren't always interesting to read. Next month I'll write far fewer blogs but I'll think about each one more.
 
Well, this blog isn't quite long enough yet and I've kinda run out of things to say about blogging. So let's talk for a sec about photography. I downloaded ACDSee last night after writing my blog. It's pretty good. It can import pictures from my camera and from my USB reader. I can almost get it to name the files the way I want to. It will put the picture date in front of the file name. This is good because it makes the file name unique and it will also sort correctly when we're taking pictures with two cameras. I can't get it to not put spaces in the file name and it will only do it in 12-hour format. Oh well, close enough I think. And it's got bug where if ACDSee is open to the directory where you are importing, it fails to rename the files. Yeah, great. But it's the best so far, so I'll try it out for the next month.

Importing Photos

After a fourteen months of taking digital pictures, I still haven't found a great way to get them on to my computer. There a handful of issues that still don't make me happy. Let's go over all the image grabbers.
 
Microsoft Scanner and Camera Wizard. When I attach my camera to the computer with the USB cable this is one of the choices that pops up. It's actually really good at copying the images to the computer without too much UI getting in the way. It let's me create a direction without making me hunt all over my hard drive. I can set a file prefix, but it has a fatal flaw. It puts a space in the filename after the prefix and before the number. Ug. Spaces suck in filenames. It ignores the original image name which I'm not yet sure if I want that. The selection GUI doesn't have a fast group select, so if I only want half the images on the camera I need to click 3 million times to select them. It's actually fast to copy all the images over and then delete them. This isn't actually something I need to do a lot, but sometimes I forget to delete the images after I copy them so I end up with photos from the previous outing. You can preview the images as you copy them which is kind of nice. Do you know what a RAW files is? Well this program doesn't so it skips those.
 
Canon ZoomBrowser for the S400 ELF. This program has way to much GUI and ever time I click a button it take a few seconds for it to do something. It lets you create a directory and file prefix and it's nice enough not to add any spaces in the filename. This program doesn't handle raw files either.
 
EOSViewerUtility. This is the program that came with my 20D. Canon needs to hire some software engineers, because like ZoomBrowser the UI on this program really stinks. I have to open the folders on my camera's flash card. Don't forget every click in the program take a few seconds. My camera has this stupid feature where it puts every 100 photos in separate directories. Huh? How is that ever useful? It just make it annoying to take photos off that span directories. So after I navigate down to a directory on the flash card, I have to select all the photos and drag them to a directory in the program. Oh, I hope I remembered to create the destination directory first.
 
Photoshop. I love Photoshop for most things, but mass importing images isn't one of them. It forces you to open all the pictures in Photoshop which is really slow. I might be able to create an action or a batch job to do this, but don't think that would be much better. Photoshop takes too long to boot when all I want to do is import.
 
Copy by hand. So far all of these programs work with cameras, but they don't work well with a USB card reader. In either case I can just copy this files by hand. This actually isn't too bad, but I hate navigating directories. I have to go to my photos and create a directory. Then I have to navigate all the stupid directories on the flash card.
 
Picasa. This is my current choice. It's actually copying some photos right now. You load Picasa and click one button. Yes, one button. It figures out if you have a camera attached or a USB reader and starts copying automatically. Then I come back in a while to specify the directory name. It has a couple problems. You can't use a viewer on the photos while they're being copied. I not sure where it puts them. The other problem is that it's really slow with lots of pictures. It's been going for 30 minutes on the current batch of photos. It seems to slow down after while. Maybe it puts them all in memory and 1 gig of memory causes it to swap. Nope, just looked. Only using 50 megs. Well, it's still really slow.
 
I should do a web search for a better tool. I'm sure some geek has had the same problems as me and made a simple tool that just does exactly what I want.
 
I still haven't figured out how to name files. Currently I use the IMG_1234.jpg name that the camera produces. This is ok but I have two camera that use the same naming convention so they names collide. That doesn't seem like it's a good solution in the long run.
 
None of these image capture utilities autorotate the jpgs. The images have a little tag in them that says "I need to be rotated when viewed". Microsoft's thumbnail viewer doesn't know about this tag, so all the vertical thumbnails are sideways. If you use the Microsoft rotator utility, it doesn't remove the tag, so all the other programs then have the image sideways. Canon's fileviewer utility will autorotate all the images in a directory (without telling you) when you are browsing with it and it's smart enough to remove the tag. It actually took me a long time to figure out why all my images were randomly rotating when I used these two programs together. I just want the imported to auto rotate the image and remove the tag.
 
By the way, did you know that you can actually rotate jpgs without losing any image quality? You can numerically rotate the image without actually rendering and recompressing it. A lot of tools will do this for you  so there is no reason to not rotate all your jpg photos.
 
So when should I delete the images off the flash card? I've been doing this after I review the photos to make sure they copied correctly, but every now and then I forget.
 
Well, I was going to talk about image viewing utilities too, but this ranty blogs is long enough.

Friday, February 11, 2005

Picture Day

I don't really have anything interesting to say today so I thought I'd just share a few pictures I took from a photo outing last weekend. I went to the San Francisco Place of Fine Arts and to the marina.
 
The Palace of Fine Arts
 
This is a really pretty place. You should visit if you've never had the chance. It's very odd to have a beautiful Roman temple plunked in the city. There were lots of photographers around. In fact I think just about everyone had a camera with them except this guy that was walking his dog.
 
Walker
Dog Walker
 
Is it me or is that guy just looking for trouble? Can't you see a pretty white poodle walking by and exciting all the dogs. The poor guy wouldn't have a chance.
 
Turtles
 
I like turtles. These guys were very photogenic today.
 
Flute Man
 
This man's flute was echoing pleasantly through the temple. He provided a very nice atmosphere to the area. When I first walked up to him and tried to take his picture he kind of turned away. I lower my camera and said, "Oh do you mind if I take your picture". He said quite confidently, "Not if you ask I don't". Then he told me that recently somebody took his picture without his knowledge and wrote a newspaper article on him. One of his friends told him about it. Since then he's been a little hesitant of photographers. And oh, it would be nice if I donated to his hat which was on the ground. I took a number of pictures of him and put $5 in his hat. Later in the day I thought it through and I'm sure that story was a setup. He must have 100 people take his picture every day and he's figured out that that story gets the most money put in his hat. He he. Even though I probably got had, I really like his music.
 
Dogs Wrestling Over a Stick
 
There's a dog park on the beach near the marina. I really like dogs so I took lots of pictures. These two guys were having a grand old time wrestling over this stick.
 
Did you like my pictures? I touched them up in Photoshop a bit. Could you tell? Was it distracting?
 
To the palace I first applied noise reduction with Noise Ninja. Then I cropped it to remove an ugly fence and some people. I also did levels and highlights/shadows to make it feel less flat. Then I applied a warming filter because it makes it look like it's in better sun light. And last I did a couple unsharp masks. I find doing a couple at different radii gives good results that look sharp but don't have that oversharpened halo look. Finally I wrote an action to save the image in two size appropriate for the web.
 
I did similar processing to the dog walker. Noise Ninja, levels, highlights/shadows, warming, and unsharp masks. I didn't need to crop this photo. I really like what the new highlight/shadows tools does. It kinda softens the highlights and lightens the shadows. The nice part about that adjustment is that it really brings out the colors that get lost in those areas.
 
The turtles picture got Noise Ninja, levels, highlights/shadows, and unsharp mask. I didn't bother with warming because I liked the look of the skin already. Can you tell this picture was taken through a chain link fence? You can see it on the bottom right of the photo. I didn't bother removing it because I liked the composition. I probably could get rid of it with a rubber stamp if I really wanted to.
 
The flute man has lots of processing. I did Noise Ninja first. Then I added a layer adjustment to desaturate the image and another to apply levels. I tweaked the color channels of the black and white image to get the most contrast. I mostly left red alone and pulled in blue and green. This makes the image a little more dramatic. I have this theory about photography as fine art. Photos need to be black and white and preferably blurry to be fine art. Black and white is because color photos look like your mom took them. Blurry is because fine art this century, ok well last century I suppose, needed to be unrealistic. So I applied a radial blur to this photo. It was too much at first so I faded the effect about 50%. I think that it's cool that you can apply a filter without a layer and then after you can still fade it. Photoshop is neat.
 
The wrestling dogs got Noise Ninja, levels, warming, and unsharp masks. The natural lighting was full so they didn't need shadows/highlights or much levels, but the warming filter added a lot. It was kind of an overcast day, but the warming filter makes it look like the sun is starting to set.
 

Thursday, February 10, 2005

The Strategy of Maka Bana

Maka Bana is my favorite German board game. It has many of the aspects with I like in board games. I've played this game many times with many different people and I've developed a number of strategies.
 
I usually start the game by playing next to a fish square. I do this for my first few turns. I normally don't get monkey blocked early in the game because the playing field is so open. Yeah I know technically it is not a monkey but a totem, but I always think the game is "Making Banana", and well, you need monkeys for that. Anyway, once I have about three piece next to fish squares, I start showing fish as my first card. If people are ganging up on me they can block the fish squares that would give me doubles, but it's hard to block them all and there are plenty of other open fish squares too. If I think people are gunning for me, I tend to not play to make a double. I usually use this fish technique for the first third of the game.
 
Getting a tiki on the board is always better than getting blocked. I find that getting blocked is really what distinguishes the score more than anything else. Having a double is only slightly better than a single, but getting blocked is devastating. So when I play my moves I actually concentrate much more on beach position than doubles.
 
If one player can control two beaches they usually win the game. Two beaches are 8 points. Compare that to getting a triple tiki which is worth 6 points. Getting a triple tiki is really hard and almost never worth it because you'll get blocked 4 out of 5 times. Beaches are easier to control because people tend to not pay enough attention to them. Instead people like blocking double tikis because it's so obvious. When I play on a beach I normally have several good moves which makes it hard to block. Also, I can hide my beach motivations until late in the game. I find that I normally completely ignore one beach that is popular so that I concentrate on the others.
 
I almost never lead with a beach card. Beach cards tend to draw monkey blocks. When it's my turn to play my monkey and only one beach card is lead by the group, that's almost always where monkey goes.
 
I try to lead the a card with the most possible squares. It's usually fish, tattoo, or flowers. The other two card types have four in the set so they lead to fewer open squares until late in the game.
 
You know that area between Bikini and Diablo with lots of touching squares? Yeah. I don't play there. That area always draw lots of attention because people see all the triple tiki opportunities. Lots of monkey blocks occur there every game.
 
Turn order is really important. When you are the leader you have two blocks. One with the monkey and the other with your tiki. When I'm in the lead I put my tiki where I think some else might go. I always err on the careful side when doing this because playing near somebody else's tiki draws monkey blocks sometimes.
 
Late in the game when people are painting it's easier to place tikis because there are fewer blockers. When I am going to make a bold move I try to do it when there are other people painting.
 
I usually play at least one painting card mid game. This give me control of a beach and really sets someone else backwards.
 
When someone else is painting, I always protect the tikis on beaches I control. It's devastating to lose those.
 
My monkey placement is for not for blocking my opponents plays so much as protecting my investments. Now this is probably the most important strategy that isn't obvious. I try hard to keep other people off my beaches and away from my tikis. This strategy really distinguishes the winners from the losers.
 

Wednesday, February 09, 2005

What Makes a Good Board Game

When I was growing up my family played board games like Monopoly. For the longest time that was what I thought all board games were like. Few years ago a friend introduced me to Settlers of Catan and I learned that board game could be more involved and strategic.
 
I've been in an active board game group for three years now. Two of the members are pretty avid collectors, so we play lots of different games. Over this time and all these games, I've figured out the features I like in board games. A lot of the really highly rated games are pretty low on my list. I think the reviewers concentrate mostly on the strategy, but I find you need way more than that to make a good game.
 
The most important aspect of a game is the pieces. You need a bunch of colorful pieces, wooden ones preferably. Carcassonne has some of the best pieces. They are fun fiddle with while you are watching the game. Most hard-core gamers think that pieces are irrelevant, but how often do they actually play a Cheap-Ass game? Those games have the worst pieces and you play them once then you are done with it.
 
Another key part of a board games is the social aspect. So many games just get this wrong. You need to have lots of communication, a few things to bicker over, and not a lot of concentration time. I find the games we come back to always have good social aspects. Recently we've been playing a lot of Modern Art. This is a great game. People are always talking out loud and kibitzing about strategy. The turn order is very important to the social part of the game. Games where you spend a lot of time waiting for somebody to go aren't fun. The person whose turn it is feels pressure and everyone else is bored. Good games have turns where everyone is participating on each turn even if it's not theirs.
 
One bad thing that really wrecks an otherwise good game when the game tends to end with king-maker situations. This is where one player has to pick someone else to win. The always makes the game end with a big let down. There are a couple good ways to get rid of king-maker situations. Lots of games simply hide the score with a little randomness. Since you don't know the score exactly, you can't pick the winner definitively. The other good way we've found to get rid of king-maker situations to play two vs. two. With only two teams, there aren't enough parties involved to have a king-maker problem. We've found it's not too hard to slightly modify the scoring of some games so they can be played two vs. two.
 
And even though I've been bagging on it a little, strategy is pretty important. If you have all the other elements, but the winner is random, the game isn't fun. I think the trick is to have some interesting game-play that doesn't involve too many numbers. Games with lots of numbers are hard to play and really don't appeal to the non-engineers in our group. Bidding is usually a pretty good mechanic because it's strategic without too many numbers.
 
 
 

Tuesday, February 08, 2005

Optimizing Computer Games

We keep our game running at 30 frames per second. When it dips below this, we take the time to figure out the problem is and fix it. This goes against my general philosophy:
 
Optimize last.
 
Optimizing early is a waste of resources because I find that it is quite common for the project to go in a different direction. Sometimes the code I optimize isn't around at the end of the project. That's just wasted time. There is value to adding a feature and then after using it, deciding that we don't like it. This makes a better game. However, optimizing code that gets removed really doesn't get us anything.
 
Keeping the frame rate high is a different story. It definitely does waste time, but the advantages we get are very valuable. When the game is always at 30 frames per second, the artists know what the performance impact of their art is. If they add something with too many polygons, the frame rate slows down and they can see this immediately. If the game was running at 5 frames per second normally, they might not notice their art had too many polygons. This way artists can optimize art in the game. One time I saw one of our artist tweaking the number of billboard polygons in grass areas so the he could get as many as possible without lowering the frame rate. You make a better game when artists can do things like that.
 
The first thing to do when you start optimizing is to find the bottleneck. Normally there is one thing that is really slow. With a graphical game this can be:
  • GPU: Vertex bound (Too many complicated polygons)
  • GPU: Pixel bound (Too many complicated pixels)
  • CPU: Driver Bound (Too many batches)
  • CPU: Game Code
In our game we tend to have a balance where all these things are normally right on the edge of being a performance issue. When the frame rate dips it's usually because one thing changed and caused the slow down. It a few minutes to find the culprit.
 
The first thing we do is to find a reproducible slow case. I see people try to optimize all the time without doing this and they just get nowhere. Without a reproducible case, optimizing is like shooting in the dark. You need to be able to see the problem to fix it.
 
Now we determine if it's a CPU or GPU problem. This is easy. We look at the CPU utilization. If it's 100% (or 50% on hyper-threaded machines) then the problem is CPU, otherwise it's the GPU.
 
If we determine the issue is with the GPU, they next few steps are annoying. It takes a little trial and error. GPU's don't give you enough debugging information. Hopefully in the future the GPU vendors will put performance meters on their pixel and vertex pipelines so you can see exactly what is slow, but for now we have do some voodoo and guess. First thing to do is change the resolution to something very small. 640x480 usually works because it's small enough and we can still read our on screen performance numbers. If the frame rate goes up dramatically when we do this, then we are pixel bound. We need to fix overdraw or turn off so many per-pixel lights or something. If the rate doesn't go up when we shrink the screen, then we are vertex bound. We need to get rid of some polygons or something.
 
If we are CPU bound we need to figure out if it's the driver or our code. One way we do this is to put the game in "null render" mode. In this mode all the game and graphics code run, but we don't call the graphics API. If switching to null render mode speeds the game up significantly, then we have too many graphics batches or we are changing too much render state or something. If null render mode doesn't speed up the game then we are happy because we are bound by our code and that is easy to fix. We run VTune and it usually show us the functions that we are calling too much.
 

Monday, February 07, 2005

The Food Months

Every month I change my diet. I give myself a rule and try to follow it. This month is "no salty snacks" month. Last night my girlfriend was eating popcorn and I was jealous because I couldn't have any. I usually find that I eat more interesting food because of the restrictions on my diet. Some months I try to find a rule that eliminates a food that I ate too much of the month before. Other months I just try to find an interesting eating idea.
 
The worst month by far was "eat breakfast" month. Oh, was that painful. There are all these people that told me that people who eat breakfast weight less. Now this is very different from eating breakfast to lose weight. All those skinny people that eat breakfast must have to do that because their metabolism is so fast they need more food. Me? I put on 5 pounds in two week. It was terrible. I've never done anything in my life that was so fattening. Well I spend the second have of the month eating "100% bran" cereal because it is the lowest calorie breakfast I could find. The cereal is actually not as bad as it sounds. Well, it's not very good either.
 
One of my more interesting months was "eat fish every day" month. Now I like fish but both of the people that I live with including my girlfriend dislike fish so I normally don't end up eating it a whole lot. That month I had 20 different kinds of fish including a number of which I had never eaten before. I had tilapia, blue cod, swordfish, snapper, haddock, and salmon just to name a few. I cooked fish a few times and even fed it to my housemates, but I mostly ate out because that way people around didn't have to suffer through fish month.
 
Usually the people around me are good sports and do the month a little with me. Like when I had "no pizza" month, my housemates didn't order pizza. That was a sad month since pizza is so good. But worse was "no cheese" month. That month also eliminated pizza, but also tried to remove burritos. Little did it know that you always order a burrito without cheese. Most restaurants were actually very reasonable with no cheese month because so many people are lactose intolerant so they understand when people ask for food with no cheese.
 
Another interesting month was "1800 calories a day" month. I was trying to lose a little weight. Now 1800 calories isn't like a super diet, but it's a reasonable amount of food if you are careful not to over do anything. I actually enjoyed that month because I learn a lot more about the foods that I eat. I had too look up the calories for everything. It's actually hard to find the calories for restaurant and take out food, so I had to guess sometimes. Sandwiches with no mayo/no cheese are actually very reasonable. And burritos with no sour cream/no cheese are ok too. I lost 7 pounds that month and was the lightest I had been since college.
 
This month is a double month. I'm doing "no salty snacks" and "write a 500 word blog each day". This goes with my philosophy that you can do anything you want in the world for a month. So far this month is going pretty well.
 

Sunday, February 06, 2005

You Can Do Anything For a Month

An old co-worker of mine, Joe, was having terrible time with relationships. He was married for a few years and got a divorce. And it was a really bad divorce. California has a law that basically states that when you get divorced the amount of money that one party has to pay the other is based on the earnings that each made in the previous year. Well, Joe was a software consultant and had an awesome year right before he got his divorce. So he ended up paying his ex-wife an enormous amount of money each month. He actually had to lengthen the payout period by a few years because he wasn't making enough money anymore to pay her. Now she wasn't exactly a poor lost helpless woman. No, she was a well-to-do software engineer pulling in the dough. The alimony check each month wasn't needed for her to start a new life or anything. It was a stab at the heart of her ex-husband. Ouch. Divorce sucks.
 
Well, Joe didn't really want this to happen to himself again. He wanted to find somebody that he was really compatible with. When I met Joe he had been dating a girl for a few months. When people asked him if he was going to marry her, he said that he didn't know yet. He said that when you date somebody they can pretend to be somebody that you want them to be and not really who they are. Now you can pretend to be somebody very different for a short period of time or you can pretend to be somebody a little different for a long period of time, but you can't be somebody you aren't forever.
 
Give me a minute to describe another person. His name is Ben and he's a weightlifter. He's actually quite a health nut and, well, a nut in general too. Ben and I met each other on a backpacking trip through some mutual friends. When you are backpacking you have time to talk with people and I learned much about Ben hiking along the trails. He spent a lot of time thinking about his diet. Not diet like the kind where you don't eat enough food, but the kind of diet that a weightlifter has to be healthy. His diet was very interesting. I didn't figure out all the details exactly but two of his rules were:
  • He didn't eat melted cheese
  • He only ate whole wheat
I was kinda of fascinated by this diet because it was a little of the wall, just like Ben. I wanted to try it. But this diet has a problem. You can't eat pizza. So I came up with a little idea that combined Ben and Joe's ideas. I did Ben's diet for a month and you know what? It stuck.
 
Well, the eating differently for month part stuck. Ben's diet was a little too restrictive to do longer. So each month I pick something different to eat or not to eat. I've been doing this for about a year and a half now. This month is "no salty snacks" month. Last month was "eat fish every day". I find that it makes me eat more interesting things because I don't get stuck in so many food ruts. I'll blog more about some of the interesting months tomorrow.
 

Saturday, February 05, 2005

Is This Fine Art?

I did a little photography project yesterday. I look a picture of some tulips with a water splat:
 
Tulips
 
Do you like it?
 
I showed this picture to my friend, Calvin, and he was impressed. It took him a while to figure out exactly what  he was looking at. And he ask me how I got the water to do that. I told him that I threw the water in the air with a table spoon measure and took the picture. Well, actually I ending up throwing about two cups of water one tablespoon at a time and took about 220 photographs. This picture is two of them Photoshopped together.
 
Do you still like this picture?
 
Can I use Photoshop? Is that ok? I don't think it is. Even though Calvin is a pretty liberal guy, he was offended at the use of Photoshop to digitally manipulate a scene. There is just something wrong with Photoshop. It's like cheating. It's not real. You can't make art with Photoshop.
 
I was actually delighted to hear Calvin say that. I makes me feel a little more like an artist. You see, just last week I went to the Roy Lichtenstein exhibit at the San Francisco Museum of Modern Art. You know, the guy that did the comic book type pictures:
 
Roy Lichtenstein
 
I didn't like Roy Lichtenstein's work before I saw his exhibit. It didn't really look like fine art to me. At the exhibit I saw lots more of his pictures and learn about his motives. I'm not going to explain it all here, but it's definitely worth your time to go to an exhibit or read a book about him. He's one of my favorite artists now.
 
One of the things that makes Lichtenstein a great artist is that when you first look at his work you quickly dismiss it. I'm not totally sure why, but this is key characteristic in good fine art. This leads to "Tod's Rule To Understand Fine Art":
 
If you like a picture the first time you see it, it's probably not fine art.
 
Most now-accepted modern fine artist's work was originally not well liked. Picasso is a perfect example. Only after his death did people fully appreciate his work. So that's why I was delighted to hear that Calvin didn't accept my picture. It makes me feel like I'm going in the right direction with my photography towards making fine art.
 
I have a prediction to make for you aspiring artists out there. The big fine art movement of this decade is going to be Photoshopped works. So take your work and manipulate it with Photoshop to offend the people. Then after you die, your work will be appreciated. (And if it isn't, you won't know because you are dead.)
 
Ok, back to my photo. Does anyone else out there take pictures of water? I have some technical problems. I first tried dropping the water and I couldn't get it not have motion blur. I exposed the shot for 1/8000 of a second, but it still blurred just a little which totally wrecked the image. So I started throwing the water and taking the picture at the top of the arc. This works ok but it really inconsistent. I need a way to throw a table spoon of water and have it stay together and hit the top of it's arc in a reasonably consistent place. My thought is to use a garden hose and put the arc of water right where I want it. Then block the flow of water to shoot tablespoon sized chucks of water. I think this could work, but everything would get wet. Probably not a good idea to do that in my dining room. My other thought is to use a flash. I'll probably try both of these ideas and see how they work out.

Friday, February 04, 2005

You Can Write A Novel

I'm trying an experiment this month and you are my unwilling subject. Well, ok, the blog is my unwilling subject and you are reading it. I wrote about why I blog a little bit back, but this month I'm going overboard. You see there was NPR story about writing a novel. The premises was that you can right a novel in November even with your job, kids, and everything else. It's easy. All you need to do is write 3000 words a day and at the end of the month you will have a novel.
 
So a bunch of NPR listeners were inspired and actually did this. Now these weren't professional writers. They were just ordinary people like you and me. Well, I actually put myself well below normal when it comes to writing. I hate writing. I was paranoid of writing in college so much that I completely designed my class schedule around minimizing writing classes. I took music as a minor to fulfill requirements because it didn't involve writing. And, of course, my major was computer science which pretty much only involved writing code (MMMmmm... code). After my freshman year when I had no control over my courses, I managed to get away with only writing two essays over one page in length.
 
Although I didn't realize it at the time, this was a big mistake in my life. Writing is really important. Every good job involves writing. Writing is a very important skill to advance your career. If I have a good idea at work that I want to get implemented, I need to convince other people that it's a good idea. If I were a full time game designer, this would be the most important job skill. Being creative, intelligent, and diligent would all take second place to communicate skills as a designer. This is little less true for programmers, but communication skills are definitely one of the things that differentiates the best from the worst. And writing is a very important communication skill. Ok, back to my NPR story...
 
So after a month a lot of these people had novels. Now I suspect these weren't good novels but many of them had a very interesting thing to say about the experiment. The first week was difficult and it took them a long time to write 3000 words. After about 7 days though it started to quickly get easier for them. And by the end it was a quick and enjoyable activity. One person said he'd get up and write in the morning before the day really started. Once he got in the habit of doing this it got really easy.
 
So this month I'm doing a very similar thing, but I'm setting the bar way lower. I'm writing a 500 word blog everyday. Today is day four. I'm recording my time to see if I improve. I'm actually amazed at how soon my writing has gotten faster. He's my track record so far:
 
2/1: 150+ minutes. 701 words. 4.6 words/min.
2/2: 70 minutes. 504 words. 7.2 words/min.
2/3: 67 minutes. 615 words. 9.2 words/min.
2/4: I'll fill this in just before I'm done... 37 minutes. 579 words. 15.6 words/min. Wow!
 
I think that's pretty amazing. Each day I get up and make coffee then head off to my office to write a blog before work. And each day so far it's gotten faster and more enjoyable. I'm shooting for 20 words / minute by the time I'm done. Wish me luck.
 

Thursday, February 03, 2005

Physics of Camera Sensors

The last few days I've been writing about camera sensors (EF-S Mount, 1.6x Zoom). There is a pretty important point that I haven't touched on yet. It is:
 
You always want more light to hit your sensor.
 
Fundamentally the quality of the image is limited by the number of photons that hit the sensor. Now photons are really small so they have no problem fitting through the lens, but there are a few things that get in their way. The glass in the lens and the diaphragm block some of the photons. This is measured by the f-stop value. A good heavy lens will have a lower minimum f-stop value which means more light gets through. These lenses have large glass elements and also higher quality glass. You can also pick the amount of light that gets through the diaphragm. Closing the diaphragm increases the depth of field, but at the cost of image quality. To compensate you need to change something else to get more photons to hit the sensor.
 
The distance and brightness of the subject also effect the amount of light. Brighter subjects have more photons coming off them which is good for image quality. Subjects that are farther away need to be brighter (or larger) because the number of photon that happen to enter your camera decreases rapidly as you get farther away. You can imagine a single photon coming off the subject in a random direction. It is much more likely to hit the sensor when the camera is really close than really far away.
 
The other really important factor is the time of the exposure. More time means more photons. This number is linear so if your exposure is twice as long you get twice as many photons. However long exposure can cause things to blur. Moving subjects and camera shake will blur the image. There is a really delicate balance between time and aperture to get the best depth of field, best blur, and best image quality. Fortunately for me my digital camera is smart and figures out the balance for me. I could put it in full manual mode, but I'd rather think about the framing and other creative aspects than setting the aperture/time ratio correctly.
 
There is another value in digital cameras that effects image quality. It's called the ISO setting. The name is left over from film photography where it mean something completely different, but has a similar effect. The ISO setting in digital cameras changes the amplification boost when reading the image sensor. This is just some stupid thing you have to do because sensors suck. You see, you need to guess the number of photons that hit your sensor in order to read it. In low light conditions you can increase the ISO setting which makes the camera read more details from the sensor. This is just a detail with the current sensor technology more than a fundamental light issue. However, back in reality this is a really important number when taking pictures and I wish the stupid engineers added a new switch and display for it. On my camera you can't see or change the value unless you take your eyes out of the view finder and press an button to display it on the exterior LCD.
 
As I've written this I've realized that the original point I was going to make isn't really true. I was going to say that you always want a bigger sensor so that more light hits it. After thinking about it more thought, more photons aren't going to hit a bigger sensor. If everything else stays the same but you magnify the image on the sensor, you get the same number of photons that are just spread out a little farther. You know what... I think full frame sensors are doomed. There isn't a strong physical reason why they need to be so big.
 
 

Wednesday, February 02, 2005

The Amazing 1.6x "Zoom"

Canon has made a brilliant marketing decision to sell cameras with APS-C sized image sensors. These amazing sensors take your existing lenses and make them zoom in 1.6x closer! Imagine you own a $1140 Canon EF 300mm f/4 L IS USM Super Telephoto lens. Believe it or not, it effectively makes it a $5500 Canon EF 500mm f/4.0 L IS USM Super Telephoto Lens. Wow!
 
Well, you shouldn't believe it. It's only partially true. If you were to compare a full frame camera to a APS-C camera you'd see that the image is identical to taking the large image and cropping it. You could easily do this operation in Photoshop. So 1.6x zoom is more appropriately called a 1.6x crop factor. Even so, there are some practical reasons why this is better. In reality, you're not planning on cropping an image from the start. You look through the view finder and that is the image you want. It can be hard to visualize the crop when you are in the heat of the creative moment. In this case you actually want the image zoomed in more and that would be better.
 
You can actually do this. It's called Digital Zoom on most consumer digicams. I'm not sure why they don't put it on DSLR's. It would only be a software change. Although the technical size of me thinks this is stupid because all you are doing is throwing away information, the creative side of me sometimes is happier with the image being closer. And, ah, hey technical size of me, the image written to the flash is smaller with the crop so you aren't wasting flash space with pixels that you are just going to throw away.
 
If you were in a store and had to pick between a APS-C camera and a full frame camera which would you choose? The full frame. No question unless the price or some other decision changed your mind. And recently, the price changed my mind. I couldn't justify 5x the price for the full frame Canon EOS 1Ds Mark II so I went with the Canon EOS 20D.
 
The cost of semiconductors follows Moore's Law which states that every 18 months the performance will double. Since sensors are semiconductors made on silicon wafers just like Pentiums this law holds for them too. Let's look at why this is a little misleading. If you make a 8 megapixel sensor today in 18 months you'll be able to make it for half the price. This cheaper sensor will be smaller. Hold a sec. You don't want smaller. You want a full frame sensor. So what you get instead in 18 months is a sensor for the same price, but with 16 megapixels. This is nice, but the price of the sensor isn't going down. So if you're trying to make a $800 camera, you are still going to have to put a smaller sensor in it. Non-profession DSLR cameras are going to have these smaller sensors for a while.