View Full Version : C++ or Bash
GearedForWar
September 28th, 2008, 02:05 PM
I really would like to know what is better for a starter? C++ or Bash? I know python is a alternative to C++ but I don't like the fact that python doesn't have the ; at the end of the statement that I know I will need to know because I would like to game program as a career. Bash just seems easier in a way that well I could probably do more and compiling the programs is less of a hassle because when I compile C++ files I get like 3 files(I use Geany) and it just bothers me when I know I want to go look for a program theres all this clutter and bash is just the one script file.
Any help here?
linux_lover69
September 28th, 2008, 02:15 PM
Im not sure what would be the best for beginners. But c++ would be the best to learn in the long run.
jimi_hendrix
September 28th, 2008, 02:25 PM
here (http://www.gamedev.net/reference/start_here/) are some resources to help you...including a comparison of a couple languages here (http://www.gamedev.net/reference/design/features/whatlang/)
ive never heard of a bash game but i think most professional games are written in C++...most people around here will tell you to go with python anyway because of its simplicity
EDIT:
@GearedForWar Gears of War = amazing game
Sinkingships7
September 28th, 2008, 02:29 PM
If your looking to go into game programming, then I'd choose C++ out of those two languages. There's a pretty good chance that you'll get tripped up over the language before you get far. Not to say that it's impossible; C++ was my first language, and I managed fairly well.
Knowing that there's a good chance of that, you should also know that there's a 100% chance of this thread becoming very popular, very quickly.
LaRoza
September 28th, 2008, 02:39 PM
I really would like to know what is better for a starter? C++ or Bash? I know python is a alternative to C++ but I don't like the fact that python doesn't have the ; at the end of the statement that I know I will need to know because I would like to game program as a career.
Ok, before you get yourself immersed, realise the sillyness of some of your statements ;)
What is better is in the stickies, and is subjective for many parts. Python isn't an alternative any more than any other language.
You can put the ; at the end of statements in Python if you want, but I have no idea why that is even mentioned here. Perl has ; if you want. If you are decided between C++ and Python soley because of a minor syntax difference, you may be in the wrong field. ;)
Im not sure what would be the best for beginners. But c++ would be the best to learn in the long run.
It would depend on the long term goals. To me, bash is much more useful than C++.
meanburrito920
September 28th, 2008, 03:15 PM
I think you have 2 questions here:
1. What language is good starter?
2. What language should I learn if I want to go into game programming?
For the first question I would suggest Python.
For the second I would suggest C++. C++ is probably not the greatest starter language unless you are really dedicated to overcoming frustration (that is, with no prior programming experience. or maybe even with it :-) ).
Looking at your goals, I would say a good starter language to be Lua. It is relatively easy to pick up and is used in conjunction with C++ quite often. I think WOW even uses it for its scripting language of choice. You can always learn C++ once you have a good foundation in the basics.
GearedForWar
September 28th, 2008, 03:20 PM
Ok, before you get yourself immersed, realise the sillyness of some of your statements ;)
You can put the ; at the end of statements in Python if you want, but I have no idea why that is even mentioned here. Perl has ; if you want. If you are decided between C++ and Python soley because of a minor syntax difference, you may be in the wrong field. ;)
In some of the tutorials I seen there were no ; at the end and I would like to develop the programming habit of putting them in when I switch to C++ so that I didn't know. TY.
Edit: also bash, can you do the same things in bash that you do with C++? (games set aside)
Mindzai
September 28th, 2008, 03:29 PM
Honestly I would not get hung up on the semi-colon! There will be plenty of differences going from any language to any other, simply starting on one that uses semi colons and thinking that will prevent you from tripping up when you move to c++ is flawed. The important thing (imo) for a new programmer is to pick a language that will help you learn the concepts as easily as possible, then worry about syntax later. Syntax really is like 10% of the battle, a solid grasp of the concepts is what will make switching from one language to another easier, a similar syntax is only a bonus.
My advice would be learn with something like python until you are comfortable with the concepts, then switch to something like c++ when you have that down. Or if you're brave, dive straight into c++, but I would imagine that if you have no programming experience you will be making things harder on yourself that necessary going that route.
Good luck!
jimi_hendrix
September 28th, 2008, 03:33 PM
Honestly I would not get hung up on the semi-colon! There will be plenty of differences going from any language to any other, simply starting on one that uses semi colons and thinking that will prevent you from tripping up when you move to c++ is flawed. The important thing (imo) for a new programmer is to pick a language that will help you learn the concepts as easily as possible, then worry about syntax later. Syntax really is like 10% of the battle, a solid grasp of the concepts is what will make switching from one language to another easier, a similar syntax is only a bonus.
My advice would be learn with something like python until you are comfortable with the concepts, then switch to something like c++ when you have that down. Or if you're brave, dive straight into c++, but I would imagine that if you have no programming experience you will be making things harder on yourself that necessary going that route.
Good luck!
+1
besides the syntax is the fun/easy part its the theory that is hard so you might as well learn theory in a simple language
GearedForWar
September 28th, 2008, 04:32 PM
Well I'm only 17 so I don't know much yet. I'm a senior in my high school and I'm looking to go to Fullsail. And well I would like to know some programming before I go. And seeing as C++ is language for games I guess I'm using it.
And what the hell is the theory?
LaRoza
September 28th, 2008, 05:05 PM
Well I'm only 17 so I don't know much yet. I'm a senior in my high school and I'm looking to go to Fullsail. And well I would like to know some programming before I go. And seeing as C++ is language for games I guess I'm using it.
And what the hell is the theory?
C++ isn't the language for games...
Any language can be used.
Python (which you reject for not having ;...) has many modules for game programming, especially PyGame. 3d game engines are also available.
Read the links on this page: http://ubuntuforums.org/showthread.php?t=796494
Especially the coloured link about learning to program (there is something about games in it), and the various threads about first languages.
GearedForWar
September 28th, 2008, 05:07 PM
I am aware of python and I do have it installed. Its just I had a bad time with PyGame in the past and nothing would work for me. Also I meant its the biggest one or at least one of them.
LaRoza
September 28th, 2008, 05:09 PM
I am aware of python and I do have it installed. Its just I had a bad time with PyGame in the past and nothing would work for me.
Well, that isn't very descriptive so we can't help ;)
Also, if you had trouble with Python, what makes you think C++ (of all languages) will be easier?
Also I meant its the biggest one or at least one of them.
Vague pronouns. Doesn't compute. ;)
Le-Froid
September 28th, 2008, 05:16 PM
I would recommend diving straight into C++. Although extremely frustrating and confusing, it defiantly has many benefits - a major one being that it becomes easier to pick up any other language you want to use. I started programming by going into PHP/C++ when I was 10 or 11 and it seemed to work out very well. ( Now at the age of 13 I write some stuff for a MMORPG server, which is coded in C++ )
Also, I wouldn't be worried by using/not using ';'s. The syntax isn't really that huge a deal. Once you get familiar with any language you will just code it properly without much thought into the syntax.
Mindzai
September 28th, 2008, 05:24 PM
And what the hell is the theory?
Well, pretty much everything that isnt the syntax. Programming theory is common amongst most languages and needs to be understood to become a good programmer.
This is a pretty good reference for programming methodology and theory (but it uses java which terminates lines with semi-colons :P)
http://uk.youtube.com/view_play_list?p=84A56BC7F4A1F852
CptPicard
September 28th, 2008, 05:30 PM
I would recommend diving straight into C++. Although extremely frustrating and confusing, it defiantly has many benefits - a major one being that it becomes easier to pick up any other language you want to use.
This is the "because it's painful it's good to learn in" argument is just simply false, although I do admire your tackling C++ at such an early age...
Programming transcends language (although different languages are associated with different styles of programming), and especially when learning, you don't want to intentionally make your learning curve steeper.
Also, I would suggest you check out some Lisp written in continuation-passing style, or Prolog perhaps, and then tell me C++ helps you in understanding that because C++ is obtuse ;)
LaRoza
September 28th, 2008, 05:31 PM
Also, I would suggest you check out some Lisp written in continuation-passing style, or Prolog perhaps, and then tell me C++ helps you in understanding that because C++ is obtuse ;)
+1
I was wondering where you all were...
GearedForWar
September 28th, 2008, 06:30 PM
Well, that isn't very descriptive so we can't help ;)
Also, if you had trouble with Python, what makes you think C++ (of all languages) will be easier?
Vague pronouns. Doesn't compute. ;)
lol. ok Mr. Descriptive, Its not going to help me now because the problem was in Windows and well I was doing the beginner tutorial and I can't remember the exact instruction but it was with the monkey thing and it wouldn't draw it correctly and I was getting a module error. If I can get pygame on here I'll be glad to get it and try it out before I dive into C++. Its also the simplicity I'm worried about. I think that if I go into a language that is too simple it won't help me later on with more complicated languages such as C++ but I guess I'm wrong there? ;)
And am I at that early of an age to go into programming?
Mindzai
September 28th, 2008, 06:31 PM
You are indeed wrong.
LaRoza
September 28th, 2008, 06:35 PM
lol. ok Mr. Descriptive, Its not going to help me now because the problem was in Windows and well I was doing the beginner tutorial and I can't remember the exact instruction but it was with the monkey thing and it wouldn't draw it correctly and I was getting a module error. If I can get pygame on here I'll be glad to get it and try it out before I dive into C++. Its also the simplicity I'm worried about. I think that if I go into a language that is too simple it won't help me later on with more complicated languages such as C++ but I guess I'm wrong there? ;)
And am I at that early of an age to go into programming?
Mr? We'll ignore that fornow, Ma'am.
I am not familiar with the Monkey thing ;)
Simplicity? The language isn't simple, it is very high level.
Read this: http://www.cs.utexas.edu/~EWD/transcriptions/EWD03xx/EWD340.html
GearedForWar
September 28th, 2008, 06:41 PM
Mr? We'll ignore that fornow, Ma'am.
I am not familiar with the Monkey thing ;)
Simplicity? The language isn't simple, it is very high level.
Read this: http://www.cs.utexas.edu/~EWD/transcriptions/EWD03xx/EWD340.html
sry bout that XD.
for the monkey tutorial: http://rene.f0o.com/mywiki/LectureThree *edit:still doesn't work by the way. just tryed it!
well I would think it is also compared to C++. sry if I'm being a pain in the ***. (gotta love being a teenager XP)
jimi_hendrix
September 28th, 2008, 06:49 PM
Its also the simplicity I'm worried about. I think that if I go into a language that is too simple it won't help me later on with more complicated languages such as C++ but I guess I'm wrong there? ;)
And am I at that early of an age to go into programming?
well game programming isn't exactly "simple" but it is fun to do ihmo...but you can take programming ideas with you to any language so you will be fine
Sinkingships7
September 28th, 2008, 06:53 PM
And am I at that early of an age to go into programming?
Absolutely not. Anyone can start programming at any age. If it makes you feel any better, I'm 17 as well.
Now, you made some remarks about simplicity. I can repeat this for you: if you had trouble with Python, then there's no point in trying C++. Python is incredibly simple compared to C++. It would seem that you don't have that much of a background in programming. In that case, I do suggest that you start with a dynamically typed language like Python, as it will help you evade the concepts which you don't need to be introduced to until later, and allow you to focus on the design of your program.
I'm not being hypocritical, I'm just speaking from experience. As already mentioned, I did indeed start with C++. After a while, I did manage to get along with the language, and it gave me my first steps into programming. That does not mean that it was a walk in the park, so to speak.
It's true that if you want to go into game programming, you just may end up coding quite a bit of C or C++. This does NOT mean, however, that you should dive right into it because you believe that it will be your mostly used language (though it may be). A programmer does not (I should say 'should not', but I wouldn't consider this kind of person to be a real programmer; at least not an efficient one) limit herself to one language. Not even two, for that matter. In order to be an efficient coder, you must surround yourself with all types of languages, paradigms, and concepts.
You don't want to be a blub programmer (http://www.paulgraham.com/avg.html), do you?
Thank you, Mindzai! I will enjoy listening to those.
GearedForWar
September 28th, 2008, 07:04 PM
thanks for that. I needed to read that. I might as well just use python. I have written programs in it. One of which tranlsates RGB numbers into one Hex number. Nothing that hasn't been done before. So I can always go back.
mssever
September 28th, 2008, 07:07 PM
You'll be best off learning the basics of programming before you spend too much time worrying about games. The basics transcend genre and language. Python, Ruby, or another interpreted language will get you going more quickly.
That said, you might be interested in playing with Alice (http://www.alice.org/), which was designed to combine games with introductory programming. I don't have a whole lot of experience with it, but you might find it interesting.
When it comes to syntax, there's only one thing that matters syntax-wise for beginner programmers: How easy are the rules to understand and apply without making too many mistakes? Semicolons aren't the answer, because they're a needless complication due to poor design choices in some languages. Life is simpler without them. But once you learn a second or third (or fourth, etc.) language, and it happens to require semicolons, it'll take all of five seconds to learn when to use them--even though you'll still get errors from forgetting them on occasion. So don't worry about that.
pmasiar
September 28th, 2008, 09:37 PM
If ; at the end-of-line will make you happy, use Python with #; instead 8-)
Seriously, if you cannot tackle Python, forget about being programmer. And don't waste time on C++ untill you have to: there are games in Python you can take a look at, and language simplicity will let you to understand more of the underlying theory, compared with same code in monstrosity like C++
jimi_hendrix
September 28th, 2008, 09:48 PM
<OT thread hijack>
If ; at the end-of-line will make you happy, use Python with #; instead 8-)
do you need the hash? because this compiles in geany
def main():
s = raw_input("what is your name? ");
print "hello, " + s;
return 0;
if __name__ == '__main__': main()
</OT thread hijack>
Sockerdrickan
September 29th, 2008, 09:00 AM
C++ isn't the language for games...
Any language can be used.
Python (which you reject for not having ;...) has many modules for game programming, especially PyGame. 3d game engines are also available.
Read the links on this page: http://ubuntuforums.org/showthread.php?t=796494
Especially the coloured link about learning to program (there is something about games in it), and the various threads about first languages.
If you want to do commercial game programming you can ignore the quote above though. :popcorn:
LaRoza
September 29th, 2008, 09:03 AM
If you want to do commercial game programming you can ignore the quote above though.
Evidence? Many commercial games use scripting languages...
Yes, in larger games, the game engine will be in C or something, but most game programming doesn't involve game engine programming (and someone skilled enough to write one wouldn't be distracted by ;)
Sockerdrickan
September 29th, 2008, 09:08 AM
My evidence is logic. If a project becomes relatively large and you use an interpreter, your customers are going to get mad at you because they got a beefy PC and get frame rates of an N64 running DOOM 3.
Wybiral
September 29th, 2008, 09:20 AM
My evidence is logic. If a project becomes relatively large and you use an interpreter, your customers are going to get mad at you because they got a beefy PC and get frame rates of an N64 running DOOM 3.
Game ENGINE development is done in (typically) C or C++, but the logic/scripting/game DESIGN is usually done in something higher level like Lua or Python. It would be foolish for someone to write all of their game logic in a low-level compiled language.
Sockerdrickan
September 29th, 2008, 09:31 AM
Game ENGINE development is done in (typically) C or C++, but the logic/scripting/game DESIGN is usually done in something higher level like Lua or Python. It would be foolish for someone to write all of their game logic in a low-level compiled language.
Game ENGINE development is a part of <game development> and a big part.
LaRoza
September 29th, 2008, 09:43 AM
Game ENGINE development is a part of <game development> and a big part.
Right. Do you mean to tell us that someone who has C++ or Bash on the plate while ignoring Python because it doesn't have ";" from a random forum will be doing game engine development in hardcore C?
Game development is the goal for many. The industry has a steady stream of enthusiastic people to code for them.
It doesn't really matter where one starts, you can always (and should) learn more. However, if a person learns only Python, they will be able to make 3d games and 2d games with sound and many features. They will be able to take advantage of existing engines to make games with little problems. All of that within a rather short period of time of dedicated study (to get the knowledge, the actual development time with not be that short) If one starts with C++ and sticks with it, they will be able to make rudimentary text games in about 6 months and in a couple years *might* be doing 3d games. And they will be wrestling with things that can easily be done in Python (or Perl and Ruby).
All of this is a long way from commercial game development. Why does one want to make games? For fun or for money? If it is for money, you are doing it the hard way.
Sockerdrickan
September 29th, 2008, 10:02 AM
Right. Do you mean to tell us that someone who has C++ or Bash on the plate while ignoring Python because it doesn't have ";" from a random forum will be doing game engine development in hardcore C?
I just gave him the truth, chill. It's pleasing to see that you actually wrote something more informative for once though! :D
If one starts with C++ and sticks with it, they will be able to make rudimentary text games in about 6 months and in a couple years *might* be doing 3d games.
Now, for 14 months I've been learning C++, I can already make advanced games with SDL (with well written code). I also had the time to learn OpenAL and some OpenGL.
If you are passionate it won't take years.
(I had some BlitzBasic experience but that's totally different, it was like re-learning to program)
pmasiar
September 29th, 2008, 11:32 AM
My evidence is logic.
Your evidence is blind bias of a speed kiddie.
Especially for a beginner Python is **much** better tool: to learn basic principles, learn to use basic functionality of the game engines, basic AI algorithms, without wasting 80% of the effort which is needed to squeeze last 20% of the performance.
After that, if OP decides to go into professional gaming (which I would strongly advice against), OP can learn C or C++ and professional game engines.
Even if you want to become NASCAR star, you learn driving first using mom's station wagon with automatic transmission. Just because it is possible to start with C++, it does not mean it is smart or advisable - just the opposite.
LaRoza
September 29th, 2008, 12:27 PM
Your evidence is blind bias of a speed kiddie.
I added it recently, so wikipedia is now a reference: http://en.wikipedia.org/wiki/Speed_kiddie
rnodal
September 29th, 2008, 02:51 PM
Just my humble opinion.
While is true that, which way you choose to go about programming will make a difference the bottom line is that if you want to succeed you will have to be a dedicated person. You will always find something wrong with a programming language, there is not such a thing as one for everything. Also, you will always find speed bumps and it will be your perseverance what will save you.
Just because something works for someone that does not mean it will work for other. My first programming class in college was C++, Assembly, More C++, C, Java. Any other experience that I have in php, perl was acquired on my own. Would I recommend learning, Assembly -> C -> C++? Sure, specially if your are going into game development. Will it work for you? Maybe, maybe not. As long as you don't give up, you will get there. If you start blaming your failures on the language then you have a problem. You should choose your language based on what you want to accomplish and not let a language determine what you can accomplish.
As a game engine developer I will say that there needs to be a balance between scripting and C/C++. That's why one of my goals for my engine is to allow the developer to go which ever way he/she wants. Want to write the whole game in C/C++ go ahead. Want to write the whole game as a script? then go ahead. Want to write the game in some parts in C/C++ and in others in a script then go ahead? I recommend the last one.
-r
nvteighen
September 29th, 2008, 04:03 PM
Just because something works for someone that does not mean it will work for other. My first programming class in college was C++, Assembly, More C++, C, Java. Any other experience that I have in php, perl was acquired on my own. Would I recommend learning, Assembly -> C -> C++? Sure, specially if your are going into game development. Will it work for you? Maybe, maybe not. As long as you don't give up, you will get there. If you start blaming your failures on the language then you have a problem. You should choose your language based on what you want to accomplish and not let a language determine what you can accomplish.
Yes, agreed. At the end, if it worked for you, it's fine... I myself learned C before Python.
But, I believe it makes much more sense to learn about what programming is before diving into any particular field of it. If you prepare your path solely based on the goal of game development, you'll miss the opportunity of taking a look on other kinds of programming: you'll be restricting yourself to a single flied taking that decision without the experience and knowledge of what you have on other places. And in the opinion of some of us, C++ will not be the best to learn programming, as I'll explain below.
In programming there are two parties: the Abstraction vs. the Efficiency, and all programming wars can be reduced to that dichotomy. The Efficiency party favors speed and computing efficiency when programming, as programming is done through computers and therefore, to have the best possible results, you need to use the computer in the best possible way. The Abstraction party (in which I consider myself to be part if) consider that programming is primarily process description, therefore a linguistic phenomenon, where expression power (the capacity of creating more complex semantic systems without loss of semantic expression power).
Keep in mind that you can program without using a computer. You just need a language and some place to write the code down. The computer has the ability to simulate the process, but you could also just imagine the process by reading some code and simulate it in your mind.
So, to learn programming, under this vision, you need a language that lets you express the processes you want in an easy way but also in such a way that you can put a distance between the process description and the tool you use to simulate that process (i.e. the computer). Much C or C++ features are too near to the computer and only have sense if referred to a computer... Lisp has absolutely no concepts referred to the computer... Python could be considered to be very near to Lisp with respect to this, though the os module, for example, brings it a bit lower level.
Of course, we need something that makes us interact and control the computer, but that should be considered as a secondary aspect of programming: tool control... and speed gain is about controlling the tool, no doubt; so, if you need speed, C, C++ and ASM are not just options, but the only way to go. Other tasks, where abstraction and description plays a more important role, should be higher-level languages' job.
nvteighen
September 29th, 2008, 04:14 PM
I added it recently, so wikipedia is now a reference: http://en.wikipedia.org/wiki/Speed_kiddie
I have been part in Wikipedia some good amount of time and I bet you that the article will be AfD'ed or however the deletion process is now called (it constantly changes name) for non-notable content...
LaRoza
September 29th, 2008, 04:40 PM
I have been part in Wikipedia some good amount of time and I bet you that the article will be AfD'ed or however the deletion process is now called (it constantly changes name) for non-notable content...
So?
I added the information. It is not my job to make them keep it.
GearedForWar
September 29th, 2008, 04:44 PM
So what all you people are saying are do python and when I'm ready move on? Because its all confusing.
What my goals are that I would like to program for hobbies such as linux and develop my own games with open source in mind but as a job I would like to develop commercially. I'm practicing python now and when I'm ready I will moving on.
Now another question...whats the differences between C and C++? I know there are ALOT of reasons but can you just give me a basic explanation?
jimi_hendrix
September 29th, 2008, 04:46 PM
C = smaller and simpler and some times faster...C++ = C with objects and a few minor changes....and its a lot more confusing
namegame
September 29th, 2008, 04:50 PM
C++ is object oriented.
GearedForWar
September 29th, 2008, 04:50 PM
well say since I need a job in the gaming industry, will C++ be more of a concern?
LaRoza
September 29th, 2008, 04:53 PM
well say since I need a job in the gaming industry, will C++ be more of a concern?
No, learning to program. Programming is not tied to a specific language, so choose the one that will enable you to learn programming the quickest.
GearedForWar
September 29th, 2008, 04:55 PM
I guess C will be the answer to that seeing as it is simpler in terms of objects and such and it will help me with hobby programming and linux because I would love to program so linux things.
namegame
September 29th, 2008, 05:01 PM
well say since I need a job in the gaming industry, will C++ be more of a concern?
"gaming industry" is awfully ambiguous.
People have made careers out of flash and Javascript games. (Runescape for example.)
Then there are more complex games which require C/C++/Python.
A game can be developed in any language. Granted some will be more "advanced" than others. Your main goal should be learning how to program. Languages are just tools to get the job done.
Then not all people in the gaming industry are game programmers.
WoW has server administrators, animators, web-developers, etc.
You shouldn't limit your self to "game-programming."
My major is computer science, yes we are learning how to program, but I'm really liking the possibility of being a server administrator or linux systems administrator.
namegame
September 29th, 2008, 05:05 PM
I guess C will be the answer to that seeing as it is simpler in terms of objects and such and it will help me with hobby programming and linux because I would love to program so linux things.
It's great that you are wanting to jump into C, but from my experience, without guidance, C can be very frustrating.
Personally, I would have preferred to learn Python before C. But my university teaches C as the first language, then C++, then Java.
I'm trying to find time to truly "learn" Python to the same extent as I have/am learning C.
GearedForWar
September 29th, 2008, 05:25 PM
No I will tackle C after I learn Python. Game Industry to me is like console programming for companies like Bungie, Activision and such.
CptPicard
September 29th, 2008, 05:28 PM
...consider that programming is primarily process description, therefore a linguistic phenomenon...
I would like to disagree slightly and suggest that even using the word process here is too low-level and refers to operational descriptions in imperative languages.
Languages like Prolog for example try to get rid of the "process" view as much as possible, and just simply describe "what is true"*in terms of the problem.
Sinkingships7
September 29th, 2008, 05:49 PM
So what all you people are saying are do python and when I'm ready move on? Because its all confusing.
Almost, but not quite. What we're saying is that there's a difference between programming and programming languages. Learning a language will not teach you how to program, but rather how to program in that language.
Instead of learning a certain language, you should get a grasp on simple programming concepts. Arrays, control flow, different paradigms, different ways of program design, modeling, data structures, algorithms, etc.
We offer Python as a choice-language to dive into these concepts because its high level of abstraction allows you to focus on those above concepts, instead of the daunting intricacies of the language such as misplaced semicolons, unmatched brackets, confusing syntax, 'magic' code, or whatever it may be.
A small example is the following programs which both print "Hello!" to the screen.
// This is C++
#include <iostream>
using namespace std;
int main(){
cout << "Hello!" << endl;
return (0);
}
# This is Python
print "Hello!"
Now, those are just simple 'Hello' examples, and yet the over-complication shines so brilliantly with C++. Both programs perform the exact same task, so tell me: which one gets the semantics of the language out of the way and allows you to focus on the problem at hand in a more proficient way?
wladicus
September 29th, 2008, 05:55 PM
Well I'm only 17 so I don't know much yet.
And what the h*** is the theory?
In general theory is a field of study that deals with the mechanics or processes of programming. It involves identifying patterns and syntaxes that govern programming techniques and the understanding and application of algorithms.
For example there is a field of study called "Algorithmic information theory" which is a subfield of information theory and computer science that concerns itself with the relationship between computation and information.
So as you can see, programming is very broad field and in fact extends deep into the field of science in general. Now coding is a subset of programming. So, what you will probably first be learning is how to code effectively so that programmes will run efficiently and without error. Then as you get the hang of that there will be many other nuances that enter your experience as your talent grows.
Mindzai
September 29th, 2008, 06:01 PM
Almost, but not quite. What we're saying is that there's a difference between programming and programming languages. Learning a language will not teach you how to program, but rather how to program in that language.
Instead of learning a certain language, you should get a grasp on simple programming concepts. Arrays, control flow, different paradigms, different ways of program design, modeling, data structures, algorithms, etc.
We offer Python as a choice-language to dive into these concepts because its high level of abstraction allows you to focus on those above concepts, instead of the daunting intricacies of the language such as misplaced semicolons, unmatched brackets, confusing syntax, 'magic' code, or whatever it may be.
A small example is the following programs which both print "Hello!" to the screen.
// This is C++
#include <iostream>
using namespace std;
int main(){
cout << "Hello!" << endl;
return (0);
}
# This is Python
print "Hello!"
Now, those are just simple 'Hello' examples, and yet the over-complication shines so brilliantly with C++. Both programs perform the exact same task, so tell me: which one gets the semantics of the language out of the way and allows you to focus on the problem at hand in a more proficient way?
Perfectly put.
GearedForWar
September 29th, 2008, 07:04 PM
Ya it is. Well I don't know how to thank you guys for this. I went from asking C++ or Bash and now its all to programming concepts. Well I think I'll learn all this in college hopefully at somepoint. I'll program in python for now. Move up to C because I want to be able to program for linux and at least create some DOOM like games with open source because I'm a open source person and would love to see a game I create just be modded and see the types of versions. Thank you so much for all this guys I really needed to know this.
jimi_hendrix
September 29th, 2008, 07:12 PM
Almost, but not quite. What we're saying is that there's a difference between programming and programming languages. Learning a language will not teach you how to program, but rather how to program in that language.
Instead of learning a certain language, you should get a grasp on simple programming concepts. Arrays, control flow, different paradigms, different ways of program design, modeling, data structures, algorithms, etc.
We offer Python as a choice-language to dive into these concepts because its high level of abstraction allows you to focus on those above concepts, instead of the daunting intricacies of the language such as misplaced semicolons, unmatched brackets, confusing syntax, 'magic' code, or whatever it may be.
A small example is the following programs which both print "Hello!" to the screen.
// This is C++
#include <iostream>
using namespace std;
int main(){
cout << "Hello!" << endl;
return (0);
}
# This is Python
print "Hello!"
Now, those are just simple 'Hello' examples, and yet the over-complication shines so brilliantly with C++. Both programs perform the exact same task, so tell me: which one gets the semantics of the language out of the way and allows you to focus on the problem at hand in a more proficient way?
well you can get around a little more typing to do some basic printing...but it gets way worse at higher levels to even make a simple picture of a ball bounce around a screen it takes pages of code in C++ (mostly setting up the screen and everything) and very little code in Python
Sinkingships7
September 29th, 2008, 11:02 PM
well you can get around a little more typing to do some basic printing...
I don't quite understand what you mean by this. Elaborate?
nvteighen
September 30th, 2008, 02:43 AM
I would like to disagree slightly and suggest that even using the word process here is too low-level and refers to operational descriptions in imperative languages.
Languages like Prolog for example try to get rid of the "process" view as much as possible, and just simply describe "what is true"*in terms of the problem.
Thanks; you're right... I'll look for a better term that also applies to logical programming. Anyway, I hope the idea was clear.
Greyed
September 30th, 2008, 03:45 AM
My evidence is logic.
Sorry, you're wrong. There is no logic, only bias.
If a project becomes relatively large and you use an interpreter, your customers are going to get mad at you because they got a beefy PC and get frame rates of an N64 running DOOM 3.
http://www.tentonhammer.com/node/10044
http://www.slideshare.net/Arbow/stackless-python-in-eve/
Just to pick two out of the dozens (hundreds) of articles written about a game that has been around 5 years with stellar graphics which aren't at all laggy on my underpowered machine much less on a beefy machine that some speed kiddies sport.
Furthermore to support LaRaza's assertion that higher level gaming functions are being programmed in Python:
http://wiki.python.org/moin/OrganizationsUsingPython#head-9bb17e7db5e2f54b19690a7acfd955257b30a54c
In short your bias that you call logic has been blown for half-a-decade (have you even been programming that long?) and what your spreading here is not facts, not logic, but plain and simple FUD.
Is anyone here denying that at the lowest level a background in C/C++ might be useful; esp. when it comes to developing an engine? No. But as is more and more common these days one doesn't develop and engine so much as direct it using higher-level languages. How many games coming out do you think have the developers creating their own engines? Heck, look at Force Unleashed from Lucas arts. They have no less than 4 third-party physics engines built into that game. They didn't write it all themselves. They just masterfully mashed them together.
Let me give you an analogy. No, not a flawed "if computers were cars" analogy but an honest "if computers were computers" analogy.
You're programming in C++. Did you write the compiler first? No? Why not? Surely a grounding in ASM and building the compiler is required from any programmer.
You're programming in Python. Did you write the engine first? No? Why not? Surely a grounding in C and building the engine is required from any game developer.
When you understand the folly of the first statement you will understand the folly of your statement which is represented by the second.
CptPicard
September 30th, 2008, 04:20 AM
Thanks; you're right... I'll look for a better term that also applies to logical programming. Anyway, I hope the idea was clear.
Actually, even in Lisp, when you try to avoid mutable state in particular, you end up describing "entities" and their relationships via functions... it's less and less about process, and more and more about bringing into being a descriptions of things.
You're programming in C++. Did you write the compiler first? No? Why not? Surely a grounding in ASM and building the compiler is required from any programmer.
As a matter of fact these sorts of statements are bs in general, as compilers can be written in any language, and interestingly, some higher level languages (like Lisp!) actually have as a native part of the language the ability to build compilers for domain-specific languages (macros).
Essentially the only low-level language that you really need to know if you want to have the whole compiler deal is asm, as you can then produce native asm from any other language.
Just reinforces the point that C is sort of syntactic sugar on top of assembler, and what some now-departed former member said about "ideally, everything should be coded in asm" is a dubious claim as obviously C was a step up in abstraction... so why not take further steps?
jimi_hendrix
September 30th, 2008, 07:21 AM
just throwing this out there...i recently found a language called Euphoria (http://www.rapideuphoria.com/) and it seems to be very simple and seems to have a few simple games written in it (i didnt have time to look at source for them yet) but im just putting more options on the table
eentonig
September 30th, 2008, 07:27 AM
Both are completely different tools in my opinion. You could as well ask, "which is better? A screwdriver or an egg?"
Greyed
September 30th, 2008, 08:03 AM
A screwdriver, clearly. Ya can't get drunk off an egg!
pmasiar
September 30th, 2008, 10:00 AM
well say since I need a job in the gaming industry, will C++ be more of a concern?
You **need**? Maybe you just **want**? :-)
game industry is great pressure cooker which can afford to abuse it's programmers, squeeze them dry and discard them because all the time new suckers want to go in and replace the disposed.
If you want to program games, you are much better off doing it as a hobby, with hope to strike it rich with some luck if you will get your own idea, like Galcon did.
pmasiar
September 30th, 2008, 10:06 AM
Well I don't know how to thank you guys for this. I went from asking C++ or Bash and now its all to programming concepts.
Thanking is easy: just click on "thanks" icon below the post ;-)
One thing you need to realize that asking right question is halfway to the answer.
At first I ignored your thread completely, because questions did not made any sense. I joined only after I seen posts of some smart people popping up.
Read 'how to ask questions' in my sig. Learn to ask more open-ended questions when you don't know the approach, to avoid risk (like you had with your thread current title) that people will ignore you because you ask wrong irrelevant question.
It's not to critique you, but to help you understand how asking questions works. You are learning, and on the right path now. Good luck!
SeanHodges
September 30th, 2008, 11:16 AM
A screwdriver, clearly. Ya can't get drunk off an egg!
lol boo!
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.