Author Topic: Learning  (Read 11664 times)

0 Members and 1 Guest are viewing this topic.

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.