Search code examples
mathesoteric-languages

What does 'pathological programming' refer to?


Does this term have a standard usage?

From Wikipedia:

In computer science, pathological has a slightly different sense with regard to the study of algorithms. Here, an input (or set of inputs) is said to be pathological if it causes atypical behavior from the algorithm

ScienceBlogs.com has a 'Pathological Programming' series, and I was wondering if this term has a broader meaning outside of that author's work.


Solution

  • I know it when I see it…

    Barring concrete examples, I'd say pathological is anything no sane programmer should seriously be doing. An attacker might be trying those things in order to find exploits somewhere (compiler, runtime, …). A programmer might be doing them for sports or fun, but knowing that this is nothing to do when delivering code for production use. A novice might use pathological programming styles due to a misunderstanding of how the language is designed.

    Compare this to pathological inputs. Some algorithms perform quite well in general, except in some situations which are usually irrelevant in real applications but which break the worst case behavior. Depending on your point of view, pathological inputs may either be rare enough to completely disregard them, or particularly problematic to focus on them. I'd assume the same to be true for pathological programming.