Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to transform COBOL programmers into modern day programmers [closed]

Tags:

cobol

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?

like image 379
tobidope Avatar asked Jul 09 '09 17:07

tobidope


2 Answers

The best way to learn how code should look is to read good code. Try to set an example with your own coding style and gently point out their mistakes during code reviews. It's essentially just a matter of perspective; like the saying goes, if the only tool you've got is a hammer, every problem looks like a nail. These programmers view everything in terms of the languages they have experience in, and so even when writing Java, their thought process is in COBOL. Their coding style is merely a reflection of their thought process.

Barring that, have everyone read Code Complete.

like image 79
mandaleeka Avatar answered Oct 27 '22 08:10

mandaleeka


Buy them a copy of "Code Complete" and have them write a book report.

like image 32
dr. Avatar answered Oct 27 '22 08:10

dr.