Hacker News new | past | comments | ask | show | jobs | submit login
30 years later, QBasic is still the best (nicolasbize.com)
373 points by AlexeyBrin on May 26, 2018 | hide | past | favorite | 195 comments



Oh, how many hours I spent in front of that TUI. QBasic was how programming should be. It's amazingly simple to understand (at the cost of ugly and somewhat verbose syntax). It doesn't force any mental burdens on you, and it included both a compiler and a interpreter, so you could run your programs instantly (with array out-of-bounds and overflow checking) and have a fast, compiled version.

I wrote plenty of programs that worked the first time I ran them, something that seldom happened to me in more modern programming environments, which put many mental burdens on you, and encourage writing fast and sloppily, and then improving your mistakes afterwards. You don't need any boilerplate - I regularly used QBasic to just plot a graph for example (in a program written from scratch).

Also, I like the approach to pointers is very nice, I think. There are no pointers. You need to PEEK or POKE into memory! In C you do

    a = *b
In QBasic you do

    a = PEEK(b)
Which is so easy to understand that I sometimes wonder if pointers is C are even an improvement to this. I'm probably being a bit nostalgic here, but I genuinely miss the feeling of mastery and understanding I had when I used QBASIC. I could do anything I needed inside the editor. No plethora of tabs and windows. In my opinion, programming is too complicated nowadays.

Edit: More nostalgy! The help system was absolutely amazing. It was possible to read a keyword for the first time, press F1, and two minutes later you would actually understand the statement. Something I never experienced afterwards.


+10000000 on the help system alone. Those people deserve a prize for making so many first time programming experiences so accessible. I read the QB help back to front as a kid


Reading the QBasic help is literally how I learned to program. I owe it my livelihood.


I started out by reading the GWBASIC manual, a 500-page tome I found in our bookshelf at home. Then I asked my father whether he could get me GWBASIC and noted that he'd have something better, QBasic, which had integrated help. It was so much better and always just a keystroke away.

Turbo Pascal was also an awesome development experience back then.


The help system was amazing even for someone who could barely read English at the time.


It helped me learn english and programming at the same time.


I probably spent months playing with just the graphics programming tutorials. Copy-paste some of the tutorial code and slowly start changing things. I didn't speak English very well but somehow those tutorials were still helpful.


IIRC QBasic, which came bundled with MSDOS, didn’t have a compiler. QuickBasic, a stand-alone product, did have the compiler.


I remember the excitement of being able to finally make my own .exe files with QuickBasic. It was like earning a new merit badge. First .bat, then .exe, then later using PC Magazine's "DOS Power Tools" book I started to write what I recall were .com files using assembly that was entered into some crude edit software that shipped with DOS. I kind of wish I would have gone deeper with that; instead I tried to dive into Linux and spent years trying to get just daily-user comfortable. :-)


When I was about 10 there was nothing I wanted more than to have a program that took minutes to build into an .EXE. In my mind that implied complexity and 'real' programming. Of course, as a professional 30 years later, waiting for compilers is something I could do without.


>> instead I tried to dive into Linux and spent years trying to get just daily-user comfortable

Ended up being the right bet though. :)

Did the same thing myself. Struggled for years in Slackware and other builds... had to write my own ADSL driver for broadband to work. Had a dual booting Gateway 2000 PC and always cringed when I selected Linux from the GRUB booter... but it served me very well decades later.


>I started to write what I recall were .com files using assembly that was entered into some crude edit software that shipped with DOS

That must have been debug.com [0]

[0] https://en.wikipedia.org/wiki/Debug_(command)


And actually, QuickBasic came first. It's final release was v.4.5 in 1988.

QBasic happened much later, 1991, as part of MS-DOS 5.0. It was considered to be a subset of QuickBasic.

So QuickBasic, as well as it's big brother, Microsoft Basic Professional Development System (which almost no one remembers), was essentially dead by the time QBasic was released.

I only ever used QuickBasic. I still have the manual. Can't make myself part with it.


I remember the PDS!

I had it a stack of 3.5" floppies, and the last disk had a bad spot, so some of the framework was impossible to use because I couldn't install it.

That being said, the QuickBasic line and the PDS were amazing -- even the PDS had reams of online documentation on how to use the tooling, straight from the IDE.

I distinctly remember the days my Dad showed me the linker and the library managers. It was like magic: now I could re-use whole chunks of my programs in other programs. Totally world-changing for a little 12 year old kid on an IBM PS/2 Model 50.


You’re right. QuickBASIC was replaced with VisualBASIC for Applications (vba), v1.0 was for MS-DOS


I think you are confusing Visual Basic with Visual Basic for Applications (VBA). The former is an independent programming language, the later is only for embedding into other applications (such as Microsoft Office). VBA is an embedded version of Visual Basic, it is missing a few features (most importantly the ability to compile to .EXE files).

There was Visual Basic for Windows 1.0 and Visual Basic for MS-DOS 1.0. The UI frameworks were completely different – Windows was GUI, MS-DOS was character mode. The Windows versions continued on until VB6, before being replaced by the very different Visual Basic.NET. Visual Basic for MS-DOS was discontinued after 1.0.


That's an approach to directly accessing memory not an approach to 'pointers'. Pointers are an entirely different language facility. For one thing, they're typed. PEEK just gives you bytes and you can neither reference or dereference anything.


I'm not sure I understand.

Can't you do something like PEEK(PEEK(a)) or PEEK(PEEK(a)*256+PEEK(a+1)) ?

I always thought of pointers as indirect addressing mode when I was learning about the 6502.


You can't take the address of a A$, for instance, and do anything with it. And in your case 'A' is always in bytes unlike a C pointer which has arithmetic that depends on its type. PEEKs and POKEs are not pointers.


QBasic has VARADR (or VARADDR) that gives you the memory location for a variable. QuickBasic also has SADD which gives you the memory location for the first character of a string, although for some reason it isn't available in QBasic (but you can figure out from the string data anyway, VARADR(A$) points to a pair of length+data words).


Real pointers, those used by Assembly are also untyped.

Other Basic dialects, including QBasic's big brother, had a Varadr function or similar, to take an address.

C is not the absolute truth in pointer manipulation across programming languages.


Next you'll be telling me laser pointers have colours and there are several dog breeds named 'pointer'. Pointer dogs are furry.


I don't need jokes about laser pointers to present languages, some of them much older than C, which have pointers with 1:1 features to C ones.

Of course, it kind of hurts the urban myth that C is a special snowflake among systems programming languages, having languages almost 10 years older with such features.


The original comment was a comparison of pointers in C and PEEKs and POKEs in BASIC. So making up stuff about how assembly has 'pointers' or trying to start some argument about C with a statement nobody made is not really much more directly related to what we're discussing than a comment about the music of the Pointer Sisters.


