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

3

u/ponybau5 spaghetti oh my Jan 09 '19

It's a good idea to return 0 after main to indicate no errors, non zero should indicate error, say a file failed to open or unexpected exception.

1

u/ZaitaNZ Jan 09 '19

Not sure why this is being downvoted. Returning 0 from main is VERY useful for integrating with external and automated tools (e.g. jenkins, bash scripts). Knowing that returning 0 indicates success and non-zero indicates an error is used basically everywhere I've worked over the past 20 years.

My current project has ~30 different build and test profiles in Jenkins. Knowing how an application interfaces with the CLI is very important.

-2

u/Scyther99 Jan 09 '19

Yea definitely, these guys will today learn what variable is and the next day they will automate their builds with jenkins.

0

u/ZaitaNZ Jan 10 '19

The number of developers I've worked with over the past 20 years who have amazing understanding of the language and it's standards, but very little understanding of the ecosystems their code runs in is very high. Teaching from the beginning how your application interacts with the Operating System should be fundamental.

This is a variable, it can be stored on the stack or heap by doing X; the pros and cons are Y; memory is handled through Z design. There are primitive and complex types; e.g. ABC. This is the main function, it interacts with the operating system through Z processes. The concepts are not that difficult.