PDA

View Full Version : Read before posting: The basics of Programming/Game Development



IAmABrodie
09-08-2013, 11:57 PM
Introduction

Ever wanted to make your own games or programs? With this bit of information, you can be set well on your way to doing just that.. Of course it'll take a ton of experience in programming boring stuff before you can get to the good stuff! So in this, I'll do my best to teach you those boring things in various programming languages so that one day you may be able to make games of your own!

Vocabulary

Programming Language: A formal language designed to communicate instructions to a machine, particularly a computer.
Examples: Java; C++; HTML; Java Script

Compiler: Translate high-level source code to machine language object code (bytecode) all at once.
Examples: Netbeans; Bloodshed (Companies that make the compilers)

Interpreter: Executes high-level program immediately after translating each individual instruction.

Variable: A memory location/unit named or labeled so it can be used in a program.
Examples: X = 1 (X being the variable) A+B=C

Variables must have THREE things:

Name (Identifier): You come up with it.
Type: What kind of info contained.
Value: Assign a value within the program.


Type: Indication of what kind of data.;

There are EIGHT primitive (Basic) data types:

Byte [Holds Integers] [Responds to a single Byte (-128 - 127)]
Short [Holds Integers] [Responds to two Bytes (-32,768 - 32,767)]
Int [Holds Integers] [Responds to three Bytes]
Long [Holds Integers] [Responds to eight Bytes]
Float [Holds Decimals/Fractions] [Responds to four Bytes]
Double [Holds Decimals/Fractions] [Responds to eight Bytes]
Char [Holds a Single Unicode Character] [Responds to two Bytes (Must be Identified)]
Boolean [Holds Two Values: True & False]


Loops: Instruction sequences repeated.
Examples: Timer; Clock

Module: Part of a bigger system, it's plugged into, that interacts with the rest simply/properly.

Object: A kind of module holding data and subroutines.

State: Contained data.

Class: Objects containing the same data type and responding to the same message similarly.
Example: When you do a math problem like "5+7*3/9-6+5" you don't just do it all at the same time, you break it down. That's basically what classes do.

Subclass: A class within a class.

Command-line Interface: One person to one computer "terminal", typing commands and getting written responses.

Graphic User Interface: Allows user control with a mouse and icons.
Examples: Games; Default Microsoft Programs; Paint

Protocol: Detail specification of communication procedure.

Internet Protocol (IP): How data physically transmits between computers.
Examples: IP Address; Internet Connection; MMOs

Transmission Control Protocol (TCP): Ensures data is received without error.

Simple Mail Transfer Protocol (SMTP): Email messages transferred between computers.
Examples: Yahoo; AOL; GMail

Program Counter (PC): A register keeps track of the next instruction the CPU uses.

Transistors: Millions of tiny switches that go on or off in the way they are wired together with the executing program, makes up the whole of the computer.

Literal: A constant value in program representation.

Syntax: The vocabulary and rules that govern a computer program.

Semantics: The program meaning and logic that, when done correctly, does what you want it to.
Examples: Instructions; Commands

Source Code: The sum of the program's syntax, Semantics, and Logic.


What's the best place to start?
There are many places you can begin, and it's entirely up to you. Now of course, you don't have an understanding of any language yet so I'll provide you a brief over-view of the mains ones (They are NOT written by me):

Java: "Java is a general-purpose, concurrent, class-based, object-oriented computer programming language that is specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run anywhere" (WORA), meaning that code that runs on one platform does not need to be recompiled to run on another. Java applications are typically compiled to bytecode (class file) that can run on any Java virtual machine (JVM) regardless of computer architecture. Java is, as of 2012, one of the most popular programming languages in use, particularly for client-server web applications, with a reported 10 million users.[10][11] Java was originally developed by James Gosling at Sun Microsystems (which has since merged into Oracle Corporation) and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++, but it has fewer low-level facilities than either of them." ~http://en.wikipedia.org/wiki/Java_(programming_language)

C: In computing, C (/ˈsiː/, as in the letter C) is a general-purpose programming language initially developed by Dennis Ritchie between 1969 and 1973 at AT&T Bell Labs.[4] Like most imperative languages in the ALGOL tradition, C has facilities for structured programming and allows lexical variable scope and recursion, while a static type system prevents many unintended operations. Its design provides constructs that map efficiently to typical machine instructions, and therefore it has found lasting use in applications that had formerly been coded in assembly language, most notably system software like the Unix computer operating system. ~http://en.wikipedia.org/wiki/C_(programming_language)

