Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Self-taught C

Reply
Thread Tools

Self-taught C

 
 
Stefan Ram
Guest
Posts: n/a
 
      02-07-2012
Sleepy Duke <(E-Mail Removed)> writes:
>What are the best methods you all have found for teaching
>yourselves how to code proficiently in C?


Reading C books (including the C specification), Reading
books on software engineering (not C specific), Reading and
porting code (e.g., C code from other systems to the Amiga
or from other languages to C), writing C code, talking with
friends about C, Reading the C source code of a computer
game while playing it to find the tricks (how to play and
win), and giving C classes (my next C class starts this
thursday [the day after tomorrow] in Berlin; it's a real
C class [not a C++ class]).

--
Stefan Ram http://www.purl.org/stefan_ram/
Programmierkurse http://www.purl.org/stefan_ram/pub/berlin-kurs

 
Reply With Quote
 
 
 
 
notbob
Guest
Posts: n/a
 
      02-07-2012
On 2012-02-03, Sleepy Duke <(E-Mail Removed)> wrote:

> What are the best methods you all have found for teaching yourselves
> how to code proficiently in C?



There are good beginning tutorials online. Here's a few:
http://how-to.linuxcareer.com/c-deve...x-introduction
http://www.cprogramming.com/tutorial/c-tutorial.html
http://www.codingunit.com/the-history-of-the-c-language

Chew on these till you milk them dry, then look for some books. Read
the reviews on Amazon. If you have a B&N or good library, go there
and read 'em before buying. I once bought a C book that was highly
recommended and was not happy with it.

As another poster recommended, learn with a goal in mind. Excellent
advice. I've dabbled unsuccessfully in coding for yrs and never
really learned anything cuz I never had a reason. I've recently
discovered arduino hobby electronics, a hands-on fun end to my means.
It can be done in C. I think this stuff is a hoot and it got me back
into learning programming. Some examples:

http://ardrone.parrot.com/parrot-ar-drone/usa/

http://www.adafruit.com/products/170

http://www.adafruit.com/products/332 (watch the belt video)

http://tinyurl.com/7p886h5

This is all stuff that can be done with Arduino electronics and C
coding. I'll never get to the point of those amazing formation flying
q-copters, but it fires one's imagination and provides inspiration.

Oh! .....also learn code debugging as you go. Nothing is more
discouraging than debugging bad code, so learn how early.

notbob --geezer learning C way too late, but still trying

--
Fight internet CENSORSHIP - Fight SOPA-PIPA
Contact your congressman and/or representative, now!
http://projects.propublica.org/sopa/
vi --the heart of evil!
 
Reply With Quote
 
 
 
 
Barry Schwarz
Guest
Posts: n/a
 
      02-07-2012
On 7 Feb 2012 14:29:21 GMT, notbob <(E-Mail Removed)> wrote:

>On 2012-02-03, Sleepy Duke <(E-Mail Removed)> wrote:
>
>> What are the best methods you all have found for teaching yourselves
>> how to code proficiently in C?

>
>
>There are good beginning tutorials online. Here's a few:
>http://how-to.linuxcareer.com/c-deve...x-introduction


This one has some really confusing examples (e.g., the discussion
regarding the ++ operator).

The discussion of pointers has major errors such as:

Next, we dereference ptoi, meaning we say "stop pointing to x and
start pointing to y".

and

when working with arrays, you don't have to use pointers, but it's
nice to do so, because operations will be faster,

and

Another important aspect is that any character array in C ends with
the null character

and it gets worse.

--
Remove del for email
 
Reply With Quote
 
notbob
Guest
Posts: n/a
 
      02-07-2012
On 2012-02-07, Barry Schwarz <(E-Mail Removed)> wrote:

> The discussion of pointers has major errors such as:


That's why I provided several sites. I've taken formal college C
programming classes twice and have yet to encounter a single learning
method that isn't flawed, somehow. If not blatant mistakes, then
outright omissions, like I will somehow absorb the correct approach
and/or code syntax by magic. One teacher used both C and C++ code as
if they were the same. Similar experiences with 2 books I've bought.
I've discovered having several sources for the same info usually
provides the answer, if only by consensus.

nb

--
Fight internet CENSORSHIP - Fight SOPA-PIPA
Contact your congressman and/or representative, now!
http://projects.propublica.org/sopa/
vi --the heart of evil!
 
Reply With Quote
 
Stefan Ram
Guest
Posts: n/a
 
      02-07-2012
notbob <(E-Mail Removed)> writes:
>method that isn't flawed, somehow. If not blatant mistakes, then
>outright omissions,


Some omissions are necessary in teaching, mistakes are not.

 
Reply With Quote
 
notbob
Guest
Posts: n/a
 
      02-07-2012
On 2012-02-07, Stefan Ram <(E-Mail Removed)-berlin.de> wrote:

