You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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/
Study Topics list: Study algorithms alongside data structures such that you understand stack (push, pop algorithm), queue (enqueue, dequeue algorithm), binary search with arrays, sort (try qsort or quicksort), merge sort, and a couple of string related algorithms. Study linked listsand how toappend to beginning/end, remove a node from beginning/end, and also try to cover binary trees, binary search trees, and, heapswhich are a fun one. Finally, you'll want to cover the topics ofrecursion`, such as the Towers of Hanoi problem.
Read these kinds of articles about data structures (always look up your own version as well of course) and code up small examples in files that you run! Maybe you could make a file called data-structures-arrays.cpp and compile that. Make another file called data-structures-structs.cpp, and compile that. Then commit your code, make a tiny PR, and merge it in yourself. Etc, and continue creating tons of small files that do cool things! With data structures you'll want to try to find academic materials as well as articles for professional working engineers. Here are some samples:
Consider following channels on youtube that you like/find in tech, and saving videos in a private "list" or series of "lists" you can refer back to.
Look up MIT MOOC courses and other universities on data structures. Code up small examples.
Prep/reading: Encapsulation, Polymorphism, and Inheritance (new repo, call it whatever you want! Maybe cpp-encapsulation-polymorphism-inheritance or something!)
Read this article, and go over the diagrams and code slowly. code up examples of things! Commit them here or elsewhere. Play around! Encapsulation, Inheritance, and Polymorphism In C++: https://learn.saylor.org/mod/url/view.php?id=25579
@devinenoise whatever you do, always have a repo to show that you did something. Always have small examples of running code in a separate repo (or, a repo of "data-structures-course" or something). But you want running code and documentation for it in a markdown README in each repo.
abstractmachines
changed the title
Moving on from this repo! Increasing C++ skills in many repos
Increasing C++ skills in many repos
Dec 1, 2020
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
Prep/reading: Data Structures (new repo called
cpp-data-structures
)Study Topics list: Study algorithms alongside data structures such that you understand
stack
(push, pop algorithm),queue
(enqueue, dequeue algorithm),binary search
witharrays
,sort
(tryqsort
orquicksort
),merge sort, and a couple of string related algorithms. Study
linked listsand how to
append to beginning/end,
remove a node from beginning/end, and also try to cover
binary trees,
binary search trees, and,
heapswhich are a fun one. Finally, you'll want to cover the topics of
recursion`, such as the Towers of Hanoi problem.Read these kinds of articles about data structures (always look up your own version as well of course) and code up small examples in files that you run! Maybe you could make a file called
data-structures-arrays.cpp
and compile that. Make another file calleddata-structures-structs.cpp
, and compile that. Then commit your code, make a tiny PR, and merge it in yourself. Etc, and continue creating tons of small files that do cool things! With data structures you'll want to try to find academic materials as well as articles for professional working engineers. Here are some samples:https://www.freecodecamp.org/news/the-top-data-structures-you-should-know-for-your-next-coding-interview-36af0831f5e3/
https://towardsdatascience.com/8-common-data-structures-every-programmer-must-know-171acf6a1a42
https://www.coursera.org/learn/data-structures
https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-006-introduction-to-algorithms-fall-2011/index.htm
https://www.youtube.com/watch?v=6LOwPhPDwVc
https://www.youtube.com/watch?v=6LOwPhPDwVc
Consider following channels on youtube that you like/find in tech, and saving videos in a private "list" or series of "lists" you can refer back to.
Look up MIT MOOC courses and other universities on data structures. Code up small examples.
Prep/reading: Encapsulation, Polymorphism, and Inheritance (new repo, call it whatever you want! Maybe
cpp-encapsulation-polymorphism-inheritance
or something!)Read this article, and go over the diagrams and code slowly. code up examples of things! Commit them here or elsewhere. Play around! Encapsulation, Inheritance, and Polymorphism In C++: https://learn.saylor.org/mod/url/view.php?id=25579
Code up little examples. Make little files!
Also, read this article: https://medium.com/@khbrt/defining-encapsulation-inheritance-and-polymorphism-db2f57bc5121
Then, 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?
The text was updated successfully, but these errors were encountered: