I finished a 50 hr C++ course, what next?

In summary: This is a non-trivial task. This is a skill that is needed regardless of the language or programming paradigm. You can happily write good procedural code using C++.The second thing to learn is how to write a system of... programs. Eventually, a task or project becomes too big to cram all the code into one program.It's at this point that the real difference between OO and procedural programming manifests itself. The skill of genuine OO software design is difficult to learn and could take months of solid programming practice. Ultimately, it's an art as much as a science to get the objects defined optimally.In summary, Object-oriented programming (OOP) is a computer programming model that focuses on organizing software design around data and
  • #1
shivajikobardan
674
54
I am still not confident with C++
I don't think I should yet go to Data Structures and Algorithms yet because I am not very comfortable with C++.
I want a book that covers problems that require Object Oriented Programming to solve problems. It should have lots of such exercises.
Is there such a book that you're using at your university?
So, I Need a C++ Object Oriented Programming Uni Textbook that has tons of solved and unsolved programming exercises, do you know of any?
 
Physics news on Phys.org
  • #3
You can modify any simple program to OOP style. The question should not instruct you to use three different classes such that one inherits the other, and so on. The question will be a problem statement. It is up to you how you can best solve it.

What about that long list of programs that I gave you once upon a time? That has some good problems if I recall correctly.

Also, the last thing you want is solved problems in programming. It's easier to create your own logic than to understand the logic of another programmer.
 
  • Like
Likes shivajikobardan
  • #4
shivajikobardan said:
I am still not confident with C++
After 50 whole hours? As I said in a previous thread, you need more realistic expectations than learning something 10-100x faster than everybody else. 500 hours (50x10) is full-time work for three months. Are those people experts?

shivajikobardan said:
I don't think I should yet go to Data Structures and Algorithms yet b
shivajikobardan said:
a book that covers... Object Oriented Programming
What do you think Object-Oriented Programming is?
 
Last edited by a moderator:
  • #5
By the way, when did you take this class? Fifty hours as five 10-hour sessions and no honework is a different proposition than fifty one-hour sessions with plenty of homework. Two months ago you didn't even mention such a class.
 
  • #6
Vanadium 50 said:
By the way, when did you take this class? Fifty hours as five 10-hour sessions and no honework is a different proposition than fifty one-hour sessions with plenty of homework. Two months ago you didn't even mention such a class.
It's been 3.5 months that I've been taking the class. It was online course.
 
  • #7
shivajikobardan said:
It's been 3.5 months that I've been taking the class. It was online course.
First, let's answer the question what is OOP?

Object-oriented programming (OOP) is a computer programming model that organizes software design around data, or objects, rather than functions and logic. An object can be defined as a data field that has unique attributes and behavior.

Note the emphasis on software design.

So, you need an application with significantly complex data structures before OOP makes any sense in the first place. The project Euler, for example, requires programs that are essentially functions and logic. It doesn't matter what language you use, you'll end up with procedural code. In fact, some of the model solutions to project Euler are entirely "Wild West" programming, with no structure of any description.

There's a big difference between learning C++ and learning to write genuine OO code.

Most people start by writing simple standalone programs, then write more complex programs. E.g. a program to solve a Sudoko puzzle.

The first thing to learn is how to organise a larger program. This is a non-trivial task. This is a skill that is needed regardless of the language or programming paradigm. You can happily write good procedural code using C++.

The second thing to learn is how to write a system of programs. Eventually a task or project becomes too big to cram all the code into one programme.

It's at this point that the real difference between OO and procedural programming manifests itself. The skill of genuine OO software design is difficult to learn and could take months of solid programming practice. Ultimately, it's an art as much as a science to get the objects defined optimally.

In my opinion, therefore, until you are writing a significant application with several programmes and many objects, you cannot master OO programming. No matter how good a C++ programmer you are!
 
  • Like
  • Wow
  • Love
Likes phinds, Vanadium 50, symbolipoint and 2 others
  • #8
