Re: why learn C?



At about the time of 2/22/2007 3:34 AM, pandit stated the following:
hai all,

i want to become a good programmer. one of my friends ( named
"arnuld", he posts here infrequently), taught me Lisp. so i am not a
programming beginner.

i have heard these 2 points. i want to know how :

1. C gives you a strong base of Procedural style of programming which
forms the basis of learning other paradigms e.g OOP

Any language that allows subroutines is procedural based. This includes
C, Pascal, and Assembler.

2. with C one will learn about pointers and algorithms.

Pointers, yes. But, you can learn about algorithms and data structures
in any language.


3. /arnuld/ told me this in an email:

" i think algorithms and data-structures are more important than
learning a new programming language . Hence i prefer learning about
algorithms and data structures 1st, before i attempt a new programming
language or OOD. i think that is a better way. i said so after
searching the archives of "comp.programming", "comp.lang.c++",
"comp.lang.c" & "comp.lang.lisp" , at these places i found that
learning about programming, algorithms, data structures, abstraction,
software design and problem solving, and version control is much more
important and time consuming than simply learning a language, almost
all folks agree on that learning a programing language is a simple
task as compared to what they have described here"

FWIW, I learned C out of a book, along with the helpful guidance of the
people here.

Algorithms are just a set of steps or tasks that must be performed to do
something. The steps used to perform a quicksort or a binary search are
the same no matter what language you use. The implementation of those
steps are going to be language dependent. Some algorithms are more
complicated than others. Quicksort, binary trees, binary search, and
hash tables are some of the more complicated ones. The most complicated
algorithms that I have ever done dealt with encryption. Ever look at
the source code for a DES algorithm? It's bad...to the point of
pre-processor abuse.

And there are the implementations of algorithms that are not just
language specific, but also platform specific. Performing network IO on
a windows machine is different than doing it on a unix machine. Even
though you are using the same language for both, the platform dictates
the procedure you must follow to do it.

Data structures are also language dependent. Pascal has record, object,
and array, C has struct, union, and array. C++ has what C has plus
class. Some languages like VBScript doesn't even have structures. But,
the basic definition of a data structure in any language is a collection
of related data. The data structure is dependent on what the format of
the data is in, and what you want to do with that data. But there are
some general guidelines.


/arnuld/ is not an experienced programmer, so i feel difficulty in
believing his words. i want to know the views of people here,a s much
of the post belong to C.


- pandit


I have to agree with your friend. He does seem to know what he is
talking about, but I would put the emphasis on algorithms before data
structures though. The data structures that you use are going to be
defined by the algorithm and language that you use, in addition to what
data types are available for the language that you are using.

--
Daniel Rudy

Email address has been base64 encoded to reduce spam
Decode email address using b64decode or uudecode -m

Why geeks like computers: look chat date touch grep make unzip
strip view finger mount fcsk more fcsk yes spray umount sleep
.



Relevant Pages

  • Re: How to solve for smallest and largest int?
    ... generate a simple algorithm has no business trying to learn Ada. ... then recommended Basic or C as a first language. ... lot of bad programming practices using Basic. ... Algorithms interact with data structures to produce programs. ...
    (comp.programming)
  • Re: Factor
    ... emphasis on idiomatic programming is the greatest challenge. ... it sure is nice when a language gives you a rich and ... flexible set of data structures and algorithms that are designed so ... There is no reason to believe that my implementation of lists is ...
    (comp.lang.forth)
  • Re: what should be in a computer science degree?
    ... Games programming ... scientists be taught something about data structures and algorithms? ... I thought about the Data Structures and Algorithms idea. ... Take a look at some of the algorithms in books ...
    (comp.lang.lisp)
  • Re: what should be in a computer science degree?
    ... Games programming ... scientists be taught something about data structures and algorithms? ... foundation in programming because computeracy is becoming as important ... I thought about the Data Structures and Algorithms idea. ...
    (comp.lang.lisp)
  • Re: what should be in a computer science degree?
    ... Games programming ... scientists be taught something about data structures and algorithms? ... there is a theory of algorithms that belongs to discrete maths ...
    (comp.lang.lisp)