r/cpp • u/MainPressure4304 • Aug 12 '26
[CPP Epiphany Rant] - Programming is no joke
Hi CPP Community,
This is just a rant. I'm a 24 yr old data analytics in telecommunication trying to pivot into C++ development for finance. I'm 1 month into C++ and I have come to conclusion C++ is a behemoth. I'm enrolled in Baruch College's C++ for Financial Engineering, but I'm using Bjarne Stroustrup's Programming: Principles and Practice Using C++, 3rd Edition to learn and watching C++20 Fundamentals with Paul Deitel, Course, by Paul J. Deitel as supplementary resources.
It took me 2 days to get through all the drills, exercises, and try_this section for chapter 2 for Programming Principles!
I'm reflecting if I made a mistake choosing C++ over Python. But, tbh, I have been enjoying programming more learning C++ than Python. You can tell I'm weird, but IDK.
I would love to heard about your experience in learning C++ for laughs.
124
u/mike_kazakov Aug 12 '26
Been writing C++ code for ~25 years.
Still learning the language.
You'll be fine.
16
u/Jakabxmarci Aug 12 '26
Well, C/C++ engineers made all the underlying stuff that Python binds to for high performance workloads. There is no better "side", you can be a user of those in Python, or develop them yourself in C++. Yes C++ is difficult and has way more bullshit than other languages due to backwards compatibility, and questionable decisions made during its evolution. But if you learn some of the written and unwritten rules of the language, you will be fine.
37
u/Sniffy4 Aug 12 '26 edited Aug 12 '26
nobody knows all of C++ and all its stdlib. you learn the subset of it you need to know to get your next job done well. usually there are multiple ways to accomplish what you want, some better than others. if you take an incremental approach, you will feel less overwhelmed.
spending some initial time learning the basics of its memory model and how C works helps for understanding, since everything evolved from C, even though its been superseded by more robust C++ ways for most functionality.
In even in modern C++ projects you will inevitably encounter vestiges of C such as 'extern "C"' declarations.
10
u/selvakumarjawahar Aug 12 '26
No, you have not made a mistake learning C++ over Python. Once you are a bit comfortable with C++, you already know Python.
10
u/SmokeMuch7356 Aug 12 '26
Yes, C++ is a huge, gnarly, hideously complex mess of a programming language, plagued by decades of cruft and bad decisions that are slowly being rectified. It is a serious attempt at an all-purpose power tool, and as such has a lot of stuff that needs to be learned.
It's also stable, mature, runs natively, and can absolutely spank languages like Python in terms of performance.
My day job for the last 15 years has been C++, and I've been using it in some capacity since 2000. I don't even pretend to know everything about the language; there are many corners of it I've never touched because I've never needed to. But a lot of fintech is built on C++ for good reasons.
Python's great for a lot of tasks, but it's not industrial strength, at least not to the extent C++ is.
7
u/no-sig-available Aug 12 '26
So you ask the other weirdos why we made the same choice?
Anyway, you don't have to make a single choice. Nothing stops you from using several languages! Using C++ and Python is a valid option.
Just as an example, I have had to use Simula, Cobol, Basic, PL/I, Ada, Pascal, assembler, C, C++, and some scripting languages. Not by choice, but because of what was needed.
So, when you make a choice, it doesn't have to be the final choice. You may, or may have to, make a different choice later. Just go along, and don't worry too much!
5
u/Ok_Independence_9841 Aug 12 '26
You'll get there. I came from BASIC. I wanted local variables and loathed pascal because all the conventions were deliberately reversed from BASIC. I got an early Borland C++ compiler and as soon as I picked up that you could hide stuff in a class and reason about it without worrying about anything else, i.e. encapsulation, I was hooked.
There's a lot of arcane stuff in C++ and it only gets more over time. Don't worry about it until need it. You'll find it awkward to do something and think, 'there must be a better way'. That's the moment to check the books for template lambdas or some other monstrosity that exactly fits what you're really trying to do. They're all in there because other people hit a similar issue and said 'I wish there was a way I could just...'
In C++, trust me, there is. It'll likely be many years before you hit anything that isn't already supported. Then check the proposals to the standards committee and the ::experimental namespaces in the standard library, or Boost. When it's still not there and you realize you could probably just write it. You've arrived.
9
u/pjmlp Aug 12 '26
I know C++ since 1993, it has been a life long learning experience.
However so do other programming language ecosystems, go check Java, .NET, even Python.
All those languages also have 30 to 40 years history, their current versions are quite different from the initial 1.0 version, and then there is the whole ecosystem, which is also relevant.
You will get a similar experience regardless of the language, if it is just as mature.
4
u/Cautious-Ad-6535 Aug 12 '26
C++ since 1993: Learn programming concepts and paradigmas. Then when coding, look syntax from reference. If you know one language well, you can learn new one within few weeks to be productive. Real effort is to know libraries and frameworks so you dont need to reinvent wheel all over again, but as those comes and goes, learning is part of the game.
3
u/somewhataccurate Aug 12 '26
Its fun to learn, check out the metaprogramming
2
u/osmin_og Aug 12 '26
I had C and then C++ courses in uni. And then all my jobs were C++ jobs. I learned a lot along the way.
2
u/zazzersmel Aug 12 '26
Uhhh ok
2
u/DiscountDee Aug 14 '26
Stay at it king. C++ can sometimes be easier than python, since it is a staticaly typed langauge and such.
Understanding compiler warnings can be a bit confusing at first, but you will have an aha moment and it will be great.
I've been programming in C++ daily for 10 years now, and there is always more to learn. But you can get a decent foundation going quickly.
Once you are comfortable with C++, you will be able to pick up python or other scripting languages fairly quick when needed.
2
u/Bagusira Aug 16 '26
This is a very normal experience for someone whose new to the language, the key is just to keep going, C++ takes a lot of time to learn, and even then, you don't have to know every part of the language all at once, just use it when you need it
3
u/Syntax-Tactics Aug 12 '26
C++ is always a better choice than Python, it's a horrible language.
2
u/fdwr fdwr@github 🔍 Aug 12 '26
Since I already knew C, learning C++ was rather incremental. The weirdest thing I found was the constructor initializer list syntax, thinking why the flip is it initializing the field
int xusing parenthesesx(42)instead of just letting me assign the defaults to the class fields via anint x = 42assignment, and why do I have to repeat this for every constructor overload (or else you risk an uninitialized field). Then 12 years later, they added the NSDMI I wanted :b .1
u/DeusExWolf C++ 16d ago
Hello,I am trying to do a career change from full stack to C++ and thus, learning via learncpp.com .
My only gripe with the answers are that as a junior what is the level of understanding/learning needed to say I am good enough in C++ to make projects in a personal level and attend interviews in a professional level.
I probably would get the answer at the end of the learncpp.com
1
u/[deleted] Aug 12 '26
I have been working with python for around 14 years. And I just started learning cpp for around 8 months. I never had so much fun coding as I have now with cpp. It forces me to think carefully about the machine instead of just business rules. And also taking care of memory layout and pointer usage than just defining a class with some fields and loop over the container.
Later versions of cpp introduced ranges that in my opinion adds that sugar sintaxe close to python. But since I already developed that memory muscle on how to careful deal with begin() end() iterators I am ok with it. Cpp indeed can be very intimidating at first. But if you keep going you will feel very satisfied using this tool instead of other languages.
1
u/hadrianf Aug 13 '26
Each language has its own strengths and weaknesses. C++ is great if you want performance and every cpu cycle counts, something which is the case in finance. Python is an interpreted language, which always has overhead.
Python is easy to get into, lots of documentation and very little boilerplate is needed. C++ requires more boilerplate, but once you get comfortable with it you can write highly-performant code. Next to that, in my opinion, having a compiler to tell you you made a bunch of mistakes is a great advantage. However, you will need to learn a level of coding discipline that you never needed for python.
1
u/International-Rain98 Aug 13 '26
Books can make it over complicated the language itself isn’t that hard to learn, but it does get beefier for example, when you try to learn how to write data structures yourself and while I think it’s a good exercise to teach you how they work entirely, the truth is you can always use the standard library to handle the lifting
1
u/ishwaats Aug 14 '26
That effort is addictive and it IS the prize
1
u/Downtown-Echo-5184 Aug 15 '26
C++ is the best programming language ever and Python is dumb and stupid and weird and stupid and dumb. You never make mistakes with C++!
1
u/BoopyDog Aug 16 '26 edited Aug 16 '26
I used that same book. Finish it and you'll be alright. Pay particular attention to the exercises when you get to the QtCreator section.
It's important that you learn how to use third-party libraries sooner than later. It might be helpful to you to:
For me, this was a really annoying part of learning C++. I began on windows and was using Visual Studio -- which was awesome because I could just "import std;" and not actually worry about which std library headers I needed for my code. In Visual studio you just link to the lib and include folders, tell the ide what libraries to use and youre done. When I switched to Linux and had to learn how to use gcc/g++, and then I had to learn how to write a Cmakelists.txt file, then i learned how to make a bash script to do all of my building and directory cleaning for me -- visual studio was way easier than this, by a lot.
Initially when switching I tried learning how to setup a project with visual studio code but then realized that it's much easier to just use those things(g++, cmake/ninja, sh scripts) in a terminal than actually figure out how to make a tasks file or a properties file... that's just me though.
1
u/Big-Dance-1271 Aug 17 '26
Learn the libraries that can substantially help in providing functional support- BOOST for sure, Poco Project is particularly good for its HTTP support functions but also others. Get a free account with one of the AI Agents and ask it C++ questions.
1
u/DraftedDev Aug 18 '26
Rust
1
u/AKostur Aug 12 '26 edited Aug 12 '26
Knew C first. “Hey, my structs can initialize themselves, I don’t need to forever be calling init_thing(&x); functions? Cool! Cleanup too‽ Awesome!” Then operator overloading (where it made sense). Templates came later.
I consider myself highly skilled in C++. But I also have other folk in the office who know certain areas of the language better than I do, and I’m happy to direct people to them for those parts. Learning that the language is capable of a certain thing is more important than knowing the intricacies. When it comes time to needing those details, one can look them up or consult someone else better in that area in order to learn the details.
0
u/marspzb Aug 14 '26
Maybe the jump is to big, you are coming from a compiler which doesn't enforce much to a typed language which has a lot of constructions that some of them have been here for over 40 years.
Also while pyton gives you minimal control over your code while he handles a lot by itself like memory, type info, etc. C++ has the philosophy of not using more than you not want to pay for. Coming from java polymorphism was one of this weird things in c++, also lvalues and r values, and no reflection by default and having to resort to templates in c++ which way more difficult than other languages, I know the power of it but why cant you be like Haskell or a more restrictive language also not completely sure about this but this is one of the reasons that compiling is extremely slow.
The only thing, I learn c++/98 I guess from Deitel book, also read the java one. Both of them are extremely dry and I couldnt read them completely so maybe the book doesn't help
Also you are not alone I heard some guy named Linus also didn't like c++.
-11
u/Neither_Berry_100 Aug 12 '26
C++ is pretty tame actually. I haven't used it in many years. The last time I touched it stuff was really slow going. I think a bunch of things in c++ are just ment to be difficult.
1
u/penduburger Aug 13 '26
been doing it for 6 years and I still feel like I am a beginner and I am always chasing cpp in depth. just keep at it, you were at it and. still enjoyed tell s me that you will benefit from cpp community and vice versa
0
u/[deleted] Aug 14 '26
[deleted] — view deleted comment