Re: why learn C?



On Feb 23, 12:05 am, Flash Gordon <s...@xxxxxxxxxxxxxxxxxx> wrote:

Please do not snip the attribution lines, the bits that say who posted
what. They are useful to the rest of us to follow the conversation.

ok

Because whatever programming language you are using you are using
algorithms, so why C in particular?


i guess, because it will help me in understanding all other languages
as C is the *hardest* language i have ever confronted. Assembly was
not that hard, Assembly is just *tedious*.

In that case you were not developing your software properly. Stages of
software development:

1) What is the problem?
This is requirements analysis
2) What method do I use to solve the problem?
This is algorithm development
3) How should I put things together to implement this method?
This is design
4) Write the code


seems, like i am reading either OOD or Software Engineering concepts.
i think programming is different from Software Engineering.


Note that I have missed out a lot of things deliberately, since software
development plans, test plans, testing and so on would complicate my point.

i knew that but "missing out things" made your explanation clear :-)


2. in C++, you get read-made algorithms from Standard Library, so
Where is the ready made algorithm to do histogram equalisation of a
greyscale image? How about the ready made algorithm to calculate the
gain and offset I need to apply to the incoming image so that 5% of
pixels are white, 5% black, and the rest somewhere in between? If you
can find those, then I can find other algorithms I have needed which are
*not* part of which ever language you choose to select.

so you are saying that i need to learn about algorithms in C++ too.
good idea i think


If anything you are biased by only doing programs where the language
provides you with a ready made solution. Write any program of any
significant complexity (say 100 lines, to pick a figure out of thin air)
and you will have done at least some algorithm development whether you
realised it at the time or not.

i never realised that. i always thought:

algorithms == maths != programming


What is most important depends on what level you are working at. If you
are implementing a design that has been produced and reviewed by others
then there is sod all algorithm development to do whatever language you
are working in. If, on the other hand, you are trying to be the
technical lead on a project then if you do not understand the algorithms
that need to be developed you are worse than useless,

i am not on a "team-lead". i am just trying to learn OOD, C++ and STL
(for getting a job) and before that i want to become a good
programmer (like "pandit", the OP)


but not knowing
all the details of a given programming language is less important
because you will find it easy to pick up what you need (prefferably be
reading good material on the language).

this is how one learns C++, i have found.


C is a higher level than assembler (which is a higher level than machine
code) which is an advantage, but one shared by many other languages.

C allows you to get close to the metal when required which is an
advantage, but one shared by many other programming languages.

C has been standardised which is an advantage shared (in one form or
another) by many other languages.

Any advantage you can find for C will be shared by at least one other
language apart from C having been ported to probably more targets than
any other language, which leads from it often being the first language
(or first after the assembler for that specific target) ported to any
given target. Assembler does not count because each assembler language
is different.

this the 3rd post, from where i conclude that rather than working
randomly at different languages (like i usually do), one needs to
choose a language he likes and spend time practicing in it.

i also conclude, that you, "Flash Gordon", indirectly said that once
one becomes proficient in that language by practicing syntax,
algorithms and paradigms in his *favourite* language, then learning
other language becomes easier.

if i am RIGHT, then you have solved the biggest problem i am facing.


The two things this group is best IMHO at in order are
1) C
2) Critiques.

:-)

Flash Gordon

i am arnuld, nice to meet you ;-)

-- arnuld
http://arnuld.blogspot.com

.



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: Software bugs arent inevitable
    ... There are lots of algorithms that could be done, ... Except for the mere implementation detail that Python doesn't have ... That illustrates my original point that a programming strategy that seems ... we'd still be programming in assembly language. ...
    (comp.lang.python)
  • Re: How to be a good programmer?
    ... For a programmer, programming is immense *fun*. ... correct implementation of the correct algorithms is likely to be fast ... Whichever language you learn first (and I mean "first", ... excellent books on that particular sub-topic. ...
    (comp.programming)
  • Re: Java or C++?
    ... for the stuff we do, its the algorithms do tend to be complex, so I ... mostly because of the predictability of the language. ... where all the intervening steps are as light-weight as possible. ... developed hardware in VHDL. ...
    (comp.programming)
  • Re: Other than php/perl/lisp/c/c++/java, anybody have a favorite computer-programming language?
    ... Picking an element based on index makes sense for strings and other ... GCD and a few other algorithms depend on that and would ... on the basis of how well that language supports the functional and ... (data types part 1, mostly the types that can be used as literals ...
    (comp.programming)