I used line-numbered BASIC. It's unimaginable that I've not erased its influence by now.
Even when I knew nothing, I knew that BASIC sucked. Line numbers sucked, GOTO and GOSUB sucked.
When I first used a freely formatted language with actual parameters and local variables, it was like ascension into heaven.
Actually the moment for me was before that. In the book Programming The 6502 by Rodnay Zaks, there is a presentation of a module with recursion. I think, binary search tree or something like that. The assembly language source is given, as well as some Pascal-like pseudocode for the search routine. (I knew it was Pascal because I had read about it in magazines like Byte and Creative Computing.)
Seeing those two things together hit home for me: BASIC is garbage even compared to assembly language for an 8 bit microprocessor. Look at this beautiful Pascal program, with no GOTO or line numbers --- and it can be translated into a clean assembly language program also. I became eager to try Pascal somewhere, somehow.
A possible consequence of one's first programming language could in fact be not a tainting by its methods, but, on the contrary, a persistent hatred for anything of its kind.
> A possible consequence of one's first programming language could in fact be not a tainting by its methods, but, on the contrary, a persistent hatred for anything of its kind
Java was not my first programming language, but it was the one I used at my first job, so it was the one in which I first read widely about the best ways to do things. I was immersed in the Java OOP culture. I lived through the days when it was normal to review the names of a couple dozen design patterns before a coding interview. Now I feel like a witness to history, and also like someone who was raised in a cult and then left and now tells people what it was like.
We're from the same era, but I have decent respect for BASIC. Pounding the square peg of my applications into the round hole that is BASIC.
BASIC has everything assembly does. At a high level, Assembly offers GOTO and GOSUB. Obviously, you can have pointers to anything, indirect jumps, etc. but, to be honest, unless you're writing your own malloc (and it a lot of assembly cases, you're not), you're dealing with static allocations of memory for data. A pointer can be no different from an offset into an array in BASIC (or set of arrays -- array of ints, array of strings).
You can recurse with BASIC, you just need to maintain your own stack for the data (the BASIC will handle the stack for the GOSUBs, if you continue to use them). You may well maintaining your own stack in assembly (ye old Forth-ish data stack v return stack). I've seen several different compilers written in BASIC. You can have "Structures" in BASIC. PNAME$, PADDR$, PZIP$, PBDATE. Turn those all into arrays, and you have arrays of structures. With a Pointer! (P!)
It's inelegant, but so is assembly. It's too primitive to not be. Outside of macros, there's no real abstractions. At best you can offset a memory reference to get something akin to a structure, and use constants for that offset. But, in the end, unlike todays legos, you're still stuck 2, 4, and 8 pin bricks to build everything. Plus all the fun register juggling.
Assembly lets you have better identifier names. Six letters! I remember a lady who wrote much of here companies core business software in BASIC. She was particularly proud of the fact that Z9 was the universal error/status variable used in the system. Similarly, I recall my father lamenting that he could only have variables such as A, and AA, but not AAA in BASIC (since at the time, MS-BASIC only distinguished on the first 2 characters).
BASIC is high level assembly, that just so happens to have some of the best string processing, and some pretty good I/O, in the business. (Garbage collected string processing in MS-BASIC, no small feat. Who knew you had a garbage collector in that 8K BASIC?)
I was not scarred by my BASIC experience. Nor my FORTRAN (it was FORTRAN back then) experience. (Very BASIC-ish, without the as many line numbers). I was grateful to have learned FORTRAN-77 and not -66. I would not want to go back to dealing with BASIC, particularly not 8-Bit level micro BASICs of yore, not if I didn't have to. That said, one of my favorite languages was a 4GL with in built SQL, screen forms, and reporting. It was limited in many ways that BASIC is, but, boy howdy, could I pound out usable, effective software that helped the company and its people with it, which is, in the end, what this is all about most of the time anyway.
About as far as I'd want to go back is QBASIC. It's lack of line numbers, and full screen editor send it over the top. Line numbers are what they are, but the biggest problem with them, particularly in MS-BASIC, is you can't renumber sections of lines. Like, you can't renumber lines 1000-2000 to 3000-4000. So, you can't easily re-organize and move code around.
I used some utility written in machine language for renumbering BASIC lines in AppleSoft BASIC (MS derivative). It would march through the linked list data structure and assign new numbers, fixing up the GOTOs and GOSUBs.
In some BASICs you can. And where not, there's renumber utilities.
Also: MSX-BASIC has the option to save a program in ASCII format (non-tokenised). Back in the day, I used that option the other way around: start writing a program in a plain text editor, using named labels only. Then as it began to take shape, add line numbers manually (replacing the labels).
One consequence of BASIC being my first pl is the D programming language has great string handling, as opposed to C string handling which is an endless fountain of bugs.
(When I review C code, the first thing I look at is the string handling code, because there's always a bug in it.)
This is a paper regarding a survey taken in 1978, with the super-biased sample of people who answer the survey solicitation via a magazine, sample size of ~50, everything self-reported/self-assessed.
So, a historical curiosity and some possibly-interesting ruminations by the author, not more. IMHO.
I've always taken a particular joy in "Writing code like Language A in Language B"
I like Java as a host language to do things like:
Write numerical codes in FORTRAN style, allocating a few big arrays at the beginning and not pressuring the garbage collector. This is how I'd write an FFT, matrix inversion, or something like that.
Write programs with very few class definitions but a large number of static methods. (Like any non-OO languages, but static methods can go nicely with a few well chosen classes you make instances of)
Write static methods that take instances of "Object" as a parameter that are inspired by an algebra like that for a language like Python (of course a Collection is treated special, etc...)
Use static methods to build up structures like LISP's S-expressions.
These tactics can be used, for better or worse, to write Java DSLs that appear to describe "business rules" in plain English with the caveat that things like that are never as easy for muggles to maintain as you wish they were.
I also find that it's a nice exercise on the way to learning a new language. I spend a lot of time in Clojure, so I'll ask and answer "okay where are the lambda-like things, how do I apply them over collections" and then write up something I know is not at all what the language designer intended for kicks.
As an added bonus, it is fun to show your work to a coworker proficient in the target language and watch the blood drain from their face.
I haven't heard UNIVAC's facility in Blue Bell, PA, mentioned in a very long time.
Original BASIC had neither data structures nor scope. So programmers who started with BASIC lacked some key concepts. There was thus a problem at one time with programmers who started in BASIC.
when I was still saving programs on tape. Assembly lacks many of the things BASIC lacks though. Wrote my own program that would take BASIC source code without line numbers and with structured control structures and compile to BASIC. Also got PASCAL and C compilers, wrote a lot of Turbo Pascal for the PC in the late 1980s, got into the C habit when I went to college, picked up Java in my PhD program and I've been coding it ever since.
"There was thus a problem at one time with programmers who started in BASIC" and who never bothered to learn the affordances, constraints, and idioms of their new language.
It is an interesting idea, although limited (as noted in the paper) by the small sample and various confounding variables. They did mention:
> A FORTRAN programmer who has successfully designed a payroll system
may not see any value in the ability to combine numeric and alphabetic information into a single data structure.
A confounding factor they forgot to note—a possible confounding variable here is that, while the first language might influence the programmer, there could also be come correlation between language picked and potential… which is to say FORTRAN programmers are just smarter than everybody else (also, better looking, so we’ll have to make sure the judges of the programming styles don’t end up falling for them).
The only data structure you need is a big block of numbers. How could your data get more structured than that? Also don’t believe the charlatans who say Fortran has OO capabilities now, they are just trying to pull you from the true path. What do you want, a graph, a linked list? Nodes are what your code runs on!
My real, true first exposure to programming was Qbasic on a Windows XP machine, followed by real BASIC on a Commodore 64, then Java. But I don't count any of that, I never really built anything, just plugged in examples. I consider my true native language to be C#. It was the first language I ever built anything real with, and my first taste of what being a Real Programmer was.
It absolutely has flavored my programming in any language. The way I name and structure things is ""bad"" C++ programming, but I'm fluent in C# concepts in a way I'm not with other languages.
I've also developed a deep distaste for non-C languages. Or maybe I'm just getting old and curmudgeonly.
> My real, true first exposure to programming was Qbasic on a Windows XP machine, followed by real BASIC on a Commodore 64, then Java.
What’s the story behind your starting with Windows XP and then moving back to a Commodore 64?
For me, by the time Windows XP rolled around, my Commodore (128 not 64) was sadly long gone — given away at a garage sale by my parents while I was off at college.
We had essentially a computer club in middle school. The teacher introduced us to QBasic. Later in high school I took a programming course which was Java. I found the C64 at a flea market around the same time and found it much more interesting than the make-work java problems we were doing in school.
I used line-numbered BASIC. It's unimaginable that I've not erased its influence by now.
Even when I knew nothing, I knew that BASIC sucked. Line numbers sucked, GOTO and GOSUB sucked.
When I first used a freely formatted language with actual parameters and local variables, it was like ascension into heaven.
Actually the moment for me was before that. In the book Programming The 6502 by Rodnay Zaks, there is a presentation of a module with recursion. I think, binary search tree or something like that. The assembly language source is given, as well as some Pascal-like pseudocode for the search routine. (I knew it was Pascal because I had read about it in magazines like Byte and Creative Computing.)
Seeing those two things together hit home for me: BASIC is garbage even compared to assembly language for an 8 bit microprocessor. Look at this beautiful Pascal program, with no GOTO or line numbers --- and it can be translated into a clean assembly language program also. I became eager to try Pascal somewhere, somehow.
A possible consequence of one's first programming language could in fact be not a tainting by its methods, but, on the contrary, a persistent hatred for anything of its kind.