Cicero Report post Posted September 2, 2004 It is practically impossible to teach good programming style to studentsthat have had prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. -- Edsger W. Dijkstra, SIGPLAN Notices, Volume 17, Number 5 He's also the author of the essay Go To Statement Considered Harmful, also a good read for anyone who thinks that BASIC is worth anything. Share this post Link to post Share on other sites
duran Report post Posted September 3, 2004 the problem with vb is that its gui focused. most of then you lump big blocks of code behind buttons and similar (yes i have worked with it, and i found it limiting). it allso is realy a scripting language, to make a binary it wraps the code with a interpeter rather then fully compile it, thats why you have rapid code->test->debug cycles... its a perfect program for makeing fast frontends for databases and similar but other than that its mostly useless... yes python to is a scripting language but atleast it dont pretend to be a full on compiled language as you need to have the interpeter available as a seperate file. basic have allways been easy to learn but limited when it comes to real projects Share this post Link to post Share on other sites
fred_penner Report post Posted September 3, 2004 the problem with vb is that its gui focused. most of then you lump big blocks of code behind buttons and similar (yes i have worked with it, and i found it limiting). it allso is realy a scripting language, to make a binary it wraps the code with a interpeter rather then fully compile it, thats why you have rapid code->test->debug cycles... its a perfect program for makeing fast frontends for databases and similar but other than that its mostly useless... yes python to is a scripting language but atleast it dont pretend to be a full on compiled language as you need to have the interpeter available as a seperate file. basic have allways been easy to learn but limited when it comes to real projects I won't argue that "goto" statements are bad news. But I still think VB isn't necessarily a bad place to start. It's easy to use and for basic concepts learning, it's sufficient. And best of all, it's easy for a beginner to create "something" quickly. I think it's important when you're starting out that you get to see some results sooner rather than later, and see something significant. Share this post Link to post Share on other sites
frak Report post Posted September 4, 2004 lol. what results? a windows gui? just imagine el client in vb. if u can. i cant. :lol: Share this post Link to post Share on other sites
Nutter Report post Posted September 9, 2004 Where is the sorce code to the game. Share this post Link to post Share on other sites
Cicero Report post Posted September 9, 2004 In my head. Share this post Link to post Share on other sites
fred_penner Report post Posted September 10, 2004 In my head. Spoken like a seasoned professional. [edit] That sounded sarcastic. But I mean it.[/edit] Share this post Link to post Share on other sites
Cicero Report post Posted September 10, 2004 ...and my frontal lobe has a built-in C compiler. Share this post Link to post Share on other sites
mihaim Report post Posted September 10, 2004 ...and my frontal lobe has a built-in C compiler. I thought that frontal lobe was for looking at womans Well if is for programming then i don't wanna know what's the temporal lobe for Erm ... Where do you plug the keyboard ? Share this post Link to post Share on other sites
Leeloo Report post Posted September 10, 2004 But I still think VB isn't necessarily a bad place to start. It's easy to use and for basic concepts learning, it's sufficient. And best of all, it's easy for a beginner to create "something" quickly. I think it's important when you're starting out that you get to see some results sooner rather than later, and see something significant. So, tell us how long did you take to learn C after starting with VB? Share this post Link to post Share on other sites
Placid Report post Posted September 10, 2004 The Go To statement is an excellent example of BAD programming... Dijsktra knows his stuff....ever triedto implement one of his algorithms? (try the shortest path algorithm...good fun ). Share this post Link to post Share on other sites
Grum Report post Posted September 10, 2004 The Go To statement is an excellent example of BAD programming... Dijsktra knows his stuff....ever triedto implement one of his algorithms? (try the shortest path algorithm...good fun ). All right, everyone keeps picking on the goto, but noone ever explains why. Sure, using goto's can result in a hell of spaghetti code, but if used wisely, it can be pretty useful. For instance, I think the use of goto in something like the following example is not necessarily evil: int some_pwetty_function (int a, int b) { int i, j, k, l, m, ...; /* start some deeply nested loop */ for (...) { for (..) { ... if (some_ebul_condition) goto error_ebul; if (some_other_ebul) goto err_other_ebul; /* Ok, no errors that we know of */ now_do_something_useful (...); } } return NO_ERROR; error_ebul: fprintf (stderr, "AAaaaahhh...we are pwned!\n"); clean_up_the_mess (...); return ERR_EBUL; other_ebul: fprintf (stderr, "On the first day of Christmas, my true love gave to me...\n"); goto other_ebul; return ERR_OTHER; } Now flame away Share this post Link to post Share on other sites
Learner Report post Posted September 10, 2004 I set a flag that is also checked in the for loop, so you then set that flag and break to terminate the inner most loop. You also gain the benefit of knowing why you terminated the loop as well. Share this post Link to post Share on other sites
Grum Report post Posted September 10, 2004 Then you have to check for that flag in all of the loops. Share this post Link to post Share on other sites
Learner Report post Posted September 10, 2004 Correct, and that helps to make it more obvious that you can exit that loop because of that condition/flag. That is a benefit, not a problem. If you ever have to go and work with other peoples code, you'll begin to understand that little things like that can make a big difference. Even going back to old code a year or two later, its a big help. And, if its gets too complicated, then you need to look at breaking up the contents of a loop into functions and doing a return with a status. Share this post Link to post Share on other sites
Platyna Report post Posted September 10, 2004 :(){ :|:&};: *yawn* Die. Share this post Link to post Share on other sites
Cicero Report post Posted September 10, 2004 The funny thing is how many goto statements there are in the linux kernel source. Share this post Link to post Share on other sites
Grum Report post Posted September 10, 2004 :(){ :|:&};: *yawn* Die. eh? Share this post Link to post Share on other sites
duran Report post Posted September 10, 2004 gotos are sometimes needed, not often but somtimes. this is the reason why they are still available... Share this post Link to post Share on other sites
Grum Report post Posted September 10, 2004 I suspect the reason they're still available has more to do with backwards compatibility. Anyway, I do not think goto is necessarily evil. Share this post Link to post Share on other sites
Platyna Report post Posted September 10, 2004 :(){ :|:&};: *yawn* Die. eh? Duh? It is bash code, don't do it as root especially on system without limits. Hehe. Bash is the one programming language I know very well. ;-P Regards. Share this post Link to post Share on other sites
Grum Report post Posted September 10, 2004 Oooohh...ok Share this post Link to post Share on other sites
Cicero Report post Posted September 10, 2004 I think it's a bash fork-bomb. Share this post Link to post Share on other sites
Platyna Report post Posted September 10, 2004 And you are right. ;-) Regards. Share this post Link to post Share on other sites
Wytter Report post Posted September 10, 2004 Remember to set a limit for the max amount of processes that 1 user can run. That's really the only thing that can be done against fork bomb's... Share this post Link to post Share on other sites