Code Smells

What code smells do you look for in a project? Here are a few I’ve seen recently:

  • Crazy compiler flags. eg -O6 when the compiler only goes up to -O3.
  • Warnings during build.
  • Missing ./configure, you can get away with this if your project is small. if it’s more than one .c file you probably want one.
  • Programs that ask you questions about how to compile the program. How am I supposed to automate this for packaging?
  • Fails to build (!)
  • Unnecessary code (particular casts). This suggests that the programmer doesn’t actually understand what they are doing.
  • Creating your own protocol/fileformat/convention/library for doing things when there are perfectly good systems already in place. A mail system that doesn’t speak SMTP?
  • The directory layout. Does it untar into one large directory? Does the src go in it’s own directory? is the src broken up into libraries/plugins in their own directories?
  • Support for only one db (usually mysql). You obviously don’t understand SQL if you can’t write a program that uses
  • No obvious ChangeLog.
  • No publically available RCS.
  • Random undocumented constants.
  • One Response to “Code Smells”

    1. kinko Says:

      you forgot “requires xmkmf”. *shudder*