Bash Usage Surpasses TypeScript, But Code Quality Lags

View profile for Gary Dean

Senior Consultant/Executive Chairman @ Okusi Associates | Open Technology Advocate, Anthropologist

Bash is the fifth most-used programming language in the world. >49% of developers use it actively -- ahead of TypeScript. And 80% of the Bash code on GitHub is absolute garbage. Not my word: ACM, 2022, 1.35 million scripts analysed. Quoting failures, word-splitting errors, missing error handling. Schoolboy errors across millions of repositories. We are talking about the language that runs on 96.3% of the world's top million web servers. The language in every CI/CD pipeline, every container entrypoint, every deployment workflow. Treated like a weekend hack. See my full rant in first comment -- with the data, the bad tutorials, and some bad language. #Bash #DevOps #ShellScripting #SoftwareEngineering #Linux

  • logo
Gary Dean

Senior Consultant/Executive Chairman @ Okusi Associates | Open Technology Advocate, Anthropologist

2w

And the reason why 80% bash code is garbage is that bash is garbage on its own. Like with most popular technologies, people use them not because they're good, but because they're popular.

I've used Bash almost every day for nearly 30 years, and as a programming language, it's hot garbage. It's also like black mold ... it spreads! I've tried to force myself to abide by a rule, that once my shell script gets longer than 150 lines, I turn it into a CLI app in Python or Typescript, but even with something like ZX (https://github.com/google/zx), nothing handles stringing together unix apps like Bash.

Like
Reply

Bash is there and its easy to use, so people tend to write something that works and leave it at it. I always suggest to people to write in python and wrap it with bash for minimal things.

back in the day there were no good ide's for bash. if all you had was bash, you probably needed vi/emacs/nano. even today it's kate and gedit. which have improved a lot tbf.

Bash is designed for routine so almost everything is garbage

thanks for the toolbox at the end of the rant. Though the link to shfmt seems wrong, it seems it is inside the project "sh" from the same author ? https://github.com/mvdan/sh/tree/master/cmd/shfmt

Not common to see someone writing about bash, Gary Dean ! Thanks 👍

I've been using bash scripts for many years, but never thought of it as a programming language. For me, it is more like a scripting language for linking different components. A programming language should have an ecosystem - extra libraries, frameworks, etc.

Rizary ®️

AI | 🦀 | Web3 | Embracing Sharia-Compliant Innovation

2w

You should read bash bible, it's a must have.

Like
Reply
See more comments

To view or add a comment, sign in

Explore content categories