PeroK said:
First, let's answer the question what is OOP?

Object-oriented programming (OOP) is a computer programming model that organizes software design around data, or objects, rather than functions and logic. An object can be defined as a data field that has unique attributes and behavior.

Note the emphasis on software design.

So, you need an application with significantly complex data structures before OOP makes any sense in the first place. The project Euler, for example, requires programs that are essentially functions and logic. It doesn't matter what language you use, you'll end up with procedural code. In fact, some of the model solutions to project Euler are entirely "Wild West" programming, with no structure of any description.

There's a big difference between learning C++ and learning to write genuine OO code.

Most people start by writing simple standalone programs, then write more complex programs. E.g. a program to solve a Sudoko puzzle.

The first thing to learn is how to organise a larger program. This is a non-trivial task. This is a skill that is needed regardless of the language or programming paradigm. You can happily write good procedural code using C++.

The second thing to learn is how to write a system of programs. Eventually a task or project becomes too big to cram all the code into one programme.

It's at this point that the real difference between OO and procedural programming manifests itself. The skill of genuine OO software design is difficult to learn and could take months of solid programming practice. Ultimately, it's an art as much as a science to get the objects defined optimally.

In my opinion, therefore, until you are writing a significant application with several programmes and many objects, you cannot master OO programming. No matter how good a C++ programmer you are!
Sorry, I am not clear on what I should do? Should I write in non-OOP code then come to OOP?
 
  • Like
Likes symbolipoint
  • #9
PeroK said:
First, let's answer the question what is OOP?
It wouldn't hurt the OP to learn direct from the master, i.e.,

"What is Object Oriented Programming" (1991 revised version) -- Bjarne Stroustrup.
-- available on his website under https://www.stroustrup.com/papers.html

It also wouldn't hurt the OP (or anyone else, for that matter) to simply work through the latest version(s) of Stroustrup's textbooks: [Check his website for the latest editions.]

"A Tour of C++",
"Programming Principles & Practice using C++",
"The C++ Programming Language"
 
  • #10
shivajikobardan said:
Sorry, I am not clear on what I should do? Should I write in non-OOP code then come to OOP?
No. You need to find a project or major programming task with enough complexity in terms of objects, data and methods to require serious OOP. System and program design is where OOP differs from procedural programming.

What I'm saying is that the OO paradigm is not in itself implied by the C++ syntax. Just because you are using C++ doesn't mean your programs have any OO design features at all.
 
  • #11
PeroK said:
There's a big difference between learning C++ and learning to write genuine OO code.
what he said (very small).jpg
 
  • #12
  • #13
shivajikobardan said:
I am still not confident with C++
I don't think I should yet go to Data Structures and Algorithms yet because I am not very comfortable with C++.
I want a book that covers problems that require Object Oriented Programming to solve problems. It should have lots of such exercises.
Is there such a book that you're using at your university?
So, I Need a C++ Object Oriented Programming Uni Textbook that has tons of solved and unsolved programming exercises, do you know of any?
In line with what @Vanadium 50 said, 50 hours is not enough for anything that could be described as "mastery". If you are looking for a regular job as a software engineer, expect to work with more experienced SW engineers for at least a year. The normal trajectory for someone who leaves college and takes a job where they are basically operating solo is either flight to some other line of work or a years-long period of "wreckage" - low productivity, unmaintainable code, and a severe lack of fun.

In a different trajectory, many people take on programming as a sideline to their "real" work. Their success is largely determined by their ability to change the code requirements based on what they discover of the language (C++ or whatever). It's follows the "when all you have is a hammer, everything looks like a nail". But it allows a solo programmer to rack up successes without a close technical mentorship.

