4 ms·
> But I do recall a bunch of characteristics of early BASIC systems that potentially led to terrible programming habits: GOTO and line numbers leading to spaghe
by seanwilson 9y ago
> But I do recall a bunch of characteristics of early BASIC systems that potentially led to terrible programming habits: GOTO and line numbers leading to spaghetti code; all global variables; no scope; no functions; self-modifying code (overlays); etc. All of these had to be unlearned at some point.
Compared to just being told these things are bad and should be avoided, I'd like to think that being forced to code in the above ways makes you better rounded as you have first hand experience for why those practices are a bad idea. It's not like you have much choice if you have to code in something like assembly as well.
I've worked with programmers before who can regurgitate the names of current bad practices but can't describe the reasoning behind them which isn't a good thing.
Personally, I think it's an absurd idea that e.g. if you began coding with all global variables and no functions you'd be unable code in a different way. If you're amazing at coding in an environment that makes it challenging to write complex programs, you're going to quickly become efficient at writing code in environments that makes it easier to write complex programs.
- smarks 9y agoSure, I don't disagree. Personally, after moving away from BASIC to other languages, I felt freed from a bunch of problems I had had with BASIC. For example, scope eliminated problems with reuse of variable names. Perhaps lots of other people who started with BASIC felt the same way. On the other hand, sometimes other people never transcended those bad habits from BASIC. Sometimes you run across programs that are one big function, with variables reused, etc. I don't know what the thought processes are of programmers who write such code. There's an old saw, "You can write FORTRAN in any language." Maybe this should be applied to BASIC as well. That's probably what Dijkstra was driving at. I don't know about "mental mutilation" (certainly hyperbole, in my book) but only Dijkstra knows what he really meant.
- seanwilson 9y ago> On the other hand, sometimes other people never transcended those bad habits from BASIC The kind of people that don't actively keep up with current best practices and latest developments are always going to be bad programmers though. It's not like you can pick a perfect language to start coding in that will teach you all the current and future best ways to do things. I personally don't think it matters what language you start coding in as long as you're always learning and adapting.