Author Topic: Programming Languages  (Read 3391 times)

0 Members and 1 Guest are viewing this topic.

Alright, I finished my second day of school today and Grade 12 Programming was one of my courses. I learned that we will be able to choose a programming language that we would like to learn individually. So my question is this, what is a good/useful/practical language to learn? I want something I can use to code PC games, so nothing like java, html or whatever, as I'll probably learn those in grade 11 anyway.
Derek Smart is his own oxymoron.

 

Offline Stealth

  • Braiiins...
  • 211
no Java, eh?

why not?

 

Offline BlackDove

  • Star Killer
  • 211
  • Section 3 of the GTVI
    • http://www.shatteredstar.org
Bobbau better answer this one.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
C/++.

PHP, Java, and Javascript all have similar syntax, as well as (obviously) C#. It's crossplatform and most of the fundamentals you learn will carry over into other languages, even if they have significantly different syntax.

I also wrote a C quickreference/primer/condensed crash course on this page, so you can get a feel for the major elements and a little of the syntax.

http://dynamic.gamespy.com/~freespace/fsdoc/index.php?pagename=CodingInC

Hopefully it's not so condensed that it scares you away :nervous:

Whatever you do, don't pick Scheme.
-C

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
go C/C++ so you can help with the SCP.  But if you start on COBOL, i'll find out where you live and murder you ;)
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
c/c++ is what you want, if you do have a choice, it is a bit tough for a first language though.
Basic as slow as it is, would be more practical (than horid relics like COBOL and FORTRAN) as visual basic is used comercaly to this day, but it's crapy _CRAPY_ for games.

if there is a c++ class take it, you'll need to learn c as a prerequsite for c++ anyway so you won't miss anything, and you won't pick up any bad habits from the older style.
« Last Edit: September 07, 2005, 10:00:49 pm by 57 »
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Styxx

  • 211
    • Hard Light Productions
Lisp. Or Nautilus.
Probably away. Contact through email.

 

Offline Kamikaze

  • A Complacent Wind
  • 29
    • http://www.nodewar.com
Start with C. Then maybe C++. Make sure to learn assembly somewhere along the line, if only to understand the C better. If you're into making games for handhelds or the web, Java would actually be useful.
Science alone of all the subjects contains within itself the lesson of the danger of belief in the infallibility of the greatest teachers in the preceding generation . . .Learn from science that you must doubt the experts. As a matter of fact, I can also define science another way: Science is the belief in the ignorance of experts. - Richard Feynman

 

Offline StratComm

  • The POFressor
  • 212
  • Cameron Crazy
    • http://www.geocities.com/cek_83/index.html
Schools these days tend to like the OO approach, so I'd say your best bet is probably C++.  Plus, actually finding a course on C programming will be difficult at best, and the differences really aren't all that great with how far you'll get in a year of coursework.  C is a better foundation to have, but it just may not be possible.
who needs a signature? ;)
It's not much of an excuse for a website, but my stuff can be found here

"Holding the last thread on a page comes with an inherent danger, especially when you are edit-happy with your posts.  For you can easily continue editing in points without ever noticing that someone else could have refuted them." ~Me, on my posting behavior

Last edited by StratComm on 08-23-2027 at 08:34 PM

 
C++ and Java to begin with, then take a look at C#. It's similar to Java in many ways but it's not as 'clean' a language. However, it's very good for getting stuff working quickly.

For games, C++ is still the language of choice and probably will be until computers run Java/.NET bytecode natively. Any language that requires a virtual machine is by definition slower than a language compiled to native machine code, and games need speed.

Knowing Assembly code is very valuable in games programming. Despite the popular view of Assembly as being unnecessarily low-level and complicated, it is still used in games to squeeze more speed out of complex loops. Also, a solid understanding of the hardware and OS helps you write better, faster, more robust code even if you don't actually write any of it in Assembly.

For the record, HTML is not a programming language. It's a markup language. Essentially, making an HTML document is no different from using MS Word. The only real difference is that you have to enclose text in <i></i> instead of Ctrl-I to get italics...
'And anyway, I agree - no sig images means more post, less pictures. It's annoying to sit through 40 different sigs telling about how cool, deadly, or assassin like a person is.' --Unknown Target

"You know what they say about the simplest solution."
"Bill Gates avoids it at every possible opportunity?"
-- Nuke and Colonol Drekker

 

Offline aldo_14

  • Gunnery Control
  • 213
Quote
Originally posted by MicroPsycho
Alright, I finished my second day of school today and Grade 12 Programming was one of my courses. I learned that we will be able to choose a programming language that we would like to learn individually. So my question is this, what is a good/useful/practical language to learn? I want something I can use to code PC games, so nothing like java, html or whatever, as I'll probably learn those in grade 11 anyway.


C/C++ for games.  C in particular is also well suited for learning low level embedded coding (along with something like MIPS assembler; I think the motorola 8-bit chips making up the majority of EmbSys use that-?).

Java is better for mobile applications (distributed systems, mobile code, portable apps, middleware systems) IMO; it's more portable, probably easier to learn, but less optimiseable (I think it's also more of a true OO language than C++, which was an extension of C minus some of the old UNIX specific operators, IIRC).  You can write games in Java (i.e. using the OpenGL or OpenAL bindings), but it's simply not as suited for fast code as C/C++.

 HTML isn't a programming language (and you'd be better off learning XML and the associated standards like XSLT than it anyways, as HTML 4.01 or so is now an XML substandard).

 
I knew html wasn't a true language, but I forgot that it was known as a mark-up language.

I'm starting to learn Java in Grade 11 programming, as I suspected I would.(I'm taking grade 11 and 12 programming at the same time)

It sounds like I should go with C/C++ but what are some other codes used in games so i can check them out?
 
btw, anyone know what Doom 3 is written in?
Derek Smart is his own oxymoron.

 
C++.

Functional languages like Haskell and Prologue aren't used for games because... well... they're just not suitable for it.
Among the remaining languages, modularity, flexibility, simplicity, efficiency, and sheer speed are the primary criteria. C/C++ fulfill these very well and are old enough to be widely known.

Delphi/Pascal is sometimes used for smaller projects, as is BASIC. But larger projects are almost exclusively C/C++.
'And anyway, I agree - no sig images means more post, less pictures. It's annoying to sit through 40 different sigs telling about how cool, deadly, or assassin like a person is.' --Unknown Target

"You know what they say about the simplest solution."
"Bill Gates avoids it at every possible opportunity?"
-- Nuke and Colonol Drekker

 

Offline StratComm

  • The POFressor
  • 212
  • Cameron Crazy
    • http://www.geocities.com/cek_83/index.html
C and its successors (C++/Java/C#, depending on what you want to do with the code) are really the only widely-used programming languages in existance today.  Some people still cling to Visual Basic and other, older languages for the simplicity, but no one considers them decent choices for writing fast programs.
who needs a signature? ;)
It's not much of an excuse for a website, but my stuff can be found here

"Holding the last thread on a page comes with an inherent danger, especially when you are edit-happy with your posts.  For you can easily continue editing in points without ever noticing that someone else could have refuted them." ~Me, on my posting behavior

Last edited by StratComm on 08-23-2027 at 08:34 PM

 

Offline aldo_14

  • Gunnery Control
  • 213
Doom 3 would be C++ and IIRC OpenGL.  I think the sound & physics code is proprietary (rather than, say, OpenAL and Havok).

AFAIK there's no other language widely used in mainstream (i.e. major or even medium scale titles) coding. However, some other languages are used for scripting purposes.

 

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
C/C++

Java is a good learning platform, but its not nearly as powerful or useful.

 

Offline bash

  • 24
>>Java is a good learning platform, but its not nearly as powerful or useful.

:wakka:, that definitly was a good one.

Why does everyone think Java is slow? On low-level and numeric, ist even much faster than C/C++.
« Last Edit: September 08, 2005, 04:37:33 pm by 3064 »

 

Offline aldo_14

  • Gunnery Control
  • 213
Quote
Originally posted by LtNarol
C/C++

Java is a good learning platform, but its not nearly as powerful or useful.


I think that's a little unfair.  It's powerful in different ways; whereas C++ allows access to the underlying hardware, Java has advantages in terms of dynamic code (i.e.  moving programs between different physical machines whilst running).  I certainly wouldn't class Java as a 'learning platform' language; to me that'd be fundamentally misunderstanding the application areas it's most used in.

In fact, I think it'salso  idiotic to characterise the 'usefulness' of any language in that way; it assumes both complete universal knowledge of applications, and of future development channels.

It's also worth noting Java is a far younger language than, say C++; it's still very much in a maturation stage.  Given that it's by nature a higher (abstraction) level language, it's unfair to assume there is no prospect of the languages problems (especially performance wise) being solved.  I think the use of dynamic recompilers and straight up compilation alongside the JIT compiler has already had an impact.  It's also IMO dangerous to assume the more useful abstractions of Java - such as automatic garbage collection and memory re/allocation - make it 'weaker' simply because they remove a programming burden present for C/C++.

