• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

JUST started computer programming

PsychoIncarnate

The Eternal Will of the Swarm
Joined
Jul 4, 2007
Messages
50,642
Location
Char
NNID
PsychoIncarnate
3DS FC
4554-0155-5885
I've decided to get into computer programming.

I've done some programming things before in classes, but I never took a dedicated class before. It's something I've wanted to check out.

I'm haven't started classes yet, but before they DO start I've decided to teach myself C++. I imagine people in the class (Even if it's a beginner class) will be ahead of me in knowledge and I plan to catch up as much as I can.

After reading a lot online on what program to start with, I decided to go to C++ and picked up a couple of books. I've only done a couple chapters so far.

Any...advice or something?
 

John2k4

The End of an Era
Joined
Aug 28, 2011
Messages
8,989
Check with your school and see if they have the MSDN program set up - that program allowed me to get Visual Studio 2010 Ultimate for free (legally). A very nice program for writing code of almost any kind. =)
 

AltF4

BRoomer
BRoomer
Joined
Dec 13, 2005
Messages
5,042
Location
2.412 – 2.462 GHz
Don't.

Don't succumb to Microsoft's lure. You will be swept up into a wave of proprietary tools and vendor lock in that you won't be able to escape. Use and write Free and Open Source software. There are more Free Software tools than you will know what to do with.

Start by doing some basic things, like installing a Free Software operating system on your computer, so you can actually control it to do what you want. Ubuntu is the most popular these days. You can try an IDE, if you want. (Integrated Development Environment) But it's not necessary.

You get better at programming the same way you get better at anything, and that's by doing it! Don't sit and think about how awesome it would be to be able to program. Just do it! Write a simple "Hello World" program.

Get better by reading other's code and sharing your own. Make an account on github.com. (Mine's github.com/altf4)

Stackoverflow.com is an EXCELLENT resource for specific programming questions. Also, just google, honestly. But feel free to ask more questions!
 

John2k4

The End of an Era
Joined
Aug 28, 2011
Messages
8,989
GitHub is a nice place.
I have used StackOverflow in the past.

--

Yes, you can use a combination of scripts and whatnot to turn a program like Notepad++ into a C++ development/compiler. I just took the Visual Studio route because it was offered to me as free software, and it's what I learned to use from the start. I don't plan on buying additional developing softwares from Microsoft, but it was nice to get such a good development program for free.
 

PsychoIncarnate

The Eternal Will of the Swarm
Joined
Jul 4, 2007
Messages
50,642
Location
Char
NNID
PsychoIncarnate
3DS FC
4554-0155-5885
I've just been using the editor and compiler that came with the book.

It's called Codeblocks or something
 

AltF4

BRoomer
BRoomer
Joined
Dec 13, 2005
Messages
5,042
Location
2.412 – 2.462 GHz
I just took the Visual Studio route because it was offered to me as free software, and it's what I learned to use from the start. I don't plan on buying additional developing softwares from Microsoft, but it was nice to get such a good development program for free.
Visual Studio is not and will never be free software. "Free Software"in the computer world (as I hope you know) refers not to price, but to freedom. As in software that respects and promotes freedom. See http://fsf.org

PsychoIncarnate said:
It's called Codeblocks or something
Code::Blocks is great. Best to get comfortable with something and try to stick with it.
 

John2k4

The End of an Era
Joined
Aug 28, 2011
Messages
8,989
Visual Studio is not and will never be free software. "Free Software"in the computer world (as I hope you know) refers not to price, but to freedom. As in software that respects and promotes freedom. See http://fsf.org
Yeah, I'm much aware of this kind of "free software". It's just that...
Best to get comfortable with something and try to stick with it.
...this is what happened to me.

-

I do use NPP for SourcePawn and some C# writing.
 

PsychoIncarnate

The Eternal Will of the Swarm
Joined
Jul 4, 2007
Messages
50,642
Location
Char
NNID
PsychoIncarnate
3DS FC
4554-0155-5885
Discouraged,

I just tried to write my own program not given to me...

However, I just read that you can't store decimals as integers...? OR i'm just doing something wrong

I don't think I have the knowledge yet to create this.

#include <iostream>

int main()
{
int My_Bill;
std::cout << "Enter your total bill amount :";
std::cin >> My_Bill;

int My_Tip;
std::cout << "Enter your tip % :";
std::cin >> My_Tip;

int Total_Tip = (My_Bill * My_Tip);

int Total_Pay = (My_Bill + Total_Tip);

std::cout << "Tip %: " << My_Tip << std::endl;
std::cout << "Tip: " << Total_Tip << std::endl;
std::cout << "Total: " << Total_Pay << std::endl;
return 0;
}

What it's SUPPOSE to do is you enter your bill, than enter your tip % and it tells you the tip and the final bill.

What it ACTUALLY does is give me bizarre numbers. Not to mention when you use decimals as the first number.

Bleh...
 

AltF4

BRoomer
BRoomer
Joined
Dec 13, 2005
Messages
5,042
Location
2.412 – 2.462 GHz
Think of your math class for a moment, not programming at all. An Integer is the set:

(-∞, ... -3, -2, -1, 0, 1, 2, 3, ... ∞)

No "decima points". So in C++ when you have a variable "My_Bill" declared as an int (Integer) it cannot store any decimal points. If you want to store decimal points, then use a "double" as the variable's type.

Also, I see that your tip is calculated using:

int Total_Tip = (My_Bill * My_Tip);
So if I had 10 for my bill, and entered 5 for my tip, it would just multiply them and tell me that the total tip is 50. Not exactly what I would have expected. The program expects you to enter .05 to input "5%". Why it's then stored asa double is beyond me.

Try changing the ints to doubles. (And if you ask me, dividing that tip by 100) Thenit works as expected.
 

PsychoIncarnate

The Eternal Will of the Swarm
Joined
Jul 4, 2007
Messages
50,642
Location
Char
NNID
PsychoIncarnate
3DS FC
4554-0155-5885
Oh, to me it makes sense to write .05 instead of 5. I guess I'm just weird

for some reason I thought it was stored as floats (But I always wrote the My_Bill as whole numbers so I never thought to use doubles or floats). I am just in the first chapter that covers them so I'll look more into what they actually do.

Double worked without a problem. Thank you

Edit:

#include <iostream>

int main()
{
double My_Bill;
std::cout << "Enter your total bill amount: $";
std::cin >> My_Bill;

double My_Tip;
std::cout << "Enter your tip %: ";
std::cin >> My_Tip;

// It was requested I divide by 100 since most people (All but me) would write the tip as a whole number. Example: 15 instead of .15
double Total_Tip = (My_Bill / 100 * My_Tip);

double Total_Pay = (My_Bill + Total_Tip);

std::cout << "Tip: $" << Total_Tip << std::endl;
std::cout << "Total: $" << Total_Pay << std::endl;
return 0;
}


Edit Edit:
At first I thought it wasn't working from all the sad faces
 

NTA

Smash Lord
Joined
Sep 20, 2008
Messages
1,478
Location
(Decatur) Atlanta, GA
I recommend using "using namespace std;" anywhere below #include <iostream> and above int main()

std::cout << "Enter your total bill amount: $";
would read:
cout << "Enter your total bill amount: $";
cin >> My_Bill;

std::cout << "Tip: $" << Total_Tip << std::endl;

would be rewritten as
cout << "Tip: $" << Total_Tip << endl;

Some people usually have problems getting their program to stay open and adding "cin.get();" above return 0; makes the program wait for the user to press enter before exiting the program
 

joe.

Smash Cadet
Joined
Apr 11, 2012
Messages
41
Location
Waxhaw, NC // East Carolina
Visual Studio is not and will never be free software. "Free Software"in the computer world (as I hope you know) refers not to price, but to freedom. As in software that respects and promotes freedom. See http://fsf.org
FSF seems like a pushy pretenious way of promoting Open Source Initiative. LINK

MSDN Academy is one of the greatest things that Microsoft has ever put out. It has been endlessly useful to me in my studies, allowing access to every useful program they have put out.
To go ahead and say that Microsoft stuff is crap because it isn't free and open source is very dense of you as a programmer, no? If you were doing this for money, and only had limited resources and a deadline to get to, I'd go ahead and take the sure fire way to get the the product to the majority of users as fast as possible. (e.g Most of standard PC userbase is on Windows.) It takes time to set up a Linux environment; no matter what distro you are using, if you want it to work correctly, there is going to be more to set up that just an out of the box installation of windows.

Not trying to be disrespectful/rude/a ****. Just my 2cents. Interested in hearing a response ; haven't had good computer conversation aside from my CCNA work for a while.
 

Dastrn

BRoomer
BRoomer
Joined
Jul 16, 2005
Messages
9,472
Location
Indiana
Microsoft Studio 2010 is an AMAZING tool. You should be fine coding in Microsoft stuff while you are learning.

C++ is a great language to start with, and is the standard when it comes to game programming.
C# has been a massively good language for me, and has expanded my skills dramatically.