So back to Basic then, this is Turbo Basic (1987)

    ' a = *addr
    a = PEEK (addr%)

    '  *addr = value
    POKE addr%, value

    'a = addr
    a = addr

    'addr++
    INCR addr%, 2

    'a = &variable
    DEF SEG = VARSEG(variable)
    a = VARPTR(varible)
    a = VARPTR$(varible)
Album, http://www.bitsavers.org/pdf/borland/Borland_Turbo_BASIC_Own...

Or to stay with QuickBasic dialects, Freebasic music tunes

https://www.freebasic.net/wiki/wikka.php?wakka=TblComparison...

Which also provides the SIZEOF chord, simplifying the increment operations of memory addresses.


> For one thing, they're typed.

Pointers were invented in PL/I, where they were specifically untyped.


The comment I replied to makes a specific comparison with C not PL/I.


Well, I'm not sure if there are strict rules to what should be called a pointer and what not (which was why I was a little bit vague in my post: In my defense, I stated "there are no pointers"). I think you can still dereference something by just manually copying the bytes.


>> I wrote plenty of programs that worked the first time I ran them, something that seldom happened to me in more modern programming environments

You know, I never really thought of programming in this way. You are very correct about this and it makes me sad in a way.


I have never heard of QBasic, but now I want to learn it just to understand your experiences with it and grasp why you think it's how programming should be versus how programming is now. Maybe we can learn a thing or two from the past?


Not parent, but here's a few bits:

check out pete's qb site for programs and code snippets for one point of reference: http://www.petesqbsite.com/downloads/downloads.shtml

In my opinion it's great because of how accessible it is. It's very easy to experiment with unfamiliar commands and rapid prototype. I learned QBasic before Pascal and C++, and was disappointed at the absence of an equivalent to many of the functions that made programming quicker and easier.


That's the site I used the most, together with qbasic.com (which is no longer up) :)



It’s a really fun language to play in. I also recommend Modula 2 - it’s more C-like but is equally easy to get something up an running with.


The answer is easy: Try searching * in google, n see what you find.


Yes! I had a completely surprising and visceral surge of feeling when I saw the screenshot of the UI. So many lazy summer days holed up with my 286 making silly shit. It seemed deeply magical. Like a portal to a secret world.


Black Annex is an indie game, made entirely in QB64, still in development. Very impressive.

* https://store.steampowered.com/app/248590/Black_Annex/

More info and interview:

https://www.gamasutra.com/view/news/190504/Black_Annex_A_QBa...

The dev even released a copy of the source code:

* http://www.qb64.net/forum/index.php?topic=12348.0

* https://gist.githubusercontent.com/anonymous/8fdec5275b2c3e8...


IMHO TI-BASIC is one of the best environments for learning. Not because it's the most capable of languages or runtime engines, but because it has menus. Lots and lots of menus. The usability on a phone emulator is the same as the real thing.

When you're starting out, and even more so when you're young, syntax is the issue. Every paren and sigil you have to type or complicated function name you have to spell is one more bomb that could explode. Keyboarding is tedious. Vocabulary is hard.

And on the TI's, most of that is eliminated by the method of input. While you can turn on an alphabetic mode to type characters, and simple algebraic expressions can be input from the calculator face keys, the environment pushes you to browse and explore the menus of library functions. Browsing is fun at any age. It is not the most efficient thing, but programming was never about how fast you can type.

So your syntax error rate goes way down and while some reference and guidance is needed to know how to use a lot of the functionality, you can focus more on the semantics of, e.g., "what is a subscript error?"

Environments that go heavily graphical like Scratch also have this kind of benefit, but the method used by TI-BASIC, which is mostly an artifact of being designed for a limited interface circa 1990, results in source code that looks and behaves similarly to other languages, making it that extra bit more transferrable.

And the functionality is good for drawing things and building up math concepts, although it's not great as a games environment. I remember my older brother making an Asteroids clone on his TI-82. He got it to where it rendered everything, moved and rotated objects, and took input, but he ran out of single-letter variable names to use. I think if he had known to use the built in matrix and list functionality to store object state and do transforms, he would have been able to take it much farther, but there was a lack of guidance on these things in the early 90's.


>He got it to where it rendered everything, moved and rotated objects, and took input, but he ran out of single-letter variable names to use.

The sheer amount of time that would have had to have gone in to that is a testament to the power of kids feeling bored to a level that may not actually exist any more. We have, today, tools that make things less tedious than writing matrix transforms in single-letter variable names, but at the same time we have computer games and more recently social apps raising the tedium floor that anyone is willing to put up with. If there was a way to combine modern tools with 1980s tenacity we'd probably end up with a golden era on our hands.


They still get bored like that. My daughter demolished the universe in The Sims by getting them stuck in a loop, making and endless pile of grilled-cheese sandwiches.

Not on the same league as Asteroids on a TI calculator, I admit, but squarely in the realm of Computer Science.


The other great thing was the built in motivation, that you could get your homework done faster with only a little effort. I remember one of my earliest successes was a classical mechanics solver where you could put in whatever you knew (time and distance) and it would spit out whatever it could come up with (average velocity and average acceleration assuming initial velocity of 0). Pretty handy!

And of course you can have this device in your hands during many classes making it so at a moment of enforced boredom you have the opportunity to learn.


Totally agree !

I basically learned to code on a TI-83.

The fact that it's a mobile programming platform is a huge plus as well. I haven't seen anything comparable on smart phones. And a touch screen just can't compete with that keyboard. Even if it is a weird layout.

Underrated device !


I knew that you could program on a TI-83. But after I was exposed to QBasic on a 586 PC-clone machine, diddling around on a calculator held very little interest. Nothing will ever be able to surpass a real keyboard and mouse.


I had both as a teenager, but ended up spending far more time programming in TI-Basic, only because I could take my TI-83 everywhere. I even got in trouble a few times for trying to sneak it in my suit jacket to formal-ish occasions I didn’t want to be at. And Z80 assembly programming offered an incredibly compelling allure (though I never got past simple programs full of ROM calls).


It's amazing how powerful and diverse the BASIC scene was when it was hot. Today we think of BASIC as a kid's toy. But people did some really quite serious heavy lifting with it in the 80's.

Canon's BASIC for its 6809-based system was almost on par with FORTRAN in many ways.

It also had fraction, rounding, modulus, min and max functions. And even named program segments. Like this example from the July, 1982 issue of Byte:

  10 FOR I=1 TO 100
  20 N=N+1
  30 IF N>2000 GOTO [FINIS]
  40 NEXT I
  50 [FINIS] PRINT I: END
You could save a screenshot with the SAVECRT% command, and then load screenshots directly back into video memory with LOADCRT%.

You could also conserve memory space by keeping portions of your program on disk and it would load them on the fly. Kind of like today's function() calls, except each function would be its own file on the floppy. You could even pass variables between the main loop and floppy-based functions very easily.


Likewise the HP-9845. I was a co-op at General Electric's Wilmington NC nuclear fuels plant in '83 - '84 (think $$$ floating around), and taught myself how to program the thing. Over the course of 9 months in 3 month stints, I wrote 10,000s of LOC taking radiological data and generating contour plots of the sampled radioactivity throughout the plant, and sent HPGL plots to this fantastic plotter. All higher level algorithms I coded by hand but the scientific and graphics (2D) libraries were solid. There must have been some, but I don't recall ever spending more than 5 min on a bug, my own, or in the system. A profoundly deep pleasure it was to work on that system. Only ever exceeded by turbo-pascal.

This was back in the days where an undergraduate could work alternating quarters and entirely pay for a BS at Georgia Tech, out-of-state. Not all things progress over time.

All that said, I will live in C++17++/cmake/emacs till the day I die. Even though cmake is hideous (but does work) and hey what is that glitch in emacs about?


Funny you should mention emacs. Nothing so fancy on the CX-1. But it was lauded because its BASIC editor was similar to ed!


But of course there was no emacs on the HP-9845. The integrated editor was "just there". I had no idea you could do things differently, and it was just perfect, for my brain, at that time.


The BASIC implementation on the CDC 6700 behaves almost identical to the much later BASIC implementations on the 8-bit micros such as the Commodore 64.

I'm assuming that this implementation was used for real work, as I doubt the CDC 6700 was used for playing around with.


I remember learning QBasic 23 years ago, (35 years old), I was left alone tinkering with a program that drew circles wrote for me by an engineer family member. At first I thought the circles were an image that was stored on the computer and all the program did was to display it. I then realized there is a thing called circle equation, I didn't understand it but I knew when I changed the parameters to it the circles would get bigger or smaller or sometimes not be circles at all which would make me sad. I loved programming more than anything else.


I initially started learning to code in middle school with QBasic around 1999. I'm 30 now so we were around the same age when we started discovering programming. Anyways, I stole my high-school brother's geometry book to learn about sines and cosines so I could make things move in a circle.


I made a qbasic baseball game when I was in high-school, about 1995. I was so proud of how I made the baseball go towards the mound by using a for loop and increasing the size of a white circle


After my friend showed me QBASIC in elementary school, I fired it up at home and made a new file called Football (I had been playing that on the NES). Then I tried to run it.


Here is a nice article about the creation and evolution of BASIC: Fifty Years of BASIC, the Programming Language That Made Computers Personal: http://time.com/69316/basic/

An excerpt from the article: "Once upon a time, knowing how to use a computer was virtually synonymous with knowing how to program one. And the thing that made it possible was a programming language called BASIC."

By the way, I have preserved an IBM Logo interpreter, a GW-BASIC interpreter, and a QuickBasic compiler from my childhood days here: https://github.com/susam/dosage/tree/master/langs. These three tools has played an important role in my life because these tools got me interested in programming.

Logo showed me how simple and elegant programming can be. The fact that it produced cool visual effects was a bonus. For example:

  REPEAT 10 [REPEAT 360 [FD 1 RT 1] RT 36]
Logo gave me a brief taste of functional programming even though back then I did not know the term "functional programming". I discovered the same simplicity and elegance later in Lisp about 15 years later. After all, Logo can be thought of as a dialect of Lisp without parentheses that controls a turtle.

GW-BASIC introduced me to procedural programming language. It was fun but I was unhappy that I could not produce .EXE files with it. Somehow .EXE files felt more real. Being naive, I would rename .BAS files to .EXE files hoping that it would somehow make it a standalone executable. Finally, I found the holy grail when I found QuickBasic compiler which could compile .BAS files to .EXEs. This experience taught me the difference between source code and machine code.


> This experience taught me the difference between source code and machine code.

Ironically the way QuickBasic works is that it concatenates the BASIC interpreter with a copy of your .BAS file to form the .EXE file. There is no machine code generated.


Then why was the compiled exe faster than running the program in the interpreter?


A slightly more modern but still old language that has many of the same benefits of QBasic but fewer of the downsides is Turing. It's used to teach programming in many Canadian high schools and was designed as a teaching language.

Nice things about Turing (many of which are similar to QBasic):

- Hello world is `put "Hello World!"`

- Really easy syntax with no semicolons

- Super easy 2d graphics e.g `Draw.Box(0,0,100,100,black)`

- The graphics starts easy with immediate mode and named colors but ramps smoothly into double-buffered full RGB drawing while still using the same primitives.

- Easy to load images, turn them into sprites, treat a certain color as transparent so you can author things in MS Paint.

- Built in help with really nice documentation of every function, with a large standard library of helpful things.

Check out http://compsci.ca/holtsoft/IPT.pdf and http://tristan.hume.ca/openturing/


Turing! I made a pager in that for a high school class. We were supposed to be writing some kind of multimedia story. I didn't get a great mark.


Turing was great! I remember making a Scorched Earth clone with it in high school.


Cut my programming teeth on QBASIC...Well, actually BASICA on the IBM PC before that. Still got my "101 BASIC Games" book on a shelf here somewhere, very tattered and dog eared.

My personal favourite though, was creating 'look alike' apps of existing accounting and database system that ran on the IBM XT's in the offices I interned at back in the day, with fake but world ending error messages that would pop up when the operator tried to select menu options or fill in fields. (This was the days of "War Games" too, so it was fun to see a receptionist freak out when she saw a "Connected to NORAD - Commencing missile launch sequence in 10... 9... 8...")


Funny. This site is blocked at the Legoland Hotel for being a hacking site:

Access Denied

http://www.nicolasbize.com/blog/30-years-later-qbasic-is-sti...

The web page you are trying to access has been blocked.

The URL has been categorized under: Criminal Skills/Hacking for Merlin Entertainment. - LLC Hotel [63.145.217.227]

Please contact your support team if you feel that this is incorrect.


I think Glitch with Javascript+HTML is great for kids. The trick is to not get into the how and why, but instead let them modify things and work up to writing their own code. I just wrapped-up a project with 5th graders where the kids designed a pixel animation in Google Slides, coded it in Javascript, converted it to C, uploaded it to an Arduino to control WS2812B LEDs. The result is animated digital art. We put a blank canvas in front of the LEDs and the effect is cool.

Here’s the code on Glitch: https://led-picture-frame.glitch.me

And here is the finished project: https://www.dropbox.com/s/7p20dvbhtsp83yw/IMG_2125.JPG?dl=0


BASIC and QB really spoiled me. Whenever I encountered another language I would always have a few questions.

1. How do I generate random numbers (great for making simple games)?

2. How do I get interactive input, including getting a single keypress without having to press ENTER (again, great for single games)

