
Ask HN: Do you still code in BASIC? - yori
Do you still write code in BASIC? If yes, which BASIC compiler or interpreter do you use?
======
proxybop
I learned to code from some indie version of basic on the internet called
Liberty BASIC when I was 13. I used it for years because the people on the
forums were so nice and basically held my hand through learning a lot of basic
computer science and exposed me to the history of computing via recreated
qbasic programs and games, etc.

I’m super grateful for little things like that. All those older people that
were welcoming to me on those forums have a special place in my heart, and
I’ve been thinking about them fondly while I build a compiler—something I
wouldn’t have been able to do without them answering all my questions when I
got stuck.

~~~
zeko1195
That is why I fell in love with programming. So many smart people willing to
spend time and effort on explaining me simple things. I have tried to give
back by tutoring people as much as I can. The technology community is amazing.

~~~
proxybop
It is wonderful. I really want to find a way to help teach kids/teenagers
about programming. It can really make you feel good about yourself to build
something and see it working

------
earthboundkid
No, and I don't miss it because I don't feel like was actually "simpler" than
what I use today. Almost anything I could have done easily in BASIC in 1992, I
can do more easily in Python now. The exception might be drawing ASCII graphic
games, but I don't have any desire to make such games today, and if I did, I
could just learn how to use TCell or whatever.

~~~
xtracto
or PLAY "CDEFCCDEFCDEGDFG"

~~~
agent008t
Is there an equivalent for Python?

