For us, the computer scientists and engineers, programming skill is essential. A common misconception is that knowing syntax of several programming languages (PL) such as C, C#, JAVA, etc. makes you knowledgeable. Knowing what special features are offered in a PL without thoroughly solving the problems is a superficial work. This is like reading manual on driving a car – not much useful. And learning several PLs is like reading manuals of different cars! Sit in the driver seat and learn how to drive.If you learn how to drive one car, you can drive any.
It is logical thinking, flow of program, modularity of code, etc. that you need to learn.It is quite interesting that any good company paying you a reasonable package does not restrict you to your choice of programming language. If you like, you can use C or C++ or JAVA or Phython or any other language. Even many times, the interviewers are content if you can simply write a flow of your program. That implies what matters to them is how deep you can think, your analysis of your code, your approach, etc.
As an example, try to write code for a simple (yes, it is simple) problem –
- Given a 2D array, print it in spiral form.
See the following example:
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
1 2 3 4 8 12 16 15 14 13 9 5 6 7 11 10
For many students, it leaves their head spiralling where to begin even though they know C, C++, JAVA, etc. When we learnt programming way back in 1990s, even small coaching centers would concentrate on making logic clear because there were not too many programming languages to learn. So, we did a lot of flow charting and thus it was easier to code difficult programs in any language after learning the syntax fast. In contrast, today the situation in most universities or diploma centers is that they focus on teaching the syntax of the new language like C#. And the time is over for the student to do coding on difficult logical problems.
I have a small insight into this way of learning. My nephew who studied in Meerut – a city in Northern India (in a very reputed school) told me that as the fifth subject in 12th class, most students have opted for German language. I was surprised because learning correct and proper English and even more importantly, Hindi would be more meaningful. How many times do you our students write “I did not knew this” or “I have came back” and so on! The problem is even deeper because the creativity is discouraged in this kind of learning. Finally, a good writer in any language is not good only because he can write proper syntax. It is the content that matters. It is their thoughts that have impacted others. Your ability to think matters, not how good you are in syntax. Of course, syntax is also required, but if you have done a lot of coding, obviously, you know the syntax. Similarly, you might know a lot of programming languages, but unless you do a lot of coding on logical problems, it is not so beneficial.