December 12th, 2007
- Consistency breeds ease of use. Even if your buttons do some weird thing, as long as they all do the same weird thing users will eventually figure it out. Make the buttons each behave differently, however, and the user is lost forever.
- Sort data the way it is most likely to be used. The logical sort order for a date is chronological, not alphabetical.
- When in doubt, the default option should be the least destructive \ most undoable choice.
- If you have to write an explanation of your code, never assume that the reader has read the same papers you have, unless you told them what else to read–and where to find it–first.
- Wrong code comments are worse than no code comments.
- “Copy and paste” errors happen to everyone. Be on the look out for them.
- If a bug disappears in debug mode, 90% of the time it will be one of two things: 1) you are overflowing memory or 2) you have a thread race condition. At least two thirds of the time, it will be a memory overflow. It is extremely unlikely it is problem with the compiler.
- Releasing your program compiled in “debug mode” is not an acceptable “fix”. The bug only looks like its gone… it’s still there, and can come back to bite you at any time. Don’t do it, no matter how tempting it might seem.
- If the program crashes on exit, you probably freed something you didn’t properly allocate, or that isn’t allocated anymore.
- Leaking memory is bad. Freeing pointers or objects that don’t belong to you is worse. If an object you expect to be free is still hanging around, don’t force it, find out why… “fixing” bugs by patching the symptoms and not the cause makes the code much harder to repair in the long run.
- If you have an intermittent bug, and your “fix” made it go away and you don’t know why, the bug is almost certainly still there. If you can’t explain it, you didn’t fix it.
- Good documentation is more important than more features. Write it down, even if it’s just a simple “readme.txt” file… the next person who has to work with your stuff will appreciate it!
More tips? Ideas you would recommend? Post a comment!
Tags: bug tracking, bugs, c++, crash, debug, debugging, memory, programming, tip, ui, user interface
Posted in Code Snippets, General | Comments Off on One Dozen Easy C++ Programming Tips
December 9th, 2007
From a Zen Kōan:
Gyosan asked Isan, “If a million objects come to you, what should you do?” Isan answered, “A green object is not yellow. A long object is not short. Each object manages its own fate. Why should I interfere with them?” Gyosan bowed in homage.
It’s good advice for programming multi-core, too.
Tags: c++, computer programming, multicore, multithreading, programming, zen koan
Posted in Code Snippets, General | Comments Off on A Million Objects
December 8th, 2007
This plugin exports your AC3D file into NMF format, the native input format of the ATI NormalMapper utility. NormalMapper allows you to generate normal maps, bent normals and ambient occlusion maps suitable for use in video games and other realtime 3D applications.
If you aren’t familiar with normal maps, normal maps are a way to make your low-polygon model look more detailed by encoding surface information from a high-polygon version of the same model into a texture map. Ben Cloward has an excellent tutorial where you can learn more.
This plug-in requires the free NormalMapper utility available from AMD in order to process the output files. The companion NormalMapperUI (Stand Alone) available at the same location is also helpful, but not required.
Download the plugin. (Requires Windows XP, AC3D 6.2 or above.)

Tags: ac3d, ambient occlusion, ati, bump mapping, cg, cgi, computer games, computer graphics, melody, normal mapping, normalmapper, parallax mapping, realtime 3d, realtime rendering, rendering, video games
Posted in General, Tools and Plugins | 2 Comments »
December 6th, 2007
This plugin “bakes” a texture from one object to another, allowing you to transfer texture data between two models with the same geometry but different texture coordinates–without having to re-paint the texture bitmap! This is useful if you start to paint a texture, and change your mind later about the UV map; or for games when you can’t change the layout of the map for technical reasons, but would like different UVs for convenience during painting. It’s also good for fitting text onto a warped surface or other projections that would be difficult or impossible to paint by hand.
Download the plugin. (Requires Windows XP, AC3D 6.2 or above.)

Tags: 3d, ac3d, AC3D plug-ins, bake, cg, cgi, graphics, plug ins, programming, texture baking, texture map, tools, uv map
Posted in General, Tools and Plugins | Comments Off on AC3D Plugin: Bake Texture Layout
December 6th, 2007
Well, Pivot finally died on me. Please don’t mind any broken links in the next couple of days while I get moved over to WordPress. Thanks!!
Posted in General | Comments Off on Pardon Our Dust