9 ms·
> Readability counts. In some fields, it counts more than anything. I've worked in about 10 languages now over the last 20 years, and Python is still the easies
by zozbot234 5y ago
> Readability counts. In some fields, it counts more than anything. I've worked in about 10 languages now over the last 20 years, and Python is still the easiest to read when you come back to some old code or have to pick up code for a small job, or hand it to a beginner to extend without having them create an unreadable mess. This is what scientists need to do all the time.
Meh. Python might be readable at the smallest scale, but then COBOL is even more readable. What matters is large-scale development, and your implied point that large Python projects turn into unstructured big-ball-of-mud monstrosities is well taken. A big ball of mud is not surveyable, or "readable".
Which is where other modern languages (e.g. Julia in the scientific programming domain, heck even Go or Rust) will probably have an advantage.
- iainctduncan 5y agothink what you will, the scientists disagree. Which was the point. Not holding my breath to find many scientists matching my description who would rather learn Go or Rust...
- shpongled 5y agoI'll be the counter example. PhD in life sciences, but I've also been programming since I was a teen. Rust is by far my most used language for both general fun projects and in my role as a programmer in the life-sciences. Python is OK for ad-hoc analyses, but I cannot stand to use dynamically typed languages for anything "real" given how much difficulty dynamic typing imposes on reading and understanding code.
- iainctduncan 5y agoSure, but by your description, you aren't really the people I'm describing. If you've been doing this since you were a teen, you're a "Real Programmer". My point was that people who have to do this as item 7 of 10 things in their job description are very much less likely to learn something like Rust than Python. That is undeniably a bigger lift to a non-programmer. Python's success in the sciences is in large part due to how good a fit as a language it is for part-time occasional programmers. I like all kinds of languages, but the only ones I would encourage my partner to bother with as tools for her science work would be R and Python.
- IshKebab 5y agoI don't think the scientists disagree. They just don't really care if their code is a big ball of mud.
- zozbot234 5y agoThey might even care, they just don't know any better. When the typical scientist "learns to code", there's no one around telling them how to do proper software engineering. At best, they engage in the polite fiction that it just doesn't matter, because all that code is inherently "throwaway" stuff that's only used for playing with in the context of research. Of course even that is wrong, the code doesn't really disappear like that.
- iainctduncan 5y agoNo. Scientists are smart people. It's not that they don't care or don't know better, it's that they have different priorities. Every scientist I know is smart enough to be well aware that they don't have the know how for proper software engineering, but they also do not have the time or resources to learn to write code the way you would for a long term product. I would not be patronizing to these people, they are very smart. They just live and work in a world that is completely different from technical product firms in pretty much every regard.
- zozbot234 5y agoYou're just rephrasing the "throwaway code" polite fiction. Increasingly, publishable-quality research is expected to be publically reproducible, and that means the code must stay around, potentially in the "long term". Every scientist loves it when their research gets cited a lot, right? Well, those citations become worthless if you can't reproduce the research because the code is an unsurveyable mess relying on bitrotted, unsupported external components.
- icedchai 5y agoSome of the best code I’ve worked on has been python. Unfortunately, also some of the worst. 5000 line, single file “modules”, with spaghetti class hierarchies (5+ levels deep) and dynamic method calls making it nearly impossible to debug.
- bigbillheck 5y ago> What matters is large-scale development, Not for the kind of computing being talked about.
- zozbot234 5y agoIn a relatively terse language like Python, anything beyond a few screenfuls of code is already "large scale" development. It's unwise to keep it all in a single module.