Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Learning C

Reply
Thread Tools

Learning C

 
 
Richard G. Riley
Guest
Posts: n/a
 
      03-10-2006
"Nick"posted the following on 2006-03-10:

> Richard G. Riley wrote:
>> "(E-Mail Removed)"posted the following on 2006-03-10:

>
>> > Thanks alot for the response, a few minutes after posting I searched
>> > this group and found hundreds of other threads about the same topic. I
>> > apoligize as well for double posting, that was a mistake even though
>> > I'm sure it must look like I tryed to bump my thread.
>> >
>> > I wanted as well, to bring forth another concern that I have with
>> > programming in general. Many people say that ACTUALLY PROGRAMMING
>> > real-world programs is the best way to get better. That theory makes
>> > sense, but when I sit down to write a program in java, I often realize
>> > that I have mastered the sytnax and searching and sorting algorithms,
>> > yet I cannot apply this to a real-world program. Are there any books
>> > for C or websites that explain the analytical thinking or other tactics
>> > involved in practical uses of C?

>>
>> One great way is to analyse existing systems. You mentioned moving to
>> Linux : this is a great idea because you can compile and step through
>> existing apps with the debugger.

>
> could we keep the platform bigotry down to a dull roar? Windows has
> perfectly good debuggers available as well. So if you really want to
> (I've never had the urge) you can "step through existing apps".


No you cant. Firstly, I use multiple OSs : windows, OS/2 and Linux so
get away with your attempt to suggest this is an OS war bigotry.

Secondly, what system apps are you aware of in windows which come with
the C source code? Most are in C++ anyway. Most Gnome/Linux system is
in C. The OP was asking about C.

>
> I've developed serious applications on both Linux and Windows. They are
>
> both perfectly adequate. It is completly possible to develop
> applications


Agreed. But see source comments above.

> on windows. For heavens sake Windows was *written* in C!



--
"A desk is a dangerous place from which to view the world" - LeCarre.
 
Reply With Quote
 
 
 
 
Nick Keighley
Guest
Posts: n/a
 
      03-10-2006

Richard G. Riley wrote:
> "Nick"posted the following on 2006-03-10:
>
> > Richard G. Riley wrote:
> >> "(E-Mail Removed)"posted the following on 2006-03-10:

> >
> >> > Thanks alot for the response, a few minutes after posting I searched
> >> > this group and found hundreds of other threads about the same topic. I
> >> > apoligize as well for double posting, that was a mistake even though
> >> > I'm sure it must look like I tryed to bump my thread.
> >> >
> >> > I wanted as well, to bring forth another concern that I have with
> >> > programming in general. Many people say that ACTUALLY PROGRAMMING
> >> > real-world programs is the best way to get better. That theory makes
> >> > sense, but when I sit down to write a program in java, I often realize
> >> > that I have mastered the sytnax and searching and sorting algorithms,
> >> > yet I cannot apply this to a real-world program. Are there any books
> >> > for C or websites that explain the analytical thinking or other tactics
> >> > involved in practical uses of C?
> >>
> >> One great way is to analyse existing systems. You mentioned moving to
> >> Linux : this is a great idea because you can compile and step through
> >> existing apps with the debugger.

> >
> > could we keep the platform bigotry down to a dull roar? Windows has
> > perfectly good debuggers available as well. So if you really want to
> > (I've never had the urge) you can "step through existing apps".

>
> No you cant. Firstly, I use multiple OSs : windows, OS/2 and Linux so
> get away with your attempt to suggest this is an OS war bigotry.
>
> Secondly, what system apps are you aware of in windows which come with
> the C source code? Most are in C++ anyway. Most Gnome/Linux system is
> in C. The OP was asking about C.


I thought you were implying Linux was better because the *debugger* was

better. I've never stepped through an existing application (that wasn't
broken)
with a debugger. If you say it's a good way to learn C, who am I to
argue.

But it *still* sounds bizzare to me

<snip>


--
Nick Keighley

 
Reply With Quote
 
 
 
 
Richard G. Riley
Guest
Posts: n/a
 
      03-10-2006
"Nick"posted the following on 2006-03-10:

>
> I thought you were implying Linux was better because the *debugger* was
>


There is no "the debugger" : although gdb is prevalent in Linux -
albeit with several front ends.

> better. I've never stepped through an existing application (that wasn't
> broken)
> with a debugger. If you say it's a good way to learn C, who am I to
> argue.


