The exceptional beauty of Doom 3’s source code

“I was really excited to write this article, because it gave me an excuse to really think about what beautiful code is. I still don’t think I know, and maybe it’s entirely subjective. I do think the two biggest things, for me at least, are stylistic indenting and maximum const-ness. A lot of the stylistic choices are definitely my personal preferences, and I’m sure other programmers will have different opinions. I think the choice of what style to use is up to whoever has to read and write the code, but I certainly think it’s something worth thinking about. I would suggest everyone look at the Doom 3 source code because I think it exemplifies beautiful code, as a complete package: from system design down to how to tab space the characters.” John Carmack himself replies in the comments.

68 Comments

  1. 2013-01-15 10:33 pm
    • 2013-01-15 11:32 pm
      • 2013-01-16 3:38 am
      • 2013-01-16 7:16 am
      • 2013-01-16 10:58 am
      • 2013-01-16 4:40 pm
    • 2013-01-15 11:47 pm
    • 2013-01-15 11:57 pm
      • 2013-01-16 12:07 am
        • 2013-01-16 6:28 am
      • 2013-01-16 12:43 am
      • 2013-01-16 10:04 am
    • 2013-01-16 12:02 am
    • 2013-01-16 12:02 am
      • 2013-01-16 1:25 am
        • 2013-01-16 2:22 am
          • 2013-01-16 9:57 am
          • 2013-01-16 3:58 pm
          • 2013-01-16 4:32 pm
        • 2013-01-16 2:54 am
          • 2013-01-16 3:44 am
          • 2013-01-16 3:30 pm
          • 2013-01-16 4:02 pm
        • 2013-01-16 9:16 am
        • 2013-01-16 6:33 pm
          • 2013-01-17 5:39 pm
    • 2013-01-16 10:39 am
      • 2013-01-16 12:09 pm
        • 2013-01-16 12:31 pm
          • 2013-01-16 12:37 pm
          • 2013-01-16 1:53 pm
          • 2013-01-16 2:01 pm
          • 2013-01-16 2:19 pm
          • 2013-01-16 2:40 pm
          • 2013-01-16 3:01 pm
          • 2013-01-16 7:32 pm
          • 2013-01-16 8:32 pm
          • 2013-01-16 8:42 pm
          • 2013-01-16 4:01 pm
          • 2013-01-16 4:13 pm
          • 2013-01-16 7:44 pm
          • 2013-01-16 4:14 pm
          • 2013-01-19 3:27 pm
          • 2013-01-19 9:36 pm
      • 2013-01-16 1:15 pm
        • 2013-01-16 4:05 pm
        • 2013-01-16 4:38 pm
          • 2013-01-16 4:43 pm
          • 2013-01-16 4:48 pm
          • 2013-01-16 5:01 pm
          • 2013-01-16 5:27 pm
          • 2013-01-16 6:52 pm
          • 2013-01-19 9:42 pm
          • 2013-01-16 5:24 pm
          • 2013-01-16 5:45 pm
          • 2013-01-16 6:24 pm
          • 2013-01-16 7:24 pm
          • 2013-01-18 1:59 pm
          • 2013-01-19 5:50 am
          • 2013-01-19 9:25 pm
          • 2013-01-18 1:47 pm
  2. 2013-01-16 1:04 pm
  3. 2013-01-16 3:04 pm
  4. 2013-01-16 4:11 pm
  5. 2013-01-16 10:35 pm
  6. 2013-01-16 10:44 pm
    • 2013-01-18 4:12 am
      • 2013-01-18 1:02 pm