Hacker News new | ask | show | jobs
by omginternets 3589 days ago
When my Ph.D is finally done (~3 months), I'll post some of the code I've had to work with daily for the past three years.

"Spaghetti" doesn't even begin to describe it. "Ball of yarn under a cat-lady's sofa" comes readily to mind, as does gouging my eyes out and amputating my fingers.

The problem isn't excel. The problem is scientists.

2 comments

The way I got people in my lab to start complying with some best practices is by linking everything back to bench top work. It would be unacceptable to run in vitro experiments the way people write software in science. You need to run controls (unit tests), you need to write your procedure down in your lab notebook (comments, version control) etc
During grad school, I found that MATLAB, in particular, lends itself to spaghettification.

I can think of a lot of reasons why that is, but the one-function-per-file and single flat directory structure of MATLAB programs is part of it.

Language quirks are another, but I could write an entire book about that.

>I found that MATLAB, in particular, lends itself to spaghettification.

How did you guess? ;)

I've been gently pointing people towards python for this exact reason. The younger generations need little convincing, but the old dogs would rather write the same shitty code.

I suppose change takes time.

Python has definitely been a much better way forward for my work!