Learning C++ programming language

"
SkyCore wrote:
Not to long ago i thought id learn python. 10 minutes later looking at example code i saw like 3 or 4 colons which all meant different things because of their context. Then and there i was like, 'nope'. Ill stick to languages that are actually human readable.

Java is the ideal beginner language imo.
I'm struggling to work out if you're joking or not. Python is much, much more human-readable than Java for people just starting to learn programming, and that's one of it's strengths.

I earned extra cash teaching in the computer science labs and tutorials at my university both during my degree and after I graduated, for 1st through 3rd year papers, and was employed as a research assistant helping to run our part of an international study into how people learn to program.

I was one of the lab demonstrators the first year the department introduced an optional python paper to be taken before the previous introductory paper, which used Java, and demonstrated that paper the next semester. The students who'd gotten to learn programming in python first before having to deal with all java's peculiarities and obnoxious boilerplate in general did a lot better than those in the same year who hadn't taken the python paper, and those in the previous year who hadn't had the option.

If someone was dead-set on learning Java specifically, I wouldn't stop them, but I wouldn't recommend it as a first language for someone learning programming, because leaning Java as well as learning programming increases the stuff you have to take in, and sometimes new programmers can't separate the two particularly well.

Basically, having to learn this (extra spacing because I can't make the tabs work):
"
public class HelloWorld {

public static void main(String[] args) {

System.out.println("Hello, World");

}

}
Is a lot trickier than this:
"
print( "Hello, World")
especially when you consider this first has to be saved to a file with a particular name for reasons that aren't immediately apparent, because the Java compiler enforces that, and the second doesn't need to be compiled and can be typed directly int he python shell and will immediately produce the intended result.

The things being touted in this thread as good features of Java as a first language (readability, ease of getting to a visible result, etc) are notably more true of Python than they are of Java, and Python has a lot less boilerplate code that has to be either memorised without understanding until you get to the point you can start to actually learn what it's for - Python, for the most part, lets you only have the bits that are important to the actual program.

Python being an interpreted language is useful for learning (compilers and how they work are important, but it's useful to not have to care about those until after you've got the basics of programming down - again with the point that keeps coming up about wanting to quickly see a result and know you're making progress, and being able to just type individual commands into the interactive shell in IDLE and copy them into an actual file when you've got them working is something I saw helping a lot of the students when they ran into issues.

Python isn't perfect, and it's not something you're going to make a big-budget game in (although it has been used for some successful indie titles), but it's a great choice as a first language because it keeps the focus on learning programming, rather than learning the language, and you can then apply those same concepts to other programming languages much more easily later.

As someone who learned in QBasic from outdated library books intended for the BBC micro (which ran a different kind of basic with different commands in many cases), and later in Delphi from an article series in PC World, who was taught Pascal, Javascript, Java, C, and C++ at varying levels of official education, who was employed to help teach Java, C, and Python at university for several years, and who (somehow) managed to get a job at an actual game studio coding in C++ (although I still use python to automate some stuff from time to time, and our server guys use it a fair bit), I'd say you can learn in any language you want, and the concepts you learn will be broadly applicable in other languages, making it easier to learn another programming language once/if you decide to switch. But you'll make that initial process easier for yourself by choosing Python as a starting point.

If I remember, I'll post a link to some of the resources used in the abovementioned python paper here once I've dug them up. If I don't remember and anyone actually wants those, PM me a reminder sometime.
Last edited by Mark_GGG on Oct 28, 2015, 1:34:20 AM

Report Forum Post

Report Account:

Report Type

Additional Info