1. Try a completely functional language like Haskell once to learn about side-effects.
2. If you do multi threading: Look into Immutability and communicating sequential processes
3. Use static analysis / linters / code checkers for every language you use. They provide a lot of tips. There are linters for bash and Dockerfiles as well.