3. How do I draw graphics on the screen? Circles. Lines. Points.

With these three I made really fun programs as a kid about the age of this post's son.

The big languages in those days were C. C++ and Java. Doing these simple things was an incredible pain. I just cogent bring myself to go beyond (and I had not heard of Perl).

Then I took my first formal programming class in college. While it was a breeze, it was also incredibly unmotivating. I always felt if they started with these three things, an order of magnitude more people would do hobby software development.


I have been a C/C++ programmer for over 10 years now, and coming from the same background as you, QBasic, I know just what you mean. The build and dependency systems for C/C++ are atrocious and not made for humans. The syntax is from a time when you didn't want your code to use up all your storage, and its been evolving slowly since. Unfortunately, nothing can fix the worst parts of either language short of starting over, and at this point, since we all know them well enough not to care, we are just stuck with them. Going to CppCon and watching the YT videos, all I see is an ever-increasing burden on the programmer to know obscure facts and the current trends to correctly write "modern" C++. I will stop myself before getting to the template meta-programming language hidden away, that no one tells you about before its too late. :) At the very least C has a consistent calling convention per architecture. C really just needs a better standard library, from scratch, and it could be the modern BASIC with worse syntax.

Might as well mention, I have used FreeBASIC before and its quite good and very mature. It generates C/C++ code (I don't remember the details) and compiles using GCC! If the compiler can generate standard C/C++ code, there is good reason to believe the project could be maintained forever and compete with other languages.


I don’t think that syntax is important here. What your parent commenter says is that he misses INKEY and SCREEN/LINE features out of box. Fun thing is that old Borland C and Watcom C (iirc) had these functions and modes too. getkey/kbhit for inkey and initgraph() from bgi/watcom variant for screen drawing. Modern environments do not allow to simply draw or listen to keys, it is so boring.


JavaScript's key event listeners, but those are a complete and utter pain.

Canvas is also somewhat nice once you figure out how to work with it. I still don't completely understand the ideas behind it. There seems to be a specific paradigm behind it that none of the tutorials I've gone through have shown me.


The fact that it is so fucking hard to respond to keystrokes and write some pixels on the screen in modern programming languages is more than a little damning.


That pretty much says it all.


PICO-8, which the parent article only name dropped without explaining why he felt it wasn't adequate, has these things you're talking built in, and was designed with making simple games specifically.

The editor has a built in sprite, level, and music editor, and you can also download any game and then enter edit mode to see what code it used, just like I did with QBasic games as a kid. It's not exactly as easy as QBasic, since it's based on LUA syntax, but it's pretty darn close that I don't think it should be ruled out.

It's the closest thing since Adobe Flash that gave me a similar feeling to making games in QBasic.


Have you given Processing or it's JS offspring p5js a shot?

https://processing.org/

https://p5js.org/


I couldn’t do the key input thing in BASIC for MS-DOS. I remember having to set the F keys to macros that would enter something for me. Maybe I just couldnt figure out the right command.

Check out PyGame for instance to do all that on current systems. That’s what I’ve used lately.


PyGame is probably the closest I have found to the ease of use of old QBasic, for simple graphics. Almost everything else that you use makes you proxy through some sort of OpenGL-esque abstraction, that makes 2D graphics far harder than they ought to be.


You were probably using GW-BASIC instead of QBasic.


Parent post said "BASIC and QB..." that's why I specified "BASIC for MS-DOS". I guess that was ambiguous. Technically I was using BASICA.COM (Advanced Basic on PC-DOS which relied on BASIC subroutines stored in ROM, which only IBM PCs, not compatibles, had) not GW-Basic which is what MS-DOS used, which had all the routines in the executable which loaded into RAM, and ended up running programs faster.


Absolutely agree. I went through the same quest with my kids around that age. Scratch is OK but feels a bit limited. Tried finding a contemporary Logo but that language seems long dead. Python/Ruby probably great for older kids but too complex, verbose, etc... for little ones. Basic has its issues but the blend of interactivity, simplicity, and open ended nature can’t be beat for 6-9 year olds.


> Tried finding a contemporary Logo but that language seems long dead.

https://ccl.northwestern.edu/netlogo/


FMSLogo is a modern implementation of Logo that comes batteries included with its own IDE, and interactive sound and graphics. Last updated 2017, so still current.

http://fmslogo.sourceforge.net/

Professor Brian Harvey of Berkely has made freely available the three volumes of his 'Computer Science Logo Style', along with UCBLogo here:

https://people.eecs.berkeley.edu/~bh/logo.html


FWIW Python does ship with the turtle module as part of the standard library:

https://docs.python.org/3/library/turtle.html?highlight=turt...

Though I don't know if that counts as a Logo implementation.


It's unmaintained, but load81 by Antirez tries to solve this problem with the modern tools of Lua and SDL wrapped in a simple IDE. Check it out: https://github.com/antirez/load81


Great article. I have used computers my whole life (my parents heard it was the future), but, only started programming in high school. None of the science teachers knew how to program, so they gave it to the gym teacher. He said: "you guys figure it out ... and when you get stuff working, teach the others." It sounds bad, but, he was one of the best teachers I had in grade school. We just messed around for an hour 3 days a week. At the end we had to present a program. I still remember the output screen (it was graphical), but, not the code. Anyway, I did CS and have been a programmer for ~18 years. It was some form of BASIC, not sure if this was it. The screen looks familiar.

    The best part was that I was not forced to do it.  I just tried it and liked it.  Parents hear there is money in programming and try to make their kids do it.  It can lead to an unhappy life.  Parents, expose your kids to lots of things, let them pick.


If you don't have GOTO loops, how do you leave infinite print loops running on the demo TRS-80's at the local Radio Shack?


Such nostalgia! I used to make fake dos prompts that would do strange things to commands that looked almost right. I was such a little twerp.


This was even more fun at a place like Sears or K-Mart where the sales folk were generally less technically savvy than Radio Shack.


  10 PRINT “foo”
  20 RUN


while True: print "Welcome to RS"


If only 14-yr-old me had known that in 1978!


;)


I started with BBC Basic running in an emulator on a PC aged around 12, I forget when I discovered QBasic but I was pretty excited about being able to use 256 colors VGA or 'high resolution' 640x480. I moved on to Turbo C++ when I wanted my mandelbrot set to display faster as I'd heard C++ was fast from somewhere (this was pre-Internet for me).

Initially I was pretty frustrated at how difficult it was to get into 256 color VGA mode 13 with Turbo C++ but remember the language itself seeming much more elegant even knowing the little I did as an early teen. Figuring out how to use inline assembly to generate interrupts to switch video modes, change palettes, etc. started me down the path of low level programming that led me to a career in video games though so it kind of worked out.


I'm only 24, so I never used qbasic or anything. But one of the first programming languages I self taught was Free basic. If I remember corectly, one of its advertised features was a qbasic compatibility mode.


