A programming language, originally designed for Dartmouth's experimental timesharing system in the early 1960s, which for many years was the leading cause of brain damage in proto-hackers. Edsger W. Dijkstra observed in "Selected Writings on Computing: A Personal Perspective" that "It is practically impossible to teach good programming style to students that have had prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." This is another case (like Pascal) of the cascading lossage that happens when a language deliberately designed as an educational toy gets taken too seriously. A novice can write short BASIC programs (on the order of 10-20 lines) very easily; writing anything longer (a) is very painful, and (b) encourages bad habits that will make it harder to use more powerful languages well. This wouldn't be so bad if historical accidents hadn't made BASIC so common on low-end micros in the 1980s. As it is, it probably ruined tens of thousands of potential wizards.
So, why do we need BASIC?
-- Every expression is true, for a given value of 'true'
I realise this is not a popular opinion around here, but Visual Basic is really not a bad language. It's obviously not designed for use by seasoned coders on large projects, but as a starter language or for getting a small job done quickly...it really is excellent.
No, it isn't.
Visual Basic is a very poor language. The form editor isn't bad, the Object Browser quite handy, the IDE is so-so, but the language is terrible. Here is some food for thought:
Arrays. Say you've got a function which returns an array of some sort - let's say an array of variants to make it easy. How do you return an array of 0 items cleanly?
Object-Orientation. Ever attempted type-safe inheritance or polymorphism in VB? Variants do not count.
String Concatenation. Say you have an HTML page being generated by an ActiveX component called from ASP in IIS (apologies for the MS jargon... this really happened at my workplace though). If you are generating a table, and it has, say 20 columns by 100 rows (or in our case, sometimes more), you naturally would simply generate a big string of the HTML and pass it back to the ASP to spit out, right? But in the process of generating those 2000 table cells, you do quite a few string concatenations. Here's the problem: VB's string concatenation is O(n^2)! (as according to MS, apparently, not to mention our own testing). It can take many seconds or even minutes to spit out something that should be done in a fraction of a second. In the end we wrote a "FastString" component in C++ and used that in the VB. It instantly brought one test case down from 8.5 minutes to 2.5 seconds. Not exactly what I'd call getting a "job done quickly".
So, the obvious question: What's the alternative that's so much better, huh? As a matter of fact, I do have one in mind: Python. It does everything VB does, and much much more. The language is a lot nicer than Visual Basic. *Especially* for beginners. The in-built types are just so much more powerful. Lists and dictionaries being integral parts of the language automatically makes those simple jobs much simpler. (Yes, I realise there is Scripting.Dictionary for VB, but it's not as convenient.)
More impressively, with Python you don't hit your head against a brick wall when you decide to attempt something larger than 50 lines - it's a language that scales well between beginners *and* experts.
If you're wondering, yes I do hate VB with a vengenance, and I code in it (almost) every day. I feel qualified to rant.
[breathes deeply]
Ahhh.... that's better.
-Spiv.
Do not download! KBasic supports the bourgeoisie!
by
faeryman
·
· Score: 5
The member list. Read down at the bottom, at the "Additional thanks to" section. Or rather read the BLANK space there.
Yes my fellow working class GNULIX user, those bastard capitalists programmers list only themselves as creating KBasic. I ask you - should not the man who created thier keyboards be listed too? Or the workers at the powerplant who provide the electricity needed for them to program? Or even Ivan who runs the breadstore down the road for providing nourishment to the programmers?
I also see they have released this software under the GPL. Blasphemy! Marx is spinning in his grave at this. How can the bourgeoisie release such foul capitalist inspired code under the sacred socialist liscence - the GPL?
Yes my fellow men, abandon KBasic as you would abandon your class in society. As you would embrace Lenin, embrace the One True BASIC - GWBASIC!
So, why do we need BASIC?
Every expression is true, for a given value of 'true'
No, it isn't.
Visual Basic is a very poor language. The form editor isn't bad, the Object Browser quite handy, the IDE is so-so, but the language is terrible. Here is some food for thought:
Arrays. Say you've got a function which returns an array of some sort - let's say an array of variants to make it easy. How do you return an array of 0 items cleanly?
Object-Orientation. Ever attempted type-safe inheritance or polymorphism in VB? Variants do not count.
String Concatenation. Say you have an HTML page being generated by an ActiveX component called from ASP in IIS (apologies for the MS jargon... this really happened at my workplace though). If you are generating a table, and it has, say 20 columns by 100 rows (or in our case, sometimes more), you naturally would simply generate a big string of the HTML and pass it back to the ASP to spit out, right? But in the process of generating those 2000 table cells, you do quite a few string concatenations. Here's the problem: VB's string concatenation is O(n^2)! (as according to MS, apparently, not to mention our own testing). It can take many seconds or even minutes to spit out something that should be done in a fraction of a second. In the end we wrote a "FastString" component in C++ and used that in the VB. It instantly brought one test case down from 8.5 minutes to 2.5 seconds. Not exactly what I'd call getting a "job done quickly".
So, the obvious question: What's the alternative that's so much better, huh? As a matter of fact, I do have one in mind: Python. It does everything VB does, and much much more. The language is a lot nicer than Visual Basic. *Especially* for beginners. The in-built types are just so much more powerful. Lists and dictionaries being integral parts of the language automatically makes those simple jobs much simpler. (Yes, I realise there is Scripting.Dictionary for VB, but it's not as convenient.)
More impressively, with Python you don't hit your head against a brick wall when you decide to attempt something larger than 50 lines - it's a language that scales well between beginners *and* experts.
If you're wondering, yes I do hate VB with a vengenance, and I code in it (almost) every day. I feel qualified to rant.
[breathes deeply]
Ahhh.... that's better.
-Spiv.
I'm sure you're saying "Oh komrad faeryman! Why not?"
The member list. Read down at the bottom, at the "Additional thanks to" section. Or rather read the BLANK space there.
Yes my fellow working class GNULIX user, those bastard capitalists programmers list only themselves as creating KBasic. I ask you - should not the man who created thier keyboards be listed too? Or the workers at the powerplant who provide the electricity needed for them to program? Or even Ivan who runs the breadstore down the road for providing nourishment to the programmers?
I also see they have released this software under the GPL. Blasphemy! Marx is spinning in his grave at this. How can the bourgeoisie release such foul capitalist inspired code under the sacred socialist liscence - the GPL?
Yes my fellow men, abandon KBasic as you would abandon your class in society. As you would embrace Lenin, embrace the One True BASIC - GWBASIC!
Thank you.
With love,
,
faeryman