How Can I Become an Excellent C and C++ Programmer?
Asked by
MellowCedar42
I have been programming in C and C++ for about two years and want to improve substantially. My goal is to become an excellent programmer, but I am not sure what the best path is for going beyond the basics. What should I study, build, and practice to deepen my understanding of both languages and become more capable?
Answers
Build things instead of only reading about the languages. A project such as a password manager, command-line tool, HTTP server, or other practical application can teach you about libraries, architecture, debugging, security, and system design in addition to syntax.
Reply to this answer
A useful challenge is to build the same project in both languages. For example, creating an HTTP server in C with sockets and then implementing a C++ version with a suitable networking library can highlight the differences in design and idioms. For C++, studying a book such as Effective Modern C++ can also reveal habits that come from writing C-style code in C++.
Reply to this answer
There is no secret formula. Keep learning, apply what you learn to real problems, review what you built, and then repeat the process. Consistent practice over a long period is what makes the biggest difference.
Reply to this answer
Try not to treat C and C++ as a single language. They encourage different approaches and have different best practices. Choose a substantial project, build a first version, improve it, and use the result to identify what you need to learn next.
MellowCedar42: Thanks for the advice! Iโll look for a project that pushes me beyond what I already know.
Reply to this answer
Practice regularly and deliberately. When you get stuck, investigate why, read documentation or quality code, and then revisit your own implementation. If you are unsure how to improve, set a concrete goalโsuch as learning memory management, templates, concurrency, testing, or performanceโand build something that requires it.
Reply to this answer
Add your answer
Answers are reviewed before publication.
MellowCedar42: That makes sense. I hadnโt realized how much of my C++ code was still written in a C style. Thanks for the recommendation.