I have seen large real-word applications written in QBASIC. It's nothing to sneeze at. I think we often overlook the value of simplicity. Today's "high abstraction" languages offer a great deal, but when the rubber hits the road, they too often prove more trouble than they are worth.


I feel the same way. I loved QBasic and when I started college I had a leg up on a lot of folks.

I am kind of jealous of you. I tried introducing my kids to programming and they simply do not show any interest.


My first proper approach to programming was a BASIC dialect for the Pocket Viewer (An early Casio PDA). At that point I already knew how to work with a computer, how to download programs from the Internet and load them up in floppy disks or burn them to CDs (My computer didn't even have any USB ports) although my time with the family computer was rather limited whereas I could use Dad's Pocket Viewer which he didn't like a whole much and practically gave away to me any time I wanted.

It was really limited, with no real means to access the system's memory save for a couple roundabout ways including yes, actual PEEKing and POKEing of all things. But it was still extremely fun despite its limitations. I wrote a simple text adventure game, a virtual die (so I could play board games whenever my little brother "lost" their dice) and even a simple poll app (Presidential elections and how they were supposedly rigged with electronic voting was a big topic back then. Nowadays it's just a given where I live). I have no doubt these first approaches tend to be the most important and keep having an influence even way later on.


I really thought it was just me who loved QBASIC. I wrote my first game ‘Dancing Dobbins’ the horse racing and betting game on qbasic. It started off as a simple gambling simulator and got more and more weird with horses going mad and attackig each other as they raced. Had to draw each horse by hand with line Co-ordinates. I remember writing programs down in a notebook while at my granny’s house.


Oh, the memories. My best mate taught me QBASIC 18 years ago. I was ten years old and we did not have Internet access or documentation but we had endless fun. I still remember some of the apps we wrote.


Almost the exact same situation here, except that it was closer to 28 years ago. :)


Almost exact same situation here, except it was ~2004 and my library's copy of "QBASIC for Dummies"


Oh boy, this brings back memories. First c64 basic, then a bit of a qbasic, but then I started fiddling with turbo pascal and I still miss the sheer speed and debug capabilities fo the IDE (compared to modern frontend development).

I just hit F9 and even my biggest programs compiled less than a sec on a 386 :)


How has no one mentioned the best part of QBASIC??? The question mark character character is a shortcut for inserting a PRINT statement. <3


It still is in Visual Studio's Immediate window.


BBC BASIC every time. I'm getting my kids ARM laptops and installing RISC OS Pico on there for them. 2 seconds straight into a CLI with native BASIC and assembler.

And they already know the GOTO 10 loop and love it. Donald Knuth was wrong, IMO.


What was Donald Knuth wrong about?


I think it's a reference to this: https://en.wikipedia.org/wiki/Considered_harmful


I thought it might be, but isn't that backwards then? (Or is bencollier49 arguing against GOTO?)