Object-Oriented design/programming is a good way of arranging your code. "Problems" do not require OOD. Programmers, designers, and other stake-holders require OOD. There is nothing that can be coded in OOD that cannot also be coded without it. But OOD makes the code easier to develop and maintain by creating something akin to "a place for everything and everything in its place". With OOD, those "*.h" files become interface definitions between different parts of the system. Even before OOD and C++ were developed, I advised coworkers to start with the "Data" in "Data Processing" when designing a system because those data structures are where the foundation is laid.

A lot of the C++ language features are very optional. Right now, I have been mentoring a couple of programmers for about 18 months and there are still concepts that surprise them from time to time. We review each others code, so discovery is easy and automatic.
 
  • Like
Likes DeBangis21 and PeroK
  • #14
@.Scott I didn't get what you were trying to say? I should not learn OOP?
 
  • #15
shivajikobardan said:
t's been 3.5 months that I've been taking the class.
Huh?
What?

You've asked us many questioins on CC++ in that period. Why didn't uyou ask the instructor? If the anwer is "the instructor wasn't very good and we do a better job", that's flattering, but why then would you expect to gain much from that class?

If the answer is "the class wasn't interactive - it was a bunch of YouTube (or similar) videos", well, then you really didn't take a class so much as watch some television. Again, in this case why would you expect to gain much from that?

One of your questions was on call by reference vs. call by value. This is covered in Chapter 1 of K&R C- not even C++. If it took about a month to get partt-way through Chapter 1, at that pace, you will cover very little in50 hours.
 
  • #16
The instructor wasn't helpful. It was a recorded online course that I bought for 20$.
 
  • Wow
Likes .Scott
  • #17
shivajikobardan said:
The instructor wasn't helpful.
Then why are you surprised that you have not yet mastered the topic?
shivajikobardan said:
t was a recorded online course that I
So essentially 50 hours of television. Again, why are you surprised that you have not yet mastered the topic?

Your expectations seem way out of line with what can be reasonably achieved.
 
  • Like
Likes phinds
  • #18
shivajikobardan said:
@.Scott I didn't get what you were trying to say? I should not learn OOP?
When I talked about a "problem" not requiring OOD/OOP, my point was only to have you understand that all coding problems are potentially OOD/OOP.
By all means, practice OOP. For example, if you have partitioned you problem into objects and you notice that you're using a lot of pointers to one class in the methods of another class, that may be a clue that you need to rethink what portions of the functions go with which objects.
I don't know your skill level. I don't know what you've picked up in the past year. So I can't really give you specific direction.

I just noticed that the course you took was $20, online, with less than great personal instruction.

So what kind of problems did you attacked with OOD in mind?
 
  • #19
  • #20
pbuk said:
Why? Learning OOP in almost any other language will be easier and more useful to you. You have posted about writing a web application in vanilla JavaScript, why don't you stick with that?
Because C++ was taught in university. And I plan to do a Data Structures and Algorithms course in C++.
 
  • Like
Likes pbuk
  • #21
You can also apply more OOP/OOD to the "Nepali Names" program you described in your other thread.

For example, there could be a "names" class with the names lists, load function, and any other functions that you will need to perform on the names list included in the class. Perhaps the url specified in the constructor. Then you would have two objects malenames = new names(male_url); and femalenames = new names(female_url). Then later, await Promise.all([malenames.load(),femalenames.load()]);

My key point is that there are many ways of attacking any problem. OOP/OOD can be readily applied to code development in many computer languages.
 
  • #22
I'm doing the program rn. Wish me luck.
 
  • #23
hello guys, completed the project. Someone else did the frontend and it's live now. Going back to my previous question. I want to practice C++ without Data Structures and Algorithms. How do I do it? Any guidance mentors?
 
  • #24
shivajikobardan said:
I want to practice C++ without Data Structures and Algorithms.
Why this limitation if I might ask?
 
  • Like
Likes berkeman
  • #25
C++ Primer by Lippman, Lajoie, and Moo
And then go through Data Structures and Algorithms in C++ by Drozdek
If the first book is too fast paced, try Programming: Principles and Practice Using C++ by Stroustrup
 
  • Like
