3 ms·
Most of the bad habits stem from how C is taught. It should not be the first language freshmen are taught in universities. All the effort will be wasted on tea
by anilakar 3y ago
Most of the bad habits stem from how C is taught.
It should not be the first language freshmen are taught in universities. All the effort will be wasted on teaching basic programming instead of the actual language and good programming habits.
Pointers and the memory model are core concepts and should be taught early on. The worst programming books I have seen introduce them in the very last chapter, often called "advanced language features" or something similar.
It is not a compiled scripting language for Unix systems either and should not be programmed with a text editor on a remote machine. The programmer should have a proper development environment installed locally.
Valgrind and and Clang's sanitizers should be used extensively. There is no such thing as partial credit when it comes to memory correctness.
If a certain QuakeNet IRCop is reading this, thank you. Your uni C course managed to avoid all the pitfalls above.
- pif 3y ago> should not be programmed with a text editor on a remote machine. The programmer should have a proper development environment installed locally. "should not", "They should have" ... well, it had to! And they didn't have. There is no point in trying to forget where C comes from.