It was Dijkstra who wrote "Go To Statement Considered Harmful" and it was Knuth in reply who wrote the best analysis (and defence in appropriate contexts) of the GOTO statement (in Structured Programming with Go To Statements: https://pic.plover.com/knuth-GOTO.pdf), and who still uses GOTO cheerfully and liberally in his programs. (https://twitter.com/svat/status/913114286951505920 , https://twitter.com/svat/status/885344334735745024 , https://github.com/shreevatsa/knuth-literate-programs/blob/m... ) — so it seems really hard to understand that a comment that seems to be positive about GOTO is invoking as "wrong" the name of probably the most prominent programmer to still use them. Very puzzling. Of course it might just be a mistake, confusing Dijkstra for Knuth, but worth asking for clarification.


Also relevant is EWD's belief that exposure to BASIC inflicts permanent damage on a student's brains.

edit:

> It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.

from EWD498: How do we tell truths that might hurt? (http://www.cs.utexas.edu/users/EWD/transcriptions/EWD04xx/EW...)


It was Dijkstra! My mistake!


Ah ok, thought it might be, thanks for clarifying. :-) You may like to look into Knuth's reasons for liking goto.


That GOTO is harmful. Kids find joy in it!


I also have fond memories of QBasic and a 7 year old.

I agree with few comments here that: - Javascript has the best deployability - Python has the nice syntax - QBasic was a nice IDE

I wrote a simple IDE that will transpile Python into Javascript and run it.

* Play with it at https://educa.juegos/

The full source code is at https://github.com/somosazucar/Jappy

Play with it! If you make something fun I'd love to hear it.


Oh and my 7yo loves it!


Ah, sweet nostalgia. 26 years ago, our once-a-month science teacher in elementary school showed us how to find, open, and use QBasic to print "Hello World." 24 years ago, my Dad took home a computer that his work was going to throw away, and I opened QBasic and started reading the help file. Opening that help file changed every aspect of my life from that moment on. Sometimes I wonder what I would have done with my life if any part of that sequence of events had not occurred.


ZX81 loyal here. Programming in BASIC. Saving code to a cassette tape. Spending an hour typing in a program in order to play a simple game. 'Twas a simpler time. Memories!!


I started my coding journey with GW-BASIC. My teacher used to make whole class do coding on paper, "dry running" the code before we go to the lab and sit in front of an actual computer. The process seemed to be an overkill initially but as I got better with it, I started to take interest in reviewing other people's codes and understanding code written in books without actually typing it in.


Scratch seems pretty cool for kids too.


Would've been interesting to hear how Scratch would go over with a 7 year old. The folks over at Raspberry Pi are pushing it quite hard for education. Lego Mindstorms also started out a long time ago with a flow chart language.


It's phenomenally popular. Scratch Jr for early beginners and thrn Scratchy when they outgrow Jr.


I agree with the article, but i'd prefer QuickBasic over QBasic. I've said it before and say it again now: if only Embarcadero provided a free Delphi (Pascal!) IDE with a big round shiny "Run" button that for console (CLI) development, together with some common sense 21st century code insight. Hints are better than errors.


I am entirely biased, but I agree, Qbasic is awesome. In seconds a complete novice could write a program that did "something", and get visual feedback from that program. In hours, a complete novice could do something useful, and in a few years, they could see how QBasic created a very nice ramp up to more powerful languages.


I started out with BASIC on a TI-99/4A. In comparison, MS-BASIC/GW-BASIC was positively luxurious.

I spent so many hours with the yellow-cover copy of Ahl's "BASIC COMPUTER GAMES":

https://www.atariarchives.org/basicgames/


I too remember QBASIC with a lot of nostalgia, but surely Python is a better choice for introducing kids to programming today.

  name = input("what's your name?")
  if name == "Noah":
     print "you're the best!"
  else:
     print "you're the worst"


What are you hoping to prove with the example? That folks that know and understand many of the idioms of programming can easily read this?

Not to mention it does invert many of the things that people coming to it will want.

Consider, you want to tell the computer to ask for something. Once it has an answer, put it in a spot.

    name = input("what's your name?")
That goes the other direction. You start with what you want to store, and then you turned the input into a function. Of course.

Contrast with the BASIC.

    INPUT "What's your name"; name$
You began with what you want the computer to do, input something. You did have to learn "input", but you had to learn that in both. So, it is a wash. There are the odd semicolons. I'd imagine that took some effort.

I'm not going to defend basic as a paragon of programming. But I don't think there is an easy answer. There are tradeoffs. BASIC was the answer in the past, as much because it was free and installed in a lot of default locations as anything else. There are alternatives now. None as widespread as Javascript, as much as the saddens me, personally. It is probably the best choice for people today.


Ok, so explain what an editor is, how to invoke and exit it, explain files, and how to run python programs. Also, indenting.


* Indenting is a good way to help explain loop/branch logic anyway.

* Editors are not necessary for beginners - just like disk I/O was unnecessary in the times of the C64 BASIC. Create a bookmark to any of the many online jupyter servers (e.g. [0]), or install Anaconda with a shortcut to a local jupyter notebook.

[0] https://mybinder.org/v2/gh/ipython/ipython-in-depth/master?f...


This is really a weak argument. Is running code from a jupyter notebook harder than:

  I installed QBasic on my son’s 11” HP Stream today, having to hack a DOSBox manual installation.
Is pressing the run button harder than pressing the F5 key? Explain DOS to a seven year old, versus explaining "this is an app we can download."


Indenting is no weirder than having to number your lines. But yeah, you'd ideally want to set up an IDE.


i don't think you had to number your lines in qbasic


Classic BASIC both has less language to learn and teaches more about how things work. And line numbers, as much as they suck for real programming, are an awesome hack that lets your REPL be a line editor, letting you do all your work in the REPL, so you don't have to learn an IDE or working with an editor plus a (graphical or text) shell.


That's my sentiment exactly. I wish I'd had Python back in the day; especially the IPython REPL or Juypter notebooks. Both are excellent for hacking around, and immediate feedback.


Try to make a game or draw a circle in IPython, see how simple it is.


    import turtle
    t = turtle.Turtle()
    t.circle(100)


OK, so I'm seven years old, I take your code and write it in my Jupyter notebook. Press run and I get half a page of errors with something about TclError: no display name and no $DISPLAY environment variable.

I also have questions:

What is import ? Why do you need to write turtle 3 times ? Why do I have to write t.circle ?

This is boring, I better play Candy Crush on my phone.

Compare your code with the QBasic equivalent:

    screen 13
    circle (50, 50), 100
Another nice thing about QBasic is that the code is checked after each line and in case of error it shows you a clear error message.


What does 'screen 13' mean? Why must I have parenthesis around 50, 50?

Also, I doubt many 7 year olds have a Jupyter notebook they refer to as "mine".


>What does 'screen 13' mean? Why must I have parenthesis around 50, 50?

See? Way fewer questions than with Python or JS.

>Also, I doubt many 7 year olds have a Jupyter notebook they refer to as "mine".

That only reinforces what the parent said.


> Why must I have parenthesis around 50, 50?

Hey, i remember that! I was actually 7 years old when i first encountered the `CIRCLE (xcenter, ycenter), radius` statement (in GWBasic, but it is the same in QBasic) and... it actually made sense to have the coordinates separate. Although probably a large reason it "made sense" was that i wasn't familiar with any other notation. I quickly jumped to Turbo Pascal and i remember the `Circle` procedure in Turbo Pascal (BGI) looking weird with it being `Circle(xcenter, ycenter, radius);` :-P.

I do not really remember much from that time (it has been almost three decades since then :-P), but this is something i sometimes think back to because of how each statement had a "customized" syntax that i found making sense (e.g. GW/QBasic has `LINE (x1,y1)-(x2,y2)` and this also made sense because i'm drawing a line between two points and again Turbo Pascal's `Line(x1, y1, x2, y2);` felt weird initially) and this sort of statement-specific syntax being something you do not really see in languages nowadays (or even at the time, AFAIK most other BASICs used `LINE x1,y1,x2,y2` - when they offered graphics functionality at all).


I believe with BASICA or GW-BASIC one wouldn't even need SCREEN 13

I know I started with the ZX Spectrum and I didn't need it.

As for the parenthesis, I was content with being told that's just how you make a circle


"Look it up in your book, 101 Things To Do With Your Personal Computer"


With DrRacket it is

    #lang slideshow
    (circle 10)
Explanation: http://docs.racket-lang.org/quick/index.html


I really like Racket, but I still think Basic is simpler to click for a kid.


OK so I'm 7 years old. My parents are my parents, so I've got constraints you would give a child who sometimes wets the bed and can't always put all their own clothes on.

I've got a bunch of paper and crayons.

See you in a couple of hours, cause I'm just gonna draw.

(or is childhood that different, now?)


At under 7 years old my daughter was doing surprisingly fancy things in MS paint. Including finding features we didn't even know Paint had.

"Daaaaaaad, crayons are boring, can I use the computer?" (I think there's a few minor differences) :)


I was 7 years old in 1980. I only wasn't using a computer yet because I had another year before I got into fourth grade where thet had a class computer (a Commodore PET), and I was programming a computer at home (a Timex/Sinclair 1000) a year after that, and a PC another couple years later. And none of that was particularly outstanding for my peer group, except some of their families got Apple or Atari computers instead of PCs.


Many seven year old children I know cannot even read at that age, let alone write computer programs. Most of them have the deck stacked against them in ways that most HN members or their offspring never will, but it's important not to lose sight of the struggles that average and below-average people face.


Urrm, seven is quite old in respect to doing something like programming. I was writing (quite rubbish) BASIC on the ZX Spectrum at that age in the late 80's. No easy error messages and a single book to help. My own four year old no longer wets the bed and can easily dress herself when she can be convinced too.


1 in 10 children still wet the bad at age 7.


> 1 in 10 children still wet the bad at age 7.

Which mean 9 in 10 don't. Not that, in any case, wetting the bed is actually in any way anything but a distraction in this discussion.


It was (for some people) that different 20 years ago, at least from what I remember from my own childhood.


I was 7, 30 years ago. We wouldn't have a computer in the house for another 10 years.

Owning a personal computer in the 80's wasn't given, even in the middle class white Connecticut suburban neighborhood I grew up in.

I was introduced to Logo at school maybe not at seven, but maybe 11?

Looking back, I would have given anything to just have more play time where I made up the rules, and those rules weren't called "rules" (because that's what playing is, right?)

As an adult, I find that I'm not playing by making computer programs, but by going into the woods, and pretending I'm basically a kid and exploring and getting a bit caught up in my own imagination. It's... it's lovely.


> import turtle

That to me is the ongoing problem with picking up a programming language these days, figuring out all the available libraries and which of them i need to load to get closer to my goal.


My recollection is hazy, as I didn't use it much, but this struck me immediately as somewhat similar to LOGO back in the 80s.


I guess text adventures aren't as fashionable or exciting any more :'(


In my experience, JavaScript is (much) better suited for teaching kids programming than Python: it only takes a few minutes for them to go from nothing to being able to use plain HTML+JS and create a simple interactive application; after an hour or so of having fun, the shroud of mystery of coding disappears completely, and it's now all about creating something great, like a game. They usually find Python kinda boring by comparison, and more complicated.


Switch to a graphics mode and draw an angled line on the screen using Javascript. You will end up having to learn: the basic HTML5 template, canvas element, a turtle-like drawing language. In qbasic,

    SCREEN 12
    LINE (50,50)-(100,100)


That way they will also learn that - once they use anything else - impressive things have never been so gloriously easy to do ever since.

Javascript is good at many things ... but: There are countless examples of stuff in LEGO - fun stuff - that would take 10 to 100 times as much code to pull off. If possible at all.


I think Processing (Java) is much better because it visualizes what you program in an easy and fun way.

The Youtube channel The Coding Train is also great for this.

It might be personal but coding with easy graphic output is very fun imho. Much more than Javascript alone when (as others commented) you need to learn HTML and canvas at the same time.

I learned programming in (q)basic because of the line and beep functions.


>In my experience, JavaScript is (much) better suited for teaching kids programming than Python

Only because of its connection to web display.

Not because of the language's syntax or qualities.


Plus, it's super motivating when they can put their HTML+JS file on some free host and show it off to friends.


Yes, but it isn't better suited for teaching kids programming than using QBasic. We can solve this using logic. If JavaScript is certainly better than Python for teaching kids programming, but is not better than QBasic, then Python isn't better than QBasic for teaching kids programming.

I don't know that QBasic is the best for teaching kids, but I don't have a better answer. OP has a point.


I would recommend JS stuff for middle schoolers. I agree Python is boring for Kids, but for kids under middle school, HTML + JS can be too much burden to learn. Besides the resources available on the web is not very friendly for Kids I think. Not to mention NPM & JS Framework stuff, even callbacks and jQuery are too much complicated.


My first programming language was QBasic on MS DOS 5-point-something. I quickly graduated to C, but I still remember the thrill of writing my first application, which was a menu system to help the neophytes in my office launch the applications we used at work without having to type commands at the DOS prompt.


I once made bullcow in qbasic on weekend, my young self's idea of fun. 24 hours and it worked as expected.


Bulls and Cows is my first post-Hello World program in a new language.


On the Mac side of things, nothing will ever beat HyperCard


I agree, and some of the HyperCard stacks today , have me dropping my screen resolution to the old 640x480 or so in order to better view the stacks. There is one on art and history that is very well written: https://archive.org/details/CultureMacintosh

(and you can run this completely in your modern browser - amazing!)


Thanks for the trip down memory lane.

My professional programming started with a Wang MVP minicomputer using BASIC.

Next came years of MIIS/MUMPS, which is BASIC with a b-tree DB tacked on. After a few years of that I did consulting to help speed up sorting a text array in QBasic/GW Basic/BASICA. Also used the TI-99/4A to code some games for my kids. And a Commodore-64 for recreational programming: remember keying in code listings from computer magazines, one in particular involved POKE's which enabled direct screen addressing. Also developed a program to calculate BTU's for heating/cooling.

And translated an Applesift Basic program to MIIS to figure out calculated results for a laboratory.

It enabled my interest and career of almost 40 years as a developer.


Racket? comes with a simple IDE, can immediately draw primitives. it seems pretty promising.


Racket is a nice second language to learn and I like it, but I doubt it is simple enough for a 10 or 11 years old.

Anyway, I have the feeling you will be interested to read this https://www.apl2bits.net/2015/03/09/john-carmack-doom-reddit... or this https://twitter.com/ID_AA_Carmack/status/569658695832829952


Also Why John Carmack thinks Racket is aces for beginning programmers - The creator of creator Doom explains why his 10 year-old son used the Racket programming language to create his latest video game"

https://www.itworld.com/article/2978142/development/why-john...


I remember, discovering on my own, how bad the QBasic random number generation was. Must have been doing some homework in college and getting strange results. It didn’t take a very long for the pseudo random generator to repeat.


I never bothered with QBasic, as I had used Turbo Basic before and was already into Turbo Pascal by then.

But QBasic was surely a very nice way to introduce high school students to programming back then.

We really need comparable systems on today's systems.


I started programming at 7 years in 1992 on a VTech kids computer. It had a 2x20 Chars LCD display and BASIC installed. No internet. No StackOverflow. Those were the times. I feel sorry for the Instagram Kids nowadays.


This is almost me exactly, except it was an IBM PCjr.

If my family could have afforded a better computer, I would have been playing games instead of tinkering with BASIC.


I'm sure there were distractions analogous to IG at the time. If a kid wants to program now they have a lot more resources and accessible platforms


Tho having so many platforms comes with its own set of challenges, like figuring out what's actually useful/approachable.

I'm not a coder, but 20 years ago I still felt somewhat competent in my overview of available platforms and what they are used for. These days it feels like there's something new every day, which is great don't get me wrong, but I can't even imagine trying to keep up with all that because it looks like quite a Sisyphean task from the outside.


Would have loved to have QBasic in my days... I started with basic on a ZX81, later got an outdated DOS machine with gwbasic. QBasic was the first step up for me before going in teenager years to Pascal.


Ken Silverman, the guy behind the Build engine which powered Duke Nukem 3D and number of other games from that era, would prototype everything in QBasic before converting to C for raw speed.


Awesome post! Looking forward to teaching my daughter and (later) son programming too -- though it's going to have to be Pascal, which is what my dad initiated me with :)


If you want to go old school and use Turbo Pascal, TP 5 is free to use. Otherwise look into FreePascal


What I really loved is that how easy it was to write directly to the video buffer (320x200 256), it was ultra fast and I could even make simple games and shiny stuff :) Not sure if it's possible to do that outside dosbox anymore.


It was really easy!

I made a resistor ladder DA convertor, and then wrote data to the parallel port with a few simple BASIC "OUT" instructions.

https://groups.google.com/forum/#!topic/sci.electronics.basi...

https://hackaday.com/2014/09/29/the-lpt-dac/

Some GB emulators (NO$ at least) used this for sound, and it was quite good.


I think you should also consider letting them use the more modern learning environments for kids, too. It's hard to do fun things in Turbo Pascal, but it's easy to do fun things in languages like Scratch ([Jr]), Racket, and Python.

I say this with a tremendous love of Turbo Pascal - it was my first real programming environment as a kid. But I also had a great time with environments like Klik-n-Play and GameMaker.


When used in its "QB" language mode, FreeBASIC provides a high level of support for programs written for QuickBASIC. Many programs written for QuickBASIC will compile and run in this mode with no changes needed. However, for compilation in the FreeBASIC default language mode, most substantial programs will require changes. https://freebasic.net/


QB64 http://www.qb64.net/ is an almost drop in replacement for QBasic, but it is still too complex for a kid.

The point of the article was make it simple, make it easy (e.g. no compilation) and make it immersive (use it fullscreen without unnecessary distractions).


This brings back memories! I learned to code in highschool using QB 4.5. I think I still have my final project, a deal or no deal style video game, somewhere.


I started my future career by writing text games in QBasic when I was 10. Then I graduated to graphics calls. I can't wait to show it to my son.


I also started with QBasic (in 1994 I think). I fondly remember its convenient graphics API (including setting the modes and palette).


People should consider using Quorum for the author's purpose of introducing programming to kids. It was designed for teaching programming: https://quorumlanguage.com/evidence.html


That's why golang is also highly successful - it somehow feels like a less anal version of Pascal with the simplicity of Basic, with sane defaults like zero-based indices and the like


Qbasic was also my first programming language :-)