I said its one way to get used to the structure and flow of
applications which is what he wants. Also, I do think a debugger can
give real insight into how C works in the real world : results of
operators there for you to see with no overhead of printfs which some favor.

>
> But it *still* sounds bizzare to me
>


What does? Are we talking about the same thing? Do you doubt that
watching other, well written apps work is beneficial to a newbie? It
seems fairly clear to me that it can only help. Its how the entire
Open SW system works : people learning by doing and picking up on
other peoples work.

><snip>
>
>



--
"A desk is a dangerous place from which to view the world" - LeCarre.
 
Reply With Quote
 
Chris Dollin
Guest
Posts: n/a
 
      03-10-2006
Richard G. Riley wrote:

> "Nick"posted the following on 2006-03-10:


>> I thought you were implying Linux was better because the *debugger* was


>
> There is no "the debugger" : although gdb is prevalent in Linux -
> albeit with several front ends.
>
>> better. I've never stepped through an existing application (that wasn't
>> broken)
>> with a debugger. If you say it's a good way to learn C, who am I to
>> argue.

>
> I said its one way to get used to the structure and flow of
> applications which is what he wants. Also, I do think a debugger can
> give real insight into how C works in the real world : results of
> operators there for you to see with no overhead of printfs which some
> favor.


The printf's are portable. The printf's work without manual intervention.
The printfs work without having to understand an additional tool.

>> But it *still* sounds bizzare to me
>>

>
> What does? Are we talking about the same thing? Do you doubt that
> watching other, well written apps work is beneficial to a newbie? It
> seems fairly clear to me that it can only help. Its how the entire
> Open SW system works : people learning by doing and picking up on
> other peoples work.


You've conflated "learning by doing and picking up on> other peoples work"
with "watching ... apps work" and that with stepping through an application
using a debugger. I think that's misleading.

--
Chris "sparqling" Dollin
"Who do you serve, and who do you trust?"
 
Reply With Quote
 
Richard G. Riley
Guest
Posts: n/a
 
      03-10-2006
"Chris"posted the following on 2006-03-10:

> Richard G. Riley wrote:
>
>> "Nick"posted the following on 2006-03-10:

>
>>> I thought you were implying Linux was better because the *debugger* was

>
>>
>> There is no "the debugger" : although gdb is prevalent in Linux -
>> albeit with several front ends.
>>
>>> better. I've never stepped through an existing application (that wasn't
>>> broken)
>>> with a debugger. If you say it's a good way to learn C, who am I to
>>> argue.

>>
>> I said its one way to get used to the structure and flow of
>> applications which is what he wants. Also, I do think a debugger can
>> give real insight into how C works in the real world : results of
>> operators there for you to see with no overhead of printfs which some
>> favor.

>
> The printf's are portable. The printf's work without manual
>intervention.


No they dont : you have to insert them in the code. But thats being
petty. Its rare that I find someone wanting their printfs to be
portable in a system process or a an X gui or a Win 32 winproc : they
dont work. Home grown or system supplied logging libraries possibly :
but can you really analyse them at run time? I cant : I like to step
through and see the flow of the app to get a feel for how the systems
heart is beating.

> The printfs work without having to understand an additional tool.
>
>>> But it *still* sounds bizzare to me
>>>

>>
>> What does? Are we talking about the same thing? Do you doubt that
>> watching other, well written apps work is beneficial to a newbie? It
>> seems fairly clear to me that it can only help. Its how the entire
>> Open SW system works : people learning by doing and picking up on
>> other peoples work.

