Hacker News new | ask | show | jobs
by pmarreck 641 days ago
Try running a 6 month old Python project that you haven't run in that time and report back.

Meanwhile, 10 year old Bash scripts I've written still run unmodified.

Winner by a mile (from a software-longevity and low-maintenance perspective at least): Bash

2 comments

That’s a testament to your distribution/package manager’s stability, not to the language itself. I happen to write my scripts in Elixir (which is as fast-moving as Python 3), using a pinned version of it in a Nix flake at the root of my `~/bin` directory. Scripts from 5 years ago are still as reproducible as today’s.
Isn't compare a Python project to a Bash script an unfair comparison?

Compare a Python script to a Bash script. If your Python3 script (assuming no dependencies) doesn't work after 6 months I got some questions for you.

(And I don't really get how a 6 month old Python _project_ is likely to fail. I guess I'm just good at managing my dependencies?)

Unless you have pinned the exact version numbers in requirements.txt (which you should) or kept you conda/venv..etc around it might be hard. I know at this stage this would be too much compared to what we are talking about regarding python scripts but non-python dependencies are real painful.

I know that this is probably beyond bash scripting vs python scripting but I was just replying to how 6 months project can have problems.

Also not a 6 months scale but the python standard library definitely changes and I would take bash anytime if I have to use venv for running util scripts.

Edit: When python3.8 removed 'time.clock()' it was annoying to change that. I know that it was deprecated since 3.3 (as I remember) but this is the example I have in mind now. But probably it was before I was born that people using

start=$(date +%s%N)

end=$(date +%s%N)

And I will be dead before/if this becomes impossible to use.