i want to learn to code...and i got a question

K

Kolo

Guest
ok heres the question......should i start with visual basic or C++?.....more more simply what is better to learn....i heard once that vB gives your bad habbits....so i was just wondering what you guys think.....i know its probably a debate as to which is better but i would just like to hear your guys opinions.

Thanks.:cheers:
 
Ive also heard that Visual forms bad habits and being a wimpy route to learn :\

i reason that learning C++ first would be more rewarding and more backward compatible to learing C and Java and C++Visual. Not really backward compatible, but educating yourself from harder concepts to easier ones is more rewarding than having to relearn what you trained yourself to do in a simpler language.

I am tryingt to learn C++, far from finishing lol.
Any other input from someone who knows'em both?
 
I don't know if you're interested in web applications but starting with something like PHP isn't a terrible way to go at all. You get the basics and pretty much all of the ground work carries through to the different languages. I taught myself PHP and then was fairly bored when I took Java and C++ because it was all almost exactly the same. A big difference between the three is the way you declare your variables. In PHP it's a simple

$variable_name = "Because this contains text PHP will figure out that it's a string, I don't have to tell it!"

but in Java or C you have to specify a data type so if you wanted an integer (which I believe is up to 4 numbers long) you'd do

int variable_name;
variable_name = 0;

But if you have a floating point number (a number with a decimal) You have to pick from 3.. I can't remember what they all are so I'll just use float.

float variable_name;
variable_name = 1.009797;

The other big difference is the way classes/functions work but I'll let other people explain that. (I can if you want me to but I think that might be putting too much info into a reply for someone looking to start out =) )
 
Originally posted by Noodlygod
I don't know if you're interested in web applications but starting with something like PHP isn't a terrible way to go at all. You get the basics and pretty much all of the ground work carries through to the different languages. I taught myself PHP and then was fairly bored when I took Java and C++ because it was all almost exactly the same. A big difference between the three is the way you declare your variables. In PHP it's a simple

$variable_name = "Because this contains text PHP will figure out that it's a string, I don't have to tell it!"

but in Java or C you have to specify a data type so if you wanted an integer (which I believe is up to 4 numbers long) you'd do

int variable_name;
variable_name = 0;

But if you have a floating point number (a number with a decimal) You have to pick from 3.. I can't remember what they all are so I'll just use float.

float variable_name;
variable_name = 1.009797;

The other big difference is the way classes/functions work but I'll let other people explain that. (I can if you want me to but I think that might be putting too much info into a reply for someone looking to start out =) )

Well a few things, the first bit I could program to work in C++ with the minor addition of parentheses around what you wanted to put in the variable:

$ variable_name("string goes here!");

secondly an int has 4 bytes (most of the time) that means it can be as big as 2,147,483,647 (unsigned)

The three types are float, double, long double, the reason for this is because you can choose the number of bytes to use, though usually all of them are 4bytes (they come from a time when one of the biggest bottlenecks was having 64k of RAM).

heh as far as how classes and functions differ, you got me, I only know C++. Anyway, C is a good langauge to start, or if you are feeling brave or bored you could try and follow my attempt to teach C++ on this forum.
 
Hm, cool bit about the $ variable_name(""); thing, I had no idea!
 
yeah though I do like the idea of having that built into the language rather than having to implement it yourself.
 
but creating a variable in C++ isn't exactly hard

type name

int integerName
float
char
etc

then theres short, long, signed, unsigned (short and long memory concerns, (un)signed whether or not its a negative number or not (using the - key )

but other things like pointers and alias thingie and classes is where declaring gets messy nuts
 
php is a nice start, you don'T need much except for a web server which is capable of php. then go on and learn c++ and java. they're pretty similar.
 
thanks for your input. I think im just going to go with C++. I would start with PHP but i have no interest in making web stuff. Really the only reason i was asking about vB was because my friend can give me all the newest .net software for free...but it also comes with a C++ compiler so i mainly want it for the compiler. But since its such expensive software i have to get a book before his dad will allow me to use the software...being as its his companys software and all.

so for my next question....
Whats a good C++ book?...theres so many out there i dont know which are any good and which arent.

Thanks again.
-Kolo
 
woops forgot tto add that i have no programing experience and if you recommend a book it would have to start fomr the very begining.
 
no programming experience at all? then look at the c++ tutorials here in the forums, get some from the internet too. and without any experience i'd recommend to buy c++ for dummies, or c for dummies in combination with a book specially about visual c++ and one more advanced book.
 
ya i have been looking at the ones on the forum and i am looking at ones on the internet..but i want to be able to work ahead....eventually
 
a book is going to be better then forums (no offense :| )
to some extent.

Im reading the sams teach yourself in 24 hours C++ third edition

comes with compiler (which you don't need i guess lol) but is pretty clear and has tons of examples. i just got past pointers and references ~ hour no 13.

I think the chapters are clear and pretty good at explaining things, but someitmes i have to read a chapter more then once.

overall, good book i think, ~30$
 
Actually, C++ for Dummies isn't that great of a book if you want to learn C++, because it assumes you know a lot. It zips through pointers relatively quickly, and gets into classes, inheritance, templates, etc. not long after pointers, from what I remember. Basically, if you know nothing, don't use this book because it'll confuse the crap out of you. You don't need to know classes right from the start; you need a basic foundation with stuff like loops, variables, conditionals, functions, structs, etc. Half-Life 2 will probably have a heavy focus on classes though (since HL1 did...) so it'd be a good thing to learn before it comes out.

And as for which you should learn first, C++ or VB, I'd go with C++. There aren't many parallels between the two. VB (not .NET) isn't really object-oriented, and besides that, you'll be making windowed programs and stuff, dealing with event handling and things like that. C++ doesn't have events. They are fairly different. If you want to be able to make Windows apps later, learn VB after you learn C++ and it'll be easy.

-Syko
 
im learning VB.net right now and going to C++ next , and right now i love it.
I think VB is a good and easier way to find out if you would be interested in a language like C++
 
I work with about 10 different programming languages at work, and I'd suggest that you get into an Object-oriented language to begin with.

Also, its very hard to 'jump' into programming. You need to have an understanding of the underlying concepts before you can totally understand the higher-level languages.

For hardcore people, who want to learn C++, I'd recommend Deitel and Deitel's Programming C++.

Otherwise, a good place to start would be "C++ for Dummies", or "Sam's C++ in 24 days".
 
This term I'm learning 2, well 3 actually. I started with PASCAL last term. This term I am doing C++, Visual Basic, and SQL.. but SQL is easy. I'm way behind on my homework though :(
 
1) If you're using .NET then go for VB or C# because they have much better integration with the .NET stuff, I really advise against C++ in this case. VB would be my language of choice here, but only because it looks a lot tidier to me (there is no functional difference between VB and C#).

2) If you want to learn games programming, then forget .NET and get your hands dirty with C++. Games are all about performance, and thats the only way you'll learn about performance. To get good performance out of .NET you have to be very clever about what you are doing.

3) Find a very good book!
 
Back
Top