With that said, I appreciate what AltF4 is saying entirely. I'm an Ubuntu user, but I can acknowledge that it isn't a terribly easy experience learning Ubuntu for a beginner. Especially when you are just starting programming, you need to focus on putting out code quickly and seeing results immediately. I can't recommend trying to learn Linux AND programming all at once.

Visual Studio express is a free option to VS2010. If I were you, I'd go with that, and just start cutting code quickly. Lots of code. Make up all sorts of crappy little games. Write some console games in C++. I did a whole rpg with motion through a map, and enemies, and loot and bosses and doors and keys and a story and everything. It taught me a TON about programming. I learned classes and functions and recursion and everything.
C# in visual studio will let you do little windows form programs, which will introduce a new level of coding involving triggers like key presses and mouse click actions. I've written a handful of little games that are easily as complex as the ones packaged with windows.
C# also allows you to code for windows phones eventually, although I'm an Android guy.
Don't go with Objective C, as it's proprietary to Macs, and most new programmers find the syntax a little wonky.
Java is worth looking into, but it is old and pretty slow. Minecraft was written in Java. Had it been done in C++, it would run MUCH faster and smoother.
The good thing about Java is that you can write Android apps when you get your skills up enough. That opens up huge potential in the medium term. Although I wouldn't be surprised if we see a new Android OS in C++ instead of Java one day. Or we could see Google finally nail on developing a new language and giving us all something to replace Java once and for all.
 

Morin0

Smash Lord
Joined
Oct 9, 2007
Messages
1,907
Location
San Diego, CA
Microsoft Studio 2010 is an AMAZING tool. You should be fine coding in Microsoft stuff while you are learning.

C++ is a great language to start with, and is the standard when it comes to game programming.
C# has been a massively good language for me, and has expanded my skills dramatically.

With that said, I appreciate what AltF4 is saying entirely. I'm an Ubuntu user, but I can acknowledge that it isn't a terribly easy experience learning Ubuntu for a beginner. Especially when you are just starting programming, you need to focus on putting out code quickly and seeing results immediately. I can't recommend trying to learn Linux AND programming all at once.

Visual Studio express is a free option to VS2010. If I were you, I'd go with that, and just start cutting code quickly. Lots of code. Make up all sorts of crappy little games. Write some console games in C++. I did a whole rpg with motion through a map, and enemies, and loot and bosses and doors and keys and a story and everything. It taught me a TON about programming. I learned classes and functions and recursion and everything.
C# in visual studio will let you do little windows form programs, which will introduce a new level of coding involving triggers like key presses and mouse click actions. I've written a handful of little games that are easily as complex as the ones packaged with windows.
C# also allows you to code for windows phones eventually, although I'm an Android guy.
Don't go with Objective C, as it's proprietary to Macs, and most new programmers find the syntax a little wonky.
Java is worth looking into, but it is old and pretty slow. Minecraft was written in Java. Had it been done in C++, it would run MUCH faster and smoother.
The good thing about Java is that you can write Android apps when you get your skills up enough. That opens up huge potential in the medium term. Although I wouldn't be surprised if we see a new Android OS in C++ instead of Java one day. Or we could see Google finally nail on developing a new language and giving us all something to replace Java once and for all.
Do you know much about networking? Perhaps a combination of networking and Java? You said Java is slow and old so I'm wondering if this can affect networking.
 

Dastrn

BRoomer
BRoomer
Joined
Jul 16, 2005
Messages
9,472
Location
Indiana
I'm not really a networking guy.

Don't get me wrong: Java is a great language, and is used all over the world in all sorts of fantastic programs. Java jobs still outnumber other jobs. There's nothing inherently wrong about the language, other than it's garbage collection.
 

joe.

Smash Cadet
Joined
Apr 11, 2012
Messages
41
Location
Waxhaw, NC // East Carolina
I'm a networking guy.. Cisco Certified and all.

What language you program in, has nothing to do with network overhead. at all. It is all about HOW you program what you need to be done over network infrastructure. That is what matters.

Hope that answered your question.
 

Warheart_666

Smash Apprentice
Joined
May 16, 2012
Messages
162
Location
Stockholm, Sweden
NNID
xX_Pinkie_Pie_Xx
As a programmer myself, my advice is that you should NOT begin with C++
Tbh, the syntax is a pain and it's actually slower than plain C (which I think it's a better language overall). So I suggest that you try Java and/or C if you want to program. I think that beginning with C++ because it's a fast language is not a very good reason.
It also depends on what kind of programs you wanna program... and then choose the appropriate language
 
Top Bottom