Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for Wanna learn a new language? Why not C++?
Muhimen
Muhimen

Posted on • Edited on

     

Wanna learn a new language? Why not C++?

Lately, I've been thinking to learn a new programming language to boost up my programming career. I already knew Python and C#. I use Python for my personal projects, Machine Learning and AI. And I use C# for game development. My life was going pretty well until I met my demon. "Competitive programming".

Why I choose C++?

As you all know, Python is a bit slower than most other languages out there. And in competitive programming, one of the most important part is to solve problems as fast as possible. And your program must finish running in a certain amount of time. If you can't you will get the annoyingTLE error. As Python is slower than it's other competitors, most of the time I end up with a TLE error. Even my solution gets accepted, there is always a significant amount of time difference between the Python solution and a C++ solution. I remember one of my solutions to finish running in about 400ms. When I checked other submissions, I found out C++ solutions took 0ms. Keep in mind, the same algorithm was applied to solve the problem.

Why should "you" choose C++?

You may not be a competitive programmer like me. But that doesn't mean you have no reason to learn C++. There are 3 reasons that I found for you to learn C++.

1|| One of the top language in FANG

Alt Text
C++ is among the top 3 three languages that are widely used in FANG(Facebook, Amazon, Netflix, Google), the current tech giants. So if you are planning for a job in FANG, having a good knowledge of C++ can surely help.

2|| Rise of a new horizon

Alt Text
Suppose you are in a war. There are enemies in front of you constantly advancing towards to slaughter you. Luckily there is a gun with you. When you tried to pull the trigger, you found the gun has no ammo. What a mess!!! You got lucky again and found a fully loaded AK47 beside you. And started firing the enemies.

So, what I meant by this example? To be simple, your newly learn C++ knowledge can turn out super handy while you face difficulties solving problems with your primary language.

3|| It's fast!

Alt Text
As mentioned earlier, C++ is pretty fast. This might be a perfect reason for you to learn C++. Yes, the small-time difference might not be an issue for you if you are just obsessed with personal projects. But if you are like me, you will probably need a fast-running language to save your back.

(Not enough reasons for you? Read thisQuora answer)

How to get started?

So, you decided to learn C++ then? AWESOME!! But the question remains how you can start learning C++. If you are like me who knows programming, it's not a huge deal. All the programming languages are the same in the core. Just the syntax differs. So, if you have the basic knowledge of any programming language, then you will need to check for the syntax and that's it!

Don't worry if you don't have any prior knowledge of programming. You can start from scratch. There is a ton of useful resources on the internet for you to start learning to program. If you are confused about which one to grab, here is a course that I will suggest.

And yeah, one more thing for the experienced programmers, you can try converting your previously written code to C++. This will be a great practice for you. Whenever you get stuck, you can just check for the syntax or the methods on the internet. That's it!

Until next time, goodbye.
Happy coding for you

Top comments(14)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss
CollapseExpand
 
mburszley profile image
Maximilian Burszley
From humble beginnings at an MSP, I've adventured through life as a sysadmin, into an engineer, and finally landed as a developer focused on fixing problems with automation.
  • Location
    Ohio, USA
  • Work
    SRE
  • Joined

why not c++

Because Rust 😂

CollapseExpand
 
readredready profile image
Charles Gibson
Fledgling solo full stack web dev and entrepreneur. I aspire to be a Rust expert and a marketing minded full stack architect.
• Edited on• Edited

Verbatim my knee jerk response.

C++ seems nifty if you are trying to get a well paying niche job, but if you don't plan on entering the C++ workforce in the next couple years I can't imagine it would be more rewarding than learning Rust.

(Absolutely DO NOT take my response as expert opinion. I know nothing and have done nothing, it just seems like the future from what I've seen.)

CollapseExpand
 
muhimen123 profile image
Muhimen
Nothing more than a programmer nothing less than a programmer. Loves to solve Rubik's cubes in spare time.
  • Location
    Bangladesh
  • Work
    Student
  • Joined

That's a good choice though

CollapseExpand
 
robenkleene profile image
Roben Kleene
The future of creative apps. I make https://repla.app Create, share, iterate.
  • Location
    New York
  • Work
    Engineering Manager at Repla
  • Joined

C++ has a reputation of being for legacy code bases, but that's demonstratively false, especially for graphics-intensive applications. The two most recent new applications to gain real traction in graphics-intensive fields are theAffinity line from Serif (released 2014) andFigma (released 2016), both have graphics engines written in C++.

There's a new industry-wide trend of calling technologies that are used for the most successful, new, bleeding-edge software "legacy". Calling C++ a legacy language is part of that. C++ will be legacy when new, important, software is no longer written in it. That's not true today, and since I'd personally consider Figma the most important new application of the last decade, I'd say the exact opposite is true.

CollapseExpand
 
ziizium profile image
Habdul Hazeez
I teach and write code with interests in Web Development, Computer Security, and Artificial Intelligence.
  • Location
    Nigeria
  • Education
    B.Sc. Computer Science
  • Work
    Web Developer and Technical Writer
  • Joined

If I could like your comment like a million times trust me I will.

In addition, thank you for this statement:

There's a new industry-wide trend of calling technologies that are used for the most successful, new, bleeding-edge software "legacy".

If I could I'll make a poster out of it and show it to every beginner programmer that gets discouraged by reading "advice" on the internet that a programming language is not worth learning because it is "legacy".

I might as well add that if they want to work on a project it's best to do research on thedomain-specific language, rather than asking on the internet something like "I want to develop a desktop application what language should I learn?". There is a high probability they will get responses suggesting the "new" and "trendy" technology.

CollapseExpand
 
juancarlospaco profile image
Juan Carlos
.10x frAgile FullStuck Midend Devlooper, Python, Nim, Arch, OpenSource, EN|ES, Argentina, UTC-3, Atheist, WFH Nim Team Leader

I codeNim lang, it made me learn C, C++, JavaScript too, so yeah I think C++ is good,
but just not for me, I want the features of Rust, with Python-like syntax, speed of C,
and runs on the browser and interpreted.
:)

CollapseExpand
 
muhimen123 profile image
Muhimen
Nothing more than a programmer nothing less than a programmer. Loves to solve Rubik's cubes in spare time.
  • Location
    Bangladesh
  • Work
    Student
  • Joined

That's really a high demand I might say. 😉

CollapseExpand
 
silvether profile image
silvether
  • Joined

Hmmm, Rust, Go, Swift, ill pass on C++.

CollapseExpand
 
virt12 profile image
virt12
I am student learning IT
  • Joined

Hello Muhimem. Pls I am creating EEG analysis desktop app in pyqt5. I have issues counting EEG signals peaks per 1 sec. Help me out. Share your contacts I will sent my files.

CollapseExpand
 
qm3ster profile image
Mihail Malo
  • Joined

Conduct like this will not be tolerated.
The police are on their way.
Don't bother deleting your comment, it is in the database.

CollapseExpand
 
muhimen123 profile image
Muhimen
Nothing more than a programmer nothing less than a programmer. Loves to solve Rubik's cubes in spare time.
  • Location
    Bangladesh
  • Work
    Student
  • Joined

😅

CollapseExpand
 
delta456 profile image
Swastik Baranwal
Open Source Engineer

I hope you know that you will learn C in C++ first.

CollapseExpand
 
muhimen123 profile image
Muhimen
Nothing more than a programmer nothing less than a programmer. Loves to solve Rubik's cubes in spare time.
  • Location
    Bangladesh
  • Work
    Student
  • Joined

2 years ago when I first wrote my hello world program, that was in C. So, yeah!

CollapseExpand
 
muhimen123 profile image
Muhimen
Nothing more than a programmer nothing less than a programmer. Loves to solve Rubik's cubes in spare time.
  • Location
    Bangladesh
  • Work
    Student
  • Joined

Consider joining our Discord server for any kind of help, or to help others.
discord.gg/ZvGcPjZ

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Nothing more than a programmer nothing less than a programmer. Loves to solve Rubik's cubes in spare time.
  • Location
    Bangladesh
  • Work
    Student
  • Joined

More fromMuhimen

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp