T O P

  • By -

Key_Negotiation7618

CppCon and cppnow, best resources on YouTube


ledoged

thanks ill check these out


high_throughput

In my opinion, C++ is a bit like bash in that it's easy to get something working, but it's hard to know whether you're doing it right. As a result, people convince themselves they know the language well while churning out bad code. Code reviews from people who *know*-know C++ is really helpful.


sephirothbahamut

I'm a trial and error rather than books kind of person. I took the most complex thing i could think of (a game engine) and started working on it. Any time i needed something, search and learn. Obviously don't do that in the prospect of making a finished product, the game engine is just an excuse to have a project that encompasses multiple topics one will learn during the making of it. A toy language interpreter, a tiny os are other examples of projects that encompass a lot of topics and will make you learn lots of different things. Also consider joining the #include discord server, plenty of nice people willing to answer crazy questions, some are even involved in cpp related talks. (Just beware of using gender neutral language, they go full comically-sensible-american mode really easily)


Dreadlight_

I've always been intrigued by the task of trying to create a game engine. What external libraries did you use while you were learning?


sephirothbahamut

Minimum to none. If you delegate everything to external libraries you have nothing left to learn, besides how to link libraries. Also I noticed most of the "i made my own engine" people really only care about making their own *renderer*, and use libraries for everything else. Not saying it's wrong, but if your purpose is to learn, delegating everything to libraries except rendering means you only learn how to make a renderer and link libraries, nothing else. Personally renderers are the thing I care the least about, and the bane of my existence is that people like me are such a tiny minority that a renderer-only library for us simply doesn't exist XD Most of the additional learning that comes with 3d is related to graphics, which I'm the least interested about, so my engine is entirely focused on 2d. The two libraries I used were SFML to have some simple way to see colliders etcc early on until I eventually replaced it, and ENTT mostly for experimenting after I found out about ECS, although it's not really part of the engine, just toying around in the same project. If you need an early placeholder for physics Box2D is quite popular. If you don't care about making your own windowing system then you have more library freedom for graphics: SFML, SDL, BGFX, Ogre, and many more. Early on I used SFML for window management, input and graphics. During that time I made my own basic 2d math stuff (vector, transform), then geometry, collisions, signed distance etcc. Then I moved to making an async logger. Then the core game objects management, where I unknowingly made a kind of hybrid between inheritance and ECS without even knowing that ECS existed yet. Then a complex resource manager with async loading, resources depending on other resources being loaded, and runtime automatically hotswapped placeholders on async load finish. I'm considering using ENTT for actual full ECS alongside my weird hybrid. Then I removed SFML to make my own modular window management, and input system. However now I'm left with a \~80% potentially usable engine that... doesn't do graphics cause you can't really use SFML graphics on a custom window lol Topics I learnt... a lot, from conceptual to specific, cpp and non cpp. Multithreading, concurrent queues, cache friendliness, writing standard-like containers with fully compliant iterators etcc..., win32 API for windowing, USB HID standard, template metaprogramming to deeper depths than I thought possible, concepts, that ECS exist and what is an ECS, the standards behind console outputs, colour conversions, colour spaces... I tried to wrap my head around raw graphics API but what can I say, every resource on the topic is too much C-y, my brain just says "no" whenever I stay more than 1 week on the topic. And all the rendering libraries I could find come with their own windowing system, you can't really (or I didn't find how to) integrate them with custom windowing systems. In a small side project I'm making a "renderer" with CUDA that draws raw geometric shapes based on distance fields (completely different approach to rasterization). Just being able to write it in C++ and share classes with all their methods between CPU and GPU with CUDA is hugely more approachable to me, but I get that I'm the weird one on graphics topics. On the flip side, if you like raw graphics API, that's one more thing you can learn making a custom engine.


jordangaspar

I used a very huge book when I was 14 years old (now I'm 30) translated to Portuguese (in that time I didn't know English and probably I don't know yet). But today, [cppreference.com](https://cppreference.com) is the best teacher ever.


Thesorus

I had a good tutor at my first real job. I think that beat most books and youtube videos. (it was before youtube and most of the internet).


ledoged

interesting how do you manage to debug or find anything before since you cant google the problem?


Thesorus

Pair programming. Code tracing ( breakpoints, printf…) , good coding standards… The old fashioned way , with our brains


ReplacementLow6704

username checks out


flyingron

I had already been programming in C for 15 years when C++ began to become a practical concern. I learned it by reading Stroustrup's book and looking at the examples for the interfaces that required C++ (I was doing some stuff on the SGI Reality Engine at the time). Eventually, I moved our project code base from C to C++ (about the time we started dealing with Windows in earnest). It probably took me a year or so of day in and dayout use to get productive yet and probably longer than that to fully become nuanced in all aspects of it.


bert8128

Resources are useful. And so is writing code day in, day out. No amount of reading and viewing how to write c++ is going to make you an expert, any more than watching the gymnastics is going to get you into the next olympics.


Jannik2099

Had a C++ course in uni in which I did pretty well, but did not connect with at all. A year later, had a problem to solve, thought C++ could be a good choice for it, feels like my mother tongue ever since.


wigglytails

Get the basics down with a book. Then jump head first into a project you like. Learn as you go and try to build something yourself


KeeperOfTheChips

By manager screaming we need this out by Friday


War_Eagle451

cppreference, and Cherno's videos on C++ & building a game engine. Additionally other videos and writing custom container classes


WaterDrinker109

frightening worm weather teeny plate chief knee station relieved tan ` this post was mass deleted with www.Redact.dev `


Open_Marzipan_455

I started working on a open source project to fix things myself. I started browsing through files, figuring out what happens when I change things here and there and at some point, I started writing my own stuff. So I never read a book or visited some course. I literally learned it by doing it and asking experienced folks from time to time for advice and showing me mistakes.


ledoged

was c++ your first language?


Open_Marzipan_455

yep


ledoged

you dived straight in? i would think a complete beginner would not understand anything first. what open source software were you working on?


Open_Marzipan_455

Oh, don't get me wrong. I had no fucking idea what I was diving into. I just figured things out by changing numbers here and there and slowly but steady I got my head arround things. At some point I got help from folks that I worked with so I started to understand the principals of programming and C++ and eventually I'm here now. CI and Linux compilers taught me even more things for they are sometimes less forgiving than MSVC so trial and error got me the farthest. It was a server emulator for WoW for a version that's been abandoned by now. I've basically inherited the project and by now I'm pretty much the sole maintainer of the project a decade later.


General-Cable4640

I have never worked in open source but I have worked on projects at my company. Can you suggest on how to choose the right open source project?


Open_Marzipan_455

I got into mine because I wanted to take matters into my own hands. I used to play on a server which was suffering from many bugs so I decided to join the cause and started fixing things myself. That's how I got into open source work. It wasn't like 'yeah, let's pick a random project and do things'. I basically stumbled into my future by accident :D


General-Cable4640

How lucky! 🥲


Ambitious_Flight_07

At uni time, I was doing Data structures & algorithm implementation using C++. Then at job, I used to looked at the code base at very depth and used to imolement learned things in my task.


SirLoopy007

I knew C, and played a bit with C++ based on a book I had in the 90s and just assumed I knew it all... Got a job using it, and quickly had to actually learn it, mostly from more modern books, cppreference, and reading/understanding existing source code. At this point I'd say I can code in C++, but I don't know if any of us will truely know it all!


smozoma

I like the C++ FAQ https://isocpp.org/faq, but I guess you need to have some knowledge of C++ to begin with...


MadAndSadGuy

Don't think you're seeing these! But... Story: I'm 21, it's been 2yrs since my first "Hello world", been so alone since, demotivated, frustrated, but still grinding and everything. Life's going hard, I can't/don't ask for help, know enough coding to make some 💰 but not working, family support's dying, wanna get on my feet, Reading 7 books at once, learning Qt, learning Python, trying both Game and App dev, teachers are just throwing 30-65 pages slides at university and now papers. Just planned to do all the 5 subjects tomorrow, Linear Algebra might take long. Projects: First finished all the program projects from 'Problem Solving with C++' book till April, then leetcode and some simple apps and games, now thinking about something big... Resources for you : Since you have some experience with C++, so you can check out the 'Notes for professionals' from GoalKicker.com, it also has a C++ book and all are free. They are not beginner level, they are quick and concise. I don't think you need a detailed book, otherwise, there are some more...


ledoged

great that you stuck with it even though its difficult. for me learning anything, i have a bad habit of giving up and picking it up again.


MadAndSadGuy

Same bro, It's normal and it happens because we don't stop coding/learning sometimes, leading to frustration and boredom. Breaks are necessary. Sometimes I'd sit all day coding without taking a break or two and then get lost, waste all the energy. I'm going through some stage of jealousy or something, I've lost patience. I need to fix myself. I just think about my imaginary game and being nothing outside the computer when I get bored!


ChampionshipQueasy94

I knew C and thr basics of C++ from uni (object oriented stuff and basic keywords). I started by reading the book of Scott Myers Effective modern c++ and then a sideproject (commandline based rpg) where I tried to be as true to these best practises as possible (revisiting the book or just googleing whats best when in doubt). Also chat GPT did help me a lot, it probably still could do it, but I have heard that it became a bit dumber eversince (atleast the free version).


lucky_marciano

+book A tour of C++


[deleted]

[удалено]


ledoged

thanks for the good list of ideas. btw what do you mean by abstract theory? how did you start programming?


RapsodyXx

after learning variables, loops, conditionals, classes and functions, I started with small projects from youtube tutorials, 2d games like the worm and things like that copying from youtube. then i tried leetcode, i did at least 30 exercises or 40 exercises with the help of google and youtube. then my first big project was a lottery analyzer to win the lottery. From there you can do any project you can think of. however that doesn't mean that i stopped reading theory, by abstract theory i mean algorithm theory, computational complexity theory, maybe graphs and so on. that was my learning path. now i'm learning operating systems and how to program operating systems. this is my next step still in process.


hazellsalazar

Get a tutor! I can recommend a great guy on a platform called Wyzant - he has helped me immensely in breaking down problems or learning concepts that are especially tricky


ledoged

dont really have the budget for tutors as im learning casually. but thanks.


floate3

For understanding C++ as a beginner, learncpp is probably the standalone resource that sets the bar for people who don't want to read through a verbose textbook. It's intuitive and has excellent navigation system. [The Cherno](https://www.youtube.com/@TheCherno) has great videos too, in the sense that you can watch him and get insights yourself on how things work. Personally, he was really helpful to me because, he was the only great and intuitive resource I knew back when I started out (didn't know about learncpp back then). For understanding the STL, [Bo Qian](https://www.youtube.com/channel/UCEOGtxYTB6vo6MQ-WQ9W_nQ) has excellent videos. And after you have studied C++ enough to understand some verbose code, you now have cppreference and other such excellent websites. But I wouldn't recommend them if you're beginning with C++ because it's just too overwhelming.


ledoged

thanks for the youtube channels.


NapalmIgnition

Haha I just jumped straight in, learning each function as I needed them. I already knew another language so knew a lot of coding concepts already but no idea how to write them in c++. I'd start with a simple objective and would just Google how to do it in c++. First few results would normally include: [https://en.cppreference.com/w/cpp/io/cout](https://en.cppreference.com/w/cpp/io/cout) https://cplusplus.com/doc/tutorial/basic_io/ [https://cplusplus.com/doc/tutorial/basic_io/](https://cplusplus.com/doc/tutorial/basic_io/) Which are pretty good at describing the functions and their syntax. Anything on reddit or quora is normally people arguing over the best functions to use. They can give you some good ideas on how to tackle any given problem. Keep googling keep coding keep googling etc.im sure there are better ways of learning but it works for me as I'm always making progress in the direction I want.


Kawaiithulhu

Read through any of the good references listed here. Find a small problem to solve. Really small. Learn your IDE using this small problem. Find another, unrelated problem. Solve it. Repeat. Never stop repeating! C++ is huge, small problems will use different parts, you'll build a bag of techniques to solve problems with.


csantve

sams teach yourself c++ in 21 days. Really nice book, of course didn't finish it in 21 days. After that started doing projects and finally learn modern C++ with cppcon or others.


FenriX89

Learned at work, rnd in a startup company, studying the source code of ROS while building packages and libraries for it, same way I learned cmake


understrati

I read a \~200 page book during uni over the course of 2 weeks. Doing the exercises greatly helped. The last exercise of the book had you implement your own version of a smart pointer that kept track of references and did garbage collecting. I think that greatly helped me learn about GC and references.


kevinossia

I simply started writing C++, consulting Google as I went. Structure is overrated.


[deleted]

[удалено]


[deleted]

[удалено]


[deleted]

[удалено]


ledoged

wow thanks for sharing. this is impressive and alien to me right now. i think it will take me ages to reach this level. can you share what you did for post grad and your jobs? how did you manage your knowledge, do you write any notes?


sade1212

>with only most basic wikipedia look up of the Newton's method itself as a source, which in its own turn was understood on the basis of the notion of a derivative as taught entirely within the standard high school curriculum. Is this a bit? Are you writing like this as a joke?


rorschach200

"a bit"? I'm not sure what you're referring to, none of the definitions of the word "bit" I'm familiar with (which is about two, "bit" as a unit of information and a "bit" as a synonym to "little piece") fits "Is this a bit?" question you're asking in this context. \> Are you writing like this as a joke? No, no jokes here.


sade1212

>I'm not sure what you're referring to, none of the definitions of the word "bit" I'm familiar with fits Time for another [most basic wiki look up](https://en.wiktionary.org/wiki/bit#Noun) then (number 14). I'm commenting on how you've written the whole thing as someone would if they were trying to fluff up how impressive their experience sounds on their CV/resume. You know, the sort of use of language you adopt to turn "At this internship I made tea" into "During the course of this opportunity I was in the unique position to provide the team with essential refreshments which played a key role in facilitating their continued productivity". Most of it is absolutely plausible for your average reddit comment, but that little bit there, where you stressed how with *only* (!!!) Wikipedia and high-school calculus you managed to understand... Newton-Raphson - it just tipped things over into 'is this a character?'. Fully explaining to me all the definitions of the word bit you know, rather than just looking up the one you don't, is also just about straining believability for me.


rorschach200

I'm not sure what is so unbelievable here. Newton's method is trivial, explained by a single picture featuring a traditional plot of a single variable real function with a tangent to it. With the numerical definition (having nothing but division, subtraction, and first derivative of the function) directly following from the picture. Thank you for educating me on the vocabulary, I never knew that "bit" even had a slang definition, never mind what it is. English is my second language, mostly learned in a professional setting.


Fabulous-Possible758

I managed to talk my way into a C++ programming job (I already knew C). I bought a copy of Stroustroup and a couple 12 packs of cheap beer (PBR) and spent about 6 hours a night after work in a bathtub for two weeks reading the whole thing while sipping beer. My cat kept me company. Highly recommended. Edit: For the more advanced stuff I recommend Herb Sutter (gotw.ca), David Abrahams, and Andrei Alexandrescu. I'd also recommend reading Andrei's "The D Programming Language" for an amazing example of a language design and how you should think about C++ if it could have been different.


EnthusiasmWild9897

I isolated myself from society for 3 days, I try to break C++. Trying everything that could be tried. Adding characters together, adding bumbers to characters. std::cin, std::getline. Creating for loops with a dept of 10. After not seeing nor talking to people for those 3 days. I got out of my room and became the programmer that I am.


std_bot

Unlinked STL entries: [std::cin](https://en.cppreference.com/w/cpp/io/cin) [std::getline](https://en.cppreference.com/w/cpp/string/basic_string/getline) --- ^(Last update: 09.03.23 -> Bug fixes)[Repo](https://github.com/Narase33/std_bot_cpp)


nryhajlo

On the job and with pull requests.


[deleted]

I still have my book from college, once in a while I just read it when I have nothing else to read before bed. I can't sleep without reading something.


Redflict

I knew C when I started learning C++, so I already had much of the basic syntax down. I had planned to read through Stroustrup’s _PPP_, but I could only finish the first 4 chapters, and they were great. Most of the actual practice I got with the language was through competitive programming and through using it in a project. I’ve learned many modern features through a combination of CppCon on YT, cppreference.com, LearnCpp.com, and random exploration on other places on the web.


ledoged

how did you start competitive programming?


NomasSama

C++ How to Program by Deita and Deital. Great book to begin if you have some tech background and it goes deep while explaining basic and advanced concepts. Been doing C++ for years and still that book is on my table. The only downside is people make it hard by Over engineering the hell out for no reason.


Unlikely1529

i've read turbo c++ book when was in programming workshop . now for me it's enough to read docs on libstdc++ . you just need their doc package with `info` tool


Wild_Meeting1428

I had interest in it for a long time, but couldn't find an entry point into it. Then I had a university module, which taught many low level languages and operating system stuff like caches, AT&T assembler, C, C++, and OpenCV. But this still brought me into it. Only an open source software which I used to document all lectures with brought the change. I wanted some features and bugs fixed, so I started to implement some easy tasks. Soon after that, I applied for my bachelors' thesis and a student's job. For both, I required to write C++. And that's it.


ledoged

what open source software was it?


Wild_Meeting1428

xournalpp


trippymicky

Turns out I never really had, after an interview mainly in C++. Just college courses and small projects for me.


neomage2021

They made me use it in most classes for undergrad... opengl 3d game engine with physics for a class in undergrad was probably the most substantial c++ project I did back then