Do you need to write code in your academic work? Have you read someone else’s code? Did you just get a code attachment with a warning like “this is a mess, I need to clean this up someday?”. Well, you are not alone. It seems that in the industry, telling someone that you plan to use code that comes straight from an academic makes them feel a drop of cold sweat down their backs.
American scientist has an article on these common practices that we have managed to avoid for so long.
I therefore started asking scientists how they wrote their programs. The answers were sobering. Whereas a few knew more than most of the commercial software developers I’d worked with, the overwhelming majority were still using ancient text editors like Vi and Notepad, sharing files with colleagues by emailing them around and testing by, well, actually, not testing their programs systematically at all.
I finally asked a friend who was pursuing a doctorate in particle physics why he insisted on doing everything the hard way. Why not use an integrated development environment with a symbolic debugger? Why not write unit tests? Why not use a version-control system? His answer was, “What’s a version-control system?”
The paper advocates the use of version-control, proper editors and IDEs, and unit testing. These three things are great practices, and in my experience we academics either don’t use them or had to learn them ‘on-the-wild’ after banging our heads on a wall. And it shows.
Our code could be tidier. The bad news is that this reputation seems not to be restricted to code tidiness.
The unqualified-reservations blog has a (long) post on how CS research in the academia is considered outside:
…anyone who’s not involved in CS research treats the products of this endeavor as if they were smallpox-infected blankets. Even when it is clearly – in my opinion – good, it winds up ignored. Because of the inescapable grant-related propaganda, it’s impossible to tell what’s good and what’s not.
The gist of his main point is that usefulness and relevance are almost inversely related to academic value. That gives academics the ‘freedom’ to write unmanageable code; as long as it produces a paper (and note that code is not provided with the paper) you are fine. A caricature: a guy invents a programming language (say python) that is used by millions included google. It has zero academic value. Another guy writes and obscure paper (or hundreds) on a topic that is irrelevant even to his mom. That second guy gets grant money, tenure. Sounds familiar?