I'm working in a corporate environment where the mindset is hugely dominated by people who started programming with COBOL IMS and CICS. Today most of them program with more modern languages like Java. But If you look at their code and design decisions not much has changed
- methods many screens long
- a huge amount of global variables or their modern incarnation the singleton pattern
- about 30 variable definitions at the start of the method
- globals instead of parameters
- instead of using a factory method a huge switch statement
- misusing of database table columns because "there was enough space left"
- ...
These people are not dumb most of them are very smart. But explaining to them modern coding practices feels like describing colors to a blind man. Do you have any experience or tips to teach them a more modern approach without affronting them?