It's simple horses for courses.

EDIT; it's also worth noting there is no requirement for an application to be written solely in one language.

 

Offline StratComm

  • The POFressor
  • 212
  • Cameron Crazy
    • http://www.geocities.com/cek_83/index.html
Because we're inately talking about graphical applications here.  Java's dependancy on a virtual machine, no matter how optimized its bytecode is, fails pretty miserably in comparison when making system-dependent calls to graphics packages.  Java is never faster than properly optimized C/C++ either, if just because its garbage collection eats cycles that you could easily avoid with proper memory allocation.

EDIT: One normally doesn't care much about the speed of memory management in a strictly computational, low-level environment, and so it is rarely optimized to that end.  That's where Java's apparent strength lies; it allows you to write more complex non-graphical programs, especially from a beginner perspective, without actually needing to worry about closing up all of your memory leaks.
« Last Edit: September 08, 2005, 04:49:43 pm by 570 »
who needs a signature? ;)
It's not much of an excuse for a website, but my stuff can be found here

"Holding the last thread on a page comes with an inherent danger, especially when you are edit-happy with your posts.  For you can easily continue editing in points without ever noticing that someone else could have refuted them." ~Me, on my posting behavior

Last edited by StratComm on 08-23-2027 at 08:34 PM

 

Offline aldo_14

  • Gunnery Control
  • 213
Quote
Originally posted by StratComm
Because we're inately talking about graphical applications here.  Java's dependancy on a virtual machine, no matter how optimized its bytecode is, fails pretty miserably in comparison when making system-dependent calls to graphics packages.  Java is never faster than properly optimized C/C++ either, if just because of its garbage collection.


But graphical applications are a very small subset of all applications, which is my entire point.  In fact, graphical engines are a subset of the requirements for games, too.

IMO it's probably most valuable in any situation to have an understanding of the design principles rather than a specific language fluency.

Albeit I believe Java graphics performance is signficiantly  improving thanks to DirectX / OpenGL bindings (through several methods IIRC; including direct interface bindings and the Java3d APIs); whether or not it can attain an acceptable performance vis-a-vis C/C++ is a different matter, of course. (The JOGL binding API is unfortunately pretty poorly documented at present, natch, so I'm not sure if direct comparative work has been done)

I would agree that Java is slower, but IMO that would be beside the point - my personal attraction to Java is the portability.  Not so much in terms of moving between different platforms, but in terms of mobile running code.  I think that will be of major use in future, and I'm not sure C++ is as suited - AFAIK all the major mobile agent programs/frameworks use Java (albeit in some cases also a modified VM in order to allow persistant state between transfers).

EDIT; actually, this is interesting.  I'd still venture that C/C++ is more innately optimizable (despite my limited experience in both of those), but I never realised the apparent closeness.

http://www.idiom.com/~zilla/Computer/javaCbenchmark.html
http://www.javaworld.com/javaworld/jw-02-1998/jw-02-jperf_p.html
http://www.tommti-systems.de/go.html?[url]http://www.tommti-systems.de/main-Dateien/reviews/languages/benchmarks.html[/url]

Quote
Originally posted by StratComm

EDIT: One normally doesn't care much about the speed of memory management in a strictly computational, low-level environment, and so it is rarely optimized to that end.  That's where Java's apparent strength lies; it allows you to write more complex non-graphical programs, especially from a beginner perspective, without actually needing to worry about closing up all of your memory leaks.


I'm not sure what you mean.  Obviously the speed of memory management and the efficacy of memory use is critical in low-level situations, particularly with embedded C coding; if you mean that Java isn't suitable for that because it doesn't have an optimizable garbage collection system (i.e. slower), then I agree; I'd always prefer a low level control of memory allocation on sparse or efficiency crucial environments.  

My point is that the lack of garbage collection / pointer tracking responsibilities for the programmer should not be regarded as a 'deficiency' in the usefulness of Java, but a difference.  Same for much of the differences between languages; Java is slow due to an abstraction layer, but it's more - natively - portable in both a static and dynamic sense.   (Obviously you can port C++, but AFAIK you'd have to either make hardware level optimization changes, or ignore that very benefit to make the code portable.  and even if you use libraries to abstract that, there's still the issue of how many platforms all those libraries cover - especially with small mobile systems)
« Last Edit: September 08, 2005, 04:59:39 pm by 181 »