F
Flash Gordon
arnuld wrote, On 23/02/07 08:19:
Thank you.
Santosh addressed some of your points and gave answers I agree with, but
not, I think, all of then, and he snipped at least one bit I wanted to
respond to.
Understanding algorithms does not help you understand languages, it
helps you do things with the languages you know.
Understanding Iambic Pentameter does not help you understand English and
French, but once you understand both Iambic Pentameter and English you
can write Iambic Pentameter in English, and if you understand German as
well you can write it in German.
Assembly is not one language. There are many different assembly
languages, and I have done one that is IMHO an order of magnitude harder
than C and other that if you want to make it worth using assembler
rather than C (i.e. produce code that is faster/smaller/beter in
whatever measure) requires a lot more work than programming in C. For
example, in some assembly languages if you want to do any indirection at
all (including accessing a "variable" on the "stack") then you need to
use double indirection!
What I described above applies whether you are using OOD/OOP or
developing a program in a pure functional language. It applies to safety
critical software of millions of lines and a 100 line hack program for
your own personal use. You might not always write down the results of
all of the above, and you might not do a thorough job on all of them,
and you might part way through one phase realise you have missed things
in an earlier phase. However, have you ever written a line of code
before deciding on the problem to be solved, even if the problem is only
how to display "Hello World!" on the screen (the analysis is, this
program must display "Hello World!")?
If I did not say I was deliberately missing them then others would have
jumped in ;-)
As Santosh said, you need to learn about algorithms. Saying you need to
learn about algorithms in C is like saying you need to learn about
physics in German. The programming language is merely what you use to
express your algorithms and design.
An algorithm is a step by step method for solving a problem. Some
algorithms have a lot of maths, some do not. Here is an algorithm for
writing a sonnet:
1) Create an empty document in your word processor
2) Pick a number between 50 and 5000
3) Enter that number of random characters in to your word processor
4) If the word processors spell checker reports a mistake goto 1
5) If the word processors grammar checker reports an error goto 1
6) Get a girlfriend.
7) Read it to your girlfriend, and if she does not say "what a
wonderful sonnet" goto 1.
I will admit that it is not a very good algorithm, but it is a step by
step method for solving the problem and there is even a finite chance of
it working! Now, where is the maths in it?
I realised that, but the point was that what is most important for you
*now* depends on what you are doing, and later the most important thing
might change.
Well, none of those things are topical here ;-)
If you want to learn OOD/OOP I would start by reading a bit about OOA
(Object Oriented Analysis) which you will not fully understand, and for
a language pick something easier than C++. Even if you start by learning
the language, don't start with C++ start with an easier OO language.
Note that having learned one methodology (e.g. OO) and a programming
language that is targeted towards that methodology it is then easier to
learn other languages targeted towards the same methodology since you
only have to learn the language, not the language and the methodology.
Yes, you definitely need to pick a language *and* a methodology and
stick with it until you get some experience with it and a reasonable
knowledge then move on to the next. If you do this and you are good you
will gradually find it easier to learn new methodologies and languages.
Yes. Especially languages targeting the same methodology. For example,
learning Java and OO properly should help learning C++. Learning Pascal
properly helps in learning C (the other way round applies as well). etc.
That's good, although this really belongs in a more general group such
as comp.programming
Have fun and one day you might be unlucky enough to work for me ;-)
Thank you.
Santosh addressed some of your points and gave answers I agree with, but
not, I think, all of then, and he snipped at least one bit I wanted to
respond to.
i guess, because it will help me in understanding all other languages
as C is the *hardest* language i have ever confronted.
Understanding algorithms does not help you understand languages, it
helps you do things with the languages you know.
Understanding Iambic Pentameter does not help you understand English and
French, but once you understand both Iambic Pentameter and English you
can write Iambic Pentameter in English, and if you understand German as
well you can write it in German.
> Assembly was
not that hard, Assembly is just *tedious*.
Assembly is not one language. There are many different assembly
languages, and I have done one that is IMHO an order of magnitude harder
than C and other that if you want to make it worth using assembler
rather than C (i.e. produce code that is faster/smaller/beter in
whatever measure) requires a lot more work than programming in C. For
example, in some assembly languages if you want to do any indirection at
all (including accessing a "variable" on the "stack") then you need to
use double indirection!
seems, like i am reading either OOD or Software Engineering concepts.
i think programming is different from Software Engineering.
What I described above applies whether you are using OOD/OOP or
developing a program in a pure functional language. It applies to safety
critical software of millions of lines and a 100 line hack program for
your own personal use. You might not always write down the results of
all of the above, and you might not do a thorough job on all of them,
and you might part way through one phase realise you have missed things
in an earlier phase. However, have you ever written a line of code
before deciding on the problem to be solved, even if the problem is only
how to display "Hello World!" on the screen (the analysis is, this
program must display "Hello World!")?
i knew that but "missing out things" made your explanation clear![]()
If I did not say I was deliberately missing them then others would have
jumped in ;-)
so you are saying that i need to learn about algorithms in C++ too.
good idea i think
As Santosh said, you need to learn about algorithms. Saying you need to
learn about algorithms in C is like saying you need to learn about
physics in German. The programming language is merely what you use to
express your algorithms and design.
i never realised that. i always thought:
algorithms == maths != programming
An algorithm is a step by step method for solving a problem. Some
algorithms have a lot of maths, some do not. Here is an algorithm for
writing a sonnet:
1) Create an empty document in your word processor
2) Pick a number between 50 and 5000
3) Enter that number of random characters in to your word processor
4) If the word processors spell checker reports a mistake goto 1
5) If the word processors grammar checker reports an error goto 1
6) Get a girlfriend.
7) Read it to your girlfriend, and if she does not say "what a
wonderful sonnet" goto 1.
I will admit that it is not a very good algorithm, but it is a step by
step method for solving the problem and there is even a finite chance of
it working! Now, where is the maths in it?
i am not on a "team-lead".
I realised that, but the point was that what is most important for you
*now* depends on what you are doing, and later the most important thing
might change.
> 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)
Well, none of those things are topical here ;-)
If you want to learn OOD/OOP I would start by reading a bit about OOA
(Object Oriented Analysis) which you will not fully understand, and for
a language pick something easier than C++. Even if you start by learning
the language, don't start with C++ start with an easier OO language.
this is how one learns C++, i have found.
Note that having learned one methodology (e.g. OO) and a programming
language that is targeted towards that methodology it is then easier to
learn other languages targeted towards the same methodology since you
only have to learn the language, not the language and the methodology.
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.
Yes, you definitely need to pick a language *and* a methodology and
stick with it until you get some experience with it and a reasonable
knowledge then move on to the next. If you do this and you are good you
will gradually find it easier to learn new methodologies and languages.
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.
Yes. Especially languages targeting the same methodology. For example,
learning Java and OO properly should help learning C++. Learning Pascal
properly helps in learning C (the other way round applies as well). etc.
if i am RIGHT, then you have solved the biggest problem i am facing.
That's good, although this really belongs in a more general group such
as comp.programming
i am arnuld, nice to meet you ;-)
Have fun and one day you might be unlucky enough to work for me ;-)