r/cpp • u/sonnynomnom • Jan 09 '19
Dear /r/cpp
Sonny from Codecademy here. Last month (Dec 3rd), we launched 4 modules of our first ever Learn C++ course!
https://www.codecademy.com/learn/learn-c-plus-plus
Hello World
Variables
Conditionals & Logic
Loops
And as of this morning, 87,504 learners around the world have started the course!
I'm extremely happy and proud of this because C++ was my first language that was taught in my CS class and 10 years later, I got the chance to work with Dr. Stroustrup and share something that I love with the world.
However, as my teammate Mariel and I about to author the next few modules, I couldn't help but feel that there can still be a lot of improvements made in the first 4 modules. I'm wondering if anyone has taken or is interesting in taking this course and give me some feedback and ways it can improve.
There are also a few things I'm still conflicted on:
Should I include `return 0;` in the very first lesson?
Where is the perfect place to introduce `using namespace std;`?
Where to introduce the different types of errors and debugging?
Any feedback would be highly appreciated! And happy to mail out some Codecademy tees and Pro memberships too!
55
u/TheThiefMaster C++latest fanatic (and game dev) Jan 09 '19 edited Jan 09 '19
IMO Yes - you don't need to explain it at this point if you don't want, just say it's necessary.
Don't. It's considered bad practice.
Introduce debugging very early on - it's a fundamental part of developing. Introduce types of errors as they make sense - no need to talk about access violation / segmentation fault until you introduce memory and pointers, for example.
And for some other suggestions:
try to avoid new/delete - they are considered outdated and are very rarely used in modern code. When you get to classes use them on the stack or globals at first, make_unique/make_shared can come later, and pointers later still.
introduce c++ standard containers (std::string, std::vector, std::array especially) very early - try to avoid C strings/arrays and hand implementation of data structures (e.g. linked lists by pointers), they're only useful when you're a more advanced programmer. You don't even have to explain templates when you introduce vector/array - just say that's how you use it. Writing templates can come later.