~~~
earthboundkid
[https://github.com/processing/p5.js-
sound](https://github.com/processing/p5.js-sound) maybe a JS equivalent.

------
ibejoeb
I understand the arguments against BASIC, e.g., ingraining impractical
paradigms, but I do wonder if I would have ever gotten so deep in without
exposure to it. I doubt that I would have jumped directly into asm, c, or
fortran as a child. Even Pascal was a major leap ahead and probably somewhat
inapproachable without help.

Maybe that was only the case in the '70s and '80s. I'm sure that if I had
Python as a kid, it would have been just as easy to experiment as it was with
BASIC back then.

~~~
mschaef
> I understand the arguments against BASIC, e.g., ingraining impractical
> paradigms,

The early interpreted BASICs did make it difficult to write good code. All
source editing was line editing, every line was numbered, there weren't any
structured control flow statements, composite data structures were limited to
arrays and strings...

But even as early as the second half of the 80's there were mainstream
implementations of BASIC that addressed all of these. Microsoft QuickBASIC 4
added a full screen editor and then completely relaxed the need for line
numbering. Line numbers were still supported, but so were symbolic labels. QB4
also had support for functions/subroutines, decent control flow statements,
and structured data types. There was also reasonable support for extension
libraries, and the like. As long as you didn't rely on any code patterns that
required any kind of callback or inversion of control, you could do a very
nice job writing well factored and maintainable code.

~~~
kentbrew
I did a ton of good work in QuickBASIC 4.5. Wrote some shareware games, one of
which was converted to a successful commercial product. Plus lots of
contracting in the 80s for people who needed data (send back and forth on
floppies) converted from one accounting system to another.

~~~
mschaef
> Plus lots of contracting in the 80s for people who needed data (send back
> and forth on floppies) converted from one accounting system to another.

When I was sixteen or seventeen, I worked as a summer intern in the IT
department of a local utility company. They gave me this data conversion task
that they expected me to complete manually on a timescale of roughly the
entire summer.

It took about two days before I just automated the whole thing with a Turbo
Pascal 6 program and had the task completed in something like a week. The
biggest part of the challenge by that point was moving around a large volume
of data (~100MB) on the 1.44MB floppies common at the time. (I remember ARJ
helping immensely, between it's multi-disk support and the high
compressibility of the data.)

My unexpectedly high output on this task served me well.

------
ph33t
Yes. PowerBasic. Since the original developer has passed on (Bob Zale), I
don't use it for new coding. However, I have an extensive existing code base.
Very fast compiler, very small generated exe's, and very easy to work with.
But, I don't see any progress in a 64-bit nor linux versions so I've switched
to Python for such things.

~~~
discreteevent
I had to use some python with vs code recently and for some reason it reminded
me (in a good way) of working in qbasic with the little ide/debugger. The same
kind of quick simplicity.

------
bobochan
I still write quite a few things in VBA. Most of this is for research or
teaching purposes where I want to add a few things to Excel, but there is a
surprising amount of demand from management consulting companies that want a
front end or some sensitivity analysis added to a model that they have
developed for a client.

------
linuxlizard
Yes. The one called Python. No line numbers but a funny indentation system.

~~~
musicale
^ This. However I still take issue with Python 3's removal of the PRINT
statement.

~~~
Phylter
You mean making it a function instead of a statement?

------
grendelt
I'm a curriculum developer and lead teacher training workshops. We _still_
teach BASIC because one of the robotics platforms still in existence is the
BoeBot from Parallax. It uses the BASIC Stamp. When I started, the rest of the
team was only doing the BoeBot. I started learning microcontrollers with the
BASIC Stamp and I forgot how restricting it is when you try to do much with
it. I proposed we adopt the Parallax Shield bot which uses an Arduino as the
brain instead of the BASIC Stamp. Leadership agreed.

It's actually more difficult to teach Arduino in a day or two and hope any of
it sticks if the person you're training in coming in with zero programming
background. BASIC is still an easy language for complete newbie to pick up in
a short amount of time. The ease of learning comes at a cost later on though.
I've encouraged teachers to start with BASIC if their students had no prior
background or if they themselves feel overwhelmed by the wider pastures of the
Arduino. I underscore that the time spent learning C++ in an Arduino context
is a better investment than time spent mastering BASIC. BASIC is easy to learn
for the purposes of the robot, but C++ can control the robot and allow you to
branch out into countless other languages. I liken programming languages to
spoken languages and learning C++ is like learning Latin. It may be obtuse and
difficult at first, but once it clicks, you can easily slide into any number
of other languages with ease.

I'm now not really beating the BASIC drum anymore, instead I talk up Python
now that Parallax has released a bot built atop the micro:bit. It's limited in
the amount of memory on board and python eats embedded memory for lunch. It's
time well spent learning Python. It allows students to grow into "what's next"
far easier. Kids that learn Python on something like this robot can easily
write the same kind of code on a computer to have it do all sorts of things.
Kids in camps that I've run (and students in my classroom years ago) love
learning about the countless python libraries they can use. I casually point
out "mouse" and they making "random mouse movement" scripts as a gag. I always
"fall for it" each time. ("Oh no! What?! My mouse... it's jumping all over the
place!!!" \- met with giggles, high fives, raucous laughter, etc)

So, yeah, I actually still teach BASIC on occasion, but I'm more and more
turning teachers into Python lovers and C++ for the Arduino.

~~~
CarlGundel
I personally think that BASIC is an excellent first language, but people
really should learn several different languages and be exposed to different
programming ideas and styles. In addition to the Python and C++ you mentioned,
people should consider Forth, Smalltalk, JavaScript, etc.

------
sixothree
In one of our solutions (about 75+ projects) we have a single VB.net project
with just a few classes. Nobody has bothered to port it over because it never
needed changes. So it sits there doing its thing. The funny thing is that it
was converted from C# code, which was promptly lost, some ten years ago
because we thought it would be easier for the dev unfamiliar with C#.

On a personal note, I collect vintage computers. I have too many and stopped
counting at 50. So I do use BASIC in that sense.

~~~
jacquesm
Is your collection online somewhere?

~~~
sixothree
No. I really need to catalog it better since it is such a fun collection. It
ranges from 8 bits (Apple IIs, TRS-80s, Commodore PETs) to Sun SparcStations.

~~~
jacquesm
Any early UK stuff in there? Atoms and such?

~~~
sixothree
Unfortunately no. My collection is almost entirely comprised of machines I had
put my hands on in practice.

------
zxdunny
I've been writing a toy BASIC interpreter for about the past ten years:
[https://www.youtube.com/user/ZXSpin/videos](https://www.youtube.com/user/ZXSpin/videos)

------
jshaqaw
I am just starting to teach my young kids to code. I haven't found a better
solution than old fashion BASIC for that stage when you graduate from Scratch
but aren't ready to onboard lot of the complexity of a Python or Racket yet. I
love Python and Racket but for an 8 year old they still have a lot of
background baggage vs the immediacy of BASIC.

------
alexhutcheson
A shocking amount of processes in the business world still depend on VBA
(Visual Basic for Applications) running in Excel (and sometimes Access). It's
actually a pretty nice RAD environment, as long as you're not going to scale
beyond a team of one or two developers!

------
codingdave
Not the BASIC with line numbers that you may be thinking of, but VBA in
Microsoft Office apps is a descendant of Visual Basic, and is definitely still
out there. I use it when writing scripts to parse content out of old Word
docs.

------
sarossell
Liberty BASIC. It's been around for nearly three decades, is very well
documented, has excellent support, and is the closest you can get in modern
times to the syntax of the original Dartmouth BASIC. So it easily appeals to
the old-school crowd like me. But it also has over 300 commands or constants
to keep up with modern operating systems and methods which allow for GUI
design, event-driven applications, calling DLLs, playing media files,
interacting with joysticks, displaying graphics, etc.

------
SyneRyder
Sometimes. I use Xojo, the new name for REALbasic. It's a cross platform Basic
compiler, that makes desktop apps for Windows, Mac & Linux (also iOS &
Raspberry Pi). Sometimes it's the fastest way to prototype an idea - it works
a lot like Visual Basic & Delphi did.

I've used it to make a business dashboard for my indie software business, a
schedule estimating app using "evidence based" Monte Carlo methods, and I was
working on a cross platform Micro.Blog client (inspired a lot by Tweetbot).

------
lovelearning
I don't but my dad does. IBM BASICA interpreter from the 80s. I setup DosBox
to run it on Linux.

------
dwculp
Not really, I dont have any real need to. BASIC holds a special place in my
heart as it is where I started in 1979....ish. However, I have very little
reason to use it now. There are better and more powerful options today.

I teach kids to program via an after school robotics club and Python is so
much easier and more powerful than BASIC ever was.

Occasionally I get nostalgic and break out a BASIC and its fun for a bit but I
quickly realize how clunky the language really is.

------
rodbird
Yes, I use Liberty BASIC V4.5.1. I started programming for fun and relaxation
when Sinclair Spectrums first appeared, then on to Commodore and Amstrad. Then
it all died down a bit real work intervened and in the meantime BASICs got
super complicated. My first reentry was to Visual BASIC uggg… Then I found
Liberty, super easy BASIC control of Windows.

------
unwiredben
The scripting language used for developing Roku channels is BrightScript,
which is based on BASIC syntax with some bits of other languages thrown in.

------
zeko1195
Beginners All Purpose Symbolic Instruction Code. What a beauty.

~~~
timbit42
That's a backronym if I ever saw one.

------
kgwxd
Just on the Commander X16. The built-in interpreter is 100% backwards-
compatible with the VIC-20 and C64.

~~~
sixothree
CC65 targets it, which is fun. I want a physical one when they are released.

------
Nzen
I work at a company that makes a niche ERP. The owner wrote the original in
Basis International's BBX. Within the last ten years, the company ported the
ERP to Java. But, we still use it as a code generator for our dao layer and
half the views. Quarterly, I'll go in there to change the templates to improve
our dao.

It gets the job done. Part of my reticence is ignorance. I might have a
meaningful opinion if I were familiar with more than just println and single
line if/else. I am glad I don't need to plan for line numbering in any other
realm.

------
ryanmercer
Erm, sorta. Does Atari BASIC count?

------
Jamwinner
I ocassionaly use it, but mostly only for toy projects. All the basic code I
write is pretty interpreter agnostic after moving from applebasic to msbasic
in the 90s. It comes down to what is available on whatever platform I am
playing with now.

------
crtlaltdel
The last thing I did in a BASIC dialect was VB.NET circa 2007-8 and was a
service in a .NET webapp backend. At the time I was a EE with limited
professional programming experience outside of small personal utilities. Like
a lot of people I had first encountered BASIC with the Apple II in a school
computer lab around 1995 and built some small text adventure games with it.

I echo the sentiment of proxybop; the ability to type things and see something
happen is a powerful motivator in learning to code. As a lot of commenters
point out, Python seems to have largely replaced BASIC as the "beginner"
language to help teach folks. The REPL reinforces this, imo.

------
klondike_klive
I seem to remember that my ZX81 Basic allowed a computed "goto" statement,
which my later Amstrad BASIC didn't. I mostly used it for type-ins from
magazines. I also had a little dabble in machine code (nearly forty years
later I still remember the opcode for Return is "C9") but the learning curve
was too steep for me to do anything much. I still wonder whether given
tutelage or encouragement in programming I could have got way more out of my
computer as a child.

~~~
timbit42
Very few BASICs had that. Atari BASIC and the Simons' BASIC add-on for C64
BASIC (CGOTO) both had it.

------
ocdtrekkie
Does Visual Basic .NET count? Because I still code in that with Visual Studio
2019.

~~~
interlocutor
VB was one of the most popular languages in the 90's and into early 2000's.
How did it fall out of favor? Was it because of Microsoft forcing VB into
"just another skin" over .NET, i.e., a variant of C# that doesn't have curly
braces?

~~~
kerng
VB was basically terminated by Microsoft in favor of .net.

It would have been (maybe still would be) amazing to see what the community
would pull off with VB6 if Microsoft would open source it.

VB6 IDE was so far ahead of it's time, even today (20+ years later) most
languages don't have anything that comes close to what Microsoft had done
there in the 90s.

It would probabaly the perfect language for UI development and data analysis
(think VBNotebooks), possibly ML.

~~~
WorldMaker
The VB6 IDE is terrible and no one should have to use it today.

It's UI tools were eventually bettered by the WinForms and WPF/UWP Designers.

Having to work in the VB6 IDE against my better judgment still, I have zero
nostalgia for it left.

~~~
kerng
It was fast and slick - WinForms (and generally VS.net) was always slow in
comparison with too many jobs and options - and WPF, same as WCF, is just an
abstraction nightmare (and even slower compared to WinForms).

People want simple, that's why Go is so successful these days - in many ways
the enthusiasm (positive and negative) around Go reminds me of VB6.

The fact that VB6 and IDE still works (didnt know that) on modern computers is
by itself an amazing thing actually.

~~~
WorldMaker
Obviously we have very different opinions.

> WinForms (and generally VS.net) was always slow in comparison

It was slower at first, sure. Performance was a huge project over multiple
years for Visual Studio and the WinForms designer hasn't been considered
"slow" in years.

> and WPF, same as WCF, is just an abstraction nightmare (and even slower
> compared to WinForms)

Not really? XAML itself is a pretty direct representation of an object graph.
More so than the hideously long Attribute blocks at the top of VB1-6 FRM files
and the giant blobs of binary nonsense in FRX files.

WPF Binding can be confusing, because like Vue or half the other web
frameworks, two-way data binding is _hard_. But WPF has always supported
classic double-click to code behind and set properties directly on window
controls models of UI code writing, just like WinForms and VB1-6. Just about
no one recommends it, for the same reason people recommend two-way binding
systems like Vue because it can simplify other parts of your application and
can be hugely beneficial on the other side of the learning curve.

Mileage varies on the speed of the WPF designer. Again, performance is
something that greatly improved over time. Most of my worst WPF performance
problems, when I was using it regularly, were with third party controls I had
no control over, and tried to get rid of.

Personally, I'd greatly prefer to write XAML by hand in notepad than design in
a UI in VB6 ever again. I'd complain a lot without tools to help me fix basic
IntelliSense mistakes in my XAML, but I'd do it. Obviously, everyone's opinion
will vary.

> The fact that VB6 and IDE still works

I cannot stress enough: _it doesn 't_. The work I have to do in VB6 is pulling
teeth. I have to do it in a VM that for reasons of security now has to be
entirely isolated from network access. Even just scrolling code in that VM now
takes what feels like subjective minutes to scroll just a few lines at a time.
I'm constantly trying to use VS Code to comb through the codebase and prepare
my plan of attack before ever opening the VM and it's like preparing punch
cards for a Mainframe because I want to make sure I've prepared enough I spend
as minimal time in that VM as possible. Navigating the VB6 in VS Code is
horrible due to the aforementioned Attribute block garbage and absolutely no
sense of navigation because all of the event handlers are wired in the FRX
opaque whatsit from what I can tell and you can only assume that functions
still do what they were named to do and that a `Form32_Load` wasn't actually
repurposed to be `Button98_Click`. For the most part I'm thankful the codebase
I'm working on isn't that evil, though I'm incredibly sick of VB6-era
Hungarian notation at this point.

~~~
dole
A little late but mostly in the same boat with you, curious as to what you're
using for a VM (W7 here). Sounds like a relatively massive project to be that
painful to navigate but for most smaller purposes, the IDE still is at least
serviceable. I've had Chrome (or the last versions available to be installed
on W7 anyway) drop a bunch of startup resident crap that kills VM
performance/network until cleaned up, and the scrolling issue (Ulli's
VBMouseWheel?) doesn't sound typical, but you did say "subjective." Installing
a full-text search app helped speed up searching through our codebase via VB6
IDE or VS2008's TFS Source Control Explorer, but you've probably been through
most of this song and dance already.

~~~
WorldMaker
The VM originated as the physical machine of a previous developer and for a
number of reasons is stuck at XP, hence a lot of the reasons it needs to be
network isolated at this point.

Also, because it is from an ancient image I don't want to break it because I
doubt we could rebuild the ecosystem from scratch, it feels like it is stuck
in VirtualBox, which is I think a large part of the slowdown because
VirtualBox doesn't just directly support Hyper-V-based acceleration like just
about everyone else finally does. I really need to convert it directly to a
Hyper-V VM, but I don't have the free hard-drive space at the moment to have
multiple VM copies around, haven't had the budget time, and I'm not sure I
trust some of the available tools.

I'm using the last build of Git for Windows I was able to get to install on
XP, and I pray that there isn't a compatibility break as right now a shared
worktree-less folder as "remote" to the VM internal repo is the only way I'm
getting code in/out of the VM. I'm generally happy with VS Code outside of the
VM for full text search, but VS Code can't build "Find All References" and "Go
To/Peek Definition" maps, and that's the biggest itch that I miss, and VB6 IDE
never had a good "Find All References" because it predates that tool in VS by
like half a decade at least, and more than a decade before "Peek" sub-editors
came about.

------
WaltPurvis
I code in BASIC all day, every day, developing an application with Xojo.
([https://www.xojo.com/](https://www.xojo.com/))

It has some issues, but it's still probably the best possible tool for making
cross-platform desktop applications.

I really enjoy the expressive power and/or other features of Swift, Go, and a
few other languages, but if I could write code in only one language it would
be an object-oriented BASIC like Xojo.

------
CarlGundel
Another point worth making is that there is no right or wrong language in many
cases. If you enjoy programming in BASIC, or C, or SNOBOL, or bash, or Python,
go knock yourself out. There's really no good excuse for language snobbery.

If you need to program in a particular language at your place of work, or you
want to learn a language to compete for a job then that's a different matter.
;-)

------
CarlGundel
I do code in BASIC a lot, but I admit to using my own compiler called Liberty
BASIC so I am biased. I do see a lot of people complaining that BASIC isn't
modern but this just isn't true today. There are many versions of BASIC and a
lot of them do have modern structure and scoping and some even add object
oriented features. Python isn't the new BASIC. BASIC is alive and well today.

------
Phylter
Does VB.NET count? I code in that all the time but only because my employer
makes me.

I still break out the QBasic once in a while. I have it in DosBox for when I
get the itch. In AppleWin I toy with Applesoft Basic. I also play a bit with
QB64 which is a modern QBasic clone.

Normally I write code in C# or Python though. C# is my main language and it's
what puts food on my table.

------
julienfr112
python is the new basic

~~~
musicale
Pretty much. Just like BASIC, Python is a gateway drug to all of computing.

BASIC was designed with a simple, algebraic syntax to enable non-experts to
learn how to write simple programs in an afternoon, and Python seems to follow
in that mold.

In fact, the following BASIC program runs fine in Python 2.7:

a = 2

b = 3

print "Hello, world! Let's do some math:"

print "a * b =", a * b

------
omarhaneef
Only if something really can't be done in excel natively -- and that gets more
rare every year.

------
mattmoose21
I wrote some on-printer programs in basic recently as it was the only thing
the printers could run.

------
gregjor
Yes, but it’s called Javascript now.

~~~
omarhaneef
Javascript because it is everywhere, or Python because it is so simple?

------
saundby
Yes.

XBASIC, QB64, and various BASICs specific to old computers I still use, like
MBASIC on my Osborne 1.

------
ninjis
Yes, a derivative called UniBasic (which is itself a derivative of Pick BASIC)
but the system it's used with provides an additional set of extensions to the
language. UniBasic + extensions results in a language referred to as Envision.

~~~
blessmyheart
Oh man, UniBasic and DataBasic. I did that for 20 years until it fell out of
favor here. I really miss it.

------
WorldMaker
Unfortunately I still have to do maintenance on ancient VB6 code. I'd rather
not, and have been working to reimplement it in more modern environments, but
you go to war with the budgets you have not the budgets you wish for.

------
spalt
We still do some development in .NET 3.5 VB (huge health care company). It
rules and I love it. We do angular, node, c#, yadda yadda, also, but I will
always return to my #1 (and first) love, BASIC.

------
chr
Nah.

    
    
      (prog ()
       10 (print "hello") 
       20 (go 10))

------
illegalsmile
I don't call myself a programmer at all but all my environmental dataloggers
are programmed using CRBasic so yes I still write code in some form of BASIC
if that counts.

------
ksec
I know there are still a lot of VB6 Apps in Small to Medium Business. And
Visual FoxPro, which has a languages 99% similar to BASIC is still being used
as well.

------
ddgflorida
No, but hard to beat Classic ASP for simple web apps. I wrote a BASIC
interpreter with built-in SQL that was very useful for scripting.

------
dejv
No, but I’ve jut seen kit of scientific gear (ADC module) that boasted about
having examples in both fortran and basic to make integration easy.

------
CarlGundel
Thirty+ years ago BASIC became a modern structured programming language, but
so many people seem ignorant of this.

------
pubby
Nope!

------
russh
Occasionally, in tiny basic running on an Arduino powered robot when teaching
classes at our local Makerspace.

------
jonathanstrange
I have an app for my own use written in Purebasic. I occasionally recompile it
to keep it up to date.

------
vb6sp6
vb6

~~~
gus_massa
Me too, but it is getting harder and harder to install.

~~~
vb6sp6
there is a 3rd party installer that works pretty good (vs6installer) and there
are dedicated\active forums for vb

------
gourabmi
The last time I used BASIC was in 2001. QBASIC was <3

~~~
saundby
Check out QB64: [https://www.portal.qb64.org](https://www.portal.qb64.org)

------
sdinsn
Still? I never have

------
zzo38computer
I still use BASIC for writing DOS programs.

------
bsdimp
The last actual BASIC I wrote was in 1985.

~~~
nighthawk24
wow, the first line in BASIC I wrote was in 1995. (millennial here)

------
DannyB2
10 CODE IN BASIC

20 ???

30 GOSUB 10

40 PROFIT!

------
smnplk
qbasic 4.5

