Author Topic: Learning  (Read 15496 times)

0 Members and 3 Guests are viewing this topic.

Offline mfqr

  • Newbie
  • *
  • Posts: 25
  • I'm new here!
    • View Profile
Learning
« on: September 22, 2005, 05:01:14 pm »
Greetings.

I am trying to learn how to program, namely in C or C++. I was wondering if anyone could point me to the best places to learn.
My apologies if this has been asked over and over.

- mfqr

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Learning
« Reply #1 on: September 22, 2005, 05:29:41 pm »
It is probably the most commonly asked question, but there's reason for that.

I always recommend buying a book to learn programming, math or any other thing that falls into the same general category.  I can't remember off hand the book I started learning with, but I'll try to find it.

Books are, in my opinion, the best way to learn because:
  -- They're published.  They've almost certainly been revised and written with care.
  -- They're more thourough than most internet tutorials.
  -- They're always there.  Websites aren't.
  -- They're usually more step-by-step.

Offline mfqr

  • Newbie
  • *
  • Posts: 25
  • I'm new here!
    • View Profile
Re: Learning
« Reply #2 on: September 22, 2005, 07:33:38 pm »
It is probably the most commonly asked question, but there's reason for that.

I always recommend buying a book to learn programming, math or any other thing that falls into the same general category.  I can't remember off hand the book I started learning with, but I'll try to find it.

Books are, in my opinion, the best way to learn because:
  -- They're published.  They've almost certainly been revised and written with care.
  -- They're more thourough than most internet tutorials.
  -- They're always there.  Websites aren't.
  -- They're usually more step-by-step.

what books do you think I should get?

Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: Learning
« Reply #3 on: September 22, 2005, 08:31:11 pm »
C for Dummies.

Teach Yourself C++ in 21 Days

Code Complete

Rapid Development

Now, the last two books I read well after having programmed for a long time.  But, at the same time, I think they taught me more about programming technique and style than I ever could have learned from anywhere else.  They're probably not a good place to start, but they're great resources once you get the hang of it.

[edit]
Personally, I don't like e-books.  I don't like to have to stare at a computer screen to read, as well as operate the computer.  Plus, when I want to reference something in the book, I either have to have my screen at an obtusely high resolution or task switch.  Not convenient.
« Last Edit: September 22, 2005, 08:33:48 pm by MyndFyre[x86] »
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline Eric

  • Full Member
  • ***
  • Posts: 304
  • I'm new here!
    • View Profile
Re: Learning
« Reply #4 on: September 22, 2005, 08:47:08 pm »
The Complete C Reference & The Complete C++ Reference.

Stay away from anything with "Learn x in y number of days"

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: Learning
« Reply #5 on: September 22, 2005, 09:17:20 pm »
I agree with LoRd (the latter part). I cruised through the first three days in about one day, and then I was lost. =p

As for MyndFyre, I would agree, but I have two screens on JoeMomma (well, thats a high resolution, but eh) so it works fine for me.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Ryan Marcus

  • Cross Platform.
  • Full Member
  • ***
  • Posts: 170
  • I'm Bono.
    • View Profile
    • My Blog
Re: Learning
« Reply #6 on: September 22, 2005, 09:29:32 pm »
You should first figure out if you really want to learn C...

If your on a mac, and your goal is cross-platform, look at REALbasic
If your on a PC, and your goal is cross-platform, look at Java.
If your on a mac, and your goal is mac, look at Cocoa.
If your on PC, and your goal is PC, look at (Go ahead and shot me) Visual Basic/.Net or Java. (Java.)



I really don't honestly understand why anybody would write in C, although I am considered a newb-ish programmer.

My summery: C is hard. I like Jello.
Thanks, Ryan Marcus

Quote
<OG-Trust> I BET YOU GOT A CAR!
<OG-Trust> A JAPANESE CAR!
Quote
deadly: Big blue fatass to the rescue!
496620796F75722072656164696E6720746869732C20796F75722061206E6572642E00

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Learning
« Reply #7 on: September 22, 2005, 09:33:31 pm »
If your on PC, and your goal is PC, look at (Go ahead and shot me) Visual Basic/.Net or Java. (Java.)

* Sidoh shoots Ryan Marcus.

VisualBasic is like the Spanish of the world.  Everyone knows a little bit of it and it's dirty as hell.  (Sorry for the racial comment -- was making a crude attempt at humor).

Java is... Java.  It's not meant for JUST Windows designing.  If your end-goal is to develop programs on a PC platform, there's no way you should chose Java.

.NET is a decent choice, I'd say.  There's definitely a lot of job opportunity with it right now.

C is a great choice, IMO.
« Last Edit: September 22, 2005, 09:37:44 pm by Sidoh »

Offline Ryan Marcus

  • Cross Platform.
  • Full Member
  • ***
  • Posts: 170
  • I'm Bono.
    • View Profile
    • My Blog
Re: Learning
« Reply #8 on: September 22, 2005, 09:36:14 pm »
If your on PC, and your goal is PC, look at (Go ahead and shot me) Visual Basic/.Net or Java. (Java.)

* Sidoh shoots Ryan Marcus.

VisualBasic is like the Spanish of the world.  Everyone knows a little bit of it and it's dirty as hell.  (Sorry for the racial comment -- was making a crude attempt at humor).

Java is... Java.  It's not meant for Windows designing.  If your end-goal is to develop programs on a PC platform, there's no way you should chose Java.

.NET is a decent choice, I'd say.  There's definitely a lot of job opportunity with it right now.

C is a great choice, IMO.

* Ryan falls over dead

Ya.. ok.. What he said is more likely true, because he knows what he is doing on a peecee and I do not... So.. ya... ;)

Sorry to bug you.
Thanks, Ryan Marcus

Quote
<OG-Trust> I BET YOU GOT A CAR!
<OG-Trust> A JAPANESE CAR!
Quote
deadly: Big blue fatass to the rescue!
496620796F75722072656164696E6720746869732C20796F75722061206E6572642E00

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Learning
« Reply #9 on: September 22, 2005, 09:37:19 pm »
It's always better to hear both sides of the argument.  Just because I believe what I say is right, doesn't mean he should too.  I'm just giving my input.  :)

Offline Ryan Marcus

  • Cross Platform.
  • Full Member
  • ***
  • Posts: 170
  • I'm Bono.
    • View Profile
    • My Blog
Re: Learning
« Reply #10 on: September 22, 2005, 09:40:20 pm »
Ya, but my input was wrong :-P

Well, anyway, you should take a look at REALbasic.. Really.
Thanks, Ryan Marcus

Quote
<OG-Trust> I BET YOU GOT A CAR!
<OG-Trust> A JAPANESE CAR!
Quote
deadly: Big blue fatass to the rescue!
496620796F75722072656164696E6720746869732C20796F75722061206E6572642E00

Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: Learning
« Reply #11 on: September 22, 2005, 11:25:17 pm »
Stay away from anything with "Learn x in y number of days"

Generally I'd agree, but the one I posted (one I've used) is pretty damn good.
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: Learning
« Reply #12 on: September 22, 2005, 11:37:33 pm »
Reasons to learn C:
Its fast.
Its been arround forever. There can't possibly be anything broken with it. If there was, it would have been fixed in the 40 (correct me if I'm wrong) years its been arround.
Again, its been arround forever. Many people know it, and there's many compilers for it.
Its cross platform.
I have no experience here, but as iago would say, when you learn it, you know everything else. Except BASIC. Screw BASIC. =p
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Blaze

  • x86
  • Hero Member
  • *****
  • Posts: 7136
  • Canadian
    • View Profile
    • Maide
Re: Learning
« Reply #13 on: September 22, 2005, 11:43:53 pm »
It is not been 40 years...
And like a fool I believed myself, and thought I was somebody else...

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: Learning
« Reply #14 on: September 23, 2005, 12:23:47 am »
It is not been 40 years...

I believe that C was written in the early 70's, which would be around 35 years.  Close enough :P

Anyway, if you want to ever be a real programmer, you have to learn C.  It's good to know it.  You should understand how a computer works before you learn Java or any other abstract language. 

Anyway, I suggest picking up The C Programming Language, by Kernigham and Ritchie.  It was the original book on the subject, and was written by the authors. 

Offline Quik

  • Webmaster Guy
  • x86
  • Hero Member
  • *****
  • Posts: 3262
  • \x51 \x75 \x69 \x6B \x5B \x78 \x38 \x36 \x5D
    • View Profile
Re: Learning
« Reply #15 on: September 23, 2005, 12:46:44 am »
It is not been 40 years...

I believe that C was written in the early 70's, which would be around 35 years. Close enough :P

Anyway, if you want to ever be a real programmer, you have to learn C. It's good to know it. You should understand how a computer works before you learn Java or any other abstract language.

Anyway, I suggest picking up The C Programming Language, by Kernigham and Ritchie. It was the original book on the subject, and was written by the authors.

