Dolphin, the GameCube and Wii emulator - Forums

Full Version: Programming C++, Games Emphasis
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
(04-06-2012, 02:42 AM)Shonumi Wrote: [ -> ]learning how to program in XYZ language is just a matter of getting the syntax down.
Not sure about this. Of course you can program most languages in C(++)-style, it's sort of a common base set of features most languages have. But writing elegant python code is completely different from writing elegant C++ code [1].

Still, I agree, languages are tools, use the one you're most comfortable with. I just wanted to emphasize that C++ isn't the only language out there, and it certainly isn't the easiest one to get started with if you want quick usable results.

____
[1] Which doesn't mean that, after several years, I'd know how to write elegant C++ code. ;p
(04-06-2012, 04:42 AM)scummos Wrote: [ -> ]
(04-06-2012, 02:42 AM)Shonumi Wrote: [ -> ]learning how to program in XYZ language is just a matter of getting the syntax down.
Not sure about this.

Of course you wouldn't be. As you didn't quote the whole sentence, I think you missed the larger context. Wink

(04-06-2012, 02:42 AM)Shonumi Wrote: [ -> ]I think that once you get the basics into your head (program flow, conditional statements, loops, variables) e.g. the core concepts that almost every programming language will use, learning how to program in XYZ language is just a matter of getting the syntax down.

Essentially, once you know what variables are, how loops are supposed to run, all the common, core concepts that most programming languages share, etc, picking up other languages is easy. Knowing the underlying mechanics of programming enables you to jump from language to language relatively easy. Elegant code is a different matter, as it requires experience and practice with a language. Not knowing how to create elegant code, however, doesn't preclude one from transferring those core concepts I mentioned and using a language effectively.

It comes down to making analogies, like "Oh, I've seen this control structure before, it's a for loop." From there, you have to learn how language XYZ expresses for loops as opposed to language ABC, which you already know. Granted, some concepts and features aren't available in other languages, but there are plenty of shared concepts wherein the difference is mainly syntax.
I've started the tutorial in the first page. Doesn't seem too hard, but then I did learn BASIC when I was 7.
(04-06-2012, 06:10 AM)AnyOldName3 Wrote: [ -> ]I did learn BASIC when I was 7.

:O
What?

10 Print "that wasn't too hard?"
20 GOTO 10
(04-06-2012, 05:15 AM)Shonumi Wrote: [ -> ]
(04-06-2012, 04:42 AM)scummos Wrote: [ -> ]
(04-06-2012, 02:42 AM)Shonumi Wrote: [ -> ]learning how to program in XYZ language is just a matter of getting the syntax down.
Not sure about this.

Of course you wouldn't be. As you didn't quote the whole sentence, I think you missed the larger context. Wink
No, I read your text. I just shortened the quote for the sake of simplicity (and because in this forum, *way* too many full posts are quoted).

(04-06-2012, 02:42 AM)Shonumi Wrote: [ -> ]Essentially, once you know what variables are, how loops are supposed to run, all the common, core concepts that most programming languages share, etc, picking up other languages is easy. Knowing the underlying mechanics of programming enables you to jump from language to language relatively easy. Elegant code is a different matter, as it requires experience and practice with a language. Not knowing how to create elegant code, however, doesn't preclude one from transferring those core concepts I mentioned and using a language effectively.
I disagree (a bit at least). Unless you only write hello world applications, different languages have different challenges. For C++ / Python, an example is memory management. In C++, you have to do it "by hand" entirely; in Python, you never waste a tought about it because it does automatic reference-counting for everything.

(04-06-2012, 09:11 AM)scummos Wrote: [ -> ]No, I read your text. I just shortened the quote for the sake of simplicity (and because in this forum, *way* too many full posts are quoted).

Just making sure you did, because that fragment you quoted needs the context of the rest of my statement to make any sense whatsoever.

(04-06-2012, 09:11 AM)scummos Wrote: [ -> ]I disagree (a bit at least). Unless you only write hello world applications, different languages have different challenges. For C++ / Python, an example is memory management. In C++, you have to do it "by hand" entirely; in Python, you never waste a tought about it because it does automatic reference-counting for everything.

It seems you're talking about the semantics of language here, whereas I've been talking about abstract concepts behind them. In regards to memory management, if you learn the concepts on a low enough level, you need only examine how the language itself implements it. There's no need to completely redefine what your ideas of the stack and the heap are; you only need to see how XYZ language goes about using them.

The same can be said of other things like variables, arrays, file manipulation, objects, functions, etc. Every time you start a new language, you (usually) don't fundamentally shift these ideas. You just learn how the language specifies how they are used. The syntax of how the language does it is different, but the underlying ideas are largely the same.

In C++, you know memory is used, but you have to take care of it yourself, so you learn how the language expresses that through pointers. In Python, you still know memory is used, but the language takes care of that for you, and it expresses that by exposing little to no code that deals with it manually. Their syntaxes, as a result, are different in that regard, but that doesn't change the larger idea of memory management. Memory gets allocated to things, and that memory needs to be freed by someone.

Ultimately, what I've been saying for the past few posts is that once you know how to code, e.g. how to program on the computer, once you've got those concepts solidly put in your head, it doesn't take much to learn a new language. You just need to learn how that language does what it does, which can be relatively easy with those previous concepts in mind.
Look it's really simple guys. If you want to GET A JOB then learning python is useless if you already know c++ because almost nobody in the commercial industry uses it. That is not an opinion, it is a statistical fact (which shonumi mentioned).

If you want to make games on your own, sure, use whatever floats your boat.
(04-06-2012, 05:15 AM)Shonumi Wrote: [ -> ]Essentially, once you know what variables are, how loops are supposed to run, all the common, core concepts that most programming languages share, etc, picking up other languages is easy. Knowing the underlying mechanics of programming enables you to jump from language to language relatively easy.
no no no no no no no.
languages can be completely different. i hear my cousin cuss all the time when we are working on stickman that in java he could do this and that without thinking or coding the details. in C/C++ this is not the case. also, memory management and inheritance are different in those 2 languages, eventho the idea is the same. so no, fully disagreed.

...oh and btw. phyton is not a programming language imo. its a scripting language.


bit off topic but...
(04-06-2012, 08:22 AM)AnyOldName3 Wrote: [ -> ]What?

10 Print "that wasn't too hard?"
20 GOTO 10

on upon a time in the dolphin IRC channel Wrote:(5:59:39 PM) JPeterson: Windows was written in vb6
(5:59:45 PM) gigaherz2: yeh sure xD
(6:00:08 PM) JPeterson: Linux to, I think, I'm not sure though
(6:01:00 PM) Daco: JPeterson: i think linux us C
(6:01:10 PM) JPeterson: MAy be
(6:01:55 PM) gigaherz2: nah, linux was coded in java
(6:02:29 PM) JPeterson: Javascript?
(6:03:11 PM) Daco: gigaherz2: whats next, basic?
(6:03:32 PM) Daco: 1 print "lol"
(6:03:32 PM) Daco: 2 input %A
(6:03:37 PM) Daco: or something like that
(6:04:29 PM) gigaherz2: 1 print "Kernel Panic"
(6:04:31 PM) gigaherz2: 2 goto 1
(6:04:33 PM) gigaherz2: that's linux!
(04-06-2012, 06:10 AM)AnyOldName3 Wrote: [ -> ]I've started the tutorial in the first page. Doesn't seem too hard, but then I did learn BASIC when I was 7.

Impressive
Pages: 1 2 3 4 5