NJ5 said:
JaggedSac said:
salaminizer said:
I think that with C you won't get "addicted" to a lot of "easy" stuff you get with Python, Java, C#. for example, even if you won't use pointers in long term, I believe it's something that every programmer should know about (even more if you don't want web programming)
after you feel comfortable with it, you can try the other languages. programming in Python SHOULD be even easier if you already know how to program "the hard way".
|
I somewhat agree with you here, but where do you stop? Should they start out with assembly to get an incredibly in-depth appreciation of what goes on with registers, etc.(I know you would learn this in Computer Architecture classes but most of these classes rarely much involve coding)? With the way languages are going now days I believe that a brief understanding of the low level functionality can be more than sufficient for most purposes.
I believe an understanding of patterns and paradigms are far more important from a business perspective.
|
I think the concepts involved in programming with C are crucial for any programmer, mainly memory management and pointers. They're better learned first, than struggled with later after the bad habits have setted in.
For people programming in higher-level languages, the concepts involved in programming with Assembly are only crucial for the micro-optimizations minded programmer. That's my guideline for recommending C as a first language. Assembly can come later without harm.
|
The thing is, once you learn either C#, Java, or C++, you have pretty much learned the other two as well. Of course there are syntactical differences but those are simple to overcome, especially with a good IDE. Assembly is pretty much a niche area of programming as far as jobs go. As far as optimizations go, you pretty much just use well known programming practices in your code and the compiler takes care of the rest(sometimes you need to understand certain language specific optimizations).
For instance in Java
int j = array.length;
int sum = 0;
for(int i = 0; i < j; i++){
sum += array;
}
is slower than
for(int i = 0; i < array.length; i++){
sum += array;
}
due to compiler optimizations. The compiler knows the end of the array and doesn't make sure there is no index out of bounds after every iteration. Of course it is good to know about handling pointers and pointers can be an excellent way of creating data structures such as trees, hashes, etc, but sometimes letting other people take care of the dirty work helps out productivity.
EDIT: it seems to have gotten rid of my brackets on the array indexing and caused the text to be italicized.