> Some omissions are necessary in teaching, mistakes are not.


......and of course, in the interest of "teaching", you are going to
omit what those "necessary" omissions might be and why.

Balderdash!

nb

--
Fight internet CENSORSHIP - Fight SOPA-PIPA
Contact your congressman and/or representative, now!
http://projects.propublica.org/sopa/
vi --the heart of evil!
 
Reply With Quote
 
Jorgen Grahn
Guest
Posts: n/a
 
      02-07-2012
On Tue, 2012-02-07, Nick Keighley wrote:
> On Feb 7, 9:26*am, Fritz Wuehler
> <(E-Mail Removed)> wrote:
>> > > It'll help to have a project or something that you want to accomplish,
>> > > and work htowards that goal.

>>
>> > I think that's the most important single advice that can be given.

>>
>> Agreed. But working at a support role where you have to read lots of code
>> and fix it is even better than that and along with it, you'll have it all.

>
> dunno, being a maintenance programmer on a nasty pile of code can be a
> dispiriting experience. I wouldn't suggest i was necessarily a good
> way to learn.


Still, IMO you need to work with (within) bad code to really learn C.
It teaches you how easy it is to end up in a mess, a few ways to get
there, and debugging/refactoring techniques.

And writing your own, fresh code can feel like a luxury afterwards

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
 
Reply With Quote
 
JohnF
Guest
Posts: n/a
 
      02-08-2012
> Fritz Wuehler <(E-Mail Removed)> wrote:
>> Joe Pfeiffer <(E-Mail Removed)>
>> > gwowen <(E-Mail Removed)> writes:
>> >> Nick Keighley <(E-Mail Removed)> wrote:
>> >> > Sleepy Duke <(E-Mail Removed)> wrote:
>> >> >
>> >> > What are the best methods you all have found for
>> >> > teaching yourselves how to code proficiently in C?
>> >>
>> >> write lots of code.
>> >
>> > It'll help to have a project or something that you want
>> > to accomplish, and work towards that goal.

>>
>> I think that's the most important single advice that can be given.

>
> Agreed.


Ditto. That's the ticket. But conjuring up the functional specs
for an interesting, doable (in this case easily doable) project
is a skill in itself, in fact a job title in itself. Most entry
level books I've seen sacrifice the "interesting" in favor of
the "easily doable", which I guess is a necessary tradeoff.
Maybe there's some site with a collection of little learning
projects that's both, though I don't know of one. That would
be a nice idea in itself, probably largely language agnostic
(i.e., not C specific).

> But working at a support role where you have to read lots of code
> and fix it is even better than that and along with it,
> you'll have it all.


That's a different mindset and a somewhat different skill.
Some people can do one and not the other: some just can't
seem to get going with nothing but a blank sheet of paper,
while others can't seem to dive into the middle of a pile
of existing code. Programmers need both skills in spades,
but you want to learn (as the op does) with writing your
own code, expressing your own thinking in your own style.
So, like "gwowen" first suggested, get yourself a project.
--
John Forkosh ( mailto: http://www.velocityreviews.com/forums/(E-Mail Removed) where j=john and f=forkosh )
 
Reply With Quote
 
Rui Maciel
Guest
Posts: n/a
 
      02-08-2012
Nick Keighley wrote:

> write lots of code.
>
> the best way I found was already knowing anothe couple of programming
> languages, but this probably doesn't help...


I would also add participating in public forums dedicated to the programming
language, such as comp.lang.c, and also forums dedicated to specific
platforms, such as comp.unix.programmer. Getting our hands dirty may be the
best learning experience that we can have, but being exposed to the
experiences that others had/are having will also contributes greatly to our
own progress.

Plus, when we stumble on a problem we might benefit from having a community
willing to help us out on it. Conversely, we may help others with their
problems, and in the process learn a bit more from it.

In short, we may do all our learning alone, but being a part of a community
dedicated to a specific subject also helps a lot.


Rui Maciel
 
Reply With Quote
 
Jorgen Grahn
Guest
Posts: n/a
 
      02-08-2012
On Sat, 2012-02-04, Malcolm McLean wrote:
> On Feb 3, 5:24*pm, Sleepy Duke <(E-Mail Removed)> wrote:
>> What are the best methods you all have found for teaching yourselves how to code proficiently in C?
>>

> Basically do it.
>
> If you're sitting in a bedroom on your own, the most likely thing
> you'll want to code is a game. So get graphics working as fast as you
> can. It's harder now than it was to get a simple character-based
> raster that can be used for moving space invaders round the screen.


It's still easy on Unix, where you have the curses library.

{{Unix bigot mode|
Unix in general makes it easier to write programs which are small and
have a simple interface, yet are useful. I haven't tried it, but I
imagine the threshold is much higher on Windows.}}

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments