I frequently have to deal with source code written by students with basically no programming experience apart from the exercises they did during their studies. Unfortunately, I mostly have to finish and maintain projects which were not even discussed with me. Since the students do not have any experience, they do stupid things, so I end up rewriting most parts of the applications. While a lot of things are annoying, I hate the lack of documentation or bad documentation the most. However, other than that, here are a few things I have encountered:
- Use of an overload of libraries instead of simple Vanilla
- Hardcoded configuration and passwords
- Global variables which are exported to the whole application and changed in nontransparent ways (plus arbitrary structures, but without any documentation)
- Lazy solutions (I once saw a C# application print a screenshot of a window instead of writing to a pixel buffer, which resulted in lots of problems, like aliasing, pixelation and miss-alignments due to different system font-sizes)
- Bad variable names, which require a deep understanding of several pieces of the code
- No error handling at all (stuff like accessing an object in an array on an object in an array, with constant indices, without checking if one of them even exists)