1081
you are viewing a single comment's thread
view the rest of the comments
[-] Successful_Try543@feddit.de 20 points 1 year ago

I've once had a course involving programming and the lecturer rewrote the code, which we were usually using at our institute, making ALL variables global. - Yes, also each and every loop counter and iterator. 🤪

[-] Chriszz@lemmy.world 17 points 1 year ago

There’s no way you teach a uni course and do this kind of thing unless to demonstrate poor practice/run time difference. Are you sure you were paying attention?

[-] Successful_Try543@feddit.de 17 points 1 year ago* (last edited 1 year ago)

Yes. He really thought it was efficient and would avoid errors if literally all variables were defined in a single Matlab function he called at the beginning of the script. We students all thought: "Man, are you serious?" As we didn't want to debug such a mess, in our code, we ignored what he was doing and kept using local variables.

[-] Chriszz@lemmy.world 23 points 1 year ago

Ah I misread I thought it was specifically a programming course. I can expect this from a math prof.

[-] Successful_Try543@feddit.de 8 points 1 year ago* (last edited 1 year ago)

Yes, it was a course on finite deformation material models. And no, you do really, really not want to declare each and every variable in your material subroutine globally for the whole finite element program.

[-] magic_lobster_party@kbin.social 8 points 1 year ago* (last edited 1 year ago)

Lecturers at universities tend to have little to no industry experience at all.

[-] Successful_Try543@feddit.de 4 points 1 year ago

Productive research is also hard to imagine with such coding practice either.

[-] Techmaster@lemm.ee 3 points 1 year ago

That's why when your job hires new people right out of college they have no idea what they're doing and now must be trained how to actually do the job. "What, you mean we aren't writing this enterprise application in python!?"

[-] rtxn@lemmy.world 4 points 1 year ago* (last edited 1 year ago)

I've seen two teachers do this, both of them mathematics professors who teach programming for the extra cash. One uses C, the other Pascal.

[-] wreckedcarzz@lemmy.world 2 points 1 year ago

Oh they were paying, way too much

this post was submitted on 08 Oct 2023
1081 points (96.6% liked)

Programmer Humor

19821 readers
535 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS