homeGeek CultureWebstoreeCards!Forums!Joy of Tech!AY2K!webcam

The Geek Culture Forums


Post New Topic  New Poll  Post A Reply
my profile | directory login | | search | faq | forum home
  next oldest topic   next newest topic
» The Geek Culture Forums   » Other Geeky Stuff   » Ask a Geek!   » Learning programming

 - UBBFriend: Email this page to someone!    
Author Topic: Learning programming
zboy
Mini Geek
Member # 2969

Member Rated:
5
Icon 1 posted May 05, 2005 15:42      Profile for zboy     Send New Private Message       Edit/Delete Post   Reply With Quote 
So I am interested in learning programming. But I am a little lost on where to begin and what I should focus on. Ultimately I would love to learn how to make games, but who knows if that is where I will be in the end.

From what I have gathered I need to learn C++, is that a good beginning or is there a better place to start. I am using a Tiger and started playing with X Code 2.0.

Basically, I am looking for some advice on where to begin. Thanks a bunch.

Posts: 72 | From: A galaxy far, far, away ... | Registered: Sep 2004  |  IP: Logged
GameMaster
BlabberMouth, a Blabber Odyssey
Member # 1173

Member Rated:
4
Icon 1 posted May 05, 2005 21:18      Profile for GameMaster   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
For guides:

the How To Program series by Dietel Dietel is a good intro to whichever language you want to start.

I'd suggest learning with Java, C or even C++. Some people don't think that learning in C or C++ is a good idea, but think that using a real language with real dangers (that is big errors you can make) is best to start with so you learn the dangers as you go.

As far as games are concerned, you'll want to look into OpenGL or someother graphics libraries a little latter, but start with basic programming. Do't be afraid to write text based or simple GUI games, but don't expect to write at Carmack's level right away.

Consume book, code and other resorces. If your an artist or musician, you might consider lending your talents to an exsisting FOSS game to meet the coders (online anyway) and open dialog with them.

Learn where to go to answer your own questions before posting to technical forums. The man pages, the technical specs for the language, the O'Riely books and google should all be on this of places to go before asking a technical community (also search their posts), because most people don't have time to answer the same question 100 times and hate to post answers to things that are easily found with a google. Also, the quick answer on the forum won't give you as much other information -- If you go to a spec site you might see another use of function or application that you had not thought of, but will find useful in the future.

Start building a library of useful functions that aren't in the languages... So you don't have to resolve the same problem over and over.

Start small, and be patient.

--------------------
My Site

Posts: 3038 | From: State of insanity | Registered: Mar 2002  |  IP: Logged
zboy
Mini Geek
Member # 2969

Member Rated:
5
Icon 1 posted May 05, 2005 23:23      Profile for zboy     Send New Private Message       Edit/Delete Post   Reply With Quote 
Thanks, I feel like I am already learning a bunch. I was hoping that starting at C++ was a good idea.
Posts: 72 | From: A galaxy far, far, away ... | Registered: Sep 2004  |  IP: Logged
GameMaster
BlabberMouth, a Blabber Odyssey
Member # 1173

Member Rated:
4
Icon 1 posted May 05, 2005 23:52      Profile for GameMaster   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
There are a lot of pitfalls to C++, but my first programming (excluding toying with basica and qbasic) was in C++. I think if you have the right tools (resources and books), you'll do well.

--------------------
My Site

Posts: 3038 | From: State of insanity | Registered: Mar 2002  |  IP: Logged
drunkennewfiemidget
BlabberMouth, a Blabber Odyssey
Member # 2814

Member Rated:
4
Icon 1 posted May 06, 2005 05:05      Profile for drunkennewfiemidget     Send New Private Message       Edit/Delete Post   Reply With Quote 
I'd suggest starting with plain vanilla C. But that's personal bias because I hate C++. But GM makes a good point in saying that learning a real language with real pitfalls (controlling your own memory) is a good way to start. That way, just about any language (with the exception of assembly) will come rather easily to you. Assembly takes some real fun to pound into your head.
Posts: 4897 | From: Cambridge, ON, Canada | Registered: Jun 2004  |  IP: Logged
Orpheus
Highlie
Member # 2397

