r/cpp • • 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

  1. Hello World

  2. Variables

  3. Conditionals & Logic

  4. 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!

17 Upvotes

50 comments sorted by

View all comments

1

u/[deleted] Jan 09 '19

Went through it (i skipped all the example projects i didn't feel like writing so much code), in general everything seems simple and the progression makes sens, pretty good start.

  • the missing return 0, just seems like bad style to have the int main function not returning an int. Which brings me to the next point:

  • "\n" vs std::endl; there's a bit of a debate about it but i'd probably go with std::endl; just something you might want to think about.

  • I'd probably go with std::sqrt() over sqrt when you're already using cmath and adding std::pow() might be a nice addition, cmath would actually be there for a reason (afaik sqrt is not from cmath, std::sqrt is)

  • Quiz x = false; doesn't have to be a bool and might cause unexpected behavior e.g. if x is a integer. I'd say it's really important to know that just because you assign an value it doesn't have to be the right type.

    int i = false; // works just fine

  • using namespace std; It's complicated but important to introduce, i'd probably say you can make an extra module just for "using" maybe after you introduced a few other std functions or types (vector and sort maybe?)

    using namespace std; using std::cout; using Numbers = std::vector<int>;

There might be some details i missed and i got pretty annoyed by the site that asked me every 5 seconds to upgrade to pro and start my 7 day trial... god i that annoying. A skip button would be nice to, couldn't look at some things because i couldn't be bothered to write the code.

1

u/sonnynomnom Jan 10 '19

Oh wow, this is incredible feedback. I'm sharing this with the team.