Seems like today’s programmers are taught to create Rube Goldberg machines. That way they are the only ones who understand the code and have job security, or if they move on to another company charge outrageous consulting fees to fix the problems in their program they created.
Paulo Lourenco Robotics and embedded programming. Writing for a microprocessor requires that you understand that everything you do has an impact. A few clock cycles on a GHz processor are fast. But if you have a 50 kHz crystal, a routine that needs to run on each interrupt, and the interrupts arrives on average each 50 ms, you need to optimize code. Not because you want to, but because you can’t honor the requirements otherwise.
Malthe Høj-Sunesen I have programmed in similar fashion in university in the early 90s. I was just surprised this is still taught as recently as 2012 was all I meant. You would think those old compilers are just not available anymore, and C code is the bare minimum. Guess not.
I think I’ve worked with some people who learnt programming from that list.
For example, from the top of a ~5000 line .c file:
#include …
int d;
void theFirstFunction ()…
d is then used in multiple functions in the file.
(d is for date, obvs)
LikeLike
I was taught that in university in 2012. Not much has changed.
LikeLike
Malthe Høj-Sunesen 2012?? History? Or very bad University….
LikeLike
It really goes to show that modern “best practice” is highly conditional, depends strongly on available resources and performance characteristics.
LikeLike
Seems like today’s programmers are taught to create Rube Goldberg machines. That way they are the only ones who understand the code and have job security, or if they move on to another company charge outrageous consulting fees to fix the problems in their program they created.
LikeLike
Well, I’ll endorse 7a: Keep your GOTO statements to a minimum. That’s an idea I’ve always followed.
LikeLike
In those days, we optimized for scarce, expensive computer time.
Today we optimize for scarce, expensive software developers.
LikeLike
I clearly need to do some cleanup of my Objective-C code.
LikeLike
One person’s Minifier is another’s Linter.
LikeLike
Paulo Lourenco Robotics and embedded programming. Writing for a microprocessor requires that you understand that everything you do has an impact. A few clock cycles on a GHz processor are fast. But if you have a 50 kHz crystal, a routine that needs to run on each interrupt, and the interrupts arrives on average each 50 ms, you need to optimize code. Not because you want to, but because you can’t honor the requirements otherwise.
LikeLike
Malthe Høj-Sunesen I have programmed in similar fashion in university in the early 90s. I was just surprised this is still taught as recently as 2012 was all I meant. You would think those old compilers are just not available anymore, and C code is the bare minimum. Guess not.
LikeLike