How to write Fortran code with few bugs as possible and few debugging time as possible?

LFortran will fix that. See the recent post LFortran Minimum Viable Product (MVP)

I think there is no miracle: either you spend time writing tests, or you spend time debugging… In Test Driven Development the first solution is considered to be best and faster.

And an advantage of writing tests is that you can more easily optimize or refactor your code: if tests are OK you can feel quite confident that you have not broken your code. Of course you need well designed tests for that.

3 Likes