A Conversation for Flea Market

A479199 - Visual Basic Programming

Post 1

Monty

http://www.h2g2.com/A479199

What do you think of this? I feel that it may be slightly biased against C and Java, but I can't really tell...


A479199- Visual Basic Programming

Post 2

Silly Willy

These are my comments, please understand I am *not* a scout:

1. There really is non need to make the first paragraph bold, but that's more of a style thing.

2. Could you explain more about what Object Orientated, assume the reader knows nothing about programming.

3. Maybe you could mention qbasic or Quick Basic in passing.

4. Generally, the coding for the page could do with a tidy, but again, that's a style point.

5. Maybe you could give some specific examples of websites you learned VB from.

I think this has the potential to be a really good guide entry!
smiley - silly


A479199- Visual Basic Programming

Post 3

Is mise Duncan

Blimey - you realise you have taken on a huge task.

Anyway, things that should be mentioned:
(1) Visual Basic is the most popular language (by lines of code written) in the world.
(2) The flavours of VB - You have the full blown programming product, currently "Visual Basic 6", the (very advanced) Office automation / Macro language (VBA) and the internet scripting language (VBScript).
(3) The history of VB, maybe?
(4) ActiveX components - how this compares with other code reuse methodologies.
(5) Reference sites :
[URLs removed by moderator]
(6) The future direction of VB i.e the .NET platform.


A479199- Visual Basic Programming

Post 4

Gnomon - time to move on

Some quibbles:

Bill Gates did not develop BASIC. He and his Microsoft company wrote a BASIC interpreter for many of the early computers. On the Apple 2 it was called Applesoft, for example. But the BASIC language already existed. Most of the early home computers such as Apple, Pet, Sinclair etc had Basic interpreters included. For example, the very first Apple 2 had a Basic interpreter written by the designer, Steve Wozniak.

Parenthesis is not the "correct" name for brackets. It is one name. Brackets is the other name. They are both equally valid, although American computer people keep trying to insists that brackets means the square things "[" and "]". To most people these are "square brackets". The curved ones are just plain "brackets".

When talking about more than one parenthesis, the word is "parentheses".


A479199- Visual Basic Programming

Post 5

manolan

Well, you're right about BASIC (a lot of people forget that it stands for Beginners' All-purpose Symbolic Instruction Code). It was invented by the US military years before the personal computer.

But the question of parentheses is more complex. The secondary sense of parenthesis (the first is an aside) in Collins English Dictionary (2nd - 1986 - edition) is:

2. Also called: bracket. either of a pair of characters, ( ), used to enclose such a phrase or as a sign of aggregation in mathematical or logical expressions.

The fourth & fifth senses of bracket (after the DIY and architectural ones) are:

4. Also called: square bracket. either of a pair of characters, [ ], used to enclose a section of writing or printing to separate it from the main text. 5. a general name for parenthesis, square bracket, and brace (sense 6).

So, strictly, curved brackets are really parentheses and square ones are really just brackets, but with some scope for each alternative meaning to be correct.


A479199- Visual Basic Programming

Post 6

Silly Willy

Ahh, the good old days of the Sinclair...
smiley - silly


A479199- Visual Basic Programming

Post 7

Monty

Thank you all for your suggestions and pieces of information. I shall take thos on board, and post a message to this conversation when I have finished.

Monty


A479199- Visual Basic Programming

Post 8

Jimi X

Has this been updated yet?


A479199- Visual Basic Programming

Post 9

manolan


Oops.

I could have sworn it was invented by the military, but apparently:

In 1965 Thomas Kurtz and John Kemeny of Dartmouth College developed BASIC (Beginners' All Purpose Symbolic Instruction Code) as a computer language to help teach people how to program.


A479199- Visual Basic Programming

Post 10

Martin Harper

the Beginner's All.... thing...

it's a backronym. That is, originally the language was just called BASIC - because all capitals was the fashion for naming computer languages in those days. Then people decided it needed to be an acronym for something, and the "beginner's ..." thing was invented.

Unfortunately this urban myth backronym has gained rather depressingly huge popularity - and it is looking likely that the truth may be wiped from the history books. Hopefully h2g2 will manage to get it right.

COBOL is the language with the most lines of code written in total. followed, if I recall, with FORTRAN. And most of the code 'written' in VB is VBA, and is created by wizards and macro recorders, so it doesn't count...

> "In my opinion"

Bzzt! No "I" or "me" in edited guide entries please! smiley - smiley

Style issues:
Your C fragment - and VB fragment, for that matter - variables should be in lower cases: 'number' instead of 'NUMBER'.
Similarly, it should be textbox.text.
In VB "If", "Else", and "End If" should all be written as I've shown.
The lines beginning printf and textbox should be indented by 4 spaces -   should do it.
In the C fragment, you don't need the curly brackets, and most C programmers don't include them.
It should be (numbernumber).

All of these are style issues - but what I've said is, by and large, universal. The only bit that isn't is whether you should include curly brackets - and if you do, where. But I think omitting them is most common in C.

You should mention that VB has evolved considerably, and has only become properly OO recently.

I'd ignore .NET for now, since even MS don't know what it is... (except that it's going to try and kill java...}

Your description of what OOP is is so far off the mark it's amusing. The webopedia entry is better: "A type of programming in which programmers define not only the data type of a data structure, but also the types of operations (functions) that can be applied to the data structure. In this way, the data structure becomes an object that includes both data and functions."


A479199- Visual Basic Programming

Post 11

Is mise Duncan

Style in C: I would always put the invariant on the left hand side, thus when doing equality comparison, if you accidentally leave off the double-equal (one of C's little quirks) you would get a compile time error which is easy to spot rather than a nasty difficult to trace bug. Doing the same for all operators just promotes consistency.

I would argue that code written by MACRO does count - a great deal of C is generated automatically, ditto Java.


A479199- Visual Basic Programming

Post 12

Martin Harper

That's what lint is for... smiley - winkeye But ok, I withdraw that to one of greater experience.

Depends what you mean by 'generated automatically'... All I'm think of is pressing the 'record' button in Word, doing some stuff, and then pressing the 'stop' button - that doesn't count as programming - and I don't think it should count as writing lines of code. That this macro is created in VBA is an irrelevance until you at least look at the resultant code.

Otherwise, compilers generating machine code count - and that's blatantly not right. Heck, JITs compile every time a piece of java is run - I could beat the amount of VB just in x86 compatible machine code...

A great deal of C is generated from -to-C compilers, and is piped straight into a C compiler - but I don't think that should count as 'lines written in C' either. They weren't written in C, they were written in . It's the human that counts, not what some idiot machine does. smiley - smiley


A479199- Visual Basic Programming

Post 13

Gnomon - time to move on

Lucinda, How do you know that it is an urban myth that BASIC stands for Beginner's All-purpose Symbolic Instruction Code? I always assumed that the original inventors of the language chose the name BASIC and then immediately chose a phrase with those initials. If this is the case, then it does stand for that phrase, although it is contrived.

I didn't get involved in the computer industry until 1979. At that time, the name was firmly entrenched in all literature as an acronym.


A479199- Visual Basic Programming

Post 14

Is mise Duncan

I don't think it was a backronym - the authors had already written a system called "DOPE" (Dartmouth Oversimplified Programming Environment) thus demonstrating that a good pun is just as important in a programming language as the language itself smiley - winkeye
Morover, COBOL stands for COmmon Business Oriented Language (or COMplete BOLloney when I write it smiley - winkeye ) and FORTRAN for FORmula TRANslator (I think - college seems such a long time ago smiley - winkeye).

However, the Dartmouth Basic was a compiled language whereas early VB and the Microsoft Basics that preceeded it are all interpreted languages...so perhaps a history of these (BASICA, GW-BASIC then later QuickBasic then PDS Basic then VB1 etc....)


A479199- Visual Basic Programming

Post 15

Martin Harper

[URL removed by moderator]


A479199- Visual Basic Programming

Post 16

manolan


Sorry. Close but no cigar. A quick visit to a search engine reveals hundreds of sites which contain the definition and not one (at a casual glance) which says it is a backronym. I first learnt BASIC in the late 1970s (about when the backronym is meant to have been introduced) and all the books had the acronym: I can't believe they were all brand new books as the pace of computer publishing was somewhat slower then.

On the C style front, I have always been taught that it is good practice to put the braces in and I insist that my team do so. This is because it takes no longer to execute (being compiled), almost no extra time to write, but is clearer to read and safer to modify. In fact, we insist on the use of compound conditional structures in all languages which support them. You may occasionally see a piece of perl code with a condition at the end, but very rarely: usually having been hacked together and then pressed into emergency service in production! Simply, in an environment where there are many programmers and they change over time, the advantages outweigh the disadvantages.


A479199- Visual Basic Programming

Post 17

Martin Harper

> "A quick visit to a search engine reveals hundreds of sites which contain the definition and not one (at a casual glance) which says it is a backronym."

And you'll find lots of sites on the internet saying that the Necronomicon is a real book. Urban myths spread, nowadays, via websites written by idiots, and reporters who don't know better. All this shows is that the myth is well spread.

The jargon file has a history going back to the time in question - I trust it a lot more than I trust most websites in historical matters.

> "I have always been taught that it is good practice to put the braces in"

I agree - it is good practice. I was basing this on my own limited experience of C programmers, and the most common style of C... while(numchars-->minnumchars||numbugs==0);


A479199- Visual Basic Programming

Post 18

Martin Harper

history of the jargon file:
[URL removed by moderator]
- 1975 -so almost exactly the correct time period. That site also gives contaqct details, so if you do manage to show that it isn't a backronym - do email them. Perhaps you are right - but it would seem off that in 25 years of majorly widespread distribution - nobody's corrected it yet, no?

If you care about quantity of sites - you might try
[URL removed by moderator]
Though what this mostly shows is that the jargon file is so widely regarded it has about ten thousand mirrors. But amongst the mirrors are these sites:

[URLs removed by moderator]

Now - find me one site *anywhere* which states definitively that BASIC is *not* a backronym. Or find me one book from the early 70s which contains the definition. Hint: your local library will be able to help.


A479199- Visual Basic Programming

Post 19

manolan


What look at paper? Hmm, I'll think about it, but all my books from that period are in storage (while I continue to support all the builders in West London).

And as for a definitive statement that it isn't a backronym... you _are_ joking, aren't you?

Unfortunately, tracing it to the early 70s just means the jargon file is a little out. What we really need to do is trace it to whatever course material the originators used in 1965, so _I'll_ have a quick look at old BASIC books and _you_ track down the authors or the Dartmouth College historian... OK?!


A479199- Visual Basic Programming

Post 20

Martin Harper

well, given that backronyms are acronyms too, all your hundreds of websites which say that BASIC is an acronym for ..... are technically accurate. They've just omitted information. Thye probably also omitted info on what the guy was wearing when he created BASIC, but that doesn't mean he did it nude. smiley - smiley


Key: Complain about this post