If those thoughts make their way into your code or the associated comments, you’re in good company. When undergraduate student Jan Strehmel from Kar

Do better coders swear more, or does C just do that to good programmers?

submited by
Style Pass
2023-03-14 20:00:18

If those thoughts make their way into your code or the associated comments, you’re in good company. When undergraduate student Jan Strehmel from Karlsruhe Institute of Technology analyzed open source code written in the programming language C, he found no shortage of obscenity. While that might be expected, Strehmel’s overall finding might not be: The average quality of code containing swears was significantly higher than the average quality of code that did not.

“The results are quite surprising!” Strehmel said. Programmers and scientists may have a lot of follow-up questions. Are the researchers sure there aren’t certain profanity-prone programmers skewing the results? What about other programming languages? And, most importantly, why would swears correlate with high-quality code? The work is ongoing, but even without all the answers, one thing’s for sure: Strehmel just wrote one hell of a bachelor’s thesis.

Strehmel’s supervisor, Bioinformatician Alexandros Stamatakis, started wondering how swears affect code quality after a lab member showed him a graph of the prevalence of swears in various versions of the code underlying Linux. Stamatakis realized he had the perfect tool for asking whether profanity correlates with the quality of code. A program called SoftWipe, developed by his lab, measures adherence to coding standards, such as the use of quality checks and a simple code structure.

Leave a Comment