Archive for February, 2010

Crossstiches

Monday, February 22nd, 2010

Someone showed me her cross stitches today. She said there are millions of website where you can buy cross stitches images and samples.
Some of them are a representation of a photo or a realistic artwork. But some are also more schematic.
I am not sure about the legal issues here, but I would think that the cross stitches samples may be a really good source for pixel art.

What do you think?

Ground Truth

Friday, February 12th, 2010

When you are in a position that you don’t know if your code is the faulty one or the bug is somewhere else. Sometimes you can just use another program that you know is working and use it to verify where the bug is at.

An example. Say you have written code to load a BMP file format. You use your program, but the image has some weird artifacts. Is it a bug in your code? Or is it a corrupted BMP file?
You can simply load the same BMP file with another program such as window’s paint, and see if it loads properly or if paint is having problems with this file as well. If paint loads the BMP file properly, the bug might be in your code.

I have given the BMP file format as an example, but this is true to many other fields where you have some tool you know is working right. It is kind of similar to the Bug negative verification.

Don’t make sense

Wednesday, February 3rd, 2010

Making sense isn’t always good. I was debugging some code and printed some number on the screen. The number had weird initialized values, so I rationalized why these values are not 0 at the beginning.
Bottom line, I just forgot to initialize the debug variable so I had garbage values.

I think it’s a common trait of humans to try rationalize everything. Sometimes they are so convinced at something and the logic behind it, even though it has no basis or it is even something that can’t make sense.

Does it happen to you too?