• Welcome to Valhalla Legends Archive.
 

Discussion of what to recommend to newbies

Started by Banana fanna fo fanna, November 25, 2003, 02:07 PM

Previous topic - Next topic

Banana fanna fo fanna

I've been seeing a large number of non-programmers coming here who want to make bots. They have all been recommended VB < .NET and have been given a download location. This leads to stupid questions about CSB and nagging I WANT I WANT posts.

I propose we stop recommending VB completely. I'm not here to preach about why Python is a better alternative :), but I truly think that VB needs to start to stop gaining new users.

First, it's ancient. It's being phased out and, as Grok has said countless times, there are no new jobs being created for it. Microsoft has/will soon terminate support for it.

It also teaches poor style; it promotes anti-modularization (most newbies put all the code in form1), poor naming conventions (they tend to stick with the default names), giving someone too much power with too little experience (they get a finished product and they think it is coded perfectly because it works, thus sticking to their old style), and throws speed totally out the window (actually, that's not too big a deal).

Finally, it's too easy to use CSB and make a bot. The reason for many of the bot restrictions in the first place is because of the abuse of them, which CSB only increases. If someone works their ass off and reverses the algorithms and protocol, they won't risk losing their access (OK OK OK, I admit that I stole CheckRevision, but I did put in the time reversing the protocol without any help/bnetdocs/whatever).

I'm open to suggestions for a teaching language. Preferably it would be something that could show results quickly, yet require the user to think. It should probably have OOP and be maintained.

I'm thinking Python, Java, or C#.

iago

I like telling newbies to use VB because it's easy for them to go off and learn and I don't have to answer tech support questions.  For somebody who isn't serious about wanting to learn, it's pointless to try to make them learn something difficult because they won't get anywhere.  For somebody who's serious, I would recommend C or C++.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Mitosis

#2
Im gunna go C++ and something else, just not sure yet. I know some basic C++ but when I get my new computer I plan to spend ALOT of time doing it, one other question though, if I bought C++.NET would it work with normal C++ code? Or do I have to learn new stuff?

iago

Visual Studio .net can compile regular C++ code.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Kp

Quote from: iago on November 25, 2003, 03:13 PM
For somebody who isn't serious about wanting to learn, it's pointless to try to make them learn something difficult because they won't get anywhere.  For somebody who's serious, I would recommend C or C++.

This is exactly why I think you ought to recommend C/C++ (or some other nontrivial language) exclusively.  If the querent can't even be bothered to learn a nontrivial language, is it really good having them around?
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

MyndFyre

C#, IMHO, is a relatively easy language to learn if you can get past all of the lingo.  Its support for modularity is worlds better than Java's (if you don't believe me, I will refer to my paper discussing the OOP differences for the two languages that I gave to my CSE 210 teacher last semester - when I actually had to educate him in the differences and make a defense for it for my honors project).  Beyond that, it's not particularly *easy* to do much of anything *useful* in C# - if you want to access a database, you need to use VS's wizards, which end up giving you useless crap anyway, or go through a huge hassle designing an XML schema and running the custom tool to develop a dataset class.  To communicate over Sockets, you actually have to know something about Sockets programming - and you also have to understand how to convert between the Unicode character set and the 8-bit character set.  While it's visual (encouraging RAD), there haven't been enough design-time tools yet developed for lUsers to mooch, e.g., CSB.

Although, I will grant, my bot API might end up being the .NET CSB equivalent....

I started out with Javascript, taking Thau's Javascript Tutorial on Webmonkey.  That's a good step into structured programming, as it taught me the importance of writing well-designed subroutines and the use of abstraction.  While it's arguable that you can't do very much that is useful with it, it's still a good primer, and many people already know part of the HTML DOM, because many computer enthusaists understand how to make web pages.

Ultimately, I think either Java or C# are the way to go for newbies.  C++ is a bit much - and to be perfectly honest, if we want to introduce C++ at some point, C# would be a good place to start, because they can't break it quite so easily.  Pointers are available, and once you get things started in C#, there are a few hurdles to leap, but by and large, they are syntactically similar.

*my two cents*  =)

--Rob
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Tuberload

#6
Just because Java may be a fairly straight forward language that is easy to learn, does not mean a programmer will learn proper programming... Java is a language made by professionals for professionals. If you program poorly your program will reflect that. While I will agree Visual Basic is not the way to go for beginning programmers, I disagree that just because they use a language such as Java, that they will learn to program correctly. A language is just a tool used to solve a specific set of problems. Accept for C/C++, which seems to handle them all.  :)

C# was Microsoft's response to Java, and I would like to here how it's support for modularity is so much better seeing it pretty much follows the same object model. Everything about Java is object-oriented besides it's primitive data types such as ints and floats.

Both C# and Java are syntactically similar to C, were C++ gets it's general syntax. C++ just makes larger programs easier to manage, and maintain. While C, and ASM if necessary, are excellent choices for time critical algorithms, and fairly small programs.

I am not an expert in any of these areas, but my main point is people that aren't interested in programming in the first place do not need a better language, they need a new hobby.
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

Kp

Quote from: Tuberload on November 27, 2003, 03:38 AMJava is a language made by professionals for professionals.

