4

I've read a blog(in Chinese only) in which the author had jeered at Java programmers who know little about C and system programming.

The author illustrated how he had found the deep reason of a Java NIO Selector exception using his knownledge of C and Windows/Linux system API. The IOException is thrown with message "Unable to establish loopback connection" when calling java.nio.channels.Selector.open() too many times. What he had found was that for each opening of Selector, a pair of TCP connections were created in Windows and a pair of pipes were created in Linux. In another blog, he also mentioned that GNU Java compiler was a clever implementation than Sun Java.

What he said seems completely new and interesting to me. But I am not sure if C/system knowledge is the only way to figure out such problems quickly. Is it really worth spending much time on learning those knowledges for Java programmers?

asked Mar 29, 2011 at 15:35
4
  • 6
    It never hurts to know more paradigms and levels of abstraction. Commented Mar 29, 2011 at 15:39
  • @James.Xu Yeah, to learn more is alway good. But the question is: is it worthy of the time spended on it? We alway have more important thing to learn. Commented Mar 29, 2011 at 15:44
  • It's good to know the concepts, but on the other hand C programmers usually write awful Java code and vice-versa, so be careful what you do in foreign territory. Oh, and check out the Programming Language Matrix Commented Mar 29, 2011 at 15:46
  • 2
    "is it worthy of the time spended on it?" Wouldn't it be great to be able to divine the future with absolute certainty? It would be so handy to foresee the future and be able to answer questions like this. Commented Mar 29, 2011 at 15:53

8 Answers 8

4

I would say yes, quite emphatically in fact. I wish there was some way to ensure that anyone without knowledge of system programming, including at least a passing familiarity with assembly, would never get anywhere near the source for any serious project.

Why? Because I don't just write computer programs; I also use them, and a lot of the ones I use are crap because they were written by people who didn't know what they were doing. There are a lot of important issues in computer programming that simply don't make any sense without a knowledge of how things work at the bits-and-bytes level, and the less incompetent coders out there cluelessly writing bad code, the better the experience will be for all of us.

answered Mar 29, 2011 at 16:30
1
  • 2
    I like this words:"they were written by people who didn't know what they were doing"! Commented Mar 30, 2011 at 9:37
6

No, it isn't. But you know what they say, the more you know the better.

answered Mar 29, 2011 at 15:53
1
  • 8
    The more you know the more you realise how much you don't know. ;) Commented Mar 29, 2011 at 15:56
3

Knowledge of C, or any other language, is not a requirement to learning Java. Yes I certainly believe it helps to know a variety of languages in different paradigms. But not knowing C in particular doesn't prevent you from being a good programmer.

Note: It is necessary to understand C in order to do Java RMI. But that is a small subset of Java.

answered Mar 29, 2011 at 15:45
1

Deep knowledge of the underlying operating system can be very helpful in application development. Every great software engineer that I know can program down to the bare metal.

answered Mar 29, 2011 at 17:36
1

If you don't know anything about how the underlying system works, then you are limited to whatever the Java environment gives you. That's fine, as far as it goes, but eventually something outside the Java environment is going to impinge upon you and make your environment behave in an unexpected manner. When that happens, if you don't know anything beyond your environment then you'll be stuck.

It's the problem that Joel Spolsky calls 'Leaky Abstractions' - in this case the Java environment is the abstraction in question, and when it gets leaky, then you're going to run into trouble.

answered Mar 29, 2011 at 17:57
0

The first two years of development I did was entirely in machine code and machine language and I have worked for a number of hardware manufactures. You can always learn a lower level of the system.

What is most valuable however is good commercial experience, learning from your mistakes, trying new things to meet a business requirement will further your career more.

answered Mar 29, 2011 at 15:55
0

As it was previously mentioned, it is isn't necessary but it certainly doesn't hurt.

At school, we were showed C first because it helped us understand the basics of coding. Also, most languages are inspired from C so it gives a you a great foundation to start learning other languages.

answered Mar 29, 2011 at 16:27
0

It's not strictly necessary, but learning C can be a rewarding experience. It gives you freedom in every detail of your program. You may miss your high-level features to begin with, I know I did, but you'll grow to enjoy it's extreme simplicity.

answered Mar 29, 2011 at 17:46

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.