Yes, but it was written by the authors, and therefore not the greatest guide for those just attempting to _learn_ the language.
Quote
[20:21:13] xar: i was just thinking about the time iago came over here and we made this huge bomb and light up the sky for 6 min
[20:21:15] xar: that was funny

Offline mfqr

  • Newbie
  • *
  • Posts: 25
  • I'm new here!
    • View Profile
Re: Learning
« Reply #16 on: September 23, 2005, 01:23:17 am »
hey guys, I'm deciding to learn C
hopefully it wont be tooooo hard  :P

- mfqr

Offline AntiVirus

  • Legendary
  • x86
  • Hero Member
  • *****
  • Posts: 2521
  • Best
    • View Profile
Re: Learning
« Reply #17 on: September 23, 2005, 04:09:37 pm »
Well, if you ever want to learn C++ I would recommend checking out: www.cplusplus.com just because it's full of neat little things. :) 
The once grove of splendor,
Aforetime crowned by lilac and lily,
Lay now forevermore slender;
And all winds that liven
Silhouette a lone existence;
A leafless oak grasping at eternity.


"They say that I must learn to kill before I can feel safe, but I rather kill myself then turn into their slave."
- The Rasmus

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Learning
« Reply #18 on: September 23, 2005, 04:44:37 pm »
hey guys, I'm deciding to learn C

Good man.  :)

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Learning
« Reply #19 on: September 25, 2005, 09:52:03 am »
There can't possibly be anything broken with it.
There's plenty wrong with it, but good enough programmers can get around the problems.

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: Learning
« Reply #20 on: September 25, 2005, 01:36:00 pm »
There can't possibly be anything broken with it.
There's plenty wrong with it, but good enough programmers can get around the problems.
What, in C, would you consider "broken"? Or are you just arguing to be an asshole?

Offline Ryan Marcus

  • Cross Platform.
  • Full Member
  • ***
  • Posts: 170
  • I'm Bono.
    • View Profile
    • My Blog
Re: Learning
« Reply #21 on: September 25, 2005, 02:04:14 pm »
There can't possibly be anything broken with it.
There's plenty wrong with it, but good enough programmers can get around the problems.
What, in C, would you consider "broken"? Or are you just arguing to be an asshole?

My dad programs mainly in PHP for his job, but he knows a little C... He said:

"There is nothing 'broken' in C. Its the base that everything is built on top of, and its just easier to work with languages that are built 'on top' of C."

Basically, there are shortcuts to C.
Thanks, Ryan Marcus

Quote
<OG-Trust> I BET YOU GOT A CAR!
<OG-Trust> A JAPANESE CAR!
Quote
deadly: Big blue fatass to the rescue!
496620796F75722072656164696E6720746869732C20796F75722061206E6572642E00

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: Learning
« Reply #22 on: September 25, 2005, 02:07:02 pm »
My dad programs mainly in PHP for his job, but he knows a little C... He said:

"There is nothing 'broken' in C. Its the base that everything is built on top of, and its just easier to work with languages that are built 'on top' of C."

Basically, there are shortcuts to C.

It's easier for some things, yes.  But you should still know C.  Not knowing C is like driving a car and not knowing how the engine works.  Sure, you can still drive it, but you don't really understand it.  It's the basis for understanding how everything else works. 

Offline Ryan Marcus

  • Cross Platform.
  • Full Member
  • ***
  • Posts: 170
  • I'm Bono.
    • View Profile
    • My Blog
Re: Learning
« Reply #23 on: September 25, 2005, 02:23:41 pm »
My dad programs mainly in PHP for his job, but he knows a little C... He said:

"There is nothing 'broken' in C. Its the base that everything is built on top of, and its just easier to work with languages that are built 'on top' of C."

Basically, there are shortcuts to C.

It's easier for some things, yes.  But you should still know C.  Not knowing C is like driving a car and not knowing how the engine works.  Sure, you can still drive it, but you don't really understand it.  It's the basis for understanding how everything else works. 

Ya, most people don't know how the engine works.

Its kind of like saying don't use AIM if you don't understand the protocol... It still works, and you still get its full potential.

But programming is not IMing. I agree with you. If you want to get down and dirty, and get to your computers full potential, C sounds good.
Thanks, Ryan Marcus

Quote
<OG-Trust> I BET YOU GOT A CAR!
<OG-Trust> A JAPANESE CAR!
Quote
deadly: Big blue fatass to the rescue!
496620796F75722072656164696E6720746869732C20796F75722061206E6572642E00

Offline drka

  • ffdshow > in_mp3.dll
  • Full Member
  • ***
  • Posts: 330
    • View Profile
Re: Learning
« Reply #24 on: September 26, 2005, 05:54:45 pm »
dirty is for Visual Basic :P

If you want my advice on learning C, make sure to code perfectly. sometimes really sloppy and ugly code can result in memory leaks(mainly with pointers)

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: Learning
« Reply #25 on: September 26, 2005, 06:00:17 pm »
If you want my advice on learning C, make sure to code perfectly. sometimes really sloppy and ugly code can result in memory leaks(mainly with pointers)

Sorry. Hate to break it to you, but if everything was coded "perfectly", we would have no use for patching software.

And by the way, "sloppy and ugly code" that results in "memory leaks" has nearly nothing to do with pointers. (Unless you push the wrong address space in the pointer integer, and point to something wrong, but that isn't a leak. That's more of an overflow than it is a leak.)

Do you know what a memory leak is? Apparently, seeing as how you associated it with pointers, I'd say no.

EDIT -- Did you know THAT good looking code can have memory leaks still?
- Newby
http://www.x86labs.org

Quote
[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Offline drka

  • ffdshow > in_mp3.dll
  • Full Member
  • ***
  • Posts: 330
    • View Profile
Re: Learning
« Reply #26 on: September 26, 2005, 06:01:34 pm »
ooooook. as perfect as can you can make it :P

edit:depends on what causes it :P

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: Learning
« Reply #27 on: September 26, 2005, 06:06:42 pm »
ooooook. as perfect as can you can make it :P

I seriously doubt programmers go into writing a program, thinking to themselves, "Man, I wonder how shitty I can make my coding. I bet I could declare a bunch of useless variables (char Var1[1024], char Var[1024], etc) and set them all to 1024 A's, and go through a lot of loops just to waste time, make my code ugly, and make my code inefficient."

(The message of this is that programmers TRY and make their coding perfect. :P)

I don't know of any. Do you?

edit:depends on what causes it :P

What's "it"?
- Newby
http://www.x86labs.org

Quote
[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: Learning
« Reply #28 on: September 26, 2005, 06:15:59 pm »
Memory leaks are normally caused by poorly structured code.  For example, if you malloc() your variables at the top of a function, then free them at the bottom, that's good; however, if you return in the middle of a function, that's bad.  Returning should only be done at the end, anything else is considered sloppy.  And if you return anywhere else, you could end up with a memory leak (for the reason I said above).  So yeah, sloppy code CAN cause memory leaks. 

Offline mynameistmp

  • Full Member
  • ***
  • Posts: 111
  • Hi! I'm new here!
    • View Profile
Re: Learning
« Reply #29 on: September 27, 2005, 02:53:04 pm »
The Art of UNIX Programming -- Eric S. Raymond
Beginning Linux Programming (I've only seen the 3rd edition) -- Matthew and Stones

The first one is a must read for a unix programmer. These books are more for the guy who's done reading the how-to books and is interested in starting to develop applications. I know that's not what mfqr is looking for but It's obvious he's not the only one with interest in programming that is viewing this thread.

Offline Windowlicker

  • Newbie
  • *
  • Posts: 11
  • I'm new here!
    • View Profile
Re: Learning
« Reply #30 on: September 27, 2005, 05:19:30 pm »
If you want my advice on learning C, make sure to code perfectly. sometimes really sloppy and ugly code can result in memory leaks(mainly with pointers)

Sorry. Hate to break it to you, but if everything was coded "perfectly", we would have no use for patching software.

And by the way, "sloppy and ugly code" that results in "memory leaks" has nearly nothing to do with pointers. (Unless you push the wrong address space in the pointer integer, and point to something wrong, but that isn't a leak. That's more of an overflow than it is a leak.)

Do you know what a memory leak is? Apparently, seeing as how you associated it with pointers, I'd say no.

EDIT -- Did you know THAT good looking code can have memory leaks still?


Indeed. Most of my code never leaks memory, well according to Valgrind at least, but I'd be amazed if it ever passed a checkstyle. What might seem like ugly code to one programmer, could be perfectly acceptable to another. The international obfuscated C code contest comes to mind; I'd argue that the "ugly" source codes in those entries are pieces of art.

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Learning
« Reply #31 on: September 29, 2005, 06:57:57 pm »
There can't possibly be anything broken with it.
There's plenty wrong with it, but good enough programmers can get around the problems.
What, in C, would you consider "broken"? Or are you just arguing to be an asshole?
namespaces, mostly.