Skip to content

Increasing C++ skills in many repos #2

Open
@abstractmachines

Description

@abstractmachines

Once devinenoise/hello-world#9 is resolved and you've learned some of the very-basics of C++ and object oriented programming, let's create a new class (replacing the existing code we have) to create a little bit more "separation of concerns" when we write code!

This is also where things are going to change a bit and involve a little bit of reading and reflecting about concepts!

Definition of done

  • 1. You have made a new repo called cpp-data-structures and made a lot of little files in there, all of which compile and run. You've read a ton of stuff and looked at CS courses online (see below, "prep, data structures".) You feel comfortable having data structures discussions.

  • 2a. You have made a new repo called `cpp-encapsulation-polymorphism-inheritance' and it's full of tons of little files that do little things to manipulate data. All of the files compile and run. (see below, "prep section.)

  • 2b. Per 2a, be able to answer this question: "Why does Amanda want me to only get input from user in the main function instead of in the class itself?

  • 3. Let's abandon this "hello world" repo. Time to move beyond it and keep things small and modular.

  • 4. The following materials will go into a new repo of your choice. I'd maybe call it cpp-classes or something.

  • 4a. This class looks a lot like the class you already have.

  • 4b. The main function, not the HelloWorldClass, will take in arguments from the user.

  • 4c. The class "does not need to know about" anything the user wants/says. The main function does all of the IO (input/output) work.

  • 4d. You will have googled ""does not need to know about" for programming and can talk about "abstraction" a bit.

  • 5. Totally optional, completely evil plan: Learn what "operator overloading is." https://github.com/abstractmachines/OOP_Cpp_ComplexNumbers

I imagine we may want to pair on some of these things to move you forward a bit. Here are some articles that you may find useful!

Prep/reading: Data Structures (new repo called cpp-data-structures)

  • I recommend starting up a new repo for some of this work called cpp-data-structures, and copying this issue over to that new repo.
  • Do as you will, but I advise that you go over these concepts and code up "small examples." Make tons of tiny little files that each do a thing! Then commit your code, put up a little PR, approve it yourself, and merge it in yourself.
  • I recommend spending a long period of time on data structures. It is a fundamental CS concept. There are also many university courses online. I highly recommend courses that are the MOOC courses at schools such as Stanford, MIT, and similar universities. This is a deep topic. Don't short change yourself.
  • When you read about "data structures", remember that "data structures and algorithms" is a different course. Now, you can get into "algorithms" if they interest you. Study your passion! Just remember, "algorithms" is going to involve computations for how to do things in computer science ("search", "Sort" etc), and "data structures" are much simpler; they are essentially the building blocks of every beginning CS student's studies. When you study "data structures", don't feel bad if you get confused by "Princeton online courses of data structures and algorithms." However, you do want to aim for an academic understanding of what you're doing here. Just don't beat yourself up if you can't yet understand these topics as taught by top universities.

This "study topics" list will seem extremely overwhelming because you aren't currently taking a CS "data structures course." I highly recommend that you take a guided course (or 2 or 3) to learn this topic. Stay in touch with me as you learn. One example is https://www.udemy.com/course/datastructurescncpp/

Prep/reading: Encapsulation, Polymorphism, and Inheritance (new repo, call it whatever you want! Maybe cpp-encapsulation-polymorphism-inheritance or something!)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions