What are your reasons for using Basic? Do you enjoy it? How do other developers react when you tell them you program in Basic?
- VB.NET supports both static and dynamic typing.
- VB.NET is a functional language, supporting local type inference, anonymous functions, monads, and language integrated comonads.
- VB.NET does project-wide namespace imports. C# doesn't.
- I like creating native client apps, and dislike the constraints and fragility of web apps.
- I've always found the Java developer environment to be brittle in comparison.
There are also a metric ton of readability issues in JS, Java and C# that VB.NET doesn't have (braces, == and =, ! instead of Not, separate keywords for inheritance and interface implementation, and so on). I also concede that I learnt Pascal before learning C (and prefer Pascal to C). The fact that Pascal and VB.NET share syntactical similarities (type declarations follow variable and function names, the Not keyword is probably not an insignificant factor.
And to be fair none of the above matter – the rationale came long after the fact that I use BASIC simply because I like BASIC.
The amount of disapproval, verbal abuse, ridicule and actual anger I've received for this over the years (and to this day) is insane. But you learn to deal with it.
PS. Did you know that the first prototype of Nokia Maps for Windows Phone was written in VB.NET? Nokia didn't know either, because they had like zero Windows Phone skills at the time.
But invariably, I do all my new programming in C.
The flavor of BASIC I used to use is North Star Disk BASIC, very similar to HP BASIC.
A few lines from an old project:
1 REM*** THIS PROGRAM CONVERTS A 8080 PROGRAM INTO AN ASMB LISTING*****
10 DIM A7(256),B7(256),A7$(512),B7$(10*256),B8(256)
15 DIM K7$(20)
30 !\!" FILECRAK: Disassembles 8080 opcode programs"\!
50 FOR M=1 TO 256
60 READ A,A$,B,B$
80 B$=B$+" "
110 NEXT M
120 INPUT " File name of 8080 program:",V$\!
130 CLOSE#1\ OPEN#1%1,V$,L6
150 INPUT " 8080 op-codes begin at:",L$
160 INPUT " Begin disassembling at:",J$
180 INPUT " Output to printer? ",H9$
It is incredible easy to build a nice one screen application with not very a very complicated background logic. Normal people like a nice graphical interface with a few buttons, and with Classic VB you can create them very easily and iterate and customize the form.
My last big problem was that it doesn't have a build in sort function, so you can use a n^2 sort or write a good sorting function by hand :( . When the logic start to be not so easy, there begin to apear problems.
I still think it's the most productive programming environment I've ever worked in, in terms of actually getting something built.
Since then, I've learned a lot more about programming, and I'm not sure I'd accept the compromises that VB makes any more.
Some of Borlands IDEs had the same power for prototyping by C++ and Delphi weren’t as great for rapid development (though I have nothing against those languages themselves).
The closest thing we have these days is Electron but I don’t think that even comes close to ease of development once you factor in the clusterfuck of a mess modern web development is.
Now, I think I'd be much more comfortable with the compromises that Delphi makes.
What it did differently to Pascal was that it allowed for lazy / inferred typing along with some transparent type conversation in places where the intention was obvious. However in VB once a variable is defined a type (either when defined or when assigned a value - depending on how the variable was defined) you couldn’t change it. Eg you cannot overwrite an integer with a string
Weirdly, despite being branded a toy language, this meant VB actually had one of the more sophisticated type systems out of the languages of that era because you had the laziness of languages like JS and PHP but without having the === et al kludge that some loosely typed languages need.
I loved “Option Explicit”. To the extent that it was almost always the first line I’d write for any new project, module and class.
Problem solved :-)
VB6 had full support for native AOT compilation and creation of OCXs in pure VB code.
Then post on HN and Reddit and scream “ageism is rampant on our industry”.
Disclaimer: I’m 45.
Now: 50% laziness and 50% don't want to migrate a few big projects that only need a tweak per year. If it ain't broke, don't fix it.
I guess a virtual machine with Windows 2000 and with VB6 is still smaller than the modern programming environments.
Compiler output looks like this:
227 IF Q>0 THEN 230......................................................90 1
94 STO I
96 RCL .1
97 TEST 7
98 GTO I
228 P=INT(P/2)...........................................................99 RCL 9
103 STO 9
I get the games to compile from the old "101 BASIC Computer Games" book: http://vintage-basic.net/games.html
So, no BASIC project since 1999 for me. VB had cool editor, amazing debugging capabilities (still not matched by anything these days, we are often even going backwards with new languages) and was great for developing and visualizing data tier apps quickly - or "rapidly" how it was called back then.
First programs I wrote were in BASIC on Amstrad CPC and Commodore computers. Fun times.
The move to .NET made the language more involved, imo to a point where there was no reason not to just use C#.
Better than Delphi? This is out of genuine curiosity because I have basically zero experience with both.
Xojo is very mature and most of the bugs have been squashed long ago, I just wish it treated functions as first class citizens. Apart from that, for internal business apps and retail-quality Win/Mac UI apps, I honestly haven’t found anything more effective to go from prototype to binary quickly and painlessly.
It’s our secret weapon, and clients don’t care it isn’t mainstream. Now if one could come up with a similar IDE coupled with a lisp... DrRacket + MrEd come close, but for large projects it becomes a pain. Until then I’ll write basic code for basic business apps. For everything else, there’s a lisp.
So you cannot store a function in a variable (scalar, list, dict)?
And does it have dicts (Python term) or equivalent (associative arrays)?
If not, a lot of things would be more clunky to program, although possible.
My enchantment with BASIC began when I was 10, and on the bus to summer camp every morning I'd read this dog-eared book:
I was such a nerd. The counselors didn't know what to make of me. Dad complained I should spend more time outside.
Then I grew up and published my first commercial software title, turning that geeky addiction into a career. It was an Outlook addin, created in VB6 around the time a prominent Microsoft MVP called Outlook the "buggiest program to ever come out of Redmond" (source: https://web.archive.org/web/20091231043608/http://www.slipst...). So in the next rewrite, I created a framework to bring Try/Catch semantics to the language along with stack-tracing error logging - after testing and discarding several equally buggy third party tools purporting to do the same.
I gained some hard-learned lessons about instrumentation, coding for readability and debugability, and the importance of good tooling. They've stuck with me to this day, and although most of my work now is in C#, the principles are the same.
Thanks mom and dad for buying me that beat up old TRS-80! And thanks Mr. Kemeny and Kurtz for bestowing this beautifully approachable language onto the world, even if your original vision was shamefully bastardized by the time I stumbled upon it.
ps. That book in all its glory: http://www.colorcomputerarchive.com/coco/Documents/Manuals/H...
The ESB-2 also had a USB port, but only worked with an Active-X control in Windows. So by using Mint BASIC we avoiding having to use Windows.
Mint BASIC is a clone of VB and I thought the syntax was pretty nice. It had some weird things like a.2=3 is the same as a=3. Also a[2,3,4]=7 is the same as a=7, a=7, a=7.
Sometimes I do catch myself “thinking in BASIC” when writing coding with C-style syntax. In that rather than saying:
For brackets I equals zero semicolon....
For I equals zero to n
For all it’s warts, BASIC can read a little like pseudocode.
Edit: it probably comes as no surprise that even until the late 90s I still preferred writing code in Pascal than I did in C.
Submitted a simplified version of it as part of my IT coursework in college and got top marks in the class. ;)
The reason why I do this is that the - for better or for worse - the world runs on Excel and some things (e.g. reporting, ad-hoc conversion of CSV data), especially one-off solutions (I know, nothing lasts as long as a prototype in production ...), are faster to implement in Excel and will also be more readily accepted by users because Excel often is what they know already.
The language is alright, the IDE within Excel, less so. I try to write VBA in a maintainable manner but especially with Excel's macro recording feature it's possible to create quite messy code. Macro recording is fantastic for bootstrapping functionality but you have to edit the resulting code if you want it to be maintainable further down the road.
Other developers often frown upon Visual Basic and don't consider writing VBA code in particular to be "proper software development" but it gets the job done and that's what counts.
REALBasic was better than any other language in terms of productivity and no language/framework combination has matched that for me so far. I used to be very active in the REALBasic community and was able to make fully working applications within a few hours. That meant that I had time to spent on details that no current applications have. For example, my application used to give visual feedback to any action, including blinking menu items, blinking selections when text was copied, and so on. Contrary to what people claimed even then, carefully-planned applications also had way less bugs than they have in any language I use nowadays. REALBasic was also way better as a language than what C++ people used to say about it, it was fully structured, had OOP, and was overall pleasant to use. It definitely gave better results faster than other frameworks, and RB's OOP was a perfect fit for end-consumer, GUI-oriented applications.
Nowadays, I do own Purebasic, but since it's not structured and has no genuine cross-platform support for rich text in edit fields, I barely use it. I currently use Go with GTK3, but the combo is way worse and not even comparable to REALBasic (no RAD). The only viable alternative seems to be Python with Qt, but the results are horribly slow and the language is just ugly. I've also been using Racket for many years and the latest version of my (very outdated, long-term maintenance) shareware application is still written in it, but there are too many GUI limitations and performance problems to recommend it.
Bottom line is that I miss the good old "an unhandled NIL object exception has occurred" days. Lazarus is not a good substitute either.
I wish Lazarus didnt have such an annoying UI and its sometimes buggy. If it were much more cleaned up out of the box I might give it a serious try. But also theres not many learning resources from what I can see. I would love to make GUIs again that are fast and snappy.
I wish D had some RAD capabilities. I would even pay money for a RAD IDE in D to be honest.
Genuine question. QBasic was my first programming language, and I learned C++ only during university. Looking at older code at my job I think I'm lucky to have missed a lot of language-uglyness (we have some legacy code samples that are basically some compiler-specific dialect of C89; feels totally different than C++11).
Other platforms never invested that much in C++ build performance.
In any case, hopefully modules will make it better.
Naturally enough I call this "visual basic" ;)
I've not "seriously" programmed in BASIC for decades, but this was still enough to make me smile and feel nostalgic.
I would never recommend it for a new, fully fledged software project these days. But I would consider it a great learning tool. Can't speak to other BASIC dialects, but TI-BASIC to me was perfect due to how limited the syntax was, and because of the TI-84 interface, to program directly on the calculator you had to select the keywords from a menu interface, which was great for feature discovery. Even if you weren't programming in a menu interface, you could probably have a single page keyword cheatsheet/language spec sitting alongside you to remind you of basically everything supported by the language.
To this day, I suppose I wouldn't completely scoff at someone who was using BASIC for very basic scripting or doing a quick computation. It is still kind of enjoyable due to how simple it is, and I'm guessing non-professionals probably could figure out what it's doing as long as the program is short enough.
Later, I found QBasic and spent a few hundred hours messing around in that, the built-in index and manual with examples made it extremely nice for me, as I could always try out things where I didn't understand what they did from the description (still lacking English skills at that point).
I mostly wrote stuff that used the lowres graphics mode and put stuff on screen, and a tic-tac-toe game (every move was hardcoded, I didn't know of algorithms at that time).
I never did anything interesting with it, but it seeded my curiosity in programming, probably made it a lot easier for me to understand stuff like variables and calling functions when I moved to PHP, and later C.
I've worked the past 10 years as a programmer, and I think I owe a bit of that to basic.
Why not change? I know the language so well, and have so many things I can reuse...ok...fear of change.
You can get pretty much anything done with classic ASP still though. Here are a few of my sites both done with only classic ASP server side.
Now, Jquery has moved some things I would previously do server side to client side, but these are basically classic ASP, SQL Server driven sites.
As info, I used Timex 2068 Basic, 48K Basic, GW-Basic, Turbo Basic, AMOS, GFA Basic, QBasic, QuickBasic and VB as well.
And yes, with the native code compiled versions of Basic it was even possible to do system level like programming back then.
So Basic has a special place for me, even if I barely used today.
Also ignore the naysayers about VB.NET vs VB6, there are plenty of features that are comparable, usually what was left behind were GW-Basic and QuickBasic compatibility features.
Just think that even F# doesn't have the amount of platform love that VB.NET enjoys on VS tooling.
Writing small programs to automate a calculation is something that should be accessible to everyone; when I created the BASIC editor and overall system the goal was to have as few steps between a user thinking "hey I want to automate this calculation" and having the program be written.
BASIC has a great sweet spot: simple commands, but still a real language. My version, of course, doesn't require line number and has real functions.
Sometimes it is easier to keep some data in Excel and then convert to JSON with a simple macro.
Not to shit on my early days learning programming. Basic was my 2nd language, and even after years away, I was able to jump right back into it. But once you learn how to walk, crawling loses its appeal.
I could also predict exactly how each line would be translated by the compiler, and that enabled interesting hacks and optimization techniques.
Kinda like Ruby, BASIC let you express what you want in an intuitive way rather than constantly try to work around the restrictions imposed by the language. There are many ways to do the same thing. None is good or bad.
When it comes to being fun, expressive and productive, Ruby is the only language that comes close to BASIC.
The ability to knock-up great GUI’s using Visual Studio’s WinForms was extremely valuable, having to develop trading desk applications quickly. Then, Microsoft introduced WPF and that’s where I jumped ship.
VB6 was actually a powerful language, compiler which was highly optimized and rivaled C++ in terms of performance. It was a highly productive language for many.
Use it for making small programs for fun, the latest to download localised weather from the BBC and give a 1 liner summary or a longer 7 day forecast in a simple popup window.
Also use it for mouse gesture type programs, as an alternative to browser addons or native software.
Despite BASIC's intent to be simplistic, I think that C-style syntax is more intuitive; moving to C# was a great step. Still, VB.NET felt like magic when I first used it, and VBA is still useful in working with MS-Office documents.
It's a tool like anything else, when it's the right one for the job it's worth using.
As for how people react, most are well informed enough to understand the reasons.
I actually enjoy the process of writing VBA because the REPL is so much better than, for instance, C# in Visual Studio.
I used to use it extensively (back when it was called REALbasic) and still occasionally dabble (i.e., tweaking apps I made awhile ago), but it's gotten much too expensive for hobbyist or "scratching my own itch" kinds of projects, which is a shame because I still love the language.
Almost every app I did was for either the Mac or Windows, but perhaps the main value prop of REALbasic/Xojo was how easy it was to write one app and have it run on both Mac & Windows. For small applications, it really did Just Work, which seemed kind of magical.
Back in the day basic was frowned upon - but I think these days the stigma is pretty much gone...
They also have support for PIC, ARM, 8051, dsPIC, FT90.
ic0nstrux (nee XGameStation) also had Basic support for their DYI games console
I still occasionally write some VBA macros.
What I took from those years is that the best tools are those that let you hit the ground running.
On anything resembling modern hardware, Python is the new BASIC.