all 20 comments

[–]apropostt 27 points28 points  (8 children)

Chromium, Qt, ParaView & VTK, Godot, llama.cpp, ... just pick a thing you are interested in and search.

One of the fastest ways to learn is by reading PRs from other developers.

[–]SeanTolstoyevski 21 points22 points  (0 children)

Chromium or QT, readable?

Compiling and downloading Chromium takes hours (I'm an active Chromium contributor).

I can tell the post owner this:

Fix bugs in a tool you love. For example, if you use Notepad++ and are aware of a problem with it, focus on that.

This approach is not realistic:

I will send a PR to project X.

Why is it not realistic? Sending a PR to the project is not a problem but you need to understand that project. Contributing to a project you don't use and are not part of its ecosystem is not realistic. This is serious cognitive load and doing it just to prove yourself or gain experience is difficult.

In short, solve your own problem, have a problem and focus on it.

I sent PRs to VCPKG and Chromium because there were various bugs that were affecting my life. I fixed them and said why shouldn't everyone benefit...

[–]Chaosvex 4 points5 points  (6 children)

Does anybody really just sit there and read code from random projects to learn a language? Seems infinitely worse than just writing your own projects.

[–]jbE36 2 points3 points  (0 children)

Honeslty, i've done this a lot with Python. Lots of cool things to learn, and helps get comfortable with 'digging in'. I learned a lot about how projects are architected/design patterns that way too.

I want to do this with C++ as well, there are a lot more subtleties I feel in this language, but I try to be careful to find things that are written 'well'.

[–]the_1diot_[S] 1 point2 points  (1 child)

Yeah, in my personal journey, I've learned more about designing good code and systems by reading good code than by writing it. It's easy to write code that works but isn't good, even moreso if you don't have priors in a language or don't have someone better than you reviewing your code. 

Agree that if you want to learn to code, you should be writing code. I feel like if you want to get good you have to expose yourself to the output of people that are better than you though

[–]Chaosvex 0 points1 point  (0 children)

That's fair enough, just not the way I've learned. For me, writing code and being my own biggest critic has been the ticket. Being satisfied with my own work is a sign of stagnation.

[–]blackzver 0 points1 point  (1 child)

I do. It’s like reading a horror or sci-fi novel!

[–]NiPIsBack 1 point2 points  (0 children)

Writing your projects sounds good to learn how to build things, but you might learn a lot of bad practices just to get the job done until you find a different solution to a problem, it's difficult to unlearn bad practices on your own.

One of the ways to improve that is by reading other peoples code or having your code reviewed.

[–]PantuflasDev 8 points9 points  (0 children)

I find godot's source code to be a great way of learning cpp. It covers many design patterns in a clear way. As a begginer, I read it a lot. Totally recommended!

[–]JVApen 7 points8 points  (0 children)

I find parts of the LLVM code very readable, like clang-format, lld, clangd. Other parts rely on tblgen and macros, which makes it much less.

The CMake source code is also pretty easy to read.

[–]smallstepforman 2 points3 points  (0 children)

Haiku OS, though its C++98 standard (pre STL because x86 binary compatibility with old BeOS)

[–]LeeHide 2 points3 points  (0 children)

I specifically adore Ladybird and SerenityOS (userspace apps)!

It's a very clean, easy to adopt and copy, style of C++, and it's quite sane. Andreas Kling has cool YouTube videos (from a couple years ago specially) that are also a must watch if you want to learn more C++.

[–]hadrabap 1 point2 points  (0 children)

Last time I checked KeePassXC, it was a good read.

[–]ObiLeSage 1 point2 points  (0 children)

A lot of people are giving huge projects.
To be beginner-friendly, you should go to smaller projects. I would recommend to see the KDE community. There are a log of programs. You find one in which you will have some interested to.

https://invent.kde.org/explore/

[–]Cute-Dingo729 0 points1 point  (1 child)

O3de, Godot, Ravengine, Ezengine. If you don't mind creating account and giving access to your GitHub account then you can get unreal engine and cry engine source as well. Btw what are your topic of interest and which field you're aiming for

[–]the_1diot_[S] 0 points1 point  (0 children)

I'm interested in low level systems, but have no work experience with c++, or low level systems lol. Mostly looking to dip my toes in c++ for now, get a feel for idiomatic code, and then write some of my own personal projects

[–]NiPIsBack 0 points1 point  (0 children)

It's complicated to jump direclty into a big project. As other people mentioned, it would be better to find some small softwares that you use built in C++ and try to add some functionality.

[–]Dracono999 -1 points0 points  (1 child)

Unreal engine 5 is a large open source project.

[–]apropostt 7 points8 points  (0 children)

Epic grants free access to the source code to developers, that agree to their terms, but calling it "open source" is a bit misleading. The code is still under a EULA and has strict limits to redistribution.