the key is with C++ you really dont go learning everything in the standards you learn the basics and stick with a subset of C++ and keep learning as you go
Too slippery. Most rookie developers won't know where to quit and look for greener pastures. The benefit of learning C++ is the control you have that you don't get in other languages. That's all contained in the C subset of the language. Most of C++s additions to C are inferior versions of other languages features packaged to be convenient for those who want to retain the C level control. I don't find C++ productive as a transitionary language to teach you machine knowledge because C++ might fool you that an iterator concept in one of these higher level languages are as efficient as explicit indexed for loop. Because they _sometimes_ are in C++. Imo your advice is good for people who need to know C++ imo. It's contrary to prominent Cppcon presenter Kate Gregory, who suggests you don't start from the basics. The argument being that most of C++ has redundant features and the most modern stuff is the best stuff. So instead of indexed for loops, iterators or even ranges. You start with views. That's what I understood from her. I think you lose as much as you gain. Maybe the developer can write good C++ after that. But they will not understand the machine as clearly as someone that's sent concentrated time in asm or C (or a C like subset of C++).
@@panjak323 IMO, learning string management in C is a bad start if you want to transfer over to C++. I really hate manual memory management for strings.
2:35 c/c++ "so fast because of its low level abstractions, compiles to machine code." Well, thats technically true, but not 100% accurrate. It is not fast because of machine code, I could right now write slow machine code using assembly. Its fast because it compiles down to machine code AND has a compiler with DECADES of optimizations techniques under the hood. The optimizations are a LOT. You still can write slow machine code, just go write assembly by hand.
@@blubblurb99% of people can't write better assembly than the compiler though. There are literally decades of optimization knowledge that goes into modern compilers and I doubt most people about them.
@@blubblurbi doubt there are many people who are capable of knowing every extended x86 assembly commands and when to use a certain command to be optimal
@@colin398 Ok to be honest, the only thing I know is that in some projects they write assembly for some critical parts. ffmpeg comes to my mind. There must be a reason they do it and don't let the compiler do it.
I started professionally with C++ in 1992. Switched to Java in 98 doing full stack web dev, then php for a bit, then eventually JS through all the evolutions to node / React. and then Next. Now I'm doing C++ again on embedded audio devices talking to Next web clients via websockets / mqtt. Went full circle. Could not be happier. C++ 20 has some serious extra add-ons from where it started, and you don't need to use them. You can still manage all your own memory allocation if you really need. Love it.
@@siman211Follow a tutorial in C, take note of all the things you hate about C, learn the alternatives in C++ please do not fall into the trap of writing "clean" C++ it will give you a headache
@@siman211 If you're still interesting, I suggest PlatformIO as a good starting point for embedded generally. The Arduino IDE is barely a step above using Notepad++. The HomeAssistant project can also point you to some ESP32 based voice assistants. Which do embedded audio.
@@siman211 You don't "learn" a programming language for audio engineering, a book about audio engineering would be better, read it whilst learning to program things in C++. I have an Audio engineering book, the series it's a part of is " The Newnes Know It All Series", pretty cold book, read a few chapters.
C isn't C++ though, and while C++ can use all of C's features, it is considered out of date and bad practice, like when using raw pointers instead of references or smart pointers.
@@SkyyySi true, but if someone is starting off in the language, most people would follow a tutorial, most tutorials if not all teach raw pointers and C stuff a lot, then when they move in the tutorial they teach about smart pointers and vectors personally, i learned it as my first language at uni, the things i learned were actually C things and that made me think of C++ "oh this language is empty, it doesn't have anything compared to other languages (that happened when i tried java and js), so let me make some things in it like ArrayLists, LinkedLists, Stacks, Queues, a proper Random class (i didn't know about std::random), etc...", and that actually made me a better programmer tbh
I sat through 2 C related courses without even knowing what UB is until I learned Rust. The problem is you don't really learn these things in C, you just do whatever works.
I want to learn C out of respect for all the amazingly talented programmers who wrote all the groundbreaking software we use today. Linux, SQLite, the SQL language itself, Python, Chrome, QT framework, to name a tiny number of them I've used the abstractions of in higher level languages. C/C++ is the foundation of the entire field.
Movie production: Unreal engine is not just a game engine but animation and CGI engine as well for movie production. It's quite competitive and used by the biggest movie makers like Disney.
C++ actually has tons of abstractions (templates, OOP, smart pointers, etc.), and IMO it could be called a multilevel language. You could feasibly write an entire C++ application without ever manually managing memory. It would be more accurate to say that the option is there if you want/need it, but you will not necessarily learn manual memory management by using C++. C is way better for getting a lower level understanding of things.
In fact, if you write a good c++ program, assuming you're not interfacing with any C APIs, it is considered bad practice to do manual memory management... Instead, you should be using things like std::unique_pointer and std::shared_pointer and use actual proper ownership semantics...
The claim of “you learn memory management using C++” was true in C++98 / C++03. With C++11’s smart pointers, you’ll not get manual memory management through a code review anymore. They’ll say: “Use unique_ptr,” or shared_ptr if unique_ptr doesn’t cut it. And rightly so. It expresses intent and saves you from many silly mistakes. There’s a library for a kind-of-GC smart pointer that avoids the destructor hell that can bite you with unique_ptr and shared_ptr.
One of C++ strongest features despite adding new things over time is the philosophy that the developers should not have to pay the price (in compile time, runtime resources etc) for any of them if they don't need it. With that said I can feel that C++ syntax over the years can feel a bit convoluted in places. But the control and flexibility of it has had me coming back for decades :)
I love C++. I'd say, it's strongest feature is it's backwards compatibility. Excluding a few things, it can be easy to keep using an old C program and add new features with C++. Which is how the language managed to get GCC. Unfortunately, that's it's largest weakness. So many programs using the old iterator for loops...
"the philosophy that the developers should not have to pay the price" And that is a nonsense notion. Most other languages look for ways to implement the abstractions in the most efficient way.
As a self taught software engineer, for me what helped actually in visualizing and understanding of memory, assembly, how computer operate at a binary level is not C, but actually writing VM's, can be any VM. I started with Chip-8 (its kinda like the hello world in emulation) and now im looking up to emulate Gambeboy, WASM... This has helped A TON in understanding how a computer works at a binary level. IMHO its a good exercise for everyone to really understand what happens at the 1's and 0's.
i also made a Chip-8 emulator. it's a lot of fun. but i don't think that writing an emulator is a good way to learn a new programming language. as typically it involves all kinds of hacks and you can ignore most of the language and how it was "meant to be used". but it can certainly deepen the understanding of some language features and Assembly language
@@xybersurferYeah thats, true, that's usually the case if you also want to implement bugs that the hardware/software had, or weird quirks. My goal in writing this vm's is not getting a 100% accurrate 1-1 with the hardware, but rather the learning experience I get from them which is not learning a new language but more learn/visualize low level CS concepts!
According to a totally real interview with Bjarne Stroustrup that was never debunked by Bjarne himself, C++ was designed to be so complicated that if you were hired to write a project in that language you could become unreplaceable. This is another aspect of C++ which Rust clearly took inspiration from.
i reckon rust employee could be replaced by anyone else that knows rust. since rust follows a sort of methodology in c++, anything and everything goes and everyone gets to have their own ways of doing things
If it's something small, using g++ or writing simple Makefile should not be a problem. There are also compliers/IDE that do that for you without you needing to know anything about it. When you get to CMake... yeah, it's like language on it's own. But it's cool, customizable cross-platform build system. You can fall in love with it.
@@anonimowelwiatko4455 Yea, for small projects i know enough cmake to get by using vscode with the cmake extension. Ive been considering visual studio as a more industrial option but it looks kind of clunky and expensive. maybe worth it.
@anonimowelwiatko4455 the c++ build system kind of sucks. I don't see any reason why you couldn't configure your whole project compilation from within your code with standard and non-standard compiler directives, as opposed to writing a script for a buildsystem generator to make the project files that are used to instruct the compiler on what to do, just so some rando could use some niche IDE or compiler. I think there could be a standard way to achieve this that doesn't require bending over backwards and learning a new syntax every time you need to use a new buildsystem generator or figure out obscure interoperability issues with your toolchain.
I don't regret learning c++, even though I probably won't ever use it. Because now I can understand how C&C++ libraries compile and work. This is a huge deal, since I couldn't wrap my head around how the compiler handles multiple libraries, headers, etc, and how cmake work. This cleared a lot of things, I mean A LOT. Since no one seems to know how all these systems work lol. If you know how c++ compiler work, then you know how to use different compilers, linker, etc, you will benefit from this even when you learn rust.
Definitely. everybody wants to use their fancy IDEs and build systems and when it actually comes to fix it it'll probably end up being me. also cmake sucks I can't believe people still tolerate it
@@Mallchad i got the impression that it was a must use so i used it for a while for my projects, that was until i tried to compile LLVM from source. I will never use CMake again.
@@somenameidk5278So did I. I gave it a good honest attempt and learned it implimented it fully in 2 seperate projects but I can honestly say I hope I never have to use CMake again. Coming from the overly pedantic Lua and C++ the idea of the language letting you silent fail on incorrect data types and missing braces is incredibly upsetting Also it's supposed to let the user define how they want to build the project locally with variables but its so messy and makes it hard to introduce new variables and logic
@@Mallchad oh hey, also learned lua before c++! LLVM's CMake config is nuts. There is an absurd amount of variables, and some only become available after setting others first, then causing the config step to error, but it will still have generated additional files with more goddamn variables. It even generates ENTIRE SOURCE FILES from CMake scripts, so a file might #include a header that does not exist until you run the generate step. The whole mess took like 5-10 minutes to generate and an HOUR to compile. I wasn't even building every subproject! (at least, i don't think so) Why was building documentation even an option? Since when was English a compiled language?!?
I haven't thought about the C++ space in a while, I've been using mostly other languages for the last 15 years. I started developing in C++ in the early days, when it was just a pre-processor for a C compiler... before the STL, and actually even before templates were a part of the language. Watching it evolve has been interesting. It's good to know C++ is still in demand. The ARM is still one of my favorite computer-language textbooks. C++ is a language that makes me feel weak and powerful at the same time. I can do anything in it, but I have to do everything for it! It's beautiful.
@tames307 could not agree more. I repeat my comment from above for you: I did C++ (03) in a project for many years. Then my main project was in C (microcontroller), but I was able to do it with an object oriented background, and so was my code - way better than before, C on steroids. Parallel a project in C# and JS. But now I return to C++ for a new project after these years, and did adopt some of the new C++11/14/17 stuff relatively natural (async, threads, condition var, foreach, lambda), because I knew the concepts from C# and JS. So I just need to look up the syntax details, and it works smoothly. So yes, switching between languages does influence how you program in other languages, in both directions. (PS: I need to say, that I feel absolutely happy now after a C++ coding day. It was OK when I built something in C, quite OK when Python, a bit more unnerving when doing JS, more unnerving when Powershell, but most unhappy with C# despite of all the fancy syntax. I can't help, it's a great language, but I am unhappy. Therefore, C++ wins my personal feel-happy award.)
I write c++ since 2006 (wrote in c since 1999), and imo the evolution of c++ is very gradual. I can easily read it regardless of the time it was written in. I'd say it's definitely a pro that it keeps getting better and more ergonomic.
@potatopower2144Learn at least C++17, use std::vector, std::unordered stuff and std::optional. Check google style guide (part with exceptions is wrong, exceptions are good since 2015), and just dig through links
I really think everyone should learn(ideally as their first language) C or C++, learning how to manage memory is a really important skill even if you're not the one mallocing and freeing stuff. I remember learning Java(my second language after an introduction to python) and doing a "new" object. I thought it was obvious I should delete that when I was done, so I spent an hour looking for a command to do so. After that hour, I discovered the horrors of garbage collection :(
no one should learn C or C++ as their FIRST language imo. You are underestimating how complicated it would feel to a beginner. (I have friends who are learning programming) What they can do is to be *curious* about what the computer is doing while they're writing javascript or python. And peek at how C does it once in a while. After they learn how to do it in their GC language. Like not because understanding C and memory management at basic level is insanely hard, it's not. It's just that beginners are not so good at researching and finding answers when they get stuck too. And they're already overwhelmed by tons of new concepts, no need to add more on top of it. You have your 'developer intuition' now so it feels like you would crush it if your memory was erased and you started learning C as your first language.
@@sitter2207 Well, it depends on how deep they want to go. If they just want to build simple webapps or automate daily tasks or just have fun with superficial things then sure, js or python are perfect for them. If they want to get into computer science, understand things in a deeper level, then I still think they should start with c/c++. I don't underestimate how hard it is, but it is a little bit of struggle that will make the rest of your life easier. You don't even have to go too deep, just build some data structures, work with pointers and do some graph stuff.
@@sitter2207I'mma push back here. C++ as a first language? Yeah, not gonna go there. But C? C is simple, not complicated. C's rabbit holes only go so far. You hit bedrock pretty fast, so once you get to the point where you have to delve into the details you catch up quick. Python, ruby, etc. look simple for the beginner because they enable you not to have a deep understanding of what's really happening. But once you need to transition into real understanding? Much harder, because that pool is so deep. I learned C as my first serious exposure to programming. Wouldn't trade it for anything. Too useful and too enlightening.
@@sitter2207I disagree, I learned C as first language and it helped me to understand most of computer science concepts and letting me learn other languages easier. Let tell you that the main concepts you need to worry about in C is pointers and that it. Other C concepts are not that difficult to learn. You said beginners don’t know how to research for their problem on top of many concepts. Well, as I said, most C concepts are easy to learn and researching to solve the problems you have is exactly the skill you need to learn as a beginner. I actually believe C is a good first language because it force you to solve all the problems you faced yourself instead of relying on the compiler like Rust or the garbage collector like Java.
@@imagudspellr1644 programming language features are hard to evaluate till you get your head around them. C++ is fast, but hardly the be all end all. Standard ML can be even faster; Fortran is easier to make fast for numeric code. Prolog trivializes a lot of problems with hard to diagram control flow; smalltalk makes python development look a little sluggish. Lisp and haskell give you nigh unparalleled bragging rights. One language to rule them all is how you get a single unreadable, unlearnable language. C++ is really a bit-twiddling language with a ton of extensions.
Me personally, I find c++ to be a lot easier to use because you are able to bootstrap code faster than with rust and refactor and iterate over it later
It's not totally true anymore that are some really great candidates now. Raw CUDA, Go, Rust, C is still valid. that's just the language I'm vaguely aware of
0:33 FACTS - im a big rust enjoyer but when i first started using it i really didnt know anything about memory, nor did i understand why any of the safety features were in place (I thought it was so limited - how can i have a self referential object in java but not rust?). But after i took a course on C/systems development in university, it pretty much forced me to learn about the memory model and i learned so much about other programming languages. Also C programming is kinda fun, in a sort of minimalist way. No more OO or polymorphism or GC or RAII; you gotta figure out how to solve your problem with a simple toolset.
To the finance and trading thing: I once worked for a small trading company that did exactly that. Implementing all the auto trading algorithms, utilities and internal interfaces to the trading venues in C++ from scratch. The standards where really high and it was hella complicated.
Great video, I'll start learning c++ (probably with codeforces or aoc). When the php video out tho. Also, very good of you to leave the ad of the video to help the Dreams of Code!
Learn C no matter what, whenever you are comfortable enough with programming. Then learn C++ and you've kind of learned the history of what object oriented means by just by comparing the two languages.
Wrong. Object oriented programming has nothing to do with C and C++, first OOP languages were Simula and Smalltalk, preceding C and C++. Object oriented way of writing code was present even in the 1950s and 1960s in assembly.
@student9941 ...did I miss the part where OP claimed that C++ was the first OOP language? I am confused why you are arguing a point that no one made.
When I learned "C++" in university, it actually meant "C with iostream.h". We didn't learn anything about STL until the last week and smart pointer was not mentioned It worked out pretty well when we learn reinterpret_cast alongside private attribute
C++ lacks an important aspect of OOP, namely message passing as alternative to function calls. Yes, many other OO languages lack it too, still it is important, it helps to understand how duck-typed polymorphism, decorations etc. work in languages like Python and Javascript, or how GUI work (GUI, being initially written in Smalltalk, makes message passing central). There are three nice ways to understand the message passing: the most difficult is probably to write Windows GUI programs using pure WinAPI. It has lots of unnecessary complexity, like writing virtual functions in plain C, or worse, and leaves lots of frustration-induced "why did they do that". A little bit easier is to really grok Qt, read source files of QObject and related stuff many times, and fully understand how its moc works. Of course, signal-slot system is not exactly the same as message passing, but in many ways it is very close. And the most straightforward way is to learn Objective C and write something for MacOS, iOS, or GNUstep -- it helps in understanding how elegant and effortless GUI programming is when the language is the native language of that GUI, and on the other side it allows programmers to go low level.
Love how instead of skipping over the ad he minimizes his camera and gives the ad attention. That's the sign of a good guy, not just leeching of the content of others
yea i tried learning Python first years ago, and it fell through because a number of seemingly random obstacles from compiler issues to real life problems i got into C++ a couple months ago, and it just clicked. im already writing my own programs and putting together a game engine. i think if i had learned Python back then, it wouldve steered me down the wrong path and made it harder to learn more performant languages, so im grateful to whatever cosmic entity blocked my progress in Python.
re trading platforms... I wouldn't say that everything is done on FPGAs. Often it is routing, parsing, basic validation, etc. The main business logic is often running on a low core, high frequency system running C++ or specially written Java app. Jane Street is the odd man out.
There's a few languages that I've sort of skimmed the top of just to like, in a weird metaphorical way, gain a few extra wrinkles in my brain. Not in order to actually make something, but in order to learn something. C/C++ was one of those languages. It's one of the first languages I learned, after Python, after Java (Java is the language my school started with). I've learned so much from C++ that has helped me even in some of the code I've written in Python for research. It also helped me understand wtf was going on in Java in a way that hadn't really clicked before. For that, I appreciate the language, similarly to how I appreciate Haskell, J and APL for teaching me how to hate myself.
The problem with url based library management is it simply falls flat when you work in a secured environment unless there is something baked into the manager to handle offline usage. If you have mono repos like pypi or whatnot at least you can do a 1 time setup pointing to Artifactory or similar proxy service and get going. If you have 20 different URLs pointing to the public internet it's a nightmare.
I started programming about 2 years ago, have learned like 8 languages, and still find c++ as my favorite alonggside python. A friend of mine at google says all of the backend of youtube is in c++, so it's very useful. I hate rust's BS in stopping you from doing what you want. Cpp gives you the power to do everything you could possibly want, which is akin to freedom, which empowers you.
Rust does have ways of forcing you to do things "more" correctly. Yes in C++ you can move fast, but forget to/miss-handle error values and you'll crash or worse, undefined behavior. C++ is still a great language though, but Rust is trying to help you rather than giving you complete freedom, it's just a difference in approach.
I think C++ biggest practical advantage is the language is based around complete basics. So whenever you want to make something really complicated, you can break it down into basics and write the code easily. If you use language such as C# for it, you have to know a lot of details behind the curtain. I actually find it easier to manage my own memory, then discovering how Garbage collector works and when its called, especially of you write performance critical applications. But the building tools and libraries are pain in the ass though.
I agree, to fully appreciate Rust one must know & use C/C++ or assembler ;)... i just saw presentation about C++ when they are fighthing with mixing of abstactions or abstraction layers and i realised that borrow-checker already keep eye on this in Rust and they slowly try to recreate it. Also i saw presentation about compiler optimizations in Zig and seems they also trying to recreate part of it from scratch.
borrow checking is literally a subset of c++ RAII, which has existed since forever, they're not 'slowly try to recreate it', it was always there for people to use
@@the_mastermage Lol 🤣 You're Right ! Also if you calculated manually bytes of machine code you will appreciate assembler. In '80 on small 8-bit MCUs it wasn't so obvious: very limited resources, not optimising compilers, pricy compilers etc.
@@blubblurb Right and in this response I should write C. If some one start to learn C++ today (C++23) can make quite big applications almost without touching low level.
At college I made the mistake of taking C++ before C. But that was the difference between CIS versus CS in the mid- to late-90's on campus, before even Java took off. I've been waiting for something like Rust and Zig, but if the vast majority of jobs out there are web dev, then why? It's not dead yet. What scares me is there are beginners using Python as a first language. Sorry, but it may be easy and natural, but it's so non-performant without Cython and all kinds of crazy shit logic. C++ still wouldn't hurt a young student. It's on our OS still. C/C++ devs do have that valid argument about Rust and object lifetime, and the inherent tradeoffs. I personally might choose Java over C++ if I started over, but I would still have to take C. Web dev is more like.. fml. And people start out like that, taking system security for granted, never knowing the ins and outs. C++ is like learning your OS before you develop on it, still relevant.
Last project I worked on, we got stuck because the version of Debian we were stuck with only supported cmake 3.18 but the codebase's make file required 3.20 so we had to build cmake from source using ... a slightly older version of cmake
Learning any low-level systems programming language should be a requirement for every developer! Like you said, it helps a developer understand the basics of machine hardware and the hardware-software interface. Whether C, C++, Zig, or ADA, a systems language is valuable knowledge and goes well beyond the language. Whether you should become an expert in one of these language depends entirely on what type of development you wish to do. I would never hire an embedded systems developer who didn't know C and C++ very well. The reverse is not true however. I might hire a web developer who know only a systems programming language. I know someone who knows a systems programming language well will be able to pickup a web language.
In my opinion C/C++ still rocks because it is a) actually very simple (KISS by Denis Ritchie, remember? and b) gets you to the hardware without layers of abstraction and cross-platform VMs and c) there’s so much legacy code out there that finding a decent job won’t be an issue. P.S.: yes, they use C++ in movies: the Renderman ray casting engine (that was used in many CG’s in 90’s and 00’s) was written in C++ and actually the book I used to read about C++ used OOP examples from this engine. P.S.S.: Im doing some projects in Go right now, but mostly because of the hype. If there was no hype, I’d do C++.
@@reinhold1616 Also the expression "C/C++"... as if they were similar languages. Even C is not simple, if you carefully read the standard and identify all the places mentioning UB. I'd rather write Rust code littered with "unsafe", than C code, where anything can blow up if you're not superhuman. And even the best C coders still produce buffer overflows and whatnot.
@@reinhold1616 I think he meant very simple if you don't want to learn all the fancy stuff at once. With C++ every feature is optional, so you can start slow with just C, then C++ with STL like string, vector, map. And then try to learn more and more complicated stuff. Most company have libraries that does what is missing in C++ standard (like multithreading, file system, network) or you can use boost. And most people will not need advanced feature like metaprogramming, playing with atomic, etc ... at their first project or job. And if you already know Rust for example, it is super easy to understand complex stuff like move vs copy, r-value vs l-value, stack vs heap, constness. C++ just does explicitly what Rust does by default (because Rust was invented with the experience acquired by C++ dev)
C is "portable assembly". If you want to know how computers work, without getting into actual assembly, it is a must. C++ is a different story. But it too is a fundamental part of all software today.
Yes, it's used in movie production because a lot of the rendering / tools pipelines are similar to Games. The main difference is that the renderers are usually not real-time (although that's changing now-a-days with Unreal coming into use). But building distributed rendering farms needs a lot of power, performance and stability - so they go with C++. If you think about the tech like Massive (used at Weta), or the renderer Pixar uses etc - these are all C++ applications.
I use C++ only as a better C but I use few of the huge features. My rule is to use only those feautures that you can trully understand how the compiler works. A C compiler is not a huge task to learn how to create, any advanced CS student should be able to handle that. But C++ is likely a 100 man task and never ending. I'm amazed that you brought up FPGAs which are usually programmed in Verilog/VHDL.
@@OryginTech Yes. I work at a firmware shop that serves high end clients, C is still king with some cpp here and there. Rust doesn't do anything for us besides prolonging compilation times. Nowadays it's trivial to write memory safe software if you know what you're doing and use appropriate tools.
HFT here, language is very dependent on the problem. C++ historically has been used in a lot of apps, but I’ve done trading apps in java and even python. I think using C++ is sort of due to a lot of people wanting to use it. That level of latency isn’t required in all markets. Equities is very different than FX for instance. Having said that, people do crazy shit when it comes to market data processing, which some just do assembly for directly.
I’ve tried assembly. That shit is crazy, that memory chunks where you can put only specific type of values, registers, duck that. It was really painful experience. Even tho this language is more than 20-50 years? It was hard to get a good documentation and tutorials.
I learned C, years after C++. C is now my favourite programing language 🙂 I have my own "tools" for safe memory management. I have my own abstract data types, polymorphism and genericity when needed. Without all that C++ ideas I dislike... Rust seems very well designed as a low level language. But when I want to PLAY, nothing compares to C 🙂
I did C++ (03) in a project for many years. Then my main project was in C (microcontroller), but I was able to do it with an object oriented background, and so was my code - way better than before, C on steroids. Parallel a project in C# and JS. But now I return to C++ for a new project after these years, and did adopt some of the new C++11/14/17 stuff relatively natural (async, threads, condition var, foreach, lambda), because I knew the concepts from C# and JS. So I just need to look up the syntax details, and it works smoothly. So yes, switching between languages _does_ influence how you program in other languages, in both directions. (PS: I need to say, that I feel absolutely happy now after a C++ coding day. It was OK when I built something in C, quite OK when Python, a bit more unnerving when doing JS, more unnerving when Powershell, but most unhappy with C# despite of all the fancy syntax. I can't help, it's a great language, but I am unhappy. Therefore, C++ wins my personal feel-happy award.)
Several engineering tools (CADs) are written in C++ and it will be stay probably forever like that (well, forever for me means till I retire, got a bit more 30 years still). These are super interesting topics requiring domain knowledge in fields like mechanics or electronics. What's funny, companies doing such stuff quite often stay under the radar of several people (good for me).
I think everyone should learn C to understand the basics of low-level programming and memory management, but *not* C++. C++ has a ton of features and while you don't need to learn them, the fact that they're there is noise if you're trying to learn low-level programming.
Totally agree. C was my first language, didn't do anything professionally with it. But to this day the knowledge helps me even if I code in Javascript.
@@blubblurb This 100%. The best thing about learning C, even if you don't use it, is that it will make you a better programmer in higher-level languages. It provides better understanding into the cost of all the abstractions other languages offer that many take for granted,. It makes one become more conscious of what is really happening a few layers down., and adjust the coding style accordingly, resulting it more optimized code.
this video actually inspired me to open up an online c compiler and tinker around. Was playing around with int and char arrays, using malloc, free, sizeof. Made my own struct to mimic a higher level language array with a size int. Pretty neat stuff. Not sure where to go from here, maybe the old calculator programming project
I agree C should be learned first. Because C++ was created to extend C and simplify abstraction C developer did a lot manually. But there are important concept that are better explained with C++ than C. Like the dynamic polymorphism (virtual) and static polymorphism (variant). Like the notion of compile time vs runtime. Like difference between copy vs move, l-value vs r-value, RAII (how to bind the lifecycle of a ressource to the stack to be cleaned automatically after use). These concepts are important whatever the language you use, because they are always there in different form. Look at how horrible it is to manage lifecycle of ressources different from memory (like file or connection) in GC language like Python or Java. They have fixed memory but all others are still badly managed. Some language are good to hide it temporarily but a good senior developer will always think about it in his mind.
I think learning a subset of c++ is better for overall programming experience where you stop just after classes, inheritance, polymorphism, and pointers. Don't do smart pointers or all that unless you're engineering in c++. The reason why I like it better for learning than C is because classes and OOP are a massive part of engineering. C++ allows you to learn classes when you're ready, but build plenty of things without them in a c like way
When you finally grasp cool concept of lambdas and find use for them but then you realize that multi layered templates are still haunting your brain 💀💀💀
Regarding git management tooling @15:50 - cmake (yes, that horrible thing again) has FetchContent feature to solve your external dependencies, including these in git repos.
the first time i started programming the teacher didnt tell us anything and said just go, where i thought this isnt for me. (java snake game) then i started my IT apprenticeship and started with C++. the key is to find projects that fit your difficulty. dont learn 5 things at once, or maybe try something else if your stuck. these days chatgpt can also be used for learning not only generating code by asking how its done-then trying it. and after a while you try it again without gpt
Company I work at we develop high traffic shared systems on linux and I find myself turning to C quite often when a system/platform needs a performance (a lot of tcp/udp and stream processing) and/or security boost (yea, security). I don't see enough mid to senior level engineers leveraging and integrating properly with the linux OS to eek out more perf and security (security isn't just about smart pointers). PID namespacing, dynamic chroot'ing, tmpfs , overlay mounting, process forking (proxying), forwarding and process state management.... Linux os and its posix features are powerful tools i suggest any mid to sr level to get more intimate with if they want to level up their system design chops and it's provided to you in a clean C interface (well most of it is clean after kernel 2.4)
The important C++ compilers have implemented most C++ 20 and many C++ 23 features. You can see the state in cppreference unter compiler support. (I can not set a link here.)
11:48 every major C++ compiler has 90+% c++ 20 support and are already implementing C++2b features (C++, 2b of course is supposedly C plus plus 23 but I don't know if C++ 23 was published.. ) also, you are 100% correct. It is a little bit hard to follow
Bloomberg uses a lot of C++ for finance (certainly here in Tokyo). I mean it's used widely enough that publishers actually publish C++ books specifically for the field of Finance.
V Timely! I just wrote my first little C++ program yesterday for an arduino unit (a 4 note "keyboard" with button switches and a single LED). It was like 50 lines and took up 3% of the unit's available memory
10:24 yep, C++ is used in image and video processing, or computer vision, It’s especially when you need to do stuff in real time Also a slightly neglected language when it comes to machine learning as it’s often handy for deploying trained neural networks (I.e inference but not training)
Oh man, 14:55 spoke too hard for me. I just recently started getting back into c++ after doing some go and rust and man... I tried simply setting up Conan to build my project and my god was it -1 If C++ had a cargo like build environment/Package Management I think honestly it would be used a lot more
I'm thinking to learn level design and gaming development, mainly for Unreal Engine 5, so C++ is the main thing to learn besides all the tools for this field.
I set my first goal to learn C++. I want to write a DLL on my own, reverse engineer games. I also feel like I can learn a lot of soft skills by trying to learn C++.
It's not true that C++ has no abstractions for memory management. You can shoot yourself in the foot the pointers but you can also use smart pointers and other abstractions.
The good stuff about C++ is, nothing gets abstracted away. The bad part about C++ is, nothing gets abstracted away. So when you hover over a function and the type is some makro, and that leads to a typedef or a makro of a typedef of a preprocessored makro typedef-makro² that is because four decades ago, multiple companies, most of them insolvent by the time you were born, could not decide about the order of bits and thats why today in 2023, you need to open 15 files to find out what a type really is, while your IDE says "hahaha, nope".
Short answer from a triple A studio engineer with a master's in computer science from UT austin. Yes, you should. Every serious engineer should know c++ simply because of the benefits of understanding the machine. I don't consider people who haven't went deeper than c# as serious engineers. If pointers are hidden from you and you don't understand them, then you're not a serious engineer.
@@AdrianChang-q5f your point? Does this look like an English class? lol I suppose though if you know English so well you haven't spent enough time studying programming.
@@anon1963 As an authority in engineering, that's not how it works. You're strawmanning what I said. when you've actually worked in industry at a few top companies, then come back to me. Your opinion will be similar to mine just like most of the engineers I work with and have worked with. You just don't have the experience to understand
@@hawks3109I'm going to prove that I'm a *SERIOUS* engineer: pointers are just variables that hold address of another variable. there, where's my turing award lol if you think that c++ gives you enough knowledge to know how computer works from ground up then you're not an authority man also you might want to do something about that superiority complex of yours, too much coders have it
the key is with C++ you really dont go learning everything in the standards you learn the basics and stick with a subset of C++ and keep learning as you go
Too slippery. Most rookie developers won't know where to quit and look for greener pastures.
The benefit of learning C++ is the control you have that you don't get in other languages. That's all contained in the C subset of the language. Most of C++s additions to C are inferior versions of other languages features packaged to be convenient for those who want to retain the C level control. I don't find C++ productive as a transitionary language to teach you machine knowledge because C++ might fool you that an iterator concept in one of these higher level languages are as efficient as explicit indexed for loop. Because they _sometimes_ are in C++.
Imo your advice is good for people who need to know C++ imo. It's contrary to prominent Cppcon presenter Kate Gregory, who suggests you don't start from the basics. The argument being that most of C++ has redundant features and the most modern stuff is the best stuff. So instead of indexed for loops, iterators or even ranges. You start with views. That's what I understood from her.
I think you lose as much as you gain. Maybe the developer can write good C++ after that. But they will not understand the machine as clearly as someone that's sent concentrated time in asm or C (or a C like subset of C++).
Alternative is also learning C and slowly switching to C++ and its more advanced features.
@@panjak323 IMO, learning string management in C is a bad start if you want to transfer over to C++. I really hate manual memory management for strings.
@@sledgex9 Almost never have I had to do dynamic strings in C. Most of the times I just used char buffer on stack.
@@sledgex9 c strings just aren't really a thing in c++. always a pain in the ass when you have have to mess with c code that uses it though
2:35 c/c++ "so fast because of its low level abstractions, compiles to machine code." Well, thats technically true, but not 100% accurrate. It is not fast because of machine code, I could right now write slow machine code using assembly. Its fast because it compiles down to machine code AND has a compiler with DECADES of optimizations techniques under the hood. The optimizations are a LOT. You still can write slow machine code, just go write assembly by hand.
Assembly written by hand is usually faster than C or C++ compiled to assembly. At least if you know the assembly for your CPU well.
@@blubblurb99% of people can't write better assembly than the compiler though. There are literally decades of optimization knowledge that goes into modern compilers and I doubt most people about them.
@@blubblurbi doubt there are many people who are capable of knowing every extended x86 assembly commands
and when to use a certain command to be optimal
@@blubblurb No, it usually isn't. Compilers are usually smarter than humans (because a lot of really smart humans made the compilers)
@@colin398 Ok to be honest, the only thing I know is that in some projects they write assembly for some critical parts. ffmpeg comes to my mind. There must be a reason they do it and don't let the compiler do it.
I started professionally with C++ in 1992. Switched to Java in 98 doing full stack web dev, then php for a bit, then eventually JS through all the evolutions to node / React. and then Next. Now I'm doing C++ again on embedded audio devices talking to Next web clients via websockets / mqtt. Went full circle. Could not be happier. C++ 20 has some serious extra add-ons from where it started, and you don't need to use them. You can still manage all your own memory allocation if you really need. Love it.
Any advice on how to learn c++ for embedded audio for begginers? Some courses you recommend? youtube or Udemy?
@@siman211Follow a tutorial in C, take note of all the things you hate about C, learn the alternatives in C++
please do not fall into the trap of writing "clean" C++ it will give you a headache
@@siman211 If you're still interesting, I suggest PlatformIO as a good starting point for embedded generally. The Arduino IDE is barely a step above using Notepad++.
The HomeAssistant project can also point you to some ESP32 based voice assistants. Which do embedded audio.
@@siman211 You don't "learn" a programming language for audio engineering, a book about audio engineering would be better, read it whilst learning to program things in C++. I have an Audio engineering book, the series it's a part of is " The Newnes Know It All Series", pretty cold book, read a few chapters.
Learning C to understand how manual memory management is working and what problems can occur is a very good foundation.
C++ pretty much teaches all those stuff as well.
C isn't C++ though, and while C++ can use all of C's features, it is considered out of date and bad practice, like when using raw pointers instead of references or smart pointers.
@@SkyyySi true, but if someone is starting off in the language, most people would follow a tutorial, most tutorials if not all teach raw pointers and C stuff a lot, then when they move in the tutorial they teach about smart pointers and vectors
personally, i learned it as my first language at uni, the things i learned were actually C things and that made me think of C++ "oh this language is empty, it doesn't have anything compared to other languages (that happened when i tried java and js), so let me make some things in it like ArrayLists, LinkedLists, Stacks, Queues, a proper Random class (i didn't know about std::random), etc...", and that actually made me a better programmer tbh
C++ gives me nightmares
I sat through 2 C related courses without even knowing what UB is until I learned Rust. The problem is you don't really learn these things in C, you just do whatever works.
Yo!!! Thanks for the reaction! I really enjoyed it.
I want to learn C out of respect for all the amazingly talented programmers who wrote all the groundbreaking software we use today. Linux, SQLite, the SQL language itself, Python, Chrome, QT framework, to name a tiny number of them I've used the abstractions of in higher level languages. C/C++ is the foundation of the entire field.
Movie production: Unreal engine is not just a game engine but animation and CGI engine as well for movie production. It's quite competitive and used by the biggest movie makers like Disney.
Agreed.
There is Dreamworks too...
Plus most of the tooling e.g. Maya, Houdini, etc. is all C++, as are almost all of their plugins.
Yep, that's the whole reason I had to learn it, for my job in a post production house
Unreal uses its own dialect of C++. It gives you garbage collection and basic introspection.
> wrote a tradebot in javascript
> made negative profit
sounds legit
C++ actually has tons of abstractions (templates, OOP, smart pointers, etc.), and IMO it could be called a multilevel language. You could feasibly write an entire C++ application without ever manually managing memory. It would be more accurate to say that the option is there if you want/need it, but you will not necessarily learn manual memory management by using C++.
C is way better for getting a lower level understanding of things.
Agreed, also for Data Structures and Algorithms is very good too, you write more but you learn the fundamentals in a very tangible way.
You will still need to do manual memory management even if you use smart pointers.
@@dancom6030 No?
In fact, if you write a good c++ program, assuming you're not interfacing with any C APIs, it is considered bad practice to do manual memory management... Instead, you should be using things like std::unique_pointer and std::shared_pointer and use actual proper ownership semantics...
The claim of “you learn memory management using C++” was true in C++98 / C++03. With C++11’s smart pointers, you’ll not get manual memory management through a code review anymore. They’ll say: “Use unique_ptr,” or shared_ptr if unique_ptr doesn’t cut it. And rightly so. It expresses intent and saves you from many silly mistakes. There’s a library for a kind-of-GC smart pointer that avoids the destructor hell that can bite you with unique_ptr and shared_ptr.
One of C++ strongest features despite adding new things over time is the philosophy that the developers should not have to pay the price (in compile time, runtime resources etc) for any of them if they don't need it. With that said I can feel that C++ syntax over the years can feel a bit convoluted in places. But the control and flexibility of it has had me coming back for decades :)
Same here, I've spent 2 decades in trying to leave it but now finally could not resist anymore and just accepted it
C++ not follows it 100% I do not use printf but 'cause of its sync with cout the cout is 2 times slower
@@thegod3500disable it then, literally 1 line of code
I love C++. I'd say, it's strongest feature is it's backwards compatibility. Excluding a few things, it can be easy to keep using an old C program and add new features with C++. Which is how the language managed to get GCC. Unfortunately, that's it's largest weakness. So many programs using the old iterator for loops...
"the philosophy that the developers should not have to pay the price"
And that is a nonsense notion. Most other languages look for ways to implement the abstractions in the most efficient way.
As a self taught software engineer, for me what helped actually in visualizing and understanding of memory, assembly, how computer operate at a binary level is not C, but actually writing VM's, can be any VM. I started with Chip-8 (its kinda like the hello world in emulation) and now im looking up to emulate Gambeboy, WASM... This has helped A TON in understanding how a computer works at a binary level. IMHO its a good exercise for everyone to really understand what happens at the 1's and 0's.
How did you render it, on web or SDL or something else.
i also made a Chip-8 emulator. it's a lot of fun. but i don't think that writing an emulator is a good way to learn a new programming language. as typically it involves all kinds of hacks and you can ignore most of the language and how it was "meant to be used". but it can certainly deepen the understanding of some language features and Assembly language
That's a good idea, should also do that some day.
@@soumen_pradhanit depends on the language you choose, I used rust, and used the SDL-Rust binding lib!
@@xybersurferYeah thats, true, that's usually the case if you also want to implement bugs that the hardware/software had, or weird quirks. My goal in writing this vm's is not getting a 100% accurrate 1-1 with the hardware, but rather the learning experience I get from them which is not learning a new language but more learn/visualize low level CS concepts!
According to a totally real interview with Bjarne Stroustrup that was never debunked by Bjarne himself, C++ was designed to be so complicated that if you were hired to write a project in that language you could become unreplaceable. This is another aspect of C++ which Rust clearly took inspiration from.
The final destiny of a C++ program is Java or JavaScript.
@@ea_naseer aren't those the same?
i reckon rust employee could be replaced by anyone else that knows rust. since rust follows a sort of methodology
in c++, anything and everything goes and everyone gets to have their own ways of doing things
@@hakadmedia Certainly not. Java and Javascript are very different languages. Despite their apparent similarity in using a C like syntax.
ROFL but true
Modern C++ is awesome. I love writing code in it. Building actual projects with C++ can be a huge pain in the ass though.
If it's something small, using g++ or writing simple Makefile should not be a problem. There are also compliers/IDE that do that for you without you needing to know anything about it. When you get to CMake... yeah, it's like language on it's own. But it's cool, customizable cross-platform build system. You can fall in love with it.
@@anonimowelwiatko4455 Yea, for small projects i know enough cmake to get by using vscode with the cmake extension. Ive been considering visual studio as a more industrial option but it looks kind of clunky and expensive. maybe worth it.
@anonimowelwiatko4455 the c++ build system kind of sucks. I don't see any reason why you couldn't configure your whole project compilation from within your code with standard and non-standard compiler directives, as opposed to writing a script for a buildsystem generator to make the project files that are used to instruct the compiler on what to do, just so some rando could use some niche IDE or compiler. I think there could be a standard way to achieve this that doesn't require bending over backwards and learning a new syntax every time you need to use a new buildsystem generator or figure out obscure interoperability issues with your toolchain.
then what did you use c++ for? low level code kinds thing?
@@briannoel7398 because systems differ, there is more than one C++ compiler and cross compliation give you tools to customize it?
I don't regret learning c++, even though I probably won't ever use it. Because now I can understand how C&C++ libraries compile and work. This is a huge deal, since I couldn't wrap my head around how the compiler handles multiple libraries, headers, etc, and how cmake work. This cleared a lot of things, I mean A LOT. Since no one seems to know how all these systems work lol. If you know how c++ compiler work, then you know how to use different compilers, linker, etc, you will benefit from this even when you learn rust.
We may have gone through a similar (huge) C/C++ learning curve, but I'm sure we agree on the same thing - C++ is AWESOME!
Definitely. everybody wants to use their fancy IDEs and build systems and when it actually comes to fix it it'll probably end up being me.
also cmake sucks I can't believe people still tolerate it
@@Mallchad i got the impression that it was a must use so i used it for a while for my projects, that was until i tried to compile LLVM from source. I will never use CMake again.
@@somenameidk5278So did I.
I gave it a good honest attempt and learned it implimented it fully in 2 seperate projects but I can honestly say I hope I never have to use CMake again.
Coming from the overly pedantic Lua and C++ the idea of the language letting you silent fail on incorrect data types and missing braces is incredibly upsetting
Also it's supposed to let the user define how they want to build the project locally with variables but its so messy and makes it hard to introduce new variables and logic
@@Mallchad oh hey, also learned lua before c++! LLVM's CMake config is nuts. There is an absurd amount of variables, and some only become available after setting others first, then causing the config step to error, but it will still have generated additional files with more goddamn variables. It even generates ENTIRE SOURCE FILES from CMake scripts, so a file might #include a header that does not exist until you run the generate step. The whole mess took like 5-10 minutes to generate and an HOUR to compile. I wasn't even building every subproject! (at least, i don't think so) Why was building documentation even an option? Since when was English a compiled language?!?
I haven't thought about the C++ space in a while, I've been using mostly other languages for the last 15 years. I started developing in C++ in the early days, when it was just a pre-processor for a C compiler... before the STL, and actually even before templates were a part of the language. Watching it evolve has been interesting.
It's good to know C++ is still in demand. The ARM is still one of my favorite computer-language textbooks.
C++ is a language that makes me feel weak and powerful at the same time. I can do anything in it, but I have to do everything for it! It's beautiful.
@tames307 could not agree more. I repeat my comment from above for you:
I did C++ (03) in a project for many years. Then my main project was in C (microcontroller), but I was able to do it with an object oriented background, and so was my code - way better than before, C on steroids. Parallel a project in C# and JS. But now I return to C++ for a new project after these years, and did adopt some of the new C++11/14/17 stuff relatively natural (async, threads, condition var, foreach, lambda), because I knew the concepts from C# and JS. So I just need to look up the syntax details, and it works smoothly.
So yes, switching between languages does influence how you program in other languages, in both directions.
(PS: I need to say, that I feel absolutely happy now after a C++ coding day. It was OK when I built something in C, quite OK when Python, a bit more unnerving when doing JS, more unnerving when Powershell, but most unhappy with C# despite of all the fancy syntax. I can't help, it's a great language, but I am unhappy. Therefore, C++ wins my personal feel-happy award.)
I write c++ since 2006 (wrote in c since 1999), and imo the evolution of c++ is very gradual. I can easily read it regardless of the time it was written in. I'd say it's definitely a pro that it keeps getting better and more ergonomic.
@potatopower2144Learn at least C++17, use std::vector, std::unordered stuff and std::optional.
Check google style guide (part with exceptions is wrong, exceptions are good since 2015), and just dig through links
@potatopower2144Buy a book
I really think everyone should learn(ideally as their first language) C or C++, learning how to manage memory is a really important skill even if you're not the one mallocing and freeing stuff. I remember learning Java(my second language after an introduction to python) and doing a "new" object. I thought it was obvious I should delete that when I was done, so I spent an hour looking for a command to do so. After that hour, I discovered the horrors of garbage collection :(
no one should learn C or C++ as their FIRST language imo. You are underestimating how complicated it would feel to a beginner. (I have friends who are learning programming)
What they can do is to be *curious* about what the computer is doing while they're writing javascript or python. And peek at how C does it once in a while. After they learn how to do it in their GC language.
Like not because understanding C and memory management at basic level is insanely hard, it's not. It's just that beginners are not so good at researching and finding answers when they get stuck too. And they're already overwhelmed by tons of new concepts, no need to add more on top of it. You have your 'developer intuition' now so it feels like you would crush it if your memory was erased and you started learning C as your first language.
@@sitter2207 Well, it depends on how deep they want to go. If they just want to build simple webapps or automate daily tasks or just have fun with superficial things then sure, js or python are perfect for them. If they want to get into computer science, understand things in a deeper level, then I still think they should start with c/c++.
I don't underestimate how hard it is, but it is a little bit of struggle that will make the rest of your life easier. You don't even have to go too deep, just build some data structures, work with pointers and do some graph stuff.
@@sitter2207I'mma push back here. C++ as a first language? Yeah, not gonna go there. But C? C is simple, not complicated. C's rabbit holes only go so far. You hit bedrock pretty fast, so once you get to the point where you have to delve into the details you catch up quick.
Python, ruby, etc. look simple for the beginner because they enable you not to have a deep understanding of what's really happening. But once you need to transition into real understanding? Much harder, because that pool is so deep.
I learned C as my first serious exposure to programming. Wouldn't trade it for anything. Too useful and too enlightening.
@@sitter2207I disagree, I learned C as first language and it helped me to understand most of computer science concepts and letting me learn other languages easier. Let tell you that the main concepts you need to worry about in C is pointers and that it. Other C concepts are not that difficult to learn. You said beginners don’t know how to research for their problem on top of many concepts. Well, as I said, most C concepts are easy to learn and researching to solve the problems you have is exactly the skill you need to learn as a beginner. I actually believe C is a good first language because it force you to solve all the problems you faced yourself instead of relying on the compiler like Rust or the garbage collector like Java.
@@imagudspellr1644 programming language features are hard to evaluate till you get your head around them. C++ is fast, but hardly the be all end all. Standard ML can be even faster; Fortran is easier to make fast for numeric code. Prolog trivializes a lot of problems with hard to diagram control flow; smalltalk makes python development look a little sluggish. Lisp and haskell give you nigh unparalleled bragging rights. One language to rule them all is how you get a single unreadable, unlearnable language. C++ is really a bit-twiddling language with a ton of extensions.
Me personally, I find c++ to be a lot easier to use because you are able to bootstrap code faster than with rust and refactor and iterate over it later
Make, CMake, Ninja, Meson
C++ can be nice. what people do with it can be horrible.
@sealsharp like what ?
@@sytnoff1 how much C++ have you written? how often do you have to work with other people's code?
@@gwentarinokripperinolkjdsf683 i am learning it , just doing snake game code practice stuff now
C++ is also the go to language for high performance computing, since it is the only viable option if you don't want to use Fortran or C
It's not totally true anymore that are some really great candidates now. Raw CUDA, Go, Rust, C is still valid. that's just the language I'm vaguely aware of
@@Mallchad sry, I meant if you do distributed memory parallelization using MPI. For that, C++ is kind of the standard, at least in my domain
0:33 FACTS - im a big rust enjoyer but when i first started using it i really didnt know anything about memory, nor did i understand why any of the safety features were in place (I thought it was so limited - how can i have a self referential object in java but not rust?). But after i took a course on C/systems development in university, it pretty much forced me to learn about the memory model and i learned so much about other programming languages.
Also C programming is kinda fun, in a sort of minimalist way. No more OO or polymorphism or GC or RAII; you gotta figure out how to solve your problem with a simple toolset.
I just feel comfy with C++
To the finance and trading thing:
I once worked for a small trading company that did exactly that. Implementing all the auto trading algorithms, utilities and internal interfaces to the trading venues in C++ from scratch. The standards where really high and it was hella complicated.
Yea C++ is the only language that really makes sense for finance
Where does that system deployed? Is it on premise system?
Great video, I'll start learning c++ (probably with codeforces or aoc).
When the php video out tho.
Also, very good of you to leave the ad of the video to help the Dreams of Code!
short answer: absolutely, but learning C and then C++ would be the best way to go.
learning by doing gamedev on c++ myself. Supporting this.
Learn C no matter what, whenever you are comfortable enough with programming. Then learn C++ and you've kind of learned the history of what object oriented means by just by comparing the two languages.
Wrong. Object oriented programming has nothing to do with C and C++, first OOP languages were Simula and Smalltalk, preceding C and C++. Object oriented way of writing code was present even in the 1950s and 1960s in assembly.
@student9941 ...did I miss the part where OP claimed that C++ was the first OOP language? I am confused why you are arguing a point that no one made.
@@ForeverZer0average redditor. Not that it’s not valid
When I learned "C++" in university, it actually meant "C with iostream.h". We didn't learn anything about STL until the last week and smart pointer was not mentioned
It worked out pretty well when we learn reinterpret_cast alongside private attribute
C++ lacks an important aspect of OOP, namely message passing as alternative to function calls. Yes, many other OO languages lack it too, still it is important, it helps to understand how duck-typed polymorphism, decorations etc. work in languages like Python and Javascript, or how GUI work (GUI, being initially written in Smalltalk, makes message passing central).
There are three nice ways to understand the message passing: the most difficult is probably to write Windows GUI programs using pure WinAPI. It has lots of unnecessary complexity, like writing virtual functions in plain C, or worse, and leaves lots of frustration-induced "why did they do that". A little bit easier is to really grok Qt, read source files of QObject and related stuff many times, and fully understand how its moc works. Of course, signal-slot system is not exactly the same as message passing, but in many ways it is very close. And the most straightforward way is to learn Objective C and write something for MacOS, iOS, or GNUstep -- it helps in understanding how elegant and effortless GUI programming is when the language is the native language of that GUI, and on the other side it allows programmers to go low level.
Love how instead of skipping over the ad he minimizes his camera and gives the ad attention. That's the sign of a good guy, not just leeching of the content of others
yea i tried learning Python first years ago, and it fell through because a number of seemingly random obstacles from compiler issues to real life problems
i got into C++ a couple months ago, and it just clicked. im already writing my own programs and putting together a game engine.
i think if i had learned Python back then, it wouldve steered me down the wrong path and made it harder to learn more performant languages, so im grateful to whatever cosmic entity blocked my progress in Python.
Learning C++ is like military training even if you're not going to use it it'll make your life easier.
re trading platforms... I wouldn't say that everything is done on FPGAs. Often it is routing, parsing, basic validation, etc. The main business logic is often running on a low core, high frequency system running C++ or specially written Java app. Jane Street is the odd man out.
There's a few languages that I've sort of skimmed the top of just to like, in a weird metaphorical way, gain a few extra wrinkles in my brain. Not in order to actually make something, but in order to learn something. C/C++ was one of those languages. It's one of the first languages I learned, after Python, after Java (Java is the language my school started with). I've learned so much from C++ that has helped me even in some of the code I've written in Python for research. It also helped me understand wtf was going on in Java in a way that hadn't really clicked before. For that, I appreciate the language, similarly to how I appreciate Haskell, J and APL for teaching me how to hate myself.
The problem with url based library management is it simply falls flat when you work in a secured environment unless there is something baked into the manager to handle offline usage. If you have mono repos like pypi or whatnot at least you can do a 1 time setup pointing to Artifactory or similar proxy service and get going. If you have 20 different URLs pointing to the public internet it's a nightmare.
I went from Go and Python in my old job to C++ full time in my new job and I love it.
I started programming about 2 years ago, have learned like 8 languages, and still find c++ as my favorite alonggside python. A friend of mine at google says all of the backend of youtube is in c++, so it's very useful. I hate rust's BS in stopping you from doing what you want. Cpp gives you the power to do everything you could possibly want, which is akin to freedom, which empowers you.
Rust does have ways of forcing you to do things "more" correctly. Yes in C++ you can move fast, but forget to/miss-handle error values and you'll crash or worse, undefined behavior. C++ is still a great language though, but Rust is trying to help you rather than giving you complete freedom, it's just a difference in approach.
I think C++ biggest practical advantage is the language is based around complete basics. So whenever you want to make something really complicated, you can break it down into basics and write the code easily. If you use language such as C# for it, you have to know a lot of details behind the curtain. I actually find it easier to manage my own memory, then discovering how Garbage collector works and when its called, especially of you write performance critical applications. But the building tools and libraries are pain in the ass though.
I like that Prime still uses the word "pessimized" after he learned it from Casey Muratori
Oooh! He shouted him out!
Casey Muratpr is a genius!
Im working as sw engineer in the medTec field - Nearly all medical softwares which have to fullfill certain performance metrics are written in C++
The fact that major slice of langauges for game engines, OS, and embedded are C/C++ says it all
I agree, to fully appreciate Rust one must know & use C/C++ or assembler ;)... i just saw presentation about C++ when they are fighthing with mixing of abstactions or abstraction layers and i realised that borrow-checker already keep eye on this in Rust and they slowly try to recreate it.
Also i saw presentation about compiler optimizations in Zig and seems they also trying to recreate part of it from scratch.
If you learnt assembler you start to appreciate C all the more.
borrow checking is literally a subset of c++ RAII, which has existed since forever, they're not 'slowly try to recreate it', it was always there for people to use
@@the_mastermage Lol 🤣 You're Right !
Also if you calculated manually bytes of machine code you will appreciate assembler. In '80 on small 8-bit MCUs it wasn't so obvious: very limited resources, not optimising compilers, pricy compilers etc.
@@AK-vx4dy Please don't use C/C++ as those are 2 different languages. But I agree otherwise.
@@blubblurb Right and in this response I should write C. If some one start to learn C++ today (C++23) can make quite big applications almost without touching low level.
At college I made the mistake of taking C++ before C. But that was the difference between CIS versus CS in the mid- to late-90's on campus, before even Java took off. I've been waiting for something like Rust and Zig, but if the vast majority of jobs out there are web dev, then why? It's not dead yet. What scares me is there are beginners using Python as a first language. Sorry, but it may be easy and natural, but it's so non-performant without Cython and all kinds of crazy shit logic. C++ still wouldn't hurt a young student. It's on our OS still. C/C++ devs do have that valid argument about Rust and object lifetime, and the inherent tradeoffs. I personally might choose Java over C++ if I started over, but I would still have to take C. Web dev is more like.. fml. And people start out like that, taking system security for granted, never knowing the ins and outs. C++ is like learning your OS before you develop on it, still relevant.
Last project I worked on, we got stuck because the version of Debian we were stuck with only supported cmake 3.18 but the codebase's make file required 3.20 so we had to build cmake from source using ... a slightly older version of cmake
Learning any low-level systems programming language should be a requirement for every developer! Like you said, it helps a developer understand the basics of machine hardware and the hardware-software interface. Whether C, C++, Zig, or ADA, a systems language is valuable knowledge and goes well beyond the language. Whether you should become an expert in one of these language depends entirely on what type of development you wish to do. I would never hire an embedded systems developer who didn't know C and C++ very well. The reverse is not true however. I might hire a web developer who know only a systems programming language. I know someone who knows a systems programming language well will be able to pickup a web language.
In my opinion C/C++ still rocks because it is a) actually very simple (KISS by Denis Ritchie, remember? and b) gets you to the hardware without layers of abstraction and cross-platform VMs and c) there’s so much legacy code out there that finding a decent job won’t be an issue.
P.S.: yes, they use C++ in movies: the Renderman ray casting engine (that was used in many CG’s in 90’s and 00’s) was written in C++ and actually the book I used to read about C++ used OOP examples from this engine.
P.S.S.: Im doing some projects in Go right now, but mostly because of the hype. If there was no hype, I’d do C++.
C++ is "very simple"? are we talking about the same C++?
@@reinhold1616 Also the expression "C/C++"... as if they were similar languages. Even C is not simple, if you carefully read the standard and identify all the places mentioning UB. I'd rather write Rust code littered with "unsafe", than C code, where anything can blow up if you're not superhuman. And even the best C coders still produce buffer overflows and whatnot.
@@reinhold1616 I think he meant very simple if you don't want to learn all the fancy stuff at once.
With C++ every feature is optional, so you can start slow with just C, then C++ with STL like string, vector, map. And then try to learn more and more complicated stuff.
Most company have libraries that does what is missing in C++ standard (like multithreading, file system, network) or you can use boost.
And most people will not need advanced feature like metaprogramming, playing with atomic, etc ... at their first project or job.
And if you already know Rust for example, it is super easy to understand complex stuff like move vs copy, r-value vs l-value, stack vs heap, constness.
C++ just does explicitly what Rust does by default (because Rust was invented with the experience acquired by C++ dev)
@@reinhold1616 What is so difficult in C++? OOP?
@@bytefu Absence of GC is ultimate feeling of freedom. It’s like sex without a condom, if you will.
That is entirely accurate. C++ is widely used in HFT
C is "portable assembly". If you want to know how computers work, without getting into actual assembly, it is a must. C++ is a different story. But it too is a fundamental part of all software today.
Piq I love your editing quips keep ‘em coming
I love it when a good editor inserts their own flavor into a video. Doesn't have to be every video, but it's nice to have some extra flavor.
Yes, it's used in movie production because a lot of the rendering / tools pipelines are similar to Games. The main difference is that the renderers are usually not real-time (although that's changing now-a-days with Unreal coming into use). But building distributed rendering farms needs a lot of power, performance and stability - so they go with C++. If you think about the tech like Massive (used at Weta), or the renderer Pixar uses etc - these are all C++ applications.
I use C++ only as a better C but I use few of the huge features. My rule is to use only those feautures that you can trully understand how the compiler works.
A C compiler is not a huge task to learn how to create, any advanced CS student should be able to handle that. But C++ is likely a 100 man task and never ending.
I'm amazed that you brought up FPGAs which are usually programmed in Verilog/VHDL.
C++ is pure love. It is still widely used in the HW industry, and that ain't going nowhere.
What's HW industry ?
@@soumen_pradhanHardware industry. CPUs, GPUs, TPUs, runtimes, drivers, compilers
@@thomassynthsSo it’s used in the computer industry? 😂
You sure about that? 😂
@@OryginTech Yes. I work at a firmware shop that serves high end clients, C is still king with some cpp here and there. Rust doesn't do anything for us besides prolonging compilation times. Nowadays it's trivial to write memory safe software if you know what you're doing and use appropriate tools.
Re littlefinger:
"Chaos... is a ladder." Is one of the coolest lines in TV history
C is definitely more popular in the embedded systems area, however, C++ does just as well in that industry too
There are programmers (Assembly/C/C++) and there is everyone else.
Best reason why c++ is relevant is its compatibility with C and the Vulkan API which is amazing when it works.
Love how Prime has a bleep button on his desk. amazing 🤣
Best of both worlds?: I'd say monogluteal implementations of every new feature. (Remember Dijkstra's discussion of PL/I? C++ has taken PL/I's place.)
14:46 the cmake rant is great. I too was using makefile all the way
4:15 int x = new int(42); // Assigning a pointer to a value is one of the iconic mistakes that needs to be avoided in C++.
Prime is going out of his way to make me feel old.
HFT here, language is very dependent on the problem. C++ historically has been used in a lot of apps, but I’ve done trading apps in java and even python. I think using C++ is sort of due to a lot of people wanting to use it. That level of latency isn’t required in all markets. Equities is very different than FX for instance. Having said that, people do crazy shit when it comes to market data processing, which some just do assembly for directly.
I’ve tried assembly. That shit is crazy, that memory chunks where you can put only specific type of values, registers, duck that. It was really painful experience. Even tho this language is more than 20-50 years? It was hard to get a good documentation and tutorials.
I learned C, years after C++. C is now my favourite programing language 🙂
I have my own "tools" for safe memory management. I have my own abstract data types, polymorphism and genericity when needed. Without all that C++ ideas I dislike...
Rust seems very well designed as a low level language. But when I want to PLAY, nothing compares to C 🙂
I did C++ (03) in a project for many years. Then my main project was in C (microcontroller), but I was able to do it with an object oriented background, and so was my code - way better than before, C on steroids. Parallel a project in C# and JS. But now I return to C++ for a new project after these years, and did adopt some of the new C++11/14/17 stuff relatively natural (async, threads, condition var, foreach, lambda), because I knew the concepts from C# and JS. So I just need to look up the syntax details, and it works smoothly.
So yes, switching between languages _does_ influence how you program in other languages, in both directions.
(PS: I need to say, that I feel absolutely happy now after a C++ coding day. It was OK when I built something in C, quite OK when Python, a bit more unnerving when doing JS, more unnerving when Powershell, but most unhappy with C# despite of all the fancy syntax. I can't help, it's a great language, but I am unhappy. Therefore, C++ wins my personal feel-happy award.)
Bloomberg is a typical C++ shop; and a lot of trading firms use C++ (under the radar).
Renaissance Technologies as well 🤗
Best way to learn memory management is to write a linked list in C.
No. Don't learn C++ so I can keep my salary bids high! LOL
I think learning c or c++ is a pretty much a must for a developer. Memory is the most important resource, and understanding it is crucial.
11:15
What's wild is I'm still using an internet protocol that was invented 2 years before C++!
just watched about an hours worth of GoT clips and needed a change of pace so I came here. Man starts talking about middlefinger.
I use to hate on C++ but now I find learning all of its complexities really fun.
me too, now i like c++
Littlefinger tried to have Bran Stark killed, not Joffrey. That was the Olenna Tyrell
Several engineering tools (CADs) are written in C++ and it will be stay probably forever like that (well, forever for me means till I retire, got a bit more 30 years still). These are super interesting topics requiring domain knowledge in fields like mechanics or electronics. What's funny, companies doing such stuff quite often stay under the radar of several people (good for me).
I wanted to watch a Prime video on C++, I ended up hearing Game of Throne spoilers about littlefinger's demise 🤣
I think everyone should learn C to understand the basics of low-level programming and memory management, but *not* C++. C++ has a ton of features and while you don't need to learn them, the fact that they're there is noise if you're trying to learn low-level programming.
Totally agree. C was my first language, didn't do anything professionally with it. But to this day the knowledge helps me even if I code in Javascript.
@@blubblurb This 100%. The best thing about learning C, even if you don't use it, is that it will make you a better programmer in higher-level languages. It provides better understanding into the cost of all the abstractions other languages offer that many take for granted,. It makes one become more conscious of what is really happening a few layers down., and adjust the coding style accordingly, resulting it more optimized code.
this video actually inspired me to open up an online c compiler and tinker around. Was playing around with int and char arrays, using malloc, free, sizeof. Made my own struct to mimic a higher level language array with a size int. Pretty neat stuff. Not sure where to go from here, maybe the old calculator programming project
I agree C should be learned first. Because C++ was created to extend C and simplify abstraction C developer did a lot manually.
But there are important concept that are better explained with C++ than C.
Like the dynamic polymorphism (virtual) and static polymorphism (variant).
Like the notion of compile time vs runtime.
Like difference between copy vs move, l-value vs r-value, RAII (how to bind the lifecycle of a ressource to the stack to be cleaned automatically after use).
These concepts are important whatever the language you use, because they are always there in different form.
Look at how horrible it is to manage lifecycle of ressources different from memory (like file or connection) in GC language like Python or Java. They have fixed memory but all others are still badly managed.
Some language are good to hide it temporarily but a good senior developer will always think about it in his mind.
I think learning a subset of c++ is better for overall programming experience where you stop just after classes, inheritance, polymorphism, and pointers. Don't do smart pointers or all that unless you're engineering in c++. The reason why I like it better for learning than C is because classes and OOP are a massive part of engineering. C++ allows you to learn classes when you're ready, but build plenty of things without them in a c like way
15:03 Wait, did he censor himself in real-time over doing it in post hahaha awesome 😂
When you finally grasp cool concept of lambdas and find use for them but then you realize that multi layered templates are still haunting your brain 💀💀💀
Regarding git management tooling @15:50 - cmake (yes, that horrible thing again) has FetchContent feature to solve your external dependencies, including these in git repos.
great for audio programming too with low latency and fast runtime
the first time i started programming the teacher didnt tell us anything and said just go, where i thought this isnt for me. (java snake game)
then i started my IT apprenticeship and started with C++. the key is to find projects that fit your difficulty. dont learn 5 things at once, or maybe try something else if your stuck.
these days chatgpt can also be used for learning not only generating code by asking how its done-then trying it. and after a while you try it again without gpt
Company I work at we develop high traffic shared systems on linux and I find myself turning to C quite often when a system/platform needs a performance (a lot of tcp/udp and stream processing) and/or security boost (yea, security). I don't see enough mid to senior level engineers leveraging and integrating properly with the linux OS to eek out more perf and security (security isn't just about smart pointers). PID namespacing, dynamic chroot'ing, tmpfs , overlay mounting, process forking (proxying), forwarding and process state management.... Linux os and its posix features are powerful tools i suggest any mid to sr level to get more intimate with if they want to level up their system design chops and it's provided to you in a clean C interface (well most of it is clean after kernel 2.4)
The important C++ compilers have implemented most C++ 20 and many C++ 23 features. You can see the state in cppreference unter compiler support. (I can not set a link here.)
11:48 every major C++ compiler has 90+% c++ 20 support and are already implementing C++2b features (C++, 2b of course is supposedly C plus plus 23 but I don't know if C++ 23 was published.. ) also, you are 100% correct. It is a little bit hard to follow
The only features of C++ 17 that aren't implemented are the ones that would be nearly technically impossible to implement...
c++ lambda expressions melt people's brains. lol. :) it's very fun to see people go "wtf is this?"
Bloomberg uses a lot of C++ for finance (certainly here in Tokyo). I mean it's used widely enough that publishers actually publish C++ books specifically for the field of Finance.
V Timely! I just wrote my first little C++ program yesterday for an arduino unit (a 4 note "keyboard" with button switches and a single LED). It was like 50 lines and took up 3% of the unit's available memory
10:24 yep, C++ is used in image and video processing, or computer vision, It’s especially when you need to do stuff in real time
Also a slightly neglected language when it comes to machine learning as it’s often handy for deploying trained neural networks (I.e inference but not training)
Oh man, 14:55 spoke too hard for me. I just recently started getting back into c++ after doing some go and rust and man... I tried simply setting up Conan to build my project and my god was it -1
If C++ had a cargo like build environment/Package Management I think honestly it would be used a lot more
I subscribed to you solely because your chat is in comic-sans
In Eastern Europe they teach C/C++ right from high school
I'm thinking to learn level design and gaming development, mainly for Unreal Engine 5, so C++ is the main thing to learn besides all the tools for this field.
I stopped using C++ 20 years ago. I don't recognize it anymore.
I only understood oop in C++, in java and c# didn't understand anything at first
I set my first goal to learn C++. I want to write a DLL on my own, reverse engineer games. I also feel like I can learn a lot of soft skills by trying to learn C++.
Great channel to find actual videos I would watch
It's not true that C++ has no abstractions for memory management. You can shoot yourself in the foot the pointers but you can also use smart pointers and other abstractions.
Most compilers are written in C/C++ or VMs (for example JVM). So, whatever you use, you use C generated code.
NASA uses JavaScript to communicate with JWST... clearly a mission critical language
The good stuff about C++ is, nothing gets abstracted away.
The bad part about C++ is, nothing gets abstracted away.
So when you hover over a function and the type is some makro, and that leads to a typedef or a makro of a typedef of a preprocessored makro typedef-makro² that is because four decades ago, multiple companies, most of them insolvent by the time you were born, could not decide about the order of bits and thats why today in 2023, you need to open 15 files to find out what a type really is, while your IDE says "hahaha, nope".
my first cs programming course my prof made us use vi. keep in mind this was my FIRST experience programming
Short answer from a triple A studio engineer with a master's in computer science from UT austin. Yes, you should. Every serious engineer should know c++ simply because of the benefits of understanding the machine. I don't consider people who haven't went deeper than c# as serious engineers. If pointers are hidden from you and you don't understand them, then you're not a serious engineer.
"People who haven't gone"*
@@AdrianChang-q5f your point? Does this look like an English class? lol I suppose though if you know English so well you haven't spent enough time studying programming.
cap, if you don't mine silicon and create your own cpu yourself. then you are not a serious engineer
@@anon1963 As an authority in engineering, that's not how it works. You're strawmanning what I said. when you've actually worked in industry at a few top companies, then come back to me. Your opinion will be similar to mine just like most of the engineers I work with and have worked with. You just don't have the experience to understand
@@hawks3109I'm going to prove that I'm a *SERIOUS* engineer: pointers are just variables that hold address of another variable. there, where's my turing award lol
if you think that c++ gives you enough knowledge to know how computer works from ground up then you're not an authority man
also you might want to do something about that superiority complex of yours, too much coders have it
12:27 - If one tried to use Borland C++ for DOS, this one will see that C++ was indeed C with classes...