>
> You've conflated "learning by doing and picking up on> other peoples work"
> with "watching ... apps work" and that with stepping through an application
> using a debugger. I think that's misleading.
>


Really? Seems pretty straightforward to me and also how close on 100% of
Universities teach coding at some stage or other : adding modules to
existing systems. Maybe I'm a bit slow today but I'm not seeing the
subtleties of the point you are making here : the user is looking for
a way to learn how to structure applications and build them himself.

I fail to see how analysing existing, successful apps can be anything
other than beneficial. It doesnt take away the donkey work of learning
the lanugage basics, but it can make text book "science" much more
accessible and "real". I cant imagine becoming a programmer without
such practice, guidance and "practical training". Its the same in all
walks of life.




--
"A desk is a dangerous place from which to view the world" - LeCarre.
 
Reply With Quote
 
Vladimir S. Oka
Guest
Posts: n/a
 
      03-10-2006

Chris Dollin wrote:
> Richard G. Riley wrote:
> > "Nick"posted the following on 2006-03-10:
> >> I thought you were implying Linux was better because the *debugger* was

> >
> > There is no "the debugger" : although gdb is prevalent in Linux -
> > albeit with several front ends.


< snip >

> > What does? Are we talking about the same thing? Do you doubt that
> > watching other, well written apps work is beneficial to a newbie? It
> > seems fairly clear to me that it can only help. Its how the entire
> > Open SW system works : people learning by doing and picking up on
> > other peoples work.

>
> You've conflated "learning by doing and picking up on> other peoples work"
> with "watching ... apps work" and that with stepping through an application
> using a debugger. I think that's misleading.


You've been trolled!

Especially in the light of the reply by the same person I couldn't
avoid seeing, as I'm forced to use Google from the office.

--
BR, Vladimir

 
Reply With Quote
 
Mike Wahler
Guest
Posts: n/a
 
      03-10-2006

"Nick Keighley" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
>
> Richard G. Riley wrote:
>> "Nick"posted the following on 2006-03-10:
>>
>> > Richard G. Riley wrote:
>> >> "(E-Mail Removed)"posted the following on 2006-03-10:
>> >
>> >> > Thanks alot for the response, a few minutes after posting I searched
>> >> > this group and found hundreds of other threads about the same topic.
>> >> > I
>> >> > apoligize as well for double posting, that was a mistake even though
>> >> > I'm sure it must look like I tryed to bump my thread.
>> >> >
>> >> > I wanted as well, to bring forth another concern that I have with
>> >> > programming in general. Many people say that ACTUALLY PROGRAMMING
>> >> > real-world programs is the best way to get better. That theory makes
>> >> > sense, but when I sit down to write a program in java, I often
>> >> > realize
>> >> > that I have mastered the sytnax and searching and sorting
>> >> > algorithms,
>> >> > yet I cannot apply this to a real-world program. Are there any books
>> >> > for C or websites that explain the analytical thinking or other
>> >> > tactics
>> >> > involved in practical uses of C?
>> >>
>> >> One great way is to analyse existing systems. You mentioned moving to
>> >> Linux : this is a great idea because you can compile and step through
>> >> existing apps with the debugger.
>> >
>> > could we keep the platform bigotry down to a dull roar? Windows has
>> > perfectly good debuggers available as well. So if you really want to
>> > (I've never had the urge) you can "step through existing apps".

>>
>> No you cant. Firstly, I use multiple OSs : windows, OS/2 and Linux so
>> get away with your attempt to suggest this is an OS war bigotry.
>>
>> Secondly, what system apps are you aware of in windows which come with
>> the C source code? Most are in C++ anyway. Most Gnome/Linux system is
>> in C. The OP was asking about C.

>
> I thought you were implying Linux was better because the *debugger* was
>
> better. I've never stepped through an existing application (that wasn't
> broken)
> with a debugger. If you say it's a good way to learn C, who am I to
> argue.
>
> But it *still* sounds bizzare to me


My $.02:

I learned C on MS-DOS systems. I found using a debugger
(even with 'working' code) to be an *extremely* good aid
in understanding the language and how it was implemented
on that system. E.g. when creating a new function, before
integrating it with the main program, I'd run it in a
'test harness' under a debugger, and more often than
not, I was able to find and fix bugs before they got
into the main application.

-Mike


>
> <snip>
>
>
> --
> Nick Keighley
>



 
Reply With Quote
 
Default User
Guest
Posts: n/a
 
      03-10-2006
Mike Wahler wrote:


> I learned C on MS-DOS systems. I found using a debugger
> (even with 'working' code) to be an extremely good aid
> in understanding the language and how it was implemented
> on that system. E.g. when creating a new function, before
> integrating it with the main program, I'd run it in a
> 'test harness' under a debugger, and more often than
> not, I was able to find and fix bugs before they got
> into the main application.



Sure, but that's not what was claimed. The original statement said
"existing programs", so not the one under development. I don't think
tracing someone else's code is likely to be much of a learning tool.

Personally I've never found that even reading other code was useful for
learning basic programming. It teaches one how to read code, which is a
useful skill in and of itself, but not how to program. Only writing
code teaches you that.

An experienced programmer may well look at existing code for tips on
how to approach a problem, but that's another thing altogether.



--
Please quote enough of the previous message for context. To do so from
Google, click "show options" and use the Reply shown in the expanded
header.
 
Reply With Quote
 
Mike Wahler
Guest
Posts: n/a
 
      03-11-2006

"Default User" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Mike Wahler wrote:
>
>
>> I learned C on MS-DOS systems. I found using a debugger
>> (even with 'working' code) to be an extremely good aid
>> in understanding the language and how it was implemented
>> on that system. E.g. when creating a new function, before
>> integrating it with the main program, I'd run it in a
>> 'test harness' under a debugger, and more often than
>> not, I was able to find and fix bugs before they got
>> into the main application.

>
>
> Sure, but that's not what was claimed.


OK, perhaps I misunderstood. I was simply stating
that I found a debugger to be useful while learning
the language.


> The original statement said
> "existing programs", so not the one under development. I don't think
> tracing someone else's code is likely to be much of a learning tool.


I think it can help (provided it's 'decent' code).

> Personally I've never found that even reading other code was useful for
> learning basic programming.


I have, especially textbook examples. I suppose this is
just a case of YMMV.

> It teaches one how to read code, which is a
> useful skill in and of itself, but not how to program. Only writing
> code teaches you that.


I also think writing code is the probably the most useful way to learn.
My remarks about a debugger were in that context. "Write it, then
watch it."


> An experienced programmer may well look at existing code for tips on
> how to approach a problem, but that's another thing altogether.


-Mike


 
Reply With Quote
 
Default User
Guest
Posts: n/a
 
      03-11-2006
Mike Wahler wrote:

>
> "Default User" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...


> > Personally I've never found that even reading other code was useful
> > for learning basic programming.

>
> I have, especially textbook examples. I suppose this is
> just a case of YMMV.


I don't mean short illustrative code examples as found in textbooks.
Those have been, hopefully, crafted for teaching purposes. That's not
usually the case with a full-blown program.

> I also think writing code is the probably the most useful way to
> learn. My remarks about a debugger were in that context. "Write it,
> then watch it."


I would agree.



Brian
 
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[I'm learning C]: Learning to use ucontext Andrey Popp C Programming 5 01-31-2012 01:05 AM
Learning C and Learning Make/Configure/Building/Linking Hal Vaughan C Programming 7 03-21-2006 05:07 PM
e-learning, (collaborative learning environment) collinm Java 1 09-08-2005 09:52 PM
Learning about SMS technology... VM Wireless Networking 2 07-02-2004 02:36 PM
learning VHDL Vilvox VHDL 5 07-20-2003 08:59 AM



Advertisments