I graduated in 1990 in Electrical Engineering and since then I have been in university, doing research in the field of DSP. To me programming is more a tool than a job.
If the language allows you, declare pre- and post-condition for your function and type invariants for your types. They are powerful bug traps. If a post-condition gets triggered when a function return, you have quite a strong hint about where the bug lies.
If the language allows you, declare pre- and post-condition for your function and type invariants for your types. They are powerful bug traps. If a post-condition gets triggered when a function return, you have quite a strong hint about where the bug lies.
could you provide a sample? and wouldn't those be considered side effects?