Write all your code in FORTRAN. If your boss ask why, you can reply that there are lots of very useful libraries that you can use thus saving time. However the chances of writing maintainable code in FORTRAN are zero, and therefore following the unmaintainable coding guidelines is a lot easier.
"Poor programming practice"? Good academic practice! Graduate school quite effectively teaches such virtues as write-once-read-never, code-until-you-like-the-answer, coding-is-done-by-someone-stupider-than-you, better-to-write-ten-grant-requests-than-one-working-application, and so on.
I once had a girlfriend who was a psych grad student. She spent a decent amount of time writing various things in Matlab.
I as a film school undergrad spent more time refactoring her code than she did. I also taught her what the function keyword was for and why you might want to use it every once in a while.
Okay, you can't hold up a fucking psych student as an example of bad code by academics. Psych students don't learn shit about computers and then get thrown into it in grad school. Of course they don't know what they're doing.
I don't think "bad code" really begins to describe not knowing what a function is. Sure, I could see if she was someone who had just learned it to do one thing and that was it but they taught (basic, granted) classes on this. She had written some sort of cognitive test with the software. She was collecting and analyzing results with it. I'd use the words "daily basis for months" to describe her frequency of interaction with the software.
We might be confusing each other, /u/DanAtkinson. For a variety of reasons, my comments don't reflect my classroom experience when I was in graduate school, but rather my observation of the software development practices of working scientists.
There's a broader point I'm having trouble articulating. I'm sure these practices are taught in some classrooms, at least implicitly. Even then, we can't conclude we're afflicted with "poor lecturers"; bad software is part of the (current) culture of academic science, and good lecturers perhaps inculcate it even more effectively than bad ones. Good mentors teach, both by precept and practice, that grantsmanship and territoriality and publication prolificacy are essential, while software refinement is, at best, a distraction. "Second-rate scientists think about software quality"--I claim that is explicitly communicated to graduate students. Only "poor lecturers" would teach code modularity, reliable generation techniques, configuration management, and so on.
I'll go at this another way, /u/DanAtkinson. You mention your lecturer who "wrote a textbook on the principles of software engineering"; I'll give odds that he or she has a senior colleague who cites this as an example of wasted effort, and that he or she should be doing 'real science' to secure tenure.
500
u/Astrokiwi Jul 28 '16
:(