Jump to content

Why is it that nobody likes BASIC?


vailixi
 Share

Recommended Posts

It's mostly historical, but I think the main reason is that when BASIC appeared, it was pretty much the first programming language that the uninformed masses could code in. And they did, vigorously. The code these people wrote was AWFUL. Think of the worst... *THE WORST* ball of tangled spaghetti code you can imagine, then having someone go MacGuyver on that to make it do something unrelated using dental floss, chewing gum, some tin foil and a metric shit-ton of blind luck to get it to produce whatever the person that was writing it was hoping for. It was like enrolling Stevie Wonder into the Indy 500.

And it wouldn't be so bad if people wrote some monumentally shit code to scratch their own itch, but they would sell these programs to other people with a similar itch. After a while features needed to be added and the original creator dutifully did so but since the creator still doesn't know anything about programming fundamentals he gets it to work using kludges that would bring most sane men to tears. As time progresses the creator decides this whole programming malarky is getting WAY too complicated for him (a.k.a. even he can't untangle the mess anymore) so he tries to hire a trained programmer to take over the codebase. Interviews tend to go something like this:

"See this program here? Looks nice, eh? Well, I have this customer that wants to change these texts, but not all my customers want that, so what I want you to do is to make this configurable."

- "Heh. That should be easy enough."

"I thought so too, but I couldn't get it to work after I tried to."

- "You... Wait, what did you write this in?"

"Basic. I really love that language."

- "Could....I... maybe see the code?"

"Here it is."

- "Where are the subroutines?"

"Subroutines?"

- "You only have 1 subroutine..."

"What's a subroutine?"

- "Your entire program is 1 code file with 1 subroutine that runs for 15654615 lines..."

"I guess. Is that bad?"

- *blank stare*

This happened A LOT. So much in fact that people stopped blaming the programmers and instead began to take issue with the language itself. And some of that was well-deserved. The language does make it ridiculously easy to write shit code. BASIC isn't alone in this. Perl is notorious for not only allowing very, very bad coding practices, but allowing you to do so in the most cryptic way possible. It's no surprise the Perl one-liner has become a thing of legend. If you think that one-liner can easily modified to do your bidding, you have another thing coming, I can assure you.

That doesn't mean it's impossible to write clean, maintainable code in BASIC or Perl. It's just that very few programs written in those languages actually are (or, I should say, used to be - things might have improved by now).

Edited by cooper
Link to comment
Share on other sites

Following on from what cooper states, I feel the same way.

From experience, I've worked with simple programs in BASIC at work, that people who are supposed to know what they are doing have created, and they are a real dogs dinner.

I think people get annoyed with BASIC because they spend more time fixing others mistakes / horrible code than actually getting to make new and nice things with it.

I feel other languages 'force' the user into using slightly better practices, so if someone else picks it up, they can at least break it down rather than looking at a wall of text that some nutter threw together.

*Edit* Spelling mistakes, again.

Edited by haze1434
Link to comment
Share on other sites

From a nostalgia point of view, I like BASIC. It was were I started to learn programming, as it was the language the home computers at the time booted up into. I think that was part of the beauty of the language and also its curse.

A lot of BASIC programs were people learning how to program. Hence the quality of the code was poor (go back an look at the early programs you wrote when learning to program and imagine if their quality was used to form an opinion of the language being used).

While the quality of these programmers later code was generally a lot better, their later code was quite often Assembler not BASIC (you could do a lot in BASIC back then, but to get real speed you had to drop down to a lower level language).

Quite a bit later, along came Visual Basic which was a chance to improve people's impressions of the language. Unfortunately it was presented to people as an easy way learn programming, except quite often you found that they didn't so much learn to program, as to draw forms and add components to them. Which resulted in a lot of people who thought they had mastered programming, when they hadn't, tarnishing the languages reputation again.

I suspect that there are a lot of programmers out there like me who view BASIC as being where their journey started and look back on it fondly, but won't be choosing it for their next project.

Link to comment
Share on other sites

My very first programming was a .bat file that provided a startup menu (ms-dos 3.30/WordPerfect 4.2 days). After that I tried to get Commodore BASIC programs my friends ran to run on MS-BASIC which my parents' PC had. I was 7 if memory serves.

Learning BASIC isn't the mental death sentence it's made out to be by some.

Link to comment
Share on other sites

My very first programming was a .bat file that provided a startup menu (ms-dos 3.30/WordPerfect 4.2 days).

Back in the day, when I was learning COBOL as part of course I was taking, the tutor told me that the menu system on course work was excellent. I didn't have the heart to tell him that the menu system wasn't implemented in COBOL and instead was just a batch file that then ran the relevant COBOL programs.

Remember GOTO?

Sure do, if you look at quite a few languages you'll find it (though they don't like to talk about it). The best thing about GOTO of course was the feeling you got when you discovered GOSUB and realized that you'd never need to use GOTO again.

Link to comment
Share on other sites

You should start using PowerShell. It's pretty amazing. I use it a lot at work to automate tasks. One particular task that would take me 3 hours to perform manually now only takes 1-2 seconds and the code didn't take long to write at all. That's a typical result for programmers but it used to not be on Windows environments. I love how it integrates with Active Directory, PowerCLI allows integration with VMware products, and there are custom modules out there that cover anything Microsoft hasn't covered already. I even used a third party SSH module to write a PowerShell script to search all of the 53 Cisco switches on a network to find a machine's location.

Okay, I'll stop promoting one of my favorite languages now.

Link to comment
Share on other sites

  • 1 month later...

Well I used Basic on different platforms and I still like it.

  • Basic V2 (Commodore 64)
  • Basic V7 (Commodore 128) - just wrote 2 or 3 code examples
  • Amiga Basic (Amiga 500) - actually I hated coding on Amiga, but enjoyed gaming :lol:
  • Quick Basic 1.1/4.5 (PC/DOS)
  • Visual Basic 4/5/6/.NET (PC/Windows)
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...