Likes shivajikobardan
  • #26
In my view OOP is having formally defined interfaces to procedural units. That's the main difference between C++ and C. In C you cannot do this. That is, you can build such an interface but it's informal as the language does not support it. In C you cannot prevent another programmer from breaking the rules if they feel like it.

I think of it in terms of electronic devices. In the old days it was a bunch of components connected by wires. Now they have printed circuit boards that plug into a buss. All communication goes through that buss. The communication protocols are formally specified. If you want to swap out a board for a better one with the same protocol, you (theoretically) can. This can be a big advantage. You tell the module what you want it to do but not how to go about doing it.

In order for OOP to be beneficial you have to be able to break down your program in independent units like this. The way NOT to do it is to find out that your breakdown was not so good then cheat by telling the module how to do things. Then you've got the worst of both worlds.
 
  • Like
Likes phinds
  • #27
Dr.AbeNikIanEdL said:
Why this limitation if I might ask?
STL. C++ is good for competitive programming. DSA in C, Javascript is painful.
 
  • #28
Muu9 said:
C++ Primer by Lippman, Lajoie, and Moo
And then go through Data Structures and Algorithms in C++ by Drozdek
If the first book is too fast paced, try Programming: Principles and Practice Using C++ by Stroustrup
thank you.
 
  • #29
shivajikobardan said:
yes i want to learn oop not c++. but oop in c++.
50 hours is not very much time to learn C++. It's the equivalent of a one quarter or one semester class. Most colleges and universities that I am aware of offer three quarters or two semesters of C++. Frequently in these introductory classes, students use classes in their programs, but don't create classes. For me, the "what next" would include taking a class (either online or in person) or getting a book that goes into detail about creating classes in programs.
 
  • #30
shivajikobardan said:
STL. C++ is good for competitive programming. DSA in C, Javascript is painful.
?? I was wondering why you specifically want to avoid algorithms and data structures. Maybe I am not getting it, but I dont feel you answered that…
 
  • Like
Likes berkeman

1. What are some practical applications of C++?

C++ is a versatile programming language that is used in a variety of fields, including software development, game development, and operating system development. It is also commonly used in fields such as finance, data analysis, and scientific computing.

2. How can I continue to improve my skills in C++?

One of the best ways to improve your skills in C++ is to practice writing code regularly. You can also read books and online resources, participate in coding challenges and competitions, and collaborate with other programmers to learn new techniques and approaches.

3. Are there any specific projects I can work on to apply my C++ knowledge?

Yes, there are many projects you can work on to apply your C++ knowledge. Some ideas include creating a simple game, developing a command-line tool, or building a small application that solves a specific problem. You can also contribute to open-source projects to gain experience working on larger codebases.

4. What other programming languages should I learn after C++?

It depends on your interests and career goals. If you want to continue working with low-level programming, you may want to learn languages like Assembly or Rust. If you are interested in web development, you may want to learn languages like JavaScript or Python. Ultimately, it's beneficial to have knowledge of multiple languages as it can make you a more well-rounded programmer.

5. How can I use my C++ skills to make a career change?

C++ is a valuable skill to have in the job market, and it can open up opportunities in various industries. You can use your C++ knowledge to apply for jobs in software development, game development, data analysis, and more. You can also consider pursuing additional education or certifications to enhance your skills and make yourself more marketable to employers.

Similar threads

  • STEM Academic Advising
Replies
3
Views
919
  • STEM Academic Advising
Replies
5
Views
857
Replies
22
Views
937
  • Programming and Computer Science
Replies
3
Views
1K
  • STEM Academic Advising
Replies
1
Views
752
  • STEM Academic Advising
Replies
1
Views
858
  • STEM Academic Advising
Replies
1
Views
1K
  • STEM Academic Advising
Replies
7
Views
1K
  • STEM Academic Advising
Replies
1
Views
778
  • Programming and Computer Science
Replies
1
Views
729
Back
Top