Member Rated:
3
Icon 1 posted May 06, 2005 08:34      Profile for Orpheus     Send New Private Message       Edit/Delete Post   Reply With Quote 
My school started everyone off in C++ (and as a result everyone grew to hate Turbo C++) because the syntax is very similar to many other languages. Later we got to use the *nix machines and I fell in love with C. I think C++ is definitely a good place to start and if you need a good reference book I liked this one
And for C, this is an excellent book to read at any level The C Programming Language.

Good luck, before you know it you'll have down all the basics and you'll get to write your first Perl script [Happytears]

--------------------
my cats make me crazy

Posts: 554 | From: Galveston, TX | Registered: Oct 2003  |  IP: Logged
Stereo

Solid Nitrozanium SuperFan!
Member # 748

Member Rated:
5
Icon 1 posted May 06, 2005 08:43      Profile for Stereo     Send New Private Message       Edit/Delete Post   Reply With Quote 
If you learn coding on a Mac, I suggest Java or Obective-C over C++. True, C++ is widely used, but the Mac has a better support for Java and Objective-C, the latter being the main language of NextOS, from wich OS X is build. And, BTW, I found O-C being very easy to work with.

I'll go against DNM and discourage starting with a structured language if you want to do objects at some point. It can be hard to unlearn structured programming techniques to do good OO programming. (I am still battling some bad usage - thought it's mostly because I don't do much OOP these days.)

I would also recommend getting an ADC membership - students is 99US$ a year and you get all the developper CDs, a web-only memebership is free, but you still have access to the Apple's developer site and most resources. IIRC, there are some tutorial there, so you may want to take a look.

Have fun!

--------------------
Eppur, si muove!

Galileo Galilei

Posts: 2289 | From: Gatineau, Quebec, Canada | Registered: Apr 2001  |  IP: Logged
zboy
Mini Geek
Member # 2969

Member Rated:
5
Icon 1 posted May 06, 2005 15:18      Profile for zboy     Send New Private Message       Edit/Delete Post   Reply With Quote 
Thanks for the advice guys. I'm currently going through 2 tutorials. One is C++ for Dummies, and the other is http://www.cprogramming.com/tutorial.html. Both seem to be helping me out quite a bit.
Posts: 72 | From: A galaxy far, far, away ... | Registered: Sep 2004  |  IP: Logged
nerdwithnofriends
Uber Geek
Member # 3773

Icon 1 posted May 06, 2005 21:03      Profile for nerdwithnofriends     Send New Private Message       Edit/Delete Post   Reply With Quote 
whatever language you choose, be sure to learn the standard library first and proprietary stuff later, and get comfortable using a screen editor (learn vim, it's the best) and a command-line compiler. For C/C++, this means learning how to use the gcc suite (gcc and g++). For Java, there's two different ways to go: on apple machines, you use the javac compiler and the java command for runtime. On many (but not all) linux machines, the compiler for java is called gcj and it produces native executables (I think; other geeks correct me if i'm wrong). The reason I mention learning the tools and the standard library is that at some point you're going to want to start doing stuff that will run on more than just a macintosh, so now is as good a time as ever to develop good habits.

--------------------
"The Buddha, the Godhead, resides quite as comfortably in the circuits of a digital computer or the gears of a cycle transmission as he does at the top of a mountain or in the petals of a flower." - Robert M. Pirsig

Posts: 948 | Registered: Mar 2005  |  IP: Logged
Brother Dysk
Geek Larva
Member # 3777

Rate Member
Icon 1 posted May 07, 2005 07:42      Profile for Brother Dysk     Send New Private Message       Edit/Delete Post   Reply With Quote 
One thing though, especially if you're starting off with C(++) - do not start off coding and compiling on a windows box! This cannot be stressed enough! Somewhere along the line, you'll pick up the habit of using some proprietary Windows library, and that'll be it! You'll never write easily portable code again, without a lot of hassle. Start off on a BSD, Plan9, or Linux. Any open-source OS really (so I guess you could use ReactOS or Haiku [Razz] ).

You'll thank me if you ever do codoing professionally - you'd be able to release your games on any and all mature platforms simultaneously, and without extra expense (just recompile on that platform, after changing some (few) interfacing commands).

Posts: 25 | From: Hong Kong | Registered: Apr 2005  |  IP: Logged
chromatic
Geek
Member # 164

Member Rated:
5
Icon 3 posted May 07, 2005 09:52      Profile for chromatic   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
Hm, I think C++ is a difficult language to start. If you have a chance, try Python for an afternoon or two. (I'm not a big Python fan, but it's much easier to start than C++ and people really do use it in professional, commercial games.)
Posts: 223 | From: Squeaky First Geek House | Registered: Jan 2000  |  IP: Logged
Brother Dysk
Geek Larva
Member # 3777

Rate Member
Icon 1 posted May 07, 2005 18:23      Profile for Brother Dysk     Send New Private Message       Edit/Delete Post   Reply With Quote 
I'd say, once you've spent a few weeks with C(++), then go back and take a look at Python or Ruby (avoid Perl - it is the Devil!), and you'll be amazed at how simple, yet powerful it is (again, if you're on a UNIX box, more so, with shell scripts and all).
Posts: 25 | From: Hong Kong | Registered: Apr 2005  |  IP: Logged
Ivan
Alpha Geek
Member # 2622

Member Rated:
3
Icon 1 posted May 07, 2005 19:00      Profile for Ivan   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
I just started python last weekend, and I must say it's exceptionally easy to learn and quite fun.

The code is usually 2/3 of a C++ program, but it does run marginally slower. But at a non-professional level, this is pretty much a non-issue.

Posts: 269 | From: North Carolina | Registered: Mar 2004  |  IP: Logged
Koboldskind
Geek-in-Training
Member # 3849

Member Rated:
5
Icon 1 posted May 08, 2005 04:09      Profile for Koboldskind     Send New Private Message       Edit/Delete Post   Reply With Quote 
quote:
Originally posted by Ivan:
I just started python last weekend, and I must say it's exceptionally easy to learn and quite fun.

The code is usually 2/3 of a C++ program, but it does run marginally slower. But at a non-professional level, this is pretty much a non-issue.

Speed is not that much of an issue since lots of project mix C(++) code for areas where speed is important (graphics engine etc.) and Python/Ruby/WhateverScript (TM by me) for the game/business logic parts because they can be changed on the fly without rebuilding and are easier to maintain. Using that approach, there probably is no more than 25% C in an app

--------------------
In the Beginning, there was nothing, which exploded ...

Posts: 36 | From: Germany | Registered: Apr 2005  |  IP: Logged
Brother Dysk
Geek Larva
Member # 3777

Rate Member
Icon 1 posted May 08, 2005 04:25      Profile for Brother Dysk     Send New Private Message       Edit/Delete Post   Reply With Quote 
They use C for the speed-critical parts these days? Heh, remember Doom? That was C for the luxurious speed-is-not-an-issue-but-ease-of-coding-is bits, and assembly for the speed-critical bits.

Does that mean that in 10 years, the newer programming languages will resemble standard English, and be so insanely high-level that we'll have to fall back on Ruby/Python/Perl/Whateverscript for speed-critical calls? [Razz]

Posts: 25 | From: Hong Kong | Registered: Apr 2005  |  IP: Logged
Koboldskind
Geek-in-Training
Member # 3849

Member Rated:
5
Icon 1 posted May 08, 2005 07:15      Profile for Koboldskind     Send New Private Message       Edit/Delete Post   Reply With Quote 
I suspect they will Brother, language processing is getting better all the time. If the same is true for compilers, we won't even have to resort to anything for speed-critical calls because everything will be optimized either at compile-time or even at run-time, perfectly adapted to the users computer. Suns HotSpot technology is a step in that direction, and i'm sure there's more to come.

--------------------
In the Beginning, there was nothing, which exploded ...

Posts: 36 | From: Germany | Registered: Apr 2005  |  IP: Logged
spungo
BlabberMouth, a Blabber Odyssey
Member # 1089

Member Rated:
4
Icon 1 posted May 08, 2005 07:16      Profile for spungo     Send New Private Message       Edit/Delete Post   Reply With Quote 
quote:
Originally posted by Brother Dysk:
Does that mean that in 10 years, the newer programming languages will resemble standard English, and be so insanely high-level that we'll have to fall back on Ruby/Python/Perl/Whateverscript for speed-critical calls? [Razz]

Well, that presumes that any higher-level abstraction necessarily slows things down; if they are well-designed they may only result in greater convenience. It depends entirely on how you write it.

--------------------
Shameless plug. (Please forgive me.)

Posts: 6529 | From: Noba Scoba | Registered: Jan 2002  |  IP: Logged
maximile

SuperFan!
Member # 3446

Member Rated:
5
Icon 1 posted May 08, 2005 14:41      Profile for maximile   Author's Homepage     Send New Private Message       Edit/Delete Post   Reply With Quote 
Happy coincidence: MacZealots have an article that might help you. (Although it seems that you've already found some suitable tutorials).

Tell us if you get anywhere. Every now and then I try to pick up some Objective-C, but I always end up sneaking back to my favourite BASIC interpreter... [blush]

Posts: 1085 | From: London, UK (Powys, UK in hols) | Registered: Feb 2005  |  IP: Logged
The Famous Druid

Gold Hearted SuperFan!
Member # 1769

Member Rated:
4
Icon 1 posted May 08, 2005 15:24      Profile for The Famous Druid     Send New Private Message       Edit/Delete Post   Reply With Quote 
quote:
Originally posted by Brother Dysk:
They use C for the speed-critical parts these days? Heh, remember Doom? That was C for the luxurious speed-is-not-an-issue-but-ease-of-coding-is bits, and assembly for the speed-critical bits.

Does that mean that in 10 years, the newer programming languages will resemble standard English, and be so insanely high-level that we'll have to fall back on Ruby/Python/Perl/Whateverscript for speed-critical calls? [Razz]

Compiler code-generation has improved greatly in the last decade or so. Many of the little speedup tricks I learned as a larval programmer (use i<<=1; instead of i*=2; to use a 'fast' shift instead of a 'slow' multiply) no longer apply, the compiler is smart enough to work those things out for itself.

In fact, unless you're an ASM guru, with a deep understanding of how the instruction decode and scheduling on the chip works, you'll probably find that the compiler generated code is faster than your hand-crafted assembler.

--------------------
If you watch 'The History Of NASA' backwards, it's about a space agency that has no manned spaceflight capability, then does low-orbit flights, then lands on the Moon.

Posts: 10669 | From: Melbourne, Australia | Registered: Oct 2002  |  IP: Logged
Zargof McBain
Mini Geek
Member # 3856

Member Rated:
1
Icon 1 posted May 08, 2005 16:16      Profile for Zargof McBain     Send New Private Message       Edit/Delete Post   Reply With Quote 
quote:
Originally posted by The Famous Druid:
Compiler code-generation has improved greatly in the last decade or so. Many of the little speedup tricks I learned as a larval programmer (use i<<=1; instead of i*=2; to use a 'fast' shift instead of a 'slow' multiply) no longer apply, the compiler is smart enough to work those things out for itself.

In fact, unless you're an ASM guru, with a deep understanding of how the instruction decode and scheduling on the chip works, you'll probably find that the compiler generated code is faster than your hand-crafted assembler.

The other problem with writing low level code such as assembler is portability. As soon as you start using instructions that are only available on certain chipsets you are limiting your audience.

And as you say these days it's unlikely that you'll be able write code that is quicker than what an optimising compiler would produce.

--------------------
Smile. It makes people wonder what you're thinking

Posts: 75 | From: A dark place | Registered: Apr 2005  |  IP: Logged
zboy
Mini Geek
Member # 2969

Member Rated:
5
Icon 1 posted May 08, 2005 16:52      Profile for zboy     Send New Private Message       Edit/Delete Post   Reply With Quote 
I am currently using X Code 2.0, is that a good compiler to use. It came bundled with Tiger? If not, is there a better one that I should be using?
Posts: 72 | From: A galaxy far, far, away ... | Registered: Sep 2004  |  IP: Logged
zboy
Mini Geek
Member # 2969

Member Rated:
5
Icon 1 posted May 08, 2005 16:57      Profile for zboy     Send New Private Message       Edit/Delete Post   Reply With Quote 
quote:
Originally posted by maximile:
Happy coincidence: MacZealots have an article that might help you. (Although it seems that you've already found some suitable tutorials).

Tell us if you get anywhere. Every now and then I try to pick up some Objective-C, but I always end up sneaking back to my favourite BASIC interpreter... [blush]

Thanks for the article, very interesting and helpful. Funny thing, when I was in middle school, our entire district bought NExt computers. Not really important, but it was mentioned in the article.
Posts: 72 | From: A galaxy far, far, away ... | Registered: Sep 2004  |  IP: Logged
Brother Dysk
Geek Larva
Member # 3777

Rate Member
Icon 1 posted May 09, 2005 06:25      Profile for Brother Dysk     Send New Private Message       Edit/Delete Post   Reply With Quote 
Well, I never presumed that higher level and abstraction went hand in hand - I was just extrapolating a historical trend.

Honestly though, for speed critical stuff, I think we'd still be falling back to code you actually compile, rather than most scripting languages.

Posts: 25 | From: Hong Kong | Registered: Apr 2005  |  IP: Logged
Koboldskind
Geek-in-Training
Member # 3849

Member Rated:
5
Icon 1 posted May 09, 2005 12:59      Profile for Koboldskind     Send New Private Message       Edit/Delete Post   Reply With Quote 
quote:
Originally posted by Brother Dysk:
Well, I never presumed that higher level and abstraction went hand in hand - I was just extrapolating a historical trend.

Honestly though, for speed critical stuff, I think we'd still be falling back to code you actually compile, rather than most scripting languages.

Partially true, i think. Using JIT-Compilers, it's possible to have the benefits of scripts (high abstraction, portability) combined with the speed of native code - if the compiler is good, that is. Code would be compiled, but not all of it, and only while the script is running, not as a separate step.

--------------------
In the Beginning, there was nothing, which exploded ...

Posts: 36 | From: Germany | Registered: Apr 2005  |  IP: Logged
chenjen
Single Celled Newbie
Member # 3946

Icon 1 posted May 13, 2005 16:53      Profile for chenjen     Send New Private Message       Edit/Delete Post   Reply With Quote 
quote:

Does that mean that in 10 years, the newer programming languages will resemble standard English, and be so insanely high-level that we'll have to fall back on Ruby/Python/Perl/Whateverscript for speed-critical calls? [Razz]

For a wonderful programming language close to English look at Prolog,cf eg cs.wwc.edu/~cs_dept/KU/PR/Prolog.html
Posts: 2 | Registered: May 2005  |  IP: Logged


All times are Eastern Time  
Post New Topic  New Poll  Post A Reply Close Topic    Move Topic    Delete Topic next oldest topic   next newest topic
 - Printer-friendly view of this topic
Hop To:

Contact Us | Geek Culture Home Page

2015 Geek Culture

Powered by Infopop Corporation
UBB.classicTM 6.4.0



homeGeek CultureWebstoreeCards!Forums!Joy of Tech!AY2K!webcam