C++: C++ (pronounced "see plus plus") is a programming language that is general purpose, statically typed, free-form, multi-paradigm and compiled. It is regarded as an intermediate-level language, as it comprises both high-level and low-level language features.[3] Developed by Bjarne Stroustrup starting in 1979 at Bell Labs, C++ was originally named C with Classes, adding object oriented features, such as classes, and other enhancements to the C programming language. The language was renamed C++ in 1983,[4] as a pun involving the increment operator. ~http://en.wikipedia.org/wiki/C%2B%2B

HTML: HTML is written in the form of HTML elements consisting of tags enclosed in angle brackets (like <html>), within the web page content. HTML tags most commonly come in pairs like <h1> and </h1>, although some tags represent empty elements and so are unpaired, for example <img>. The first tag in a pair is the start tag, and the second tag is the end tag (they are also called opening tags and closing tags). In between these tags web designers can add text, further tags, comments and other types of text-based content. ~http://en.wikipedia.org/wiki/HTML

There are many more, but these are the main ones you should know about for now.


Where can I go to learn more?
If you are very serious about getting into Programming, then College is the best place to go. But, if for some reason, college isn't a choice, then YouTube is where you should go. Yeah, you could just look it up on Google then just copy & paist, but you won't learn ANYTHING that way. The point of learning how to code, is, well learning. That's why I feel YouTube's a good alternative from school... It's free, you have to read it to write it, and a person can explain more in physical words than in text.

If you want to know a good YouTuber that does these kind of tutorials, TheNewBoston (http://www.youtube.com/channel/UCJbPGzawDH1njbqV-D5HqKw) is the best. He thoroughly explains whats going on more than once, shows you how what you learn can be used in everyday programs, and he's just a plain cool guy.

Java (Downloads)

How to start Java
Java may be pretty easy to use, but it's fairly difficult to set up.

1) Download a compiler. You can find multiple over the internet, but the best is, of course, the original. To grab this, you'll need to go to http://www.oracle.com/technetwork/java/javase/downloads/index.html. Right in the middle-left of the page there should be a button that says "JDK" in it. That's the one you want.
13363 You'll be directed to the download page, now this part is important make sure you accept the Oracle Binary Code License Agreement before anything else.
13364. After you accept it, select your correct operating system and its type (x64 or x86/x32).

2) Once you've finished the download for the compiler, you'll have to set up a path within your computer. This part involves going into your systems settings, be very careful while you're in there.

Go into you're files , then get into your main hard drive (Usually it's under "Computer") and go in "Program Files. When in there, there should be a file called "Java", click into that. If you downloaded the Compiler correctly, there should now be a file called "jdk" and it's version. If there isn't, go back to step one and redo it. Click into "jdk", then into "bin". Now right click the file on the very-top of the list and click "Properties". In it's properties, it says it's location. The location is what you want, so copy it.
13366 After you copied just it's location, you can cancel out of everything. Open up start, and right click or open "System" (Depending on operation system) then go into "Advanced System Settings".
13368
At the vary bottom of the "Advanced" tab, there should be a button that says "Environment Variables...". Click on it. THIS IS WHERE YOU MUST BE SUPER CAREFUL! DON'T TOUCH ANYTHING EXCEPT WHAT I TELL YOU! Under User Variables, underneith the box of words should be three buttons: "New"; "Edit"; "Delete". ONLY CLICK "NEW".
13380
Under Variable Name, put "Path", and for "Value", paist the location you copied earlier.
13381
Now click "OK" then "Apply". The scary part's done.

3) Lastly, you'll need an IDE to code in, and the best for Java is Eclipse. To download eclipse, go to: http://www.eclipse.org/downloads/
From there you'll be given a list of useful programs made by the company, but for now just download the "Standard Edition" (Remember to use the same operating system and xBit used for the compiler).
13382
This'll be compressed, so you'll needs a program like 7-Zip to unzip it.

4) Open up Eclipse! If everything was done correctly, it should open up just fine.


Java (Basic Program)


class <Insert Class Name Here> {
public static void main (String[] args) {
System.out.println ("Hello World!");
}
}
This is a basic 3-line program, it prints out "Hello World" to the command prompt.


class <Insert Class Name Here> {
This tells the computer to convert all files into .class for the duration of the program (You have to define which class you're working with; if the class name does not match and/or it is not defined in the program, it will not run).


public static void main (String[] args) {
public- allows the current function to be used within other classes (Easy why to remember it is as in Public property, anyone/everyone is allowed to enter)
static- basically says that it's not running anything special, only working with the class and no specific instance of the class
void- indicates that the main method does not return any value to the caller
main- tells the program where to start reading; without which your program won't work.
(String[] args)- every main function must accept String arguments, this says so.


System.out.println("Hello world");
System.out- tells the system you want to out-put a variable
.println- defines that you want to out-put a line of text
();- Where you enter an argument OR ("Hello World") define one. In this case, you'd put a pair quotation marks and your text in the middle

C++ (Downloads)
Now, if you read the section above, you'll learn how to start using Java. If you feel that Java isn't your "strong side", then I'll recommend you to C++.

This is fairly simple, A single download then run, in fact. All you have to do is go to http://www.codeblocks.org/downloads, click the "binary release" (Or http://www.codeblocks.org/downloads/26) and select the operating system of your current computer.

Boom! You've completed all he downloads for your C/C++ IDE!



C++ (Basic Program)


#include <iostream>
using namespace std;

int main ()
{
cout << "Hello World!";
return 0;
}
What this does is it prints out "Hello world!" on the screen.
The break down


#include <iostream> Line 1, it "imports" pre-written code for practical/convenient use. It includes basic input/output functions.

using namespace std; Every standard C++ program is written in whats called a "namespace"; in this case its "std". The ";" declares the end of a line.

int main ()
{

} This declares the beginning definition of the main function. This is where all C++ programs begin the execution. The "()" is a function declaration that usually have a pair of perimeters, but just left empty in this case. The main function is held within the "{ }" that comes after.


{
cout << "Hello World!"; The "cout" is used to display integers/strings onto the screen (A good way to remember this is "Console Output"). The "<<" represent it being "sent" out; and finally you write the desired output within quotation marks (" "/ ' '). End the line with a ";".

return 0;
} The "return" statement is used to declare the end of the main function (Or others, for that matter) and is usually followed by a return code (In this case it's "0") that tells the program that it ran flawlessly, without errors.

That's about it for this program. Congrats, you can now code in C++.
Malbolge
Ahh.... Malbolge. This isn't one that you'll most likely ever use (Probably no one in this lifetime). The peculiarity of Malbolge is to be literally IMPOSSIBLE to write any useful programs with it, making it very little known to most people. Although, a little weak point in the system has shown that it is possible to work with, still immensely hard unfortunately. So why am I teaching you something you'll never need? For knowledge sake, it's always good to know more.

Fun Fact!: Malbolge is so difficult, it took two years for the first program to be made.


('&%:9]!~}|z2Vxwv-,POqponl$Hjig%eB@@>}=<M:9wv6WsU2T|nm-,jcL(I&%$#"
`CB]V?Tx<uVtT`Rpo3NlF.Jh++FdbCBA@?]!~|4XzyTT43Qsqq(Lnmkj"Fhg${z@>
A basic "Hello World!" output.


jmp [d] + 1
The value of "d" + 1 is where the program will start.


out a
Prints out the value of "a" as an ASCII (http://en.wikipedia.org/wiki/ASCII) character.


in a
Inputs a character, as an ASCII code, into a. Newlines or line feeds are both code 10. An end-of-file condition is code 59048. (I didn't understand this part, so I copied & paisted :sweatdrop:)


rotr [d]
mov a, [d]
Rotates the value at "d" by one ternary digit (0002111112 becomes 2000211111) and stores the result at both "d" and "a".


mov d, [d]
Copies "d"s value to d.


crz [d], a
mov a, [d]
Does the crazy operation with the value at "d" and the value of a. Stores the result both at "d" and in a. (Yeah... I have no idea)


nop
Does utterly & literally nothing.


end
The ending to the Malbolge program. Pretty straight forward.

There's a bit more to it, but this is the just of it. Now you see why no one ever uses this.


From here, I can only wish you luck. If you've gone over each subject, you should be set and ready to begin your first program!

Any other questions? Feel free to ask down below and I'm sure it'll be answered (Whether it be by me or another).

Good luck!

Working on a completely new and better guide! Should be here in a week or two.

raqk
09-10-2013, 02:59 AM
This guide is great! I now have a new source to be learning more about a programming language im not so familiar with yet!
I honestly prefer starting out making simple programs in command prompt though...

IAmABrodie
09-10-2013, 04:05 AM
This guide is great! I now have a new source to be learning more about a programming language im not so familiar with yet!
I honestly prefer starting out making simple programs in command prompt though...

Thanks!

That's exactly what everyone should start with. My first "game" I made was a simple command prompt that used java.util.Scanner and java.util.Random to take in user data and create a random integer for a variable I called "Comp". It was just basically a 1 beats 2, 2 beats 3, and 3 beats 1, it's not much but it was my first game hehe. I've recently moved on from Java to C++... I like C++ a lot more now that I learned Java lol.

IAmABrodie
09-11-2013, 06:20 AM
Added C++ optional choice... It seemed a little too "shallow" with just Java :sweatdrop:

Seth
09-11-2013, 06:39 AM
Fun fact, Growtopia (both the client and the server) was written in C++!

Alythiciale
09-11-2013, 08:34 AM
Fun fact, Growtopia (both the client and the server) was written in C++!

I dare you to write it in Malbolge!

IAmABrodie
09-12-2013, 04:14 AM
Fun fact, Growtopia (both the client and the server) was written in C++!

I always knew the client was, but I never knew about the server :ninja:


I dare you to write it in Malbolge!

Haha, that'd take literally years.

Alythiciale
09-12-2013, 06:46 AM
Haha, that'd take literally years.

Indeed.. Have you seen the 99 bottles of beer in Malbolge? Jesus Christ, it looks like WAVES.

IAmABrodie
09-25-2013, 04:35 AM
Updated it a bit... Added a basic C++ program's break down.

IAmABrodie
09-25-2013, 06:05 AM
Great Guide IAmABrodie.
Congratulations on the Sticky man!
You deserved it.
I can see a lot of effort has been put into this, and I would like to thank you that you used your time to make this.

~Jack Bowe:wave:

Thanks bro.
Knowledge is power!

IAmABrodie
09-30-2013, 06:00 AM
Added Malbolge programming introduction.

IAmABrodie
11-16-2013, 06:19 AM
Updated the format a bit, added in a Java Program Break-down. Hoping to add a couple more languages this weekend..

Pandoez
12-06-2013, 04:57 AM
Updated the format a bit, added in a Java Program Break-down. Hoping to add a couple more languages this weekend..

Add python? Its something my older brother used once.

IAmABrodie
12-07-2013, 09:31 AM
Add python? Its something my older brother used once.

Yeah, I might actually do that. Python is a good one to start with in the very beginning.. So basic, yet so much potential.

Brennanber
12-08-2013, 05:32 AM
Updated the format a bit, added in a Java Program Break-down. Hoping to add a couple more languages this weekend..

Html should be pretty quick to add if you wanted to.

IAmABrodie
12-08-2013, 11:01 AM
Html should be pretty quick to add if you wanted to.

I've thought about that and the one problem I find is, I don't really understand it myself.. I mean the coding is pretty straight forward, it's just that it'll take up a ton of time explaining how to download, format, and compile HTML in Notepad++. If I had some free time, I might consider it.. I can assure you I'll get around to it eventually.

Brennanber
12-10-2013, 03:39 AM
I've thought about that and the one problem I find is, I don't really understand it myself.. I mean the coding is pretty straight forward, it's just that it'll take up a ton of time explaining how to download, format, and compile HTML in Notepad++. If I had some free time, I might consider it.. I can assure you I'll get around to it eventually.

Well along the description i would reference w3schools.com (its how I learned Html) because they do have an editor that you input html and it will export it into a preview (though the actual tutorials on the website were not very explanatory so i had to learn html by messing around with everything at the time)
I guess it would be a temporary solution for html then when you want to you could add additional information on setting the workspace up with Notepad++ (in fact i don't fully understand setting up some parts of notepad++)

Karl0331
12-27-2013, 07:08 AM
I'd love to make one, but now I know that coding things is like exploding your head (for people like me)

Bobotov
01-31-2014, 06:46 PM
Hello,

Does java work on Linux?

Brennanber
02-06-2014, 10:51 PM
Hello,

Does java work on Linux?
Yes, linux is kind of known for things like that.

Jack Bowe
02-06-2014, 10:55 PM
I have no questions, as you have covered everything I wanted to know.
But I want to mention, that since I last saw this, it has come along and been improved so well.

I really want to thank you for the time and effort put into this.
I am going to be learning to code soon and this really will help me, THANK YOU!

P.S It's below not bellow. ;)

IAmABrodie
02-17-2014, 11:18 PM
I have no questions, as you have covered everything I wanted to know.
But I want to mention, that since I last saw this, it has come along and been improved so well.

I really want to thank you for the time and effort put into this.
I am going to be learning to code soon and this really will help me, THANK YOU!

P.S It's below not bellow. ;)

Really, there's no need to thank me, I merely saw a problem and tried to fix it. The sheer number of views is thank you enough for me, anyways. I wrote this to be read and that's exactly what has happened. I'll go through and fix the grammatical/spelling errors again, but you know what I mean :p


Hello,

Does java work on Linux?

Do you mean the Compiler, IDE, or the language itself? From what I'm aware, all should work fine, though if you run into troubles just give some details on the matter and I'll look into it.

Brennanber
02-18-2014, 04:22 AM
I have no questions, as you have covered everything I wanted to know.
But I want to mention, that since I last saw this, it has come along and been improved so well.

I really want to thank you for the time and effort put into this.
I am going to be learning to code soon and this really will help me, THANK YOU!

P.S It's below not bellow. ;)

Agreed, these are one of the better sticky threads in my opinion.

PatrickCrissman
02-25-2014, 08:31 AM
i am already known with the basics of the Java, C & C++ along with the Oracle 9 and 10 version and now need to know how to take my knowledge further so able to work on a live project as well

Brennanber
02-28-2014, 03:53 AM
i am already known with the basics of the Java, C & C++ along with the Oracle 9 and 10 version and now need to know how to take my knowledge further so able to work on a live project as well

If you only know the basics then you can improve.

Happymeep
06-29-2014, 02:12 AM
I've noticed that there's always 1-2 Threads in this Forum that ask: "How do I make a game?"; "I want to make an app, but I don't know how.."; "I wanna' be like!@Seth and make cool games, but how?" Now I can't exactly explain how to program, because it varies from each language. Though once you learn one, you'll be pretty much set in any other. What will I teach you? The basics, as the title says.

Vocabulary

Programming Language: A formal language designed to communicate instructions to a machine, particularly a computer.
Examples: Java; C++; HTML; Java Script

Compiler: Translate high-level source code to machine language object code (bytecode) all at once.
Examples: Netbeans; Bloodshed (Companies that make the compilers)

Interpreter: Executes high-level program immediately after translating each individual instruction.

Variable: A memory location/unit named or labeled so it can be used in a program.
Examples: X = 1 (X being the variable) A+B=C

Variables must have THREE things:

Name (Identifier): You come up with it.
Type: What kind of info contained.
Value: Assign a value within the program.


Type: Indication of what kind of data.;

There are EIGHT primitive (Basic) data types:

Byte [Holds Integers] [Responds to a single Byte (-128 - 127)]
Short [Holds Integers] [Responds to two Bytes (-32,768 - 32,767)]
Int [Holds Integers] [Responds to three Bytes]
Long [Holds Integers] [Responds to eight Bytes]
Float [Holds Decimals/Fractions] [Responds to four Bytes]
Double [Holds Decimals/Fractions] [Responds to eight Bytes]
Char [Holds a Single Unicode Character] [Responds to two Bytes (Must be Identified)]
Boolean [Holds Two Values: True & False]


Loops: Instruction sequences repeated.
Examples: Timer; Clock

Module: Part of a bigger system, it's plugged into, that interacts with the rest simply/properly.

Object: A kind of module holding data and subroutines.

State: Contained data.

Class: Objects containing the same data type and responding to the same message similarly.
Example: When you do a math problem like "5+7*3/9-6+5" you don't just do it all at the same time, you break it down. That's basically what classes do.

Subclass: A class within a class.

Command-line Interface: One person to one computer "terminal", typing commands and getting written responses.

Graphic User Interface: Allows user control with a mouse and icons.
Examples: Games; Default Microsoft Programs; Paint

Protocol: Detail specification of communication procedure.

Internet Protocol (IP): How data physically transmits between computers.
Examples: IP Address; Internet Connection; MMOs

Transmission Control Protocol (TCP): Ensures data is received without error.

Simple Mail Transfer Protocol (SMTP): Email messages transferred between computers.
Examples: Yahoo; AOL; GMail

Program Counter (PC): A register keeps track of the next instruction the CPU uses.

Transistors: Millions of tiny switches that go on or off in the way they are wired together with the executing program, makes up the whole of the computer.

Literal: A constant value in program representation.

Syntax: The vocabulary and rules that govern a computer program.

Semantics: The program meaning and logic that, when done correctly, does what you want it to.
Examples: Instructions; Commands

Source Code: The sum of the program's syntax, Semantics, and Logic.


What's the best place to start?
There are many places you can begin, and it's entirely up to you. Now of course, you don't have an understanding of any language yet so I'll provide you a brief over-view of the mains ones (They are NOT written by me):

Java: "Java is a general-purpose, concurrent, class-based, object-oriented computer programming language that is specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run anywhere" (WORA), meaning that code that runs on one platform does not need to be recompiled to run on another. Java applications are typically compiled to bytecode (class file) that can run on any Java virtual machine (JVM) regardless of computer architecture. Java is, as of 2012, one of the most popular programming languages in use, particularly for client-server web applications, with a reported 10 million users.[10][11] Java was originally developed by James Gosling at Sun Microsystems (which has since merged into Oracle Corporation) and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++, but it has fewer low-level facilities than either of them." ~http://en.wikipedia.org/wiki/Java_(programming_language)

C: In computing, C (/ˈsiː/, as in the letter C) is a general-purpose programming language initially developed by Dennis Ritchie between 1969 and 1973 at AT&T Bell Labs.[4] Like most imperative languages in the ALGOL tradition, C has facilities for structured programming and allows lexical variable scope and recursion, while a static type system prevents many unintended operations. Its design provides constructs that map efficiently to typical machine instructions, and therefore it has found lasting use in applications that had formerly been coded in assembly language, most notably system software like the Unix computer operating system. ~http://en.wikipedia.org/wiki/C_(programming_language)

C++: C++ (pronounced "see plus plus") is a programming language that is general purpose, statically typed, free-form, multi-paradigm and compiled. It is regarded as an intermediate-level language, as it comprises both high-level and low-level language features.[3] Developed by Bjarne Stroustrup starting in 1979 at Bell Labs, C++ was originally named C with Classes, adding object oriented features, such as classes, and other enhancements to the C programming language. The language was renamed C++ in 1983,[4] as a pun involving the increment operator. ~http://en.wikipedia.org/wiki/C%2B%2B

HTML: HTML is written in the form of HTML elements consisting of tags enclosed in angle brackets (like <html>), within the web page content. HTML tags most commonly come in pairs like <h1> and </h1>, although some tags represent empty elements and so are unpaired, for example <img>. The first tag in a pair is the start tag, and the second tag is the end tag (they are also called opening tags and closing tags). In between these tags web designers can add text, further tags, comments and other types of text-based content. ~http://en.wikipedia.org/wiki/HTML

There are many more, but these are the main ones you should know about for now.


Where can I go to learn more?
If you are very serious about getting into Programming, then College is the best place to go. But, if for some reason, college isn't a choice, then YouTube is where you should go. Yeah, you could just look it up on Google then just copy & paist, but you won't learn ANYTHING that way. The point of learning how to code, is, well learning. That's why I feel YouTube's a good alternative from school... It's free, you have to read it to write it, and a person can explain more in physical words than in text.

If you want to know a good YouTuber that does these kind of tutorials, TheNewBoston (http://www.youtube.com/channel/UCJbPGzawDH1njbqV-D5HqKw) is the best. He thoroughly explains whats going on more than once, shows you how what you learn can be used in everyday programs, and he's just a plain cool guy.

Java (Downloads)

How to start Java
Java may be pretty easy to use, but it's fairly difficult to set up.

1) Download a compiler. You can find multiple over the internet, but the best is, of course, the original. To grab this, you'll need to go to http://www.oracle.com/technetwork/java/javase/downloads/index.html. Right in the middle-left of the page there should be a button that says "JDK" in it. That's the one you want.
13363 You'll be directed to the download page, now this part is important make sure you accept the Oracle Binary Code License Agreement before anything else.
13364. After you accept it, select your correct operating system and its type (x64 or x86/x32).

2) Once you've finished the download for the compiler, you'll have to set up a path within your computer. This part involves going into your systems settings, be very careful while you're in there.

Go into you're files , then get into your main hard drive (Usually it's under "Computer") and go in "Program Files. When in there, there should be a file called "Java", click into that. If you downloaded the Compiler correctly, there should now be a file called "jdk" and it's version. If there isn't, go back to step one and redo it. Click into "jdk", then into "bin". Now right click the file on the very-top of the list and click "Properties". In it's properties, it says it's location. The location is what you want, so copy it.
13366 After you copied just it's location, you can cancel out of everything. Open up start, and right click or open "System" (Depending on operation system) then go into "Advanced System Settings".
13368
At the vary bottom of the "Advanced" tab, there should be a button that says "Environment Variables...". Click on it. THIS IS WHERE YOU MUST BE SUPER CAREFUL! DON'T TOUCH ANYTHING EXCEPT WHAT I TELL YOU! Under User Variables, underneith the box of words should be three buttons: "New"; "Edit"; "Delete". ONLY CLICK "NEW".
13380
Under Variable Name, put "Path", and for "Value", paist the location you copied earlier.
13381
Now click "OK" then "Apply". The scary part's done.

3) Lastly, you'll need an IDE to code in, and the best for Java is Eclipse. To download eclipse, go to: http://www.eclipse.org/downloads/
From there you'll be given a list of useful programs made by the company, but for now just download the "Standard Edition" (Remember to use the same operating system and xBit used for the compiler).
13382
This'll be compressed, so you'll needs a program like 7-Zip to unzip it.

4) Open up Eclipse! If everything was done correctly, it should open up just fine.


Java (Basic Program)


class <Insert Class Name Here> {
public static void main (String[] args) {
System.out.println ("Hello World!");
}
}
This is a basic 3-line program, it prints out "Hello World" to the command prompt.


class <Insert Class Name Here> {
This tells the computer to convert all files into .class for the duration of the program (You have to define which class you're working with; if the class name does not match and/or it is not defined in the program, it will not run).


public static void main (String[] args) {
public- allows the current function to be used within other classes (Easy why to remember it is as in Public property, anyone/everyone is allowed to enter)
static- basically says that it's not running anything special, only working with the class and no specific instance of the class
void- indicates that the main method does not return any value to the caller
main- tells the program where to start reading; without which your program won't work.
(String[] args)- every main function must accept String arguments, this says so.


System.out.println("Hello world");
System.out- tells the system you want to out-put a variable
.println- defines that you want to out-put a line of text
();- Where you enter an argument OR ("Hello World") define one. In this case, you'd put a pair quotation marks and your text in the middle

C++ (Downloads)
Now, if you read the section above, you'll learn how to start using Java. If you feel that Java isn't your "strong side", then I'll recommend you to C++.

This is fairly simple, A single download then run, in fact. All you have to do is go to http://www.codeblocks.org/downloads, click the "binary release" (Or http://www.codeblocks.org/downloads/26) and select the operating system of your current computer.

Boom! You've completed all he downloads for your C/C++ IDE!



C++ (Basic Program)


#include <iostream>
using namespace std;

int main ()
{
cout << "Hello World!";
return 0;
}
What this does is it prints out "Hello world!" on the screen.
The break down


#include <iostream> Line 1, it "imports" pre-written code for practical/convenient use. It includes basic input/output functions.

using namespace std; Every standard C++ program is written in whats called a "namespace"; in this case its "std". The ";" declares the end of a line.

int main ()
{

} This declares the beginning definition of the main function. This is where all C++ programs begin the execution. The "()" is a function declaration that usually have a pair of perimeters, but just left empty in this case. The main function is held within the "{ }" that comes after.


{
cout << "Hello World!"; The "cout" is used to display integers/strings onto the screen (A good way to remember this is "Console Output"). The "<<" represent it being "sent" out; and finally you write the desired output within quotation marks (" "/ ' '). End the line with a ";".

return 0;
} The "return" statement is used to declare the end of the main function (Or others, for that matter) and is usually followed by a return code (In this case it's "0") that tells the program that it ran flawlessly, without errors.

That's about it for this program. Congrats, you can now code in C++.
Malbolge
Ahh.... Malbolge. This isn't one that you'll most likely ever use (Probably no one in this lifetime). The peculiarity of Malbolge is to be literally IMPOSSIBLE to write any useful programs with it, making it very little known to most people. Although, a little weak point in the system has shown that it is possible to work with, still immensely hard unfortunately. So why am I teaching you something you'll never need? For knowledge sake, it's always good to know more.

Fun Fact!: Malbolge is so difficult, it took two years for the first program to be made.


('&%:9]!~}|z2Vxwv-,POqponl$Hjig%eB@@>}=<M:9wv6WsU2T|nm-,jcL(I&%$#"
`CB]V?Tx<uVtT`Rpo3NlF.Jh++FdbCBA@?]!~|4XzyTT43Qsqq(Lnmkj"Fhg${z@>
A basic "Hello World!" output.


jmp [d] + 1
The value of "d" + 1 is where the program will start.


out a
Prints out the value of "a" as an ASCII (http://en.wikipedia.org/wiki/ASCII) character.


in a
Inputs a character, as an ASCII code, into a. Newlines or line feeds are both code 10. An end-of-file condition is code 59048. (I didn't understand this part, so I copied & paisted :sweatdrop:)


rotr [d]
mov a, [d]
Rotates the value at "d" by one ternary digit (0002111112 becomes 2000211111) and stores the result at both "d" and "a".


mov d, [d]
Copies "d"s value to d.


crz [d], a
mov a, [d]
Does the crazy operation with the value at "d" and the value of a. Stores the result both at "d" and in a. (Yeah... I have no idea)


nop
Does utterly & literally nothing.


end
The ending to the Malbolge program. Pretty straight forward.

There's a bit more to it, but this is the just of it. Now you see why no one ever uses this.


From here, I can only wish you luck. If you've gone over each subject, you should be set and ready to begin your first program! Which I would teach you, but there's way too many different and diverse languages to even just explain the basics of each.

Any other questions? Feel free to ask down bellow and I'm sure it'll be answered (Whether it be by me or another).

Good luck!

This makes absolutely no sence to me it's not you it's me can you find a super easy way? Because I have no idea what your talking about:sweatdrop:

darksnake99
07-05-2014, 03:25 PM
What about REALbasic? (The newer version of BASIC)

IAmABrodie
07-08-2014, 04:34 PM
This makes absolutely no sence to me it's not you it's me can you find a super easy way? Because I have no idea what your talking about:sweatdrop:

Yeah, reading through this now I see a ton of mistakes and a lot of indirect instructions. Maybe when I have some free time I'll start working on re-writing it, possibly might redo it from scratch. But right now, I really don't have time to go indepth in anything, but I can direct you to a place that'll teach you everything you needa' know- https://www.youtube.com/channel/UCJbPGzawDH1njbqV-D5HqKw - This guy is a real genius when it comes to coding and should answer all your questions, just search around in his playlists.


What about REALbasic? (The newer version of BASIC)

I honestly never heard of REALbasic or BASIC, any links to where I can read up about it?

darksnake99
07-08-2014, 05:03 PM
Suprised you never heard of BASIC, it was really popular. It stands for Beginners All-Purpose Symbolic Instruction Code. http://en.m.wikipedia.org/wiki/BASIC

But that's old. The newer version of it is called REALbasic, aka Xojo, and isn't THAT popular, but can be useful. http://en.m.wikipedia.org/wiki/Xojo http://www.xojo.com/

Happymeep
07-08-2014, 05:10 PM
Yeah, reading through this now I see a ton of mistakes and a lot of indirect instructions. Maybe when I have some free time I'll start working on re-writing it, possibly might redo it from scratch. But right now, I really don't have time to go indepth in anything, but I can direct you to a place that'll teach you everything you needa' know- https://www.youtube.com/channel/UCJbPGzawDH1njbqV-D5HqKw - This guy is a real genius when it comes to coding and should answer all your questions, just search around in his playlists.



I honestly never heard of REALbasic or BASIC, any links to where I can read up about it?

Please find a way for it to be 10 year old friendly? Hehe... Ya...

IAmABrodie
09-21-2014, 08:39 AM
Just realized that this thread is over a year old with almost 4.6k views. I think it's time to add on a bit more, haha.

Happymeep
09-24-2014, 01:55 AM
Just realized that this thread is over a year old with almost 4.6k views. I think it's time to add on a bit more, haha.
Ya your right lol

MisterBear
12-18-2014, 01:56 AM
Love seeing new programmers! Ever heard of Eclipse? It's a Java program!

ProOFgro2
01-01-2015, 02:37 PM
Nothing to say :whistling:

Brennanber
02-06-2015, 03:07 AM
Please find a way for it to be 10 year old friendly? Hehe... Ya...

For your age and dedication id go here:

https://www.khanacademy.org/computing/computer-programming

Thats to learn how code works, etc. It claims its javascript but its modified so if you want to do real code go here:

http://www.w3schools.com

Pick your poison

darksnake99
05-18-2015, 10:41 PM
Really late correction of my own post, Xojo is an IDE for realBASIC. Not sure what I was thinking there. :scratch:

Conan
05-18-2015, 11:32 PM
Well there are alot of things here that needs to be fixed

Netbeans Code::Blocks Eclipse etc are Integrated Development Environments (IDE) Not compilers.
Compilers are G++ GCC and MS VC Compiler (Dont know anything about microsoft compilers doe)
HTML cant be compiled because its a markup language. A web browser just parses the text into something useful not compile it

And PS Brainf*** is the best time waster IMO (well who would use a language that only uses + . [ ] - < > etc and no text?
Oh and one interesting fact is its compiler is only 1mb large (The goal for this language is to create the smallest compiler)

Oh if your talking about what i said that Netbeans isnt a compiler
It bundles a compiler for Java.
You need MinGW or the MS Compiler for C++. (Netbeans + MinGW is the best combo IMO)

darksnake99
05-20-2015, 03:36 PM
What about REALbasic? (The newer version of BASIC)


What about REALbasic?

ಠ_ಠ The spam bots aren't even trying to look legitimate now.

Nothingface
06-24-2015, 10:10 PM
Working on an updated guide- expect a huge change to the thread within a week or two (More languages, better vocab, new layout, redux of current languages, ext ext)

If you have anything specific you'd like to see, please let me know before I update it, it'll make things easier- and this is really all for you guys, so don't be afraid to ask or suggest ANYTHING!

(This is the OP by the way, to lazy to switch back to my old account right now)

peck
07-12-2015, 08:48 PM
(This is the OP by the way, to lazy to switch back to my old account right now)

You either log in as the posters account, or you aren't the poster. There is no such thing as "lazy" to log into a different account.

IAmABrodie
07-12-2015, 09:29 PM
You either log in as the posters account, or you aren't the poster. There is no such thing as "lazy" to log into a different account.

Lol thanks for your concern, but that is me and I was too lazy. Please dont derail any furthor, thanks.

VendLolx
01-22-2016, 05:26 PM
This is Very Hard!