30 ms·
Was BASIC that horrible or better?
- Aardwolf 3y agoThe only basic variant I used was qbasic, it was the first programming language I used! It's not horrible at all if a child can learn to make a game in it from scratch. However, qbasic doesn't have the line numbers (edit: at least not mandatory!). Never used a basic variant that requires the line numbers, but that seems like a total kludge!
- tgv 3y agoIt was fun. The dense text, all caps, line numbers in the left column, peeking and poking in memory, simple variables, it felt as a direct connection with the machine. The step to assembler wasn't that big. They shared some aesthetics, and certainly the spaghetti structure. And it possibly made me appreciate the algol-inspired languages more.
- rahen 3y agoExactly. BASIC a high-level low-level language, effectively pretty close to assembly.
- thriftwy 3y agoQBasic could do line numbers all right. It did not require them, that's that. It had labels and loops, so why bother.
- ziotom78 3y agoIt's been a long time since I programmed in BASIC, but I have gone memories of it. My very first computer was a Commodore Vic20, whose User's Manual was essentially a BASIC manual. One of the very first programs I learned to wrote drew a simple bird on the screen made by characters and made its wings flap. I was mesmerised. Boy, how much I enjoyed that manual! Edit: bids -> bird
- kleiba 3y agoI started out on the C64, but that manual, too, received much love from me. I read it until it pretty much fell apart. Oh, well, the spiral binding might also have had something to do with that ;-)
- cbm-vic-20 3y agoThe VIC-20 Programmers Reference was also a great next step, to get you into assembly/machine language. There wasn't a good freely-available assembler, so you get to become the assembler itself, POKEing instructions into memory. https://archive.org/details/commodore-vic-20-manual-del-usuario https://archive.org/details/commodore-vic-20-manual-del-usua... https://archive.org/details/VIC-20ProgrammersReferenceGuide1stEdition6thPrinti https://archive.org/details/VIC-20ProgrammersReferenceGuide1...
- RedNifre 3y agoIt's a great language if you want to write a compiler for fun: You can add the different statements incrementally, so you quickly get to a point where you can compile your first program and then add more and more features to compile more and more. Also, when I was implementing FOR, my first naive implementation was compiling the body first, then append the loop related things that check the conditional and jump backwards to the start of the body. "Hang on, what about the case when the condition is initially false?" I thought, only to discover that the BASIC standard actually specifies that a FOR loop runs at least once, even if the condition is false! Officially, the language is advertised as for beginners, but to me it looks like it was meant as a lingua franca of computers, as in not only easy to understand, but also easy to implement. Here's a BASIC compiler for the HP 15-C calculator written in Idris: https://gitlab.com/michaelzinn/voyc/-/blob/master/src/Compile/CommodoreBasicCompiler.idr?ref_type=heads#L337 https://gitlab.com/michaelzinn/voyc/-/blob/master/src/Compil...
- yiransheng 3y agoTrying to compile Basic is actually a bit trickier than just implementing an interpreter indeed. Like the FOR statement example you mentioned. Another messy situation is non-lexical FOR/NEXT like here [1], where NEXT can be encountered before a FOR statement, fairly certain I did not get it entirely right there. Original Dartmouth BASIC had only 14 statement types, and it takes very little efforts to enumerate and implement all of them, even if you are just starting on a compiler journey and making things up suboptimally along the way. The bonus upside for choosing BASIC as your first compiler project is that you get decades of vintage test programs to play with like this one [2]. [1] https://github.com/yiransheng/basic_rs/blob/ddd64e2eacfc2b36354e32e2b6abdb97989bd3a2/src/compile/mod.rs#L74 https://github.com/yiransheng/basic_rs/blob/ddd64e2eacfc2b36... [2] Game of Life compiled to warm: http://subdued-afternoon.surge.sh/ http://subdued-afternoon.surge.sh/
- pavlov 3y agoThere were many kinds of BASIC created over the years. Some were incredibly limited interpreters for computers with 1kB available working memory, and decades later others were full-fledged desktop languages with structured programming and objects and GUI event loops. Is TypeScript in 2023 the same language as JavaScript in 1996? The various BASICs were even more different than that. It’s impossible to say that they were all categorically horrible or perfect. But they did enable millions of people to discover computing, on everything from ZX-81 to Windows 95.
- jasfi 3y agoBASIC was a product of its time.
- mhd 3y agoNobody is ever talking about the original Dartmouth BASIC, so we're really talking about a vast language family here. Arguably with more difference between different strands than e.g. within the BCPL family.
- vajrabum 3y agoDijkstra was in fact talking about something very close to the original Darmouth BASIC. In 1975 all the other BASICs, like for example the CDC one I used, looked pretty similar to the original. And the differences back then were much smaller than what you see today or even in the 80s.
- kragen 3y agoas the article points out, many contemporary and even earlier languages supported structured flow control, records, local variables, and subroutines with arguments. and of course lisp was basically javascript basic had the advantage of being implementable in 4 kilobytes of ram and being memory-safe
- zabzonk 3y ago> memory-safe you are forgetting peek and poke.
- flohofwoe 3y agoThe biggest achievement of BASIC was probably that it was the gateway drug into computing for teenagers throughout the 80's, because every popular home computer came with a BASIC builtin, available right after switching the computer on.
- sokoloff 3y agoExactly! My Atari booted up to a READY prompt and even loading a program/game from tape required typing a BASIC command. The on-ramp was incredibly shallow and smooth.
- TheOtherHobbes 3y agoYes. You owned the entire machine, there was a progression to assembler (awkard, but possible if you didn't mind hand-assembling the hex and typing into a BASIC shell), and you could a huge amount just with that. The capabilities and the limits captured your imagination in a way that the modern stack doesn't come close to. And especially in the UK, easy and cheap access to 8-bit machines for teenagers launched a generation of coding careers. So Dijsktra is wrong. It's very possible to learn CS principles after learning BASIC. it's certainly an adjustment, but it's very easy to sell if you explain that you can build larger structured projects from smaller elements, including more complex data structures - not a difficult concept for anyone who taught themselves assembler from magazine articles and books, because there was no other help or support. The other thing BASIC did was gave some of those teens a career. The cost of entry to a small game business was very low, and there were plenty of games that didn't even need assembler. A bit of advertising in the magazines, maybe some hand duplication to start with, and good games made non-trivial money almost immediately, through organic word of mouth promotion.
- jaybrendansmith 3y agoI found it very easy to learn these principles once BASIC taught me loops and functions. Once out of BASIC, a tough concept to grok was passing pointers and different data types, because BASIC made global and local variables so brainless. Object-oriented languages are in many ways further from assembly than BASIC, but even VB teaches you objects and methods and properties albeit in a very simple form. Leaving the virtual box framework of basic was also somewhat difficult, but I don't think learning basic made it any harder or easier, just more frustrating because it seemed so pointless at first. It's like learning to drive an automatic and having someone tell you that you must now learn a manual transmission with manual brakes and steering, and how to change the oil/clean the carb. Seems silly at first, but ultimately rewarding.
- rational_indian 3y agoIt was okay. Just don't use it to build large systems. It is known to create an unmaintainable mess.
- pjmlp 3y agoCounter example, VMS Basic.
- nathell 3y agoI’m so happy that this article mentions Bajtek. It was one of the most important, if not _the_ most important, source of computing knowledge in my early childhood. I was born in 1984, got my first computer – a C64C – in 1991, and my dad procured a heap of past issues of „Bajtek” from previous years. In rural Poland those days, knowledge was hard to come by, so those proved invaluable to me. Not only were there type-in programs and games, like in the German 64er, but most of them were actually accompanied by prose articles that offered clear explanations, background, and trivia. I learned BASIC from Bajtek and a few books. Bajtek literally had a monthly column called „For Preschoolers Only” with a BASIC tutorial in it.
- ikari_pl 3y agoI (the author) am Polish :) Bajtek was a treasure, the best pre-internet source of all kinds of information, also the advanced stuff (like a multi-issue series with a list of system calls on an Amstrad!). I didn't have access to any of it until the late 90s (still didn't have the opportunity to switch to a PC). BTW. Retronics is re-issuing Bajtek now! They print the same old issues but re-typeset for the highest quality. A true gem.
- jeffwass 3y agoBASIC was ideal for introducing a generation of school kids to programming. Back in the 80’s you fired up your computer and you had a readily-available interpreter for which you could immediately do ‘real’ stuff like printing characters anywhere on the screen and turning on and off pixels (even in colour on some platforms). There was no need to compile or build a project or start with a lot of boilerplate. You just did stuff right away from a REPL or could make programs from line numbers and save them. I learned a ton from it. Eg how to think algorithmically and break up something complicated into small parts. A key milestone was grokking the difference between GOTO and GOSUB. I also understood much about its limitations once I started learning Turbo Pascal in high school. If you’re judging BASIC compared to a modern IDE with a modern structured language of course it falls short, but for what it was at the time it was nearly perfect.
- lkuty 3y agoThat's what I miss these days. The barrier was low, you had access to it immediately and when using a computer from that era you were going to be exposed to that stuff. Now everyone has a smartphone but you cannot easily program with it and moreover the chances you will encounter a programming language using it is 0 unless you look hard for it. A lot of young people are missing opportunities of discovering cool stuff and having fun. Which maybe hurts the entire profession. Using BASIC and assembler was a ton of fun back then.
- wslh 3y agoAs a child a learnt BASIC after having taught LOGO. As a child that was an advancement (with all due respect to LOGO). Almost every computer included BASIC so it was an universal programming language for home computers. You could also interact with assembler (CALL/SYS instructions) so it enabled to go even farther. Conclusion, BASIC was pervasive and it was not horrible since your focus was in creating something on cheap personal computers. I know two older people than me, accountants, that learnt BASIC around their 40s and build their own accounting programs in a ZX81 [2] and TI-99/4A [3]. I don't think many people now of that age (plus "age inflation") learn this new skill (programming) and create an useful program or even a script for themselves. The language is primitive by today's standards but it gives you all sort of ways to express yourself. When BASIC progressed and was more structured, for example AmigaBASIC from Microsoft [2], there were more alternatives and more evolution so it is natural that BASIC faded. Also important to highlight that every popular computer magazine (media) published BASIC code, also books. [1] https://en.wikipedia.org/wiki/ZX81 https://en.wikipedia.org/wiki/ZX81 [2] https://en.wikipedia.org/wiki/AmigaBASIC https://en.wikipedia.org/wiki/AmigaBASIC [3] https://en.wikipedia.org/wiki/TI-99/4A https://en.wikipedia.org/wiki/TI-99/4A
- sdsd 3y agoI've programmed extensively in QBasic and TI-BASIC. Both were extremely limiting, ofc. But there is one thing I'm very grateful for, in retrospect. Both languages required very few "concepts". Functions? Pointers? Classes? These are basics for coders, but BASIC didn't ask even this of you. With a small syntactic baseline you could make full on games pretty easily. Compare this to making games even with Python using PyGame, or Godot, or whathaveyou. Of course, nothing prevents you from learning Python and just limiting yourself to a few data types and control structures. But what really made BASICs easy (for me) was that "draw to the screen" was such a primitive operation. Same with detecting keypresses. Again, these are easy if you're a software engineer, or even if you know how to code. But what if you don't? Even Visual Basic had this virtue. When I was in Mexico I volunteered at a homeless shelter. The man who operated the shelter had no coding education, but was able to self teach Visual Basic two decades ago, and had created an entire system for managing the facility. He had tried to rewrite it to use a more modern language (I believe C# or VB.Net) and was totally unable. I've never used VB but I've heard countless tales like this, where non-coders create entire functioning software in it.
- pjmlp 3y agoWhich is why VBA is still loved, regardless how many think it is outdated. Lost count of non-coders that outgrown their Excel macros that I got to know, that dive into VBA, eventually ask IT for VS and VB.NET.
- XorNot 3y agoLinux is still missing something which had as tight a development loop as VB in terms of "intent -> result" (I've never managed to get Glade or any of the similar GUI tools working, and thus never really written a GUI app in Linux).
- pjmlp 3y agoHave a try at Gambas. https://gambas.sourceforge.net/en/main.html https://gambas.sourceforge.net/en/main.html Or Lazarus, for the Delphi variant, https://www.lazarus-ide.org/ https://www.lazarus-ide.org/
- pjmlp 3y agoWe miss having environments like BASIC nowadays, Python is probably the closest to it, but at least by the 16 and 32 bit days of home computers, BASIC not only was structured, native compilation was part of the picture against. Guess we need to hope for Mojo's success.
- dev_tty01 3y agoWell, Python is far from BASIC, but you can run a Python-based BASIC interpreter if you want to get the retro experience. https://github.com/richpl/PyBasic https://github.com/richpl/PyBasic
- pjmlp 3y agoMy first computer was a Timex 2068, and something like CircuitPython or MicroPython, or TI/Casio calculators with them, definitely give similar experience.
- thriftwy 3y agoPascal (the reference PL) is sooo clumsy and verbose that I just can't take Dijkstra's opinion at its face value. Maybe early BASICs were so-so, but QBasic already had all kind if procedural stuff.
- vajrabum 3y agoIn 1975 there was no QBasic which according to Wikipedia was delivered in 1991. And pretty much no microcomputers.
- thriftwy 3y agoWhat would that generation of programmers do their thing on? A programmable abacus?
- vajrabum 3y agoMainframes or minicomputers of course, mostly from IBM (mainframe) and DEC (minicomputers). There were other players and IBM sold minis and DEC sold mainframes but those two dominated those two niches.
- thriftwy 3y agoHow do you spoil mainframe programmers? I don't believe they had sufficient passion and/or freedom to manifest spoiledness.
- alerighi 3y agoWhat is a good program? To me, it's a program that does something useful and serves a purpose (being this a person or an organization). I'm tired of this "good programming", there is people that talks about good programming and than produced programs that are either too complex to do something useful. These to me are bad programs! There were a ton of companies or persons that used (and still use) BASIC (or Visual Basic) programs to do stuff, and maybe if it wasn't for BASIC these programs would probably never be written. Same thing we can say about COBOL, a ton of companies are run by an IBM AS/400 running old COBOL programs written in the 80s that still work fine.
- cm2187 3y agoRunning fine isn't the only measure. It also needs to be maintainable. Those old COBOL programs are a major headache for the organisations running them. One company I worked for had to pull old COBOL developers out of retirement to implement a mandatory change to a critical program. I don't know what they will do if it happens again in 10 years. I agree with your point on companies running on VBA and how much worse the world would be without. But I still blame microsoft for making a language stuck in the 90s the only option for those users to integrate simple coding into their workflows. They are forcing users onto a bad path (and I am not complaining about the Basic syntax itself, but about the lack of the 25y of evolution and improvements you would find in VB.net).
- alerighi 3y agoI don't see what there is such difficult in a COBOL program to have to take a programmer out of retirement. The syntax may be different and old, but still there is no reason why a programmer can't learn it. I mean, I know people of my age (30 years) that work on companies that still maintain COBOL programs, and they learned it (some of this went to work for these companies right after high school). It's not that is rocket science, like it is not BASIC. The most difficult thing is getting a development environment set up, but a company that maintains such programs can use virtual machines and test systems. There are even companies that provide you "cloud" IBM AS/400. Anyway, what I meant is that normal companies are not Google, you find a small department of developers (in case of small companies, only one) that does everyting, from fixing the printers to developing the programs that are useful to automate and do the job the company needs to do. I've seen companies build even systems that manage an entire production plant in house with a complex business logic, something that not even commercial software that cost thousands of dollars do! With no budget, and thanks to simple programming languages (in the past was BASIC, today I say that it's python) companies write programs that helps them speed up the work, that may be an ugly file of 10.000 lines of code with few comments, copied/pasted blocks, classes with poor or no encapsulation, but that work. Saying that they are bad programs because they don't follow SOLID pricniples, or they don't do TDD or have a CI set up, or they are on a folder in file server instead of a git repository, to me is stupid. A bad program to me is a program that doesn't work, a program that has bugs, a program that doesn't solve the problem it was designed to solve.
- acqq 3y agoTrying to solve the modern problems and showing that one needs more code than in Python is not the point. The reason Basic wasn't horrible but amazing at the time as the home computers appeared is hard to understand without the context of that time: Basic on these computers was, in today's language: - an actual "complete" operating system and - a command language and - a script language and - a programming language Additionally, if one wanted to use the "full power" of the CPU one had to use machine code, as there was so little RAM that most of the programs that did fascinating stuff were true masterpieces. Those using Basic knew that it's not "all there is".
- forinti 3y agoI don't think there was a better language for 8 bit micros. It was line oriented so you didn't need an editor. It was simple and had a very short learning curve. You were never going to write a huge program, so modules or packages weren't a necessity. It just fit this niche perfectly.
- karmakaze 3y agoOne really cool thing Atari Basic did was that you could list lines x,y and just move your cursor up to the line you wanted to change and insert/delete/overtype characters. It would even handle line-wrapping of the logical line up to 3 physical lines. Press enter and that's the new line (or change the line number and it's a new source line). It was often used for renumbering a few lines to make room for more as there was no built-in renumber utility.
- zozbot234 3y agoFORTH was the closest competitor. Perhaps it could have worked well enough if it was extended with custom parsing modes for infix arithmetic and for printing out floating point numbers, which were the main poimts where even minimal versions of BASIC were genuinely more user-friendly than FORTH.
- deleted 3y ago[deleted]
- greenbit 3y agoPunched cards were a thing of the past when I first encountered computers (in the form of ROM BASIC machines like the TRS80 and PET4032), but there's just something fascinating about being able to physically hold the individual lines of your program in your hand. These days if you want to run a program to crunch some numbers, the program is one file, and the data another - but back then, since you fed the whole 'job' into the card reader at once, you could change the data set by just swapping out the cards. Not saying that this was in any way better. Just that the idea of it feels so alien - and this was the era in which BASIC first evolved.
- eesmith 3y agoDarthmouth BASIC used teletype terminals, not punched card input. The article has a picture, and comments "Dartmouth did better. At any time, when the program was in memory, you could use SAVE to save it from being forgotten when you finish working with the computer, and RUN to compile and execute it right away."
- greenbit 3y agoAs may be, just going on observation that when I got to college, several of the profs still had punch decks lying around the offices. Granted that said offices were not more than 3 minutes walk from the computing center where the mainframe lived. Clearly anyone miles from campus, or anyone seeking any kind of interactive session, would want a tty. But evidently if you wanted to run your program more than once, and didn't want to incur the rental charge for online "DASD" storage, batch-job card decks had been an option. I presume that did not exclude BASIC programs. Also, I suppose "era in which BASIC first evolved" would have better been stated as "part of the era in which BASIC first flourished"
- wruza 3y agoI still remember the appeal of BASIC to me as a kid. A simple GOTO loop over INKEY, in which you can test which key is pressed and erase+redraw a CIRCLE accordingly. A trivial thing, but the feel it created was unforgettable. Idk what Dijkstra means. My whole generation started with BASIC and learned languages as they’ve become useful enough for every new wave of accessible hardware, which wasn’t cheap for a hobby. There was no like “oh, now you’re lost”. My next language was 8080 assembly then Pascal then 8086 then C. You just can’t learn Pascal and C on a Sinclair clone when loading a compiler from a tape recorder takes half an hour and most of the available memory. And you can’t learn Python either, because it doesn’t really exist yet. I know it’s from 1991, but never heard of it until ten+ years later. I also know that some ROMs had FORTRAN instead. Maybe Dijkstra would like to re-teach FORTRAN programmers more.
- eesmith 3y ago> Idk what Dijkstra means. I thought the article did a pretty good job about describing what Dijkstra meant, and pointing out it was written years before you learned a BASIC variant on a microcomputer. What are you still unsure about? > Maybe Dijkstra would like to re-teach FORTRAN programmers more. Unlikely. The article points out Dijkstra called FORTRAN "hopelessly inadequate".
- InfamousRece 3y agoI actually learned Pascal on a ZX Spectrum clone. It was Hisoft Pascal, so it was a bit limited (no strings - you had to use ARRAY OF CHAR instead). But it was awesome to draw 3D graphs due to its “fast” floating point routines.
- MarkusWandel 3y agoOn the Commodore PET, at least, you could do all kinds of clever things with BASIC due to the special graphics characters and the "cursor control" characters that could be embedded in strings (up/down/left/right etc). One of my hacks was a playable, graphic video game in one line of code (almost the full maximum 80 characters) and another is the standard 1-liner that generates mazes. For examples of fancy BASIC graphic programs, search for: https://www.youtube.com/results?search_query=cursor+tape+magazine https://www.youtube.com/results?search_query=cursor+tape+mag... Cursor magazine programs did occasionally have an assembly language subroutine; at least one flashed the screen using one. But most of them were just BASIC. Purists may scoff, but kids with zero experience could make animated graphics after just a day or two of playing around, and curiosity about how more sophisticated programs worked (in my case: The "Miser" text adventure game) would soon motivate to find out more. Is that bad? It was the whole point of the language, the B stands for "Beginner". Plenty of time to graduate to other things later (in my case: Assembly language -> Pascal -> C).
- odux 3y agoBasic was my second programming language after Logo[1] in the early 90s (I was in 5th grade) in a third world country, on very slow computers that a factory had donated to my school after they had passed their useful life for the factory. In such an environment basic was amazing. Low barrier of entry both from computing and knowledge perspective. Easy to learn and create a lifetime of love and passion for programming and all things computers in people like me. [1]: https://en.m.wikipedia.org/wiki/Logo_(programming_language) https://en.m.wikipedia.org/wiki/Logo_(programming_language)
- ikari_pl 3y agoCurious author here. For me, Logo was a curiosity covered in chapter 6 of the manual. I wonder what the experience of learning it first was. Was it mostly like vector art fun, or did they teach more advanced concepts too?
- weinzierl 3y agoI've been thinking about this recently when teaching my daughter to program. What was very different about BASIC compared to today was that it was "Beginners' All-purpose Symbolic Instruction Code" (that's what BASIC stands for). At the same time it used to be used by adults to solve real world problems. If you outgrew BASIC you could easily segue into Pascal which was much more powerful but still designed with education in mind. I think today the gap between what is used to teach and what is used to solve problems is much bigger. Once children get older the motivation for toy languages understandably goes away but learning a modern programming language that is actually used in the industry is a big step that is not easy to overcome. I have no perfect solution for that but for us and for now we settled for Godot and GD Script. It is simple enough to get started and I think when I showed my daughter the Tesla App [1] it was a big motivation. [1] I've heard the current version it is not made in Godot anymore, but it was when we started on this journey a while ago.
- nox100 3y agoI'd say Scratch is the #1 way kids to day are introduced to programming in 2023 For parents that have some 8bit experience, Pico-8 (LUA) is also relatively popular. It's basically like running an Apple 2, Atari 800, Commodore 64 as if it booted into LUA instead of Basic. You can trivially draw things, and peak and poke bytes into "Screen memory" if you want to feel like you're "touching the hardware" JavaScript is also available everywhere a kid might be and it's easy to draw stuff with literally millions of examples all over the net. Processing.JS is also a thing https://thecodingtrain.com/ https://thecodingtrain.com/
- _trampeltier 3y agoAt least QBasic was great. No line numbers and came with a very good ducumentation. This was very important before internet was in every home.
- downut 3y agoI spent the summer of '83 at the GE Wilmington, NC nuclear fuels plant as the sole user of an HP 9845C with the integrated full size plotter. My job as a GA Tech ChE co-op student was to go around the plant with a rather simple gradient air sampling unit mapping out the airborne density of the various sizes of UO₂. I would take my overnight measurements (point a geiger counter at the different filter papers from the different levels) and enter the data into a program I wrote in... HP Basic. I would then feed that into another program I wrote in... HP Basic that plotted the densities as level plots in HPGL across a rather detailed for the time 2D map of the plant. It produced multicolor paper plots on full size drafting paper. My bosses, the physicists in the safety department, were very pleased. I was so happy doing this that I spent the evenings in the UNC Wilmington library learning level plotting algorithms. I needed more programming time so I would come in very early in the morning and have to remember to clock in at 8AM (overtime not allowed). All of us co-ops made $10/hr in '83, and I saved enough to pay for the entire next quarter at Ga Tech every quarter I spent working. Weekends I spent at the beach, though. I see from Wikipedia that the system costs were enormous! But that was an exquisite summer romance with BASIC. Not too many years later I discovered Turbo Pascal. Yeah, off to the races. And then came Turbo C++, and g++ around '92. Haha you kids today would really enjoy debugging templates in early g++. (The idea that you could write the same code for 'float' and 'double' was intoxicatingly cool.) The transition from Fortran (what I learned to program with) => HP Basic => Pascal => C++ was pretty easy. Pointers, well if you study 'The C Programming Language' carefully, are not difficult. People writing serious computational mathematics codes are constantly using pointers, just not as 'pointers'. Debugging, well that is another problem entirely, and I believe from way out here in the future, that that is the most difficult problem of all. How to program in such a way that the bugs are not silent. Those silent ones were the cause of most of the grief in my programming life. The thing about HP Basic is none of the bugs were ever silent. Same with Turbo Pascal. I did a lot of really cool things with those 'toy' languages. They never caused me any grief. So I think Dijkstra didn't understand (maybe) the importance of painless pleasure when (some) mortals are learning programming. It sure turned me on.
- glimshe 3y agoBASIC was responsible for sparking the interest in computers for a generation. One of the most harmful falsehoods about it is that somehow GOTOs and line numbers would turn you into a bad programmer for life. I think that even today there is nothing like BASIC to get kids interested in computers. But it's not a language just for kids. While most dialects are somewhat limiting, there is nonetheless a TON of real useful stuff you can do with it.
- phkahler 3y agoI learned Basic at 10, and I would argue that Python is a better choice today. But regardless of which one, the most important thing about basic was that for a while every computer came with some flavor of Basic. It's what got a generation hooked on tech. Why oh why doesn't Windows and macOS come with Python and Idle out of the box? Or does Mac, I forget.
- Cockbrand 3y agoThe Mac does come with Python, but of course it’s easier to get started from zero when the first thing you see after switching on the computer is a BASIC prompt.
- antod 3y agoNot just that, usually the computer came with a printed manual for BASIC too.
- musicale 3y agoHaving an onramp to programming is nice. I also imagine there was more of an incentive to write your own programs when there weren't a million games and other apps already available in app stores.
- leetrout 3y agoMac like other bsd/linux includes a system python but not idle.
- llm_nerd 3y agoGFA Basic on the Atari ST was my true entry into programming, and I went through many other languages before I found one that felt as modern and productive.
- FabHK 3y agoYes. Great language, relatively fast, surprisingly modern (at the time - came out in 1986), lots of fun. https://en.wikipedia.org/wiki/GFA_BASIC https://en.wikipedia.org/wiki/GFA_BASIC
- lproven 3y agoThen you may enjoy this: https://gfabasic32.blogspot.com/ https://gfabasic32.blogspot.com/
- karmakaze 3y agoI used both an Atari 8-bit and ST and wasn't aware of GFA Basic (or Turbo-Basic XL found on Wiki page). They would have been cool to have. On the ST I was using Megamax C compiler on one diskette and programs on another.
- bhauer 3y agoGFA was fantastic. I used it for various telecommunications programs back in the day. The only thing I really wanted as an addition was data structures.
- lproven 3y agoIt is still around, in a maintained 32-bit Windows version. https://gfabasic32.blogspot.com/ https://gfabasic32.blogspot.com/
- rvba 3y agoIs there anything as visual as visual basic?
- WillAdams 3y ago_That_ is a question I want an answer for. Currently I am using OpenSCAD Graph Editor: https://github.com/derkork/openscad-graph-editor https://github.com/derkork/openscad-graph-editor to create programs: https://willadams.gitbook.io/design-into-3d/programming#openscad-graph-editor https://willadams.gitbook.io/design-into-3d/programming#open... but the fundamental question which remains unanswered is: >What does an algorithm look like?
- sigzero 3y agoXojo is that.
- stephc_int13 3y agoDijkstra was a dick and his take has probably be more damaging than BASIC itself.
- drewcoo 3y agoOf course Dijkstra didn't like BASIC. BASIC was the language that shook programming loose from his ivory tower and let common people try it. On actual computers. Bought at stores like Sears.
- ukuina 3y agoImagine what he would have thought of AI-driven programming.
- firebot 3y agoI think a good supplemental way to extend on BASIC knowledge is a good stack-based language, something forth-like, perhaps.
- vajrabum 3y agoThe article's example of a Fortran program is an anachronism. In 1975, what we had was Fortran IV which didn't have any of the structuring stuff shown in the example. This example of Fortran IV shows where most of BASIC came from although there are important features of Fortran that it doesn't show (DO loops, multi-character variable names, SUBROUTINES, FUNCTIONS, COMMON blocks), but Basic was pretty clearly designed as an interactive, student dialect of Fortran. C AREA OF A TRIANGLE - HERON'S FORMULA C INPUT - CARD READER UNIT 5, INTEGER INPUT, ONE BLANK CARD FOR END-OF-DATA C OUTPUT - LINE PRINTER UNIT 6, REAL OUTPUT C INPUT ERROR DISPAY ERROR MESSAGE ON OUTPUT 501 FORMAT(3I5) 601 FORMAT(4H A= ,I5,5H B= ,I5,5H C= ,I5,8H AREA= ,F10.2, $13H SQUARE UNITS) 602 FORMAT(10HNORMAL END) 603 FORMAT(23HINPUT ERROR, ZERO VALUE) INTEGER A,B,C 10 READ(5,501) A,B,C IF(A.EQ.0 .AND. B.EQ.0 .AND. C.EQ.0) GO TO 50 IF(A.EQ.0 .OR. B.EQ.0 .OR. C.EQ.0) GO TO 90 S = (A + B + C) / 2.0 AREA = SQRT( S * (S - A) * (S - B) * (S - C) ) WRITE(6,601) A,B,C,AREA GO TO 10 50 WRITE(6,602) STOP 90 WRITE(6,603) STOP END
- AnimalMuppet 3y ago> Basic was pretty clearly designed as an interactive, student dialect of Fortran. Yeah. I knew Fortran (at a high school level). Then I came across the TRS80 Basic manual. I read it in an hour, and I thought "this is just like Fortran, except the words are different".
- cmrdporcupine 3y agoAbsolutely, and I remember in the 80s through the early 90s it being the case that this way of writing Fortran just continued for years in e.g. engineering disciplines (my sister was an EE student early 90s) while the rest of the world had moved on from classic BASIC and line # programming, which made Fortran in the real world twice as horrifying. I see programs written in later dialects of Fortran and they look totally fine. But my understanding is that Fortran in the "real world" is a far messier affair.
- deleted 3y ago[deleted]
- 3y ago
- ofrzeta 3y agoThe question is: what is BASIC? Just to take two examples, Atari BASIC and Atari Turbo-BASIC XL. They share some keywords but on the other side are totally different languages, for instance Turbo BASIC has structured programming constructs like procedures. Part of the problem is that the OS API is kind of restricted to basic sounds and graphics drawing primitives. For everything else you need PEEK and POKE.
- anonymousiam 3y ago"Otherwise the examples mention 122 characters per line." I'm pretty sure that should be 132 not 122.
- readyplayernull 3y agoBASIC was easy and I was able to modify some Apple Basic games and learn some techniques from their code, but using PEEK and POKE was such a mistery!
- cameldrv 3y agoI learned BASIC at age 7 and then shortly thereafter tried to learn C and failed because I couldn't seem to grasp pointers. Then I took a detour to x86 assembly language and then pointers just became obvious. The beauty of BASIC is that everything is so concrete. Every line has a number, and you just keep going down the page unless you hit a GOTO. It's easy to reason about what's going on inside the computer. Abstractions make a language powerful, but also harder to learn. This is why spreadsheets are still the most popular way of programming a computer -- they're concrete and you can see exactly what is happening in every cell.
- EvanAnderson 3y agoI took that BASIC-to-asm-to-C route (albeit 6502) and it absolutely made pointers totally make sense. I hear about people having struggles with pointers in C and I know that, almost certainly, they have no assembler experience.
- velcrovan 3y ago“The beauty of BASIC is that everything is so concrete. Every line has a number, and you just keep going down the page unless you hit a GOTO. It's easy to reason about what's going on inside the computer. Abstractions make a language powerful, but also harder to learn.” I will try to say this without bitterness: a wistful statement like this could only come from someone who hasn’t had to maintain production software of any size written in BASIC, which was my situation from 2016–2021. It was incredibly fragile and difficult to reason about, *because of* its so-called simplicity, global variables and line numbers with GOTO/GOSUB in particular. Abstractions do not always make a language harder to learn. A language with the right set of abstractions for the problem space is going to be easier than a “simpler” language that is insufficient to meet the size or complexity of the actual problem. Machine code is the most concrete of all: by your standards it ought to be the most beautiful language of all. The appropriate problem space for BASIC is “an alternative to assembler for teaching programming to middle-schoolers” — which was how I first encountered it. Using it even for that use case is irresponsible in an age where we have Python and Pyret.
- cameldrv 3y ago
- LanzVonL 3y agoBASIC was the thing that allowed non-programmers to easily start out. It was the whole reason home computers initially took off - they all ran BASIC, source code was mostly compatible across systems (as long as you didn't use special features unique to your computer) and anybody could learn it in a day. It's never been replaced or improved upon. You could argue Python is the modern BASIC but it's much more complicated and far slower, bit banging the hardware is also not something easily experimented with in Python whereas with BASIC it was the next step beyond learning the keywords on your machine. The GOTO guy has done more damage to computing than Microsoft and Google combined.
- phkamp 3y agoOne often overlooked aspect of BASIC's and COMAL's success was the educational benefit of line numbers. Several teachers who taught BASIC/COMAL in the 1970ies and 1980ies have commented to me, that the line numbers made them much easier to teach than for instance PASCAL. The line numbers enables the teacher to say "Now, look at line 240" which is much more precise and concise than "Look at the statement in the IF inside the WHILE" etc.
- cmrdporcupine 3y agoAbsolutely. And the line numbers stuff was made it much easier to write code on these machines that lacked proper text editors, and made it easier to ship a minimal programmable machine without including one. Plus it immediately and intuitively exposes the imperative sequential "turing tape" model of the computer to the user. "Do these sets of things, in sequence, now go back to this line, or forward to this, and do the things there" is far less abstract than "execute this function."
- CydeWeys 3y agoMost (all?) modern IDEs have line numbers for all languages, so if you open the code in the right program the educational benefit should still be there.
- colanderman 3y agoLine numbers in an IDE change as soon as you add or delete a line. Not the case for BASIC.
- CydeWeys 3y agoI always renumbered my lines in BASIC to be incrementing multiples of ten as I was anal about that ... But I was thinking more in the context of showing code to a class, during which you're usually not updating it, and even if you do, you just say the new line number as appropriate. It only breaks down if everyone is individually editing the same one piece of code.
- 3y ago
- BeefDinnerPurge 3y agoWhy would I hate the first programming language I learned? What I hate is the number of tools since created to enable endless tech debt and horrible engineering practices so as to increase the hiring pool of fungible coding talent. Who needed nice things anyway when we have 280 characters and inspiring influencers?
- BeefDinnerPurge 3y agoGOTO has its uses here and there, even in C/C++. It's just sometimes simpler than enabling exceptions or overthinking the indentation to annihilate the readability of code. But it's a horrible generic control structure and that's all anyone notices.
- sourcecodeplz 3y agoBASIC is what got me into programming, so there is that.
- ChuckMcM 3y agoI found that article to be great. The author does a good job of trying to understand what was going on in the 70's with programming languages. I have a small issue with their use of "Fortran 70" rather than Fortran IV (or Fortran 4 as it was called) which was far and away more used, especially in university/scientific contexts. As I've told unbelieving students that I learned to program using a Teletype and line numbers were really really useful. Later I actually used an "editor" on a DEC Writer and it was even more convoluted. (it would print the line you were editing, down arrow would move to the next line, up arrow to the previous line, right arrow would print out the current line character by character and if you typed other characters they would either be inserted or replace characters depending on the mode.) I think a case insensitive python with group delimiters rather than using indentation for groups and a line terminator character would be a good replacement. The goal is to minimize the number of new things you have to learn to get going. Concepts like grouping and individual statements seem to "stick" better with students when they can easily express that with characters in the code. (my experience teaching people to program YMMV of course).
- eszed 3y agoI, an actual adult, would love a Python like that. It's not that I can't program in Python (or that I'm sloppy with indentation - quite the reverse, actually), but I find significant white-space really difficult to read, and harder to hold in my head. I'm not sure why that is!
- ikari_pl 3y agoIt only used to be a progrem if you use more than one editor for your code. Set everything to 4 spaces and be merry! For where you have to put a newline and an indent, I tend to think of it like the mandatory "only good" formatting, which many languages suggest, or enforce, anyway. Maybe rather than "whitespace matters", we should see it more like "you gotta start an indented block after if condition:"
- ikari_pl 3y agoThank you :-) The author, being born in 1987, while interested in how things came to be the way they are, only had an 8-bit and PCs, and needed to base it on some archive digging, and it was really satisfying. I have corrected the Fortran reference - was mislead by the "70", but it turns out it was more like a WIP standard that wasn't even in use until the end of the decade. Inserting on a DEC Writer must have been... not the most intuitive experience. I think inserting characters in the middle of the line wasn't practical on anything else than a screen, even if of an electronic typewriter? It's also a great point how case sensitivity may be confusing for beginners - it's the same word after all, isn't it?
- tanepiper 3y agoI'm about to start writing some basic on my 2023 ZX Spectrum Next https://en.wikipedia.org/wiki/ZX_Spectrum_Next https://en.wikipedia.org/wiki/ZX_Spectrum_Next It was my first language - I don't think it was detrimental as it lead to me having my career in tech.
- analog31 3y agoI learned programming in BASIC. One nice thing about BASIC is that it allowed for a mechanistic model of what the computer was doing at each line. Being able to work through a program on paper was especially useful when lack of access to a physical computer for more than a few minutes a day discouraged trial-and-error programming. I think the idea of learning one bad thing and being ruined for life is a misconception about learning.
- bsder 3y agoPeople forget that these languages grew up alongside the computer they ran on. BASIC is a product of limited memory. It can run, as an interpreter, in a machine with 4K of RAM and nothing else. No ROM--No tape--No disk. Try that in any other language. The only ones that can even attempt that are Scheme and Forth. Dijkstra can slag BASIC all he wants; he had access to computers with megabytes of storage. We plebians, on the other hand, were quite lucky if we had 4K of RAM.
- teddyh 3y agoAny BASIC which lacks user-defined named subroutines (i.e. real functions, not DEF FN) is a terrible language (compared to available alternatives), especially for beginners: <https://news.ycombinator.com/item?id=35220605 https://news.ycombinator.com/item?id=35220605> I wrote BASIC code in the 1980s; both games and utility software. It is precisely because I did those things that I object to any BASIC lacking functions. The BASIC I used lacked functions, and I remember it being very difficult to do what I can now call abstractions and subroutines. This would have been vastly more easy if the BASIC I used had had user-defined proper functions.
- lproven 3y agoA subroutine isn't the same as a function. Functions return a value, and can be used by name in an assignment operation. Subroutines are not interchangeable with them and are traditionally called by line number, and lack local variables. It sounds to me like what you are referring to are procedures: named blocks of code that can accept parameters, manipulate them in local variables, and thus can call themselves, enabling recursion. If that's what you meant, I agree. I owned a few (ZX Spectrum Beta BASIC, Sam Coupe SAM BASIC, and BBC BASIC V) and it makes much clearer code very easy.
- teddyh 3y agoIt doesn’t matter what you call them, since the BASIC people seem to have such fond memories of does not have any of them as a construct in the language. What I would like, no matter what they’re called, is anything which would allow easier methods of creating abstractions.
- lproven 3y agoIt does matter, very much. Firstly, because you are so lazy and inconsistent with your terminology, it's not possible to determine what your real meaning is. Secondly, because you are muddling up separate and different terms "function", "subroutine" and not using the correct term "procedure", you are missing the core point that even simple BASICs had subroutines. 0/10, try again. Learn the right words and use them correctly.
- jantypas2 3y agoBASIC itself can't be defined -- which basic? Altair 4K, Apple ][+, Microsoft QuickBasic? Some BASICs are quite advanced, others not so much. Honestly, later versions of QuickBasic were worlds ahead of what I did on the Apple.
- ikari_pl 3y ago"which BASIC" is the first question the article answers. Turns out it was Dartmouth BASIC, much simpler than the ones on C64, CPC, XL/XE or a ZX.
- jantypas2 3y agoA blast from the past, but you have no idea how jealous I was that the PC users had "Good Basic" but not the Apple. They could use "Real Pascal" -- I think that's what drove me to C. (Yes, I probably was one of three people who had the 6502 C Compiler. Old kodger powers -- ACTIVATE! *Form of,an 80s programmer! (My sidekick will form something liquid like a case of Jolt) I miss those days, because anyone could learn to do whatever they wanted -- it was just work, not layers of corporate. Granted, it was mostly assembly language to get anything done, but it was all open And just so you know-- I have other things I can change into like: Form of - a paper tape reader/punch! form of - a modem without an AT command set! Form of - 64KB of RAM -- or less! Form of - the GOOD Byte Magazine -- but if I had to, I'd settle for an Interface Age or Creative Computing Form of - that snooty guy at the Byte Shop who wouldn't talk to this kid because he had no money Maybe I should have called them Blue-Smoke powers -- I certainly made enough of that.
- todd8 3y agoBASIC was almost my first programming language. Ten years before anybody had a home computer (1967), I decided that I would write a program. I was just a kid and I came across a keypunch machine in a small room at my high school. After reading a book on FORTRAN I keypunched a program that was supposed to solve optimization problems over sets of linear equations in a number of unknowns constrained by a set of inequalities. The algorithm for doing this is known as the Simplex Method. I gave the deck of cards to a friend and a couple of days later I got the fan-fold paper output that listed a bunch of syntax errors and nothing else. I just didn't understand programming very well. BASIC is what got me on track. I found a book in my local public library on the relatively new language BASIC. It was easy to understand and I practiced writing out the solutions to simple problems with paper and pencil. I didn't have access to a BASIC system, but I learned enough that I could try FORTRAN again (this time on simpler problems). After a few attempts (with the two day turnaround) I was successful and programming became a hobby that eventually led to a career as a real computer scientist. BASIC was just right. It was concrete enough for a novice to understand while being much more expressive than assembly language. I've never actually run any program that I wrote in BASIC, but I have written programs in scores of languages since and BASIC got me started. Today, there are better choices for a first language: Python provides students with a lot of power right away, and my daughter learned Scheme as her first language and never had difficulties in later classes with recursion or functions as values.
- ikari_pl 3y agoI love this story! You are right, I should have, and wanted to have mentioned Python for everything else than creative coding - I think I got too dragged into that direction. Python is the language that takes the "how" out of the way, and lets you do what you want to do, focusing on the goal. Scheme, like Lisp, no matter how popular, seem to me a little... esoteric? Even though there's no reason to, they're easy to parse, and enchantingly functional. Maybe that's how BASIC spoiled me, pushing me towards procedural code on day 1? :)
- Retro79 3y agoHello, I would like to get in contact with you (todd8) regarding TI and their old software development services. You wrote in another post that you were involved modernizing their stack back then. I'm a hobby computer games researcher and looking for info regarding TI's old programming services of the 70s. I have added an icloud email address to my profile. Could you please reach out? Thanks so much! P.S.: This is not a scam and I'm not some weird prince from your spam emails...
- ikari_pl 3y agoAuthor here. I thought my wordpress stats are broken, when instead of the usual 3-10 vitits it showed 3800 :'). Thank you. A personal background: writing this article was fun! I started with BASIC too, I was about 6, and the Amstrad CPC6128 my dad had was 8 already. You can tell by how I treat Locomotive BASIC like a reference implementation of the 80s. I knew Pascal only from a label on diskette 5 (but someone replaced it with invoices), listings from 80s Bajtek magazine stash that I mostly got from a friend (he had an Atari 65XE but was switching to a... Pentium III 500Mhz), and the manual for the Amstrad and having A LOT of free time were my source of knowledge. I remember trying to replicate (in BASIC!) the UI of first computerized cash registers from the shops, when I was 12. I knew Dijkstra made the quote, but never before asked myself: when did he do it? Was it the BASIC I know? What did people use, probably just assembly, right? Wrong! It's amazing how much old documents, newsletters, and documentation you can find from the 70s, and how many the problems it did not change that much today, even though the computers changed incredibly. I'll read through the comments here, and for sure won't miss any on the site itself.
- kazinator 3y agoBASIC was so horrible that it was obvious to me, even as a complete neophyte, that it sucked. I quickly gained the understanding that BASIC itself is a computer program written in machine language, which offers a dumbed-down way of using the computer. When I saw what assembly language is like, I immediately realized that, look, even though this is a difficult language in which you specify minute details, ... even in such a language you don't have to put a stupid line number on every line!
- ikari_pl 3y agoCan we ask for some context? Was it the first language you tried? Was it a PC or an 8-bit home computer? ...and weren't line numbers a parallel to memory addresses? Not named, of course.
- thrance 3y agoMy first exposure to programmming was by coding in TI-BASIC on my TI calculator during math class in highschool. I never thought of going online to learn more so I had to explore what every builtin functions did. Them being written in a foreign language also did not help. Discovering "Then" and being able to make a multi-line "If" block was a revelation. I didn't know a single developer back then. I think I still have that silly device somewhere to which I owe so much.
- bvan 3y agoBASIC opened the door to computing for a great many people. It usually gets bashed by (a) academics or (b) CS students who have not yet had any productive, real-world, development experience. I know many folks who started with BASIC and went on to become excellent programmers/developers. At the end of the day, what matters is the end-product. Your users don’t care what programming language or tech you used to solve their problem.