I've met programmers who didn't understand functions. Pretty well everything was one giant code block. He also didn't understand the need for compiler warnings and switched them all off.
Come to think of it, I refactored some code from a guy who didn't understand procs. He just cut & pasted code 'snippets' (a snippet being about a screenful) a couple of hundred times.
During my first few years as a professional I worked on COBOL systems. COBOL doesn’t have functions, only procedures (no parameters, no return values, everything come from the global state). People were writing horrible programs made of one giant procedure that would go for thousands of lines and crazy level of indentation.
Everything was done through a small terminal emulator for AS400, 24x80 characters. Every programs were copy pasted from other places.
I eventually found a way to transfer the file out via FTP then upload it back that way I could at least use vim and see what I was writing but I was alone doing that.
I’ve been reprimanded after documenting my code via comments because I was using some vertical space that should have been instead reserved to code (when you only have 24 lines at a time, people become really petty about things).
I suspect some of these programming habits might have come from working on MATLAB. I think experience with MATLAB could be considered positively harmfull:- and it fosters a mentality of quickly thrashing out a piece of code with hardly any thought of structuring it into a systematic organized manner.
Hopefully adoption of python based tooling in many fields could help alleviate this in coming years..
Come to think of it, I refactored some code from a guy who didn't understand procs. He just cut & pasted code 'snippets' (a snippet being about a screenful) a couple of hundred times.
I find it difficult to understand such people.