Many programmers are frustrated in and leaning away toward the C/C++ programming languages because of the following reasons:
(1) Very steep learning curve..
Many people joined the programming world by learning C or C++, but it’s rare for them to keep learning and mastering these two languages well because they get frustrated in handling the low-level programming elements such as pointers, the memory storage model, address alignment, templates expansion, multi-thread data races, and so on. If these elements are not handled properly, the app will have a high probability of crashing, which will frustrate the new programmer.
(2) Rarely used in modern application development
- Mobile application development: iOS (Objective-C, Swift), Android (Java).
- Distributed systems, Big Data, Cloud Computing: Java, Go, Groovy, Scala.
- Data science, AI (Artificial Intelligence), ML (Machine Learning): Python.
It looks like C/C++ are rarely used in these modern application development areas. So why should we still learn C/C++? Here are 5 reasons why you should:
1. Master other advanced programming languages faster.
Almost all other modern programming languages and popular libraries are built by C/C++. Here are some typical examples:
– Java: The core of Java Virtual Machine hotspot is implemented in C++.
– Python: The Python interpreter is implemented in C.
– Numpy: One of the most popular scientific libraries in Python and it is widely used in AI and ML, but its core module is implemented in C.
If you just remember the syntax of a programming language or can use the common libraries well, it doesn’t mean you truly mastered the programming language. Knowing the theory behind the languages can help you develop applications in the language more efficiently, which then means you truly mastered the language. But the prerequisite for all of that is you have to know C/C++ well.
2. Bring performance.
When programming in the advanced programming languages, we mainly focus on the implementation of functionalities. We usually use guidelines of best practice to avoid silly mistakes but it is not nearly enough when you need to gain better performance. Better performance requires careful profiling and analysis to find out which code are the performance hot spot and how to rewrite them in a more efficient way.
If you know C/C++ enough, then it will aide you in gaining a better performance because you know how these advanced programming languages run at its lowest level. You will be able to discover the issue faster which may be performance decay, the expensive CPU instructions, the cache miss, the tradeoff of context switching, or something else.
3. Understand the fundamental computer theories well.
Computer networks, operating systems, computer architecture, and compiler theories are four of the most important fundamental computer theories and almost all of our new techniques are built based on these four.
If you are just programming in the advanced programming languages, these machine-level details are usually hidden from you. But these techniques are really important if you want to jump out of the existing frameworks and develop something more.
For example, when the network status is unstable and you need a reliable connection you would not solve the issue with TCP because TCP brings a large latency due to its large retransmission timeout. So how should you do it?
Most importantly, all these key techniques are based on C/C++.
4. C/C++ powers the world
C/C++ is everywhere. In particular, they power more technologies than we give it credit for.
Modern browsers are also written in C/C++. like Chrome, Firefox etc.
Modern game engines are written in C/C++, like Unity3D, Unreal Engine, cocos2d-x etc.
As mentioned above, programming languages compilers and interpreters are implemented in C/C++ too.
According to the TIOBE Index for March 2018, C/C++ are still the most popular languages. So don’t hesitate to keep learning these two languages that are still powering the world.
5. There are many C/C++ challenges on Topcoder
Here are some of the successful challenges on Topcoder.
Hercules Fog Recoder series (currently active as of 4/3/18)
Hercules pxCore series (currently active as of 4/3/18)
C Code documentation reverse engineering series
So get started with C/C++ and keep learning. Don’t be scared off by its difficulty and steep learning curve. Once you have mastered them, you will gain a lot more knowledge than you expected!
The post 5 Reasons Why You Should Keep Learning C/C++ appeared first on .