I’m very fond of it


Everything new is the best until it becomes your day job.


Any idea how does qbasic and gwbasic compare here?


Being captivated by the article and diving deep into nostalgia, I just have to recommend an enlighting book about Basic that my parents bought me when I was a child, and that I think it fits perfectly to the topic in question.

Luca Novelli published in the 80s two books called “My first book about Basic” and “My first book about Computers” [1], which are specifically intended to introduce computers and programming to children. After an introduction to algorithms and flow diagrams, the book dedicates a full page to each (GW)Basic instruction, providing an easy-to-understand explanation and -even more important- a small code example (~10 to ~50 lines) in the form of a game.

This means that the whole book is a compendium of interesting games (guess the animal, guess my age, pick a number) that slowly build up knowledge without being boring or pushy, and gives the child tools to build his own games. It may look outdated, but programming hasn’t changed that much since K&R C, so most of the concepts are still relevant today.

Sadly, the few page scans I could find are in portuguese or spanish, but they will serve as an example of the pedagogical approach. I hope anyone interested can find an English copy on Amazon, as it is IMHO an excellent way to teach & learn programming.

[1] “Two children, a dog, and a personal computer explore the history, concepts, and uses of computers, identifying such aspects as binary systems, computer languages, programming, and memory.” https://www.amazon.com/My-First-Book-About-Computers/dp/0914...

Instructions, strings and numbers https://cloud10.todocoleccion.online/tc/2013/10/09/PA0900055...

FLOW DIAGRAMS — AND instruction https://pbs.twimg.com/media/DLhzcb3WkAEVrF3.jpg

IF THEN GOTO instructions https://cdn.wallapop.com/images/10420/39/59/__/c10420p196760...

LIST and LOAD instructions https://cloud10.todocoleccion.online/tc/2013/10/09/PA0900075...

Basic and Binary https://cloud10.todocoleccion.online/libros-segunda-mano-inf...

More: https://twitter.com/eduo/status/782934202572472320 http://www.lucanovelli.info/2015/10/07/amici-lettori/

I coded many interesting things in QBasic in my childhood, way before the Internet era: a point-and-click GUI like windows 3.x, a compression format that I thought was marvelous. Later in my life I found I had “invented” Run-Length Encoding, haha.


GfA-Basic is the best.


This idea comes up occasionally; the idea that classic-style BASIC is great because that’s what a certain generation of us used to learn programming for the first time in the 80’s. Well, consider me a dissenting voice. To quote myself:

> I, myself, originally taught myself to code when I was young, using BASIC on machines with BASIC in ROM, and have typed in listings from magazines and bought expensive BASIC reference manuals, read them in detail and used the language to create many utility programs and games. And even I wouldn’t wish BASIC on anyone when modern languages with features like (gasp) functions are readily available.

(https://news.ycombinator.com/item?id=10842908#10855345)

> I believe that my development and education as a programmer was severely hampered by BASIC’s lack of functions, and I would not wish it on anyone else.

(https://news.ycombinator.com/item?id=10842908#10855467)


BASIC is great because it's basically structurally like simple assembly language but with deceptively approachable syntax.

Also, classic 8-bit era BASIC has functions, they are just limited to a single expression, and limited by BASICs limited array of built in functions and operators that don't require using statements (which I guess makes them the spiritual precursor of Python’s lambdas.)


> classic 8-bit era BASIC has functions

If you mean “functions” in a strict mathematical sense, sure, I remember those. I remember thinking they were useless and wondering what anyone would use them for – I never used them myself. The way to do any sensible subroutine things (in the BASICs I had access to) was to use GOSUB to line numbers, which was a method inherently too cumbersome to do anything complex with, which is why I was stalled when my programs reached a certain level of complexity. I was then mostly halted in my education and development as a programmer for many years, because the language did not make program composition easy. It was not until I had the opportunity to learn other languages with did have proper functions and other methods of program composition that I could break through the barrier, so to speak.

> BASIC is great because it's basically structurally like simple assembly language

And why would that be a good thing? Classic assembly language is basically living on borrowed time, since the memory and CPU model they assume and expose are long gone, and only emulated in microcode on today’s hardware.

Modern hardware platforms are multi-threaded multi-core systems with multiple levels of cache for memory, nothing of which is exposed to classic assembly language. Also, disks are no longer nearly as slow, nor is RAM always volatile. Not to mention that even memory mappings and protection rings, as old they are, weren’t always there in classic hardware, and, when present, were mostly hidden from the programmer, since the programmers of the time were used to systems without them.

Just like classic assembly in a way created C (commonly called a “portable assembler” for its closeness to the old machine model), I’d like to first see an “assembly language” for the modern architecture – something low-level which exposes all the multi-core, cache level, and protection ring complexity as inherent parts of the language. Then, if I dare dream, I’d like to see many high-level languages built directly on top of that low-level one – almost certainly a Lisp, but also maybe an Erlang. All other languages (except maybe Prolog) would probably be too hard (or too like an emulator) to map sensibly to the inherent multi-core model of modern hardware; you might need an entirely new language paradigm. And, sure, also a pony¹, why not.

1. http://www.gocomics.com/calvinandhobbes/1987/01/13


> The way to do any sensible subroutine things (in the BASICs I had access to) was to use GOSUB to line numbers,

True.

> which was a method inherently too cumbersome to do anything complex with,

It's really not. (Unless by “complex” you mean specifically “recursive (even indirectly), but not tail recursive”, in which case I'd have trouble disagreeing.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: