Archived

This topic is now archived and is closed to further replies.

PlayGGY

Which language to learn next...

Recommended Posts

First, a little background. I am sixteen, and have been programming in C++ for almost two years. I now think I have mastered it, with lots of help from you at GameDev (thanks a lot, guys... ). What should I learn that next? Assembly? I have always wanted to understand how C++ works under the hood. Or should I learn C#? It looks really nice, but keep in mind that I do not intend on developing exclusively on Windows forever. What would be most benificial for me to learn next? I am thinking of learning assembly and then C#, because C# shouldn't take very long to learn, but what do you think? I am open to all opinions (well, I did ask here, right? ) -Daniel [edited by - PlayGGY on January 14, 2004 11:57:37 PM]

Share this post


Link to post
Share on other sites
It depends what you plan on doing.

If you are wanting to make highly tuned games or someday migrate to consoles then asm could definatly be a good thing to learn. Of course if you want to make programs for cell phones you probably should learn Java.



Drakonite

[Insert Witty Signature Here]

Share this post


Link to post
Share on other sites
No actually i THINK its even different between compilers... (well jsut keywords) and im usre due to different cpu archetecture it would be noticeably different, but by how much i dont know (i wanted to look into asm, but couldnt find any real good resources and kinda got shot down...)

there IS a community that might help you there though...

Win32 Asm Community

(first board that didnt flame me as a n00b :-D)

Share this post


Link to post
Share on other sites
quote:
Original post by PlayGGY
Did you learn it for multiple CPUs? I assume it is about the same thing for most of them.


Take it this way - most (all) programming languages share the same concepts, and yet they each have differences in the way things are done. Assembly languages is the same. They will all have instructions for arithmetic operations, reading/writing to memory, etc, but the details of how they work, how to best arrange them, etc may vary wildly from machine to machine. Then, just like you have different high-level programming paradigms (imperative, functional, logical, structured, object-based, object-oriented), you have different ISA paradigms (the great CISC/RISC debate).

So, just like knowing one language well will give you hints as to how things work in another language (they''re all targetting Van Neumann binary computers, after all), knowing an ASM language well will give you some insight into other ASM languages, but will not make you proficient in them by any stretch of the imagination. Knowing the concepts involved (addressing, stack, etc...) is useful even if you don''t go into the detail needed to be an effective ASM programmer.

I suggest that, rather than, or in addition to your computer''s ASM language, you go and learn languages that do things completely differently from C++, so that you get exposed to another way of thinking, and come back with some understanding of the decisions that have to be taken in language design, and, yes, some idea of what they are doing under the hood (e.g. the 1001 ways a language can do function calls, handle arguments (currying, type inference, closures... hmmm good stuff), how it all boils down to a CALL or a JMP (tail recursion tricks!), that kind of stuff).

And of course, no post of mine could be complete without a plug for python.


“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.”
— Brian W. Kernighan (C programming language co-inventor)

Share this post


Link to post
Share on other sites
Yeah, thanks Ademan555, I remember doing a google search, and lots of the info is from 1996 or earlier. Well, probably CPUs haven''t added many new instructions. Tommorow I am probably going to start on assembly, and hope I can find a good tutorial.

Share this post


Link to post
Share on other sites
Fruny, thanks for the long reply.
What you said made me wan to learn assembly even more. I think it will be easier to understand other languages once I understand what they are all doing underneath the surface. And I will have to google some of those paradigms, even thouh a few look nearly identical to another (like functional and sturctured). Thanks for your help!

[edited by - PlayGGY on January 14, 2004 12:55:13 AM]

Share this post


Link to post
Share on other sites
C# isn''t exclusive to Windows.

It''s also a damn fine language. I have a few complaints about the libraries supplied by Microsoft (the System.Net async socket functions seem to be a bit buggy and poorly thought-out), but nothing major, and nothing that can''t be fixed by a patch to their .NET framework.

Share this post


Link to post
Share on other sites
quote:
Original post by glassJAw
C# isn''t exclusive to Windows.

It''s also a damn fine language. I have a few complaints about the libraries supplied by Microsoft (the System.Net async socket functions seem to be a bit buggy and poorly thought-out), but nothing major, and nothing that can''t be fixed by a patch to their .NET framework.


Yeah, but I really doubt it will become big on any other platform. I see it becoming huge on Windows, but nothing else. I am planning on learning it, but I am just wondering what order I should learn things. I don''t see how anyone learned assembly, the resources on the net are pretty sparce (and all of the code looks completely different... some code uses macros that I know isn''t part of assembly, like ''.IF''. The don''t explain where the macros came from though). Does anyone have a good resource?

Share this post


Link to post
Share on other sites
Here's a resource, not related to your C# question in any way () but which you may still find interesting (click on the picture and check out the links on the page).


“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.”
— Brian W. Kernighan (C programming language co-inventor)


[edited by - Fruny on January 15, 2004 1:11:49 AM]

Share this post


Link to post
Share on other sites
So many languages...

"C with classes?"

They had that before C++? B!? Yikes, that is going on my favorites list. So many links, too...

Actually, they probably have every single language except for some of the Basics, like Qbasic, the first "language" I learned... good thing though, it had built in graphics commands, so that can't really count as a language.



I think I am going to learn about how the CPU works , and some of the very basic assembly commands, instead of learning it for one processor (plus, it is way too hard to find anything anywhere near recent, even your link strangely skips assembly). That way, I will know what is happenning, which out having to learn to code for one processor. Then, I'll probably go ahead and learn C#.

[edited by - PlayGGY on January 15, 2004 1:29:21 AM]

[edited by - PlayGGY on January 15, 2004 1:29:41 AM]

Share this post


Link to post
Share on other sites
I''m sure you know a lot, but you have not mastered C++. No offense intended. Especially if you don''t anything about assembly. Look for new C++ projects (maybe like porting some open source software) before you give up on continuing your C++ education.

Share this post


Link to post
Share on other sites
quote:

"C with classes?"

They had that before C++? B!? Yikes, that is going on my favorites list. So many links, too...



C++ started out as a preprocessor that would process "C with classes" code and generate "regular" C code. (search for CFront)

quote:
Original post by PlayGGY
Actually, they probably have every single language except for some of the Basics, like Qbasic, the first "language" I learned... good thing though, it had built in graphics commands, so that can't really count as a language.


Check the link that's just under the graph And yes, QBASIC *is* a language. After all, Logo does have graphics commands too, and it's in the graph.

quote:
I think I am going to learn about how the CPU works, and some of the very basic assembly commands, instead of learning it for one processor (plus, it is way too hard to find anything anywhere near recent, even your link strangely skips assembly).


Modern programming languages have been designed to spare you from having to learn CPU-specific languages. Fortran was the very first to actually allow you two write programs for multiple machines. But yes, learning a bit of computer architecture can be useful. Get an algorithms book too, that will prove invaluable.

quote:
That way, I will know what is happenning, which out having to learn to code for one processor. Then, I'll probably go ahead and learn C#.


Don't espect to find much about ASM that is not directly related to a specify architecture. It's inherent to the topic. As for what programming languages to look into next, try looking at something outside the Algol family

Edit - and I agree with what reynoldspaul said, C++ is a very complex language. Just think for a while about how it handles multiple inheritance (say at a C level).


“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.”
— Brian W. Kernighan (C programming language co-inventor)


[edited by - Fruny on January 15, 2004 1:39:10 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by reynoldspaul
I''m sure you know a lot, but you have not mastered C++. No offense intended. Especially if you don''t anything about assembly. Look for new C++ projects (maybe like porting some open source software) before you give up on continuing your C++ education.


I don''t know what you mean, could you explain some more? What is it about assembly that I need to know before I can understand how to effectively use C++? Maybe there is something I don''t know because I don''t know about it?

Share this post


Link to post
Share on other sites
What!?!?!? C++ stops bfore 2000.... :-/ but anyways, yeah hes right, theres ALWAYS more to learn (not technically true but its almost impossible to "know it all")

anyways, i hate to be a whore like this...but could you guys take a look at my post just a few down from this one? "Getting non queued messagees..." im havin a hell of a time and i really need help...and my post is quickly dropping... thanx :-D

Share this post


Link to post
Share on other sites
quote:
Original post by Ademan555
What!?!?!? C++ stops bfore 2000.... :-/ but anyways, yeah hes right, theres ALWAYS more to learn (not technically true but its almost impossible to "know it all")

anyways, i hate to be a whore like this...but could you guys take a look at my post just a few down from this one? "Getting non queued messagees..." im havin a hell of a time and i really need help...and my post is quickly dropping... thanx :-D


Like I said, could you explain what is it in assembly I need to know before I can master C++? I do know about cache misses, which is really the only thing I can think of (I had to look that up a while ago). Not saying you guys are wrong, I am just asking (so I can learn it ).

[edited by - PlayGGY on January 15, 2004 1:41:10 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by Ademan555
What!?!?!? C++ stops bfore 2000.... :-/



Yes, the ISO C++ standard is dated 1998, at which time the language entered a 5-year "stabilization" period, intended to let compiler implementers catch up with the language (which we are starting to see - Vc6 was an abomination, VC7.1 is much better) . The C++ Standard committee started working on language evolution again last year (C++ committee website - the proposals are publicly accessible)



“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.”
— Brian W. Kernighan (C programming language co-inventor)


[edited by - Fruny on January 15, 2004 1:46:54 AM]

Share this post


Link to post
Share on other sites
Yes, do that. Learn how the computer (as an abstraction) works, what with the program counter and the code==data business and all that. See if you can sit in on a university course for it, the course title you''re looking for will be something like "computer organization", "computer architecture" or "digital logic".

Yes, there were a handful of attempts to add classes to C before C++. They apparently weren''t very successful. Except perhaps Objective C, which I *believe* technically predates C++.

If you''ve been hacking around in C++ for 2 years, you should know a thing or two about pointers. It shouldn''t be too hard, once you have a bit of background, to get a sense of how this stuff is implemented in assembly.

In my course, we used 68000 assembly on custom hardware (based off a 68000 chip though of course). As part of my effort to make sure I understood the stuff, I tried implementing basic stuff (like equivalents to C''s gets() and puts(). I was in a computer engineering course; if you do computer science instead, it likely that instead of a specific assembly language you''ll be working in a fictional (probably highly simplified) one. This is a reasonable approach too.
Seriously though - once you''ve grokked that, put it all aside as much as you can. You don''t need the headache. Learn something higher-level, like Java - or even a scripting language like Python (that''s what''s in fashion these days it seems; also Lua in the gaming industry according to the boards here. I''m a Perl h4><0r myself; hopefully when Perl 6 finally shows up, using Perl will be that much more respectable). Start realizing how much of a pain it was to do the memory management yourself. Appreciate the beauty of having resizable and/or associative containers built into the language (not in Java, but most scripting languages are like this). Learn how to write simple things, use the right algorithm first (or at least something close), and optimize later. Learn about the options for integrating stuff done in different languages, so that you can alternate ''hard'' and ''soft'' layers. And be happy.

Don''t be too proud, either. You can memorize a language''s specification, but programming is an art that takes years to fully master, just like any other.

Most of these ideas are probably considered heretical in the games industry. Seems to me like the games industry lacks a lot of common sense. Oh well.

Share this post


Link to post
Share on other sites
Sorru Fruny, I didn't see your reply. Actually, I just thought of something in C++ that I don't really understand... the v-table. Crap. Oh well, that something I really need to learn. And Fruny, how on earth do you know all of that!?

EDIT: And by the way, I know I haven't come close to learning "how to write" in C++, I was should have said "whenever I see any code, I can tell what it is doing" . Mastered wasn't the right word at all, but I understand basically every concept in C++, as most people here do.

*Lots of edits*

[edited by - PlayGGY on January 15, 2004 1:47:26 AM]

[edited by - PlayGGY on January 15, 2004 1:48:12 AM]

[edited by - PlayGGY on January 15, 2004 1:48:48 AM]

[edited by - PlayGGY on January 15, 2004 1:49:05 AM]

Share this post


Link to post
Share on other sites
When I interviewed for my current job position using C# and .NET, I got the job over many candidates with longer programming history and previous experience with both C# and .NET - EVEN THOUGH I HAD NONE ... My last 2 jobs we''re using C++, one using Visual C++ 6.0 and DirectX making video gambling games, and the other using gcc on BeOS to create an embedded audio processing application (actually the app just controlled outboard gear which did all the DSP) ...

I got the job because both me and my boss feel that a very deep understanding of programming in general and any one programming langauge in particular are enough to qualify a person as a skilled professional developer ... and it doesn''t matter what the langauge is (although it WILL affect which other concepts they assume you know - such as OOP, Generic Programming, Structured Programming, Multi-Threaded Programming, Real-Time Programming, etc ....) I capitalized all of these to point out that to various people, these are THE way to do it and are Very Important and Hard Things (even though most really aren''t) ...

Back to the question at hand:

I took x86 ASM in school (after I had learned Pascal, 1 ANSI C class, and was using C++) ... I am VERY glad I took that one class, because I then completely understood - well years latter, but because of it - what the machine is actually doing in ITS terms ... and therefore it becomes MUCH easier to understand why some programming constructs are so efficent or CAN be, and others have an inheirent cost. BUT I DONT recommend becomming an ASM expert, 1 class and some fun experiments should be more than enough - and every year the actual sellability of ASM skills drops.

It wouldn''t hurt to take a few weeks and write something like a linked-list or string class in ANSI C (and by that I mean a struct and a set of functions which take a struct pointer as the first parameter) - in order to truely and finally see how any langauges Object Oriented features are simply syntax suger on top of things already being done in C and even ASM programming (our ASM semester assignment was a GAME ... and we used OO programming to create it ... we created files like Graphics, GameLogic, Board, MapGenerator, etc ...)

But those are all seconday - the REAL importance of where to go next will be in things you might actuall USE in the future ... and they won''t be ASM or C ...

They will be either a scripting langauge (which REALLY helps make a programmer more powerfull ... there is just no way to overemphasize how much more cool stuff you can do if you master either Perl, Python, or Ruby). I like ruby best myself, but python is more popular and pretty nice, perl is good just cause it is actually already installed on nearly all *nix and bsd systems (so you only have to install it on windows - which is the easiest to install on). Mastering regular expressions is a very powerfull skill ... and usefull in nearly anything ... people today can write a COMPILER in weeks by using these advanced processing langauge instead of the old ASM / C methods of old. There is also Tcl/Tk, and BASH shell scripting, but neither is really as powerfull or modern as the others.

And of course dabling in something like: DarkBASIC, LISP, SmallTalk, PROLOG, ML can really help you break out of a myopic C oriented view of the universe. PROLOG has a rules based view of programming, very interesting to spend a few weeks on - just for ideas. Lisp of course has a functional programming background, but I haven''t kept up with all the newer LISPS around ... 15 years ago LISP was too HEAVY a language for desktops to handle ... not true anymore.

Internet Langauges: Perl, Python and Ruby all fit here too, but so do PHP and javascript.

And then there''s the modern C''s: Obejct-C, Java, C#. Objective-C only thrives on the Mac, but Java or C#? I really have no clue, I use C# at work, and my coworker used Java at his last job. They are so similar that it barely matters. IF you are going to buy the Academic version of Visual Studio .NET (2003), then go C#, cause it''s a really good tool. If you are not going to buy it, download "eclipse" and use Java. If you are busy and not sure, do Java now, then do C# WHEN the next version comes out (Visual Studio .NET 2004, called Whidbey) ... cause C# is NOT as good as C++ right now, NO TEMPLATES!!!

And XML and PARTICULARLY XSLT are very cool once you get comfortable with them. If you use Java or C#, you WILL use XML a lot, cause they make it so easy to manipulate.

Share this post


Link to post
Share on other sites
quote:
Original post by PlayGGY
Sorru Fruny, I didn't see your reply. Actually, I just thought of something in C++ that I don't really understand... the v-table. Crap. Oh well, that something I really need to learn.


Get "Inside the C++ Object Model". It will most certainly satisfy your interest in the innards of C++.

quote:
And Fruny, how on earth do you know all of that!?


I learned . Honestly, I bought (quite) a few books ("The C++ programming language", "The C++ Standard Library" ... I have thousands of dollars worths of computer books covering a variety of topics) and tried to figure out *why* the language was done that way, instead of simply memorizing how things were. Being a computer science graduate student also probably helped a lot - I'm *meant* to be interested in that kind of crap.

And you know, what I was getting at is, since all languages are built on the same bricks, there are not that many ways you can do, say, a loop or a function call, at the metal level. You can make it easier for the programmer to express complex ideas, but the more (high-level) languages you learn, the more you start to see the similarities - and it helps you understanding how to use them.

quote:
And by the way, I know I haven't come close to learning "how to write" in C++, I was more reffereing to "whenever I see any code, I can tell what it is doing".


You should try to look at "Template Metaprogramming". It's strictly C++ code, and yet, it will completely blow your mind, especially if you've not been exposed to functional programming.

Or go have a look at Lisp macros, which let you do outrageous things, and then cry at how inadequate C macros are.

Once you understand that, you can come back with your bold claims

edit: What Xai and Zahlman say.


“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.”
— Brian W. Kernighan (C programming language co-inventor)


[edited by - Fruny on January 15, 2004 2:01:25 AM]

Share this post


Link to post
Share on other sites
Xai. thanks for taking your time to respond. Just today after seeing the article on GameDev I wrote a template container that was "hiding" a linked list (the data was stored in a linked list). I have practiced little things like that a lot, and while there still are things I don't completely understand, like how v-tables work (again mastered wasn't the right word for me, see my last reply), I think that I know enough now to learn a new language. I have read some stuff from AMD about their 64-but processors, and I really want to learn more about CPUs, but I really don't want to learn assembly for a specific processor, considering I may never use it. I think that if I do learn how CPUs work, it will be easier to learn assembly for anyone one processor. So tommorow (I... need... sleep...) I will start learning C#, and reading up on CPU architecture. Thanks for your replies , I will come back tommorow... sleep........

Fruny, I saw your reply, but I am too tired to respond right now...

[edited by - PlayGGY on January 15, 2004 2:03:23 AM]

Share this post


Link to post
Share on other sites
Try writing a compiler.

Seriously. If you are interested in figuring out how programming languages work, and have an interest in learning ASM, look into creating your own simple language and compiler, or writing a complier for a simple language.

Don't try to build a C compiler that creates a full-on executable file for a Windows system yet. Start with something that compiles a simple language with limited features (maybe arrays and structs, but don't worry about dynamic memory allocation) that emits code you can run on a simulator, like the DLX or a MIPS simulator.

You'll learn a whole lot about how programming languages work under the hood, and you'll also learn a lot about how computers work at the ISA level. At this point don't get too worried about becoming the master of a specific implementation of a specific ISA, assembly languages have a lot in common, and you'll learn a lot about how they work.

[Edited by - The_Incubator on June 14, 2006 2:53:07 PM]

Share this post


Link to post
Share on other sites
I wouldn't have thought that you could have mastered the whole of c++ after 2 years. I've been at it for 7 years and don't think I'm anywhere near mastering it (and I'm no slouch). You can however be a master of as much as you know (e.g. you may never have to look up the syntax for pointers but know nothing about templates or using the standard library)

I've read Bjarne Stroustrup's the 'C++ programming Language 3rd Edition', Herb Sutter's 'Exceptional C++' and 'More Exceptional C++', Scott Meyer's 'Effective C++' and 'More Effective C++' (available combined on CD-ROM) and 'Effective STL', Andrei Alexandrescu's 'Modern C++ Design'. These authors are considered the masters of C++ and some of the things they are writing about, discussing and still trying to get right in C++ shows that they are still growing in their mastery.

I also subscribe to C/C++ User's Journal and pick up Doctor Dobb's Journal when it looks interesting. They keep me informed of real life applications of C++ and the problems that arise in trying to use C++ and the way of finding solutions. I have also read 'Design Patterns' which is often refered to in articles in said magazines (and the above books too). It isn't C++ specific although all examples are in C++ or SmallTalk. I believe that mastery of C++ programming cannot be detached from an understanding of Patterns, although that would be true of other languages too such as Python, Ruby, Java etc. (maybe that can be opened up in another thread)

edit: added bit about python, ruby, java

[edited by - petewood on January 15, 2004 6:14:42 AM]

Share this post


Link to post
Share on other sites
Although you may not have "mastered" C++ (and no matter what anyone tells you, no one... well, maybe no one but savants focused on programming... has mastered it outright), you should be proud that you understand, interpret, and write C++ at an advanced level at your age. That''s a very, very good head start. You get my kudos. =) So though you may not be a master yet, don''t let it get you down. You''re at least "advanced", and that''s good enough for anyone who doesn''t want to spend most of their lives in padded rooms. =)

Speaking of related issues... I wonder if there ever has been a savant with an affinity for programming... you know, as opposed to counting objects with frightening speed, or writing cryptic poetry that no one can understand. Have any of you ever heard of an autistic programmer? I''d be interested to see what kinds of crazy stuff they could produce. =)

Share this post


Link to post
Share on other sites