Microsoft "Small Basic"

PhatoseAlpha

Platinum Member
Apr 10, 2005
2,131
21
81
Eh. Is this really a good idea?
It seems that teaching people bad programming habits from the get go is kind of self defeating.
 

sourceninja

Diamond Member
Mar 8, 2005
8,805
65
91
Oh yea, this is just horrible. Their getting started document teaches you to use goto statements.....dear god.
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
While I applaud MS for trying to appeal to more people... this belongs in a "Toy" forum IMO.

goto statements? :laugh: :laugh: :laugh: :laugh:
 

imported_Dhaval00

Senior member
Jul 23, 2004
573
0
0
I might get blasted, but I don't think GOTO statements, in general, are a bad thing. I use them occasionally in my SQL scripts [especially when making calls from within Integration Services] to skip processing blocks and prevent the DB engine from estimating a execution plan. The net effect in this case is that the scripts execute faster. It may not be viable on smaller tables, but the trick is quite effective on tables that contain millions of rows and in scripts that must make use of temporary tables or table variables.
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
Originally posted by: Dhaval00
I might get blasted, but I don't think GOTO statements, in general, are a bad thing. I use them occasionally in my SQL scripts [especially when making calls from within Integration Services] to skip processing blocks and prevent the DB engine from estimating a execution plan. The net effect in this case is that the scripts execute faster. It may not be viable on smaller tables, but the trick is quite effective on tables that contain millions of rows and in scripts that must make use of temporary tables or table variables.

That's one thing, but using GOTO to control the flow of your program is wrong on so many levels!
 

imported_Dhaval00

Senior member
Jul 23, 2004
573
0
0
Originally posted by: Crusty
Originally posted by: Dhaval00
I might get blasted, but I don't think GOTO statements, in general, are a bad thing. I use them occasionally in my SQL scripts [especially when making calls from within Integration Services] to skip processing blocks and prevent the DB engine from estimating a execution plan. The net effect in this case is that the scripts execute faster. It may not be viable on smaller tables, but the trick is quite effective on tables that contain millions of rows and in scripts that must make use of temporary tables or table variables.

That's one thing, but using GOTO to control the flow of your program is wrong on so many levels!

I was just saying. I agree with everyone about GOTO in general, but the statement has gained so much ill publicity that people frequently forget about its power [assuming it is used wisely].
 

sourceninja

Diamond Member
Mar 8, 2005
8,805
65
91
GOTO statements should only be introduced after you have a solid programing background. Otherwise it leads to the kind of code I wrote back in 5th grade.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
I disagree with you guys completely. The thing to remember is that it used to be trivially easy for a beginner to step into BASIC and start programming. Everything you needed was on the ROM in every IBM PC. It's how I started, and how a lot of other people got started as well. Jeff Brin wrote a good article a few years back lamenting the loss of simple, tiny implementations of BASIC.

As for GOTO, it is the earliest and easiest form of flow control to learn. If you're going to be a carpenter you learn how to make a butt joint first. It's an unsuitable joint for almost any project you'll do later, but if you started people out on mitres you'd have a lot fewer good carpenters. What GOTO does is teach beginners that control can transfer to somewhere else in the program on command. From that comes conditional logic, subroutines, functions, and eventually objects when the idea of data is integrated.

So, look not with the experienced coder's jaundiced eye on tools meant for the young :).
 

JasonCoder

Golden Member
Feb 23, 2005
1,893
1
81
Originally posted by: Dhaval00
I might get blasted, but I don't think GOTO statements, in general, are a bad thing. I use them occasionally in my SQL scripts [especially when making calls from within Integration Services] to skip processing blocks and prevent the DB engine from estimating a execution plan. The net effect in this case is that the scripts execute faster. It may not be viable on smaller tables, but the trick is quite effective on tables that contain millions of rows and in scripts that must make use of temporary tables or table variables.

Wait, does the T-SQL in integration services lack the IF statement? Just saying... do you really NEED the GOTO in T-SQL?
 

Journer

Banned
Jun 30, 2005
4,355
0
0
why would anyone be creating new programs in VB still? C# is better in almost every way, no?
 

KB

Diamond Member
Nov 8, 1999
5,406
389
126
Originally posted by: Journer
why would anyone be creating new programs in VB still? C# is better in almost every way, no?

C# is better than VB 6.0 yes, but better than VB.Net ... not really. This has been discussed and debated a million times on the web. Neither is considered better than the other since they both consume the same objects of the .Net framework and have identical statements. Its all about preference.



Microsoft SmallBasic has a lot of competition out there. The full VB.Net isn't that much more complex than SmallBasic, but it is much more powerful. Ultimately the statements are the same except in VB.Net you have to have a Sub Main(). Then theres PowerShell which I thought was supposed to be a replacement for Basic and Vbscript. It doesn't require the Sub Main nor does it require you to Dim your variables. Usually choice is a good thing but I think my company and I won't be using it for anything..
 

degibson

Golden Member
Mar 21, 2008
1,389
0
0
I'm forced to agree with Markbnj. Goto isn't the root of all evil. It played a very important role in my formative programming environments as well. It also has its place in modern languages -- there are times when nested control flow isn't the right abstraction.

Also: http://imgs.xkcd.com/comics/goto.png
 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
You all are being too critical. The purpose is:

Small Basic is intended for beginners that want to learn programming. In our internal trials we've had success with kids between the ages of 10 and 16. However, it's not limited to just kids; even adults that had an inclination to programming have found Small Basic very helpful in taking that first step.

and that's it. Kids aren't interested in abstract ideas about variables, memory allocation, naming conventions, etc. Kids just want a little instant gratification to further their interests. For these purposes, this is a fantastic tool.

The trouble of course is when people use this to expose themselves to programming and never move beyond it. We all know of such people, and it's unfortunate; however, it doesn't diminish its value, imo.