Page 1 of 5
Posted: Mon Nov 22, 2004 5:43 pm
by cobain
hi im a new member and a newbie to programming but i wanna learn...any advise on books and...the big question i have is what do you use programming for!? sounds stupid...but im a newbie
Thx
Posted: Mon Nov 22, 2004 6:02 pm
by Falco Girgis
Programming is for any electronic. (best way I can describe it)
Imagine a video game. How does it work? How does it know that when your life gets 0 or below to make you explode in that savage bloodspray? How does it know to render those beautiful graphics?
Easy -- you tell it to. You do that by programming. Programming is basically giving a set of instructions to hardware and making it... do stuff.
Everything from the bios on your computer to your Windows XP and video games. They've been programmed.
First off, programming cool things is NOT easy. You have to realize how hard it is just to simply draw something to a computer screen. If you're really interested, you eventually need to learn C or C++.
I say eventually because I don't think you could jump right into it. I first started off with HTML. I moved up to a little Javascript and eventually started doing CGI on websites. That kind of gradual change prepared me for tackling C++ (Perl especially). I think programming in things like C/++ would've been insane had I not had that previous web design background....
Posted: Tue Nov 23, 2004 7:40 am
by JS Lemming
Hey cobain, yeah I agree with GyroVorbis. If you haven't already learned HTML, i suggest you do so. The reasons being: Its insanely easy, it helps you understand how syntax works, and basic knowlege of linking to files on the commpoooot. If your fast, you can most likey know and understand almost all of HTML in just a few days.
After that, you can either get into dull boring BASIC programming and make stupid text based games OR jump straight into C++.
um...help
Posted: Thu Nov 25, 2004 6:01 pm
by cobain
yall know im a noob 2 programming...i do know some html though, but no "proper" names 4 stuff but ive done some websites and whatnot but this post consists of questions i have after reading the first chapter of the c++ book i got.
1. whats a complier? whats a linker? how u use a complier?
2. it says i need 2 make a directory for each peice of the program i create...i proly know what that means but in simpler terms plz.
3. i need a debugger? where can i get 1?
4. whats a parameter?
5. do u always put the braces { and } enclosing the "body? eg in a 4 line prog would i put the braces for lines 2 and 4?
thx the main question tho is whats a complier? whats a linker? and the seperate directories... thx any help appreciated
Posted: Thu Nov 25, 2004 6:42 pm
by cobain
o yes, and in my book it doesnt put two slashes in front of everything, and sometimes seemingly randomly in lines of code it just puts spaces...why? and how do i know where they go if i am writing 1 w/out this book? here is the prog that is the first in this book
int ma=in(int argc, char* argv[])
{
return 0;
}
that is the first prog in book, the thing im talkin bout is like in line 3 and the thing i was talkin bout in my last post are in lines 2 and 4. thx email me if ya want
ductiledogg@yahoo.com and my aim is q3420cobain
Posted: Thu Nov 25, 2004 8:31 pm
by Falco Girgis
First off, I'm Falco Jaenisch. I see that you're from Tennessee. Do you by any chance go to Clarksville High? Have we ever met?
Okay, you asked quite a few questions. I'm going to try to sum them up in the most easily understood way I possibly can...
cobain wrote:1. whats a complier? whats a linker? how u use a complier?
A
compiler is used to change your program that you write into something that the computer can read. You don't think it knows english or anything do you? It converts what you write into what the computer/hardware can read. To use it? You want to go and find something called
Dev-C++. MarauderIIC and I use a compiler called
Visual C++ but that's like $700. Dev-C++ is free and should suit you well. JS Lemming can give you the rundown of how to use it.
cobain wrote:2. it says i need 2 make a directory for each peice of the program i create...i proly know what that means but in simpler terms plz.
You sure that's what it says? The hell kind of compiler are they using? OH WAIT -- you need to make a directory (new folder) for you to store your programs in is what I think it's trying to tell you.
cobain wrote:3. i need a debugger? where can i get 1?
A debugger is something that basically tells you what is wrong with your program when you screw up. That is with the Dev-C++ compiler (so is the linker) so don't worry about that.
cobain wrote:4. whats a parameter?
Okay, let's say that you have a function like this:
Code: Select all
int something(int x) {
printf("hello");
}
The X is an integer parameter that the function takes. It is just a variable that is passed to the function to use there.
cobain wrote:5. do u always put the braces { and } enclosing the "body? eg in a 4 line prog would i put the braces for lines 2 and 4?
The body? As in everything in a main function? The only thing I'm sure you'd have to know in Chapter 1 is that everything in a function (particularly main at this point) must be between {} showing that it is in that function.
cobain wrote:o yes, and in my book it doesnt put two slashes in front of everything,
I'm not sure what you mean, but if by two slashes you mean "//", then that's because that is a comment line. You do this:
Code: Select all
int ma=in(int argc, char* argv[])
{
// This returns a 0 to the operating system
return 0;
}
See how I wrote a nice comment about what return 0 does? That is completely ignored by the compiler and just makes it easier to understand what your program is doing.
cobain wrote:and sometimes seemingly randomly in lines of code it just puts spaces
Well, the spaces are actually VERY important. Too many times these days I see (would-be) programmers who have TERRIBLE coding style. The basic rule is that anything between {} should be indented another four lines.
Here is an example. DONT try to understand this. Just look at how I'm indenting to make it look pretty.
Code: Select all
#include <iostream>
int ma=in(int argc, char* argv[]) {
int something;
cout << "Hello fools";
cin >> something;
if(something == 1) {
cout << "dude, you just typed in 1!";
}
}
Okay, I'm sure I haven't answered everything. If you have any more questions then just bring them on. I've had enough bawls today to keep going for a while.
Posted: Fri Nov 26, 2004 11:42 am
by cobain
thx 4 the help...i do go 2 chs! thats weird. um..idk if weve met im a freshman u? my locker is 603 upstairs by mr long's room im in his room 4 advisory. stop by my locker but thx again 4 the help
cobain
Posted: Fri Nov 26, 2004 12:39 pm
by Falco Girgis
I went to CHS a year ago. I now live in Madison, Alabama. I am a Sophamore now. Both JS Lemming and The Phantom go to CHS though. They're Sophamores. I'm sure they could help you lots.
Posted: Fri Nov 26, 2004 4:26 pm
by JS Lemming
Yeah, cobain is from my latin 1 class. Oh, and here is a link to download Dev-C++, the better then V6C++, compiler HUHA.
http://www.bloodshed.net/dev/devcpp.html
Posted: Fri Nov 26, 2004 4:29 pm
by cobain
hey. well, i dl'ed somethin a friend told me bout called borlands 5.5 somethhin or another thats a compiler and it converted the file i wrote in notepad to a .bak file that wont open, it has the options of either "use web to find an appropriate prog" or "select a prog from a list" now im lost. when i saved this simple prog that i copied straight from my book which it said to do i just pushed save as. idk what file type it saved as and on properties is just says the file type is "text file" whatm i doin wrong? how i get this .bak file to a .exe?
Posted: Fri Nov 26, 2004 4:49 pm
by Falco Girgis
Ummm... Dude, if your compiler makes you do all of that bullcrap to go from .cpp to .exe, trash it.
I just looked up this Borland. It's nice and all, but it really isn't what you need. I think it is a project some students made going to a college to turn in to their professor. There isn't even an interface it's just load a file and compile. I don't think it has a debugger.
Dude, you need to get Dev-C++. JS Lemming could even help you, but with this "Bor Land" think, we have no clue what to do.
Also, the friend who told you to download it, are you sure he knows what he's talking about? Is he a C++ programmer? What has he done/made that makes him know what he's talking about?
Posted: Fri Nov 26, 2004 4:57 pm
by JS Lemming
BTW cobain, how did you know I programmed? I think you said someone told you, who? Just curious.
Posted: Fri Nov 26, 2004 5:12 pm
by cobain
the friend was jordan in our latin class, the friend that told me to get borlands was vegetz. a guy lives in NY i think i play quake III w/ him but anywho now hes telling me since this whole .bak thing to get a development suite. they expensive and easy or can ya just dl em from edonkey or soulseek or somethin?
Posted: Fri Nov 26, 2004 5:16 pm
by cobain
o yea and the whole reason i started that reply but 4 got 2 include was what version of the Dev C++ thing i get? Dev-C++ 5.0 beta 9 (4.9.9.0) (7.6 MB) with Mingw/GCC 3.3.1
or
Dev-C++ 5.0 beta 9 (4.9.9.0), executable only (2.1 MB)
?
Posted: Fri Nov 26, 2004 6:22 pm
by cobain
ok i figgered that out lmfao but now i dl'ed the first 1 i mentioned but can some1 walk me through the steps 1 by 1? like open a new project and get it 2 where i can type in the code and then compile that and debug it and run it? exactly step by step from the moment u start it? lol im technically challenged and does any1 here that can help me w/ programming have instant messenger and actually gtes on? i am q3 420 cobain by the way
ta ta