I tend to disagree on this point.  Some of the things prohibited by the Java compiler seem like absolutely absurd requirements unless you're working under the assumption the programmer is an idiot who must be protected from all constructs he didn't specifically intend (and possibly even from some of those).   Offhand, I can't recall a Java compiler ever implicitly doing the "right thing", and very often it simply refused to do anything implicit at all.  For example, Java is the only language I've seen where it's illegal to assign an int a value, then do if (int_name) { stuff } and have it work.  In Java, you get a compile time error that you can't use an int there; all the other languages I've worked with (C, C++, Perl) assume != 0 as the suffix to your statement, if you don't provide one.  Java forces you to explicitly say if (int_name != 0).

Quote from: Tuberload on November 27, 2003, 03:38 AM
Both C# and Java are syntactically similar to C, were C++ gets it's general syntax. C++ just makes larger programs easier to manage, and maintain. While C, and ASM if necessary, are excellent choices for time critical algorithms, and fairly small programs.

Having worked with Java, C, and C++, I can say that Java and C syntax are quite different.  C++ extended upon C's syntax, and Java copied mostly the extended parts.  This is really not that surprising, since C is not an OO language, but Java and C++ are OO.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Tuberload

#8
Quote from: Kp on November 27, 2003, 10:12 AM
Quote from: Tuberload on November 27, 2003, 03:38 AMJava is a language made by professionals for professionals.

I tend to disagree on this point.  Some of the things prohibited by the Java compiler seem like absolutely absurd requirements unless you're working under the assumption the programmer is an idiot who must be protected from all constructs he didn't specifically intend (and possibly even from some of those).   Offhand, I can't recall a Java compiler ever implicitly doing the "right thing", and very often it simply refused to do anything implicit at all.  For example, Java is the only language I've seen where it's illegal to assign an int a value, then do if (int_name) { stuff } and have it work.  In Java, you get a compile time error that you can't use an int there; all the other languages I've worked with (C, C++, Perl) assume != 0 as the suffix to your statement, if you don't provide one.  Java forces you to explicitly say if (int_name != 0).

Quote from: Tuberload on November 27, 2003, 03:38 AM
Both C# and Java are syntactically similar to C, were C++ gets it's general syntax. C++ just makes larger programs easier to manage, and maintain. While C, and ASM if necessary, are excellent choices for time critical algorithms, and fairly small programs.

Having worked with Java, C, and C++, I can say that Java and C syntax are quite different.  C++ extended upon C's syntax, and Java copied mostly the extended parts.  This is really not that surprising, since C is not an OO language, but Java and C++ are OO.

Yes but all of it's general language syntax such as for/do/while loops, if/else/switch, and method declaration formats all are the same as C, and it copies C++'s extended parts as you say. I have only limited experience in either C/C++ but they look the same to me if you ignore the OO requirements imposed by Java.

Java programs created using bad habits will exhibit that, is why I made the comment it is for professionals, but I guess any language besides Visual Basics will do that. I do think Java puts a little to much effort in preventing runtime errors, and limits some unnecessary things, but that does not make a language unprofessional. I still think, besides your obvious discontent for Java Kp, that it is an excellent language.  ;D
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

Kp

Quote from: Tuberload on November 27, 2003, 10:37 AMI do think Java puts a little to much effort in preventing runtime errors, and limits some unnecessary things, but that does not make a language unprofessional.

I didn't call the language unprofessional.  I disagreed with your assertion that it was "by professionals for professionals". ;)
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Tuberload

Quote from: Kp on November 27, 2003, 11:00 AM
Quote from: Tuberload on November 27, 2003, 10:37 AMI do think Java puts a little to much effort in preventing runtime errors, and limits some unnecessary things, but that does not make a language unprofessional.

I didn't call the language unprofessional.  I disagreed with your assertion that it was "by professionals for professionals". ;)

Would you prefer "by hobbyists for professionals"?
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

Banana fanna fo fanna

"by professionals for everyone"

Dammit, how about we all just get together and make "The Bot Making Kit"? We can make it just like VB, but you don't have to write code, AND it has the paperclip to help you out.

Hitmen

Quote from: St0rm.iD on November 28, 2003, 08:03 PM
AND it has the paperclip to help you out.
Oh come on, even newbs hate the paperclip!

Grok

I agree with the tenor of this topic, but would suggest we recommend C# in place of VB.

Note that I said "in place of VB", meaning where we would have recommended Visual Basic 6.0 to a newbie, they will be better off overall learning C# instead.  The reasons are simple, and probably arguable, but are my first thoughts and not a well-developed treatment of the issue.

1)  The "help me with VB" botnewbs are assumed to have no other language experience.

2)  They are likely to be Microsoft Windows users, and should at be most comfortable with VS.NET's IDE as their first experience.

3)  C# promotes good computer science from the ground up.

4)  C# addresses weaknesses in VB, Java, C, C++, while allowing newbs to write programs as easily as they would have written one in Visual Basic, just starting out.

Arguments against:  .NET while claiming to be platform independent, is only so on Windows :P  But only because the CLR hasn't been implemented anywhere else (yet).

Banana fanna fo fanna

Mono works (kinda)

My vote is with Python and/or Java.