News:

Wieners, Brats, Franks, we've got 'em all.

Main Menu

Learning

Started by mfqr, September 22, 2005, 05:01:14 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Quik

Quote from: iago on September 23, 2005, 12:23:47 AM
Quote from: Blaze on September 22, 2005, 11:43:53 PM
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

mfqr

hey guys, I'm deciding to learn C
hopefully it wont be tooooo hard  :P

- mfqr

AntiVirus

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

Sidoh


rabbit

Quote from: Joe[e2] on September 22, 2005, 11:37:33 PMThere can't possibly be anything broken with it.
There's plenty wrong with it, but good enough programmers can get around the problems.

iago

Quote from: rabbit on September 25, 2005, 09:52:03 AM
Quote from: Joe[e2] on September 22, 2005, 11:37:33 PMThere 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?

Ryan Marcus

Quote from: iago on September 25, 2005, 01:36:00 PM
Quote from: rabbit on September 25, 2005, 09:52:03 AM
Quote from: Joe[e2] on September 22, 2005, 11:37:33 PMThere 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

iago

Quote from: Ryan Marcus on September 25, 2005, 02:04:14 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. 

Ryan Marcus

Quote from: iago on September 25, 2005, 02:07:02 PM
Quote from: Ryan Marcus on September 25, 2005, 02:04:14 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

drka

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)

Newby

Quote from: Mangix on September 26, 2005, 05:54:45 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

Quote from: Rule on June 30, 2008, 01:13:20 PM
Quote from: CrAz3D on June 30, 2008, 10:38:22 AM
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. 

drka

ooooook. as perfect as can you can make it :P

edit:depends on what causes it :P

Newby

Quote from: Mangix on September 26, 2005, 06:01:34 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?

Quote from: Mangix on September 26, 2005, 06:01:34 PM
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

Quote from: Rule on June 30, 2008, 01:13:20 PM
Quote from: CrAz3D on June 30, 2008, 10:38:22 AM
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. 

iago

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. 

mynameistmp

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.