<p>I think that one key issue I see all the time is asking students to build contrived applications. You need to give them an actual problem to solve. The final assignment you were given seems pretty lazily thrown together by the professor. This is why it's hard to take what you were taught and apply it.</p>
<p>Anecdote: My little brother almost dropped out of college because he just couldn't grasp calculus and failed the class. He ultimately went back the next year and had a different professor, and now he's published a paper and is on a fast track to be a professor at that college. He told me that it all came down to the difference in teaching style. He said the second time it was easy and intuitive.</p>
<p>The ultimate point here, is that you're paying that school to teach you. If that teacher is doing a poor job, you should find a different teacher, or a different school/program.</p>
<p>I've worked with quite a few people now who took an online code camp course, and they have all turned out to be good hires.</p>

CC BY-SA 4.0
2024-02-16T23:38:16.267Z
Welcome to the site! Although the assignment won't win any "wow!" awards, it is a complete CRUD application with persistent storage, which seems representative of a large chunk of real-world programming. As far as professor quality: in programs I've been through, I'll inevitably run into an upper-division teacher I don't gel with in a required class. As an instructor, there are students who don't gel with me. While unfortunate, I think it's an important skill to take one's educational outcome into one's own hands at a certain point and learn the material regardless of who's at the helm.
ggorlen
CC BY-SA 4.0
2024-02-23T21:59:00.443Z
I'm not saying that they didn't get along, they got along fine, I'm saying the teacher was not good at teaching. If the professor is being lazy with their teaching assignments, it's going to be a lot more difficult for the students to understand what's going on.
Kelly Elton
CC BY-SA 4.0
2024-02-23T22:14:04.090Z
I'm not sure "not good at teaching" is an objectively measureable thing. I suspect it's more a matter of fit. I've had some great classes that were pretty hands-off from the teacher and had a blast hacking on my own most of the semester, while other students didn't care for the course. But assuming there are teachers who simply cannot teach (they probably exist, just less than many students assume), as a student, should you blame the teacher and quit as a result of that, or should you learn what you're there to learn anyway? I vote the latter option in most cases.
ggorlen
CC BY-SA 4.0
2024-02-27T06:40:25.053Z
Im with Kelly on this. CRUD is fine; C++ is also fine (ahem). But CRUD in C++ is not. I see this as a bad question
Rushi
CC BY-SA 4.0
2024-02-16T19:45:26.813Z
2024-02-25T20:13:23.063Z
2024-02-25T20:13:23.063Z
Kelly Elton
<p>In addition to what has already been said. Learning to program at the same time as learning C++ is too hard (cognitive load theory in teaching says: Keep detractions to a minimum. Keep steps small.).</p>
<p>Therefore, first learn to program, then <strong>if necessary</strong> learn C++.</p>

CC BY-SA 4.0
2024-04-01T13:33:28.857Z
2024-04-01T13:33:28.857Z
ctrl-alt-delor
<p>To translate a program specification like this into a working program, a few things are required.</p>
<p>First, you'll need an understanding of what's being asked. Define all terms in the assignment. For example, do you know what a &quot;struct&quot; is? How about a &quot;function&quot;? If a term is unclear, revisit earlier lectures or research online or in your textbook. Write down any knowledge gaps and build up from first principles, writing simple standalone programs that help you learn about one concept in isolation from the overwhelming complexity of the full app.</p>
<p>Once you've defined the problem, break the problem down into small enough pieces that you can begin making progress on something, even if it's just printing &quot;hello world&quot; on the screen. Once you have that, work on the next achievable step, such as creating an integer <code>id</code>, or a <code>Student</code> struct with an integer id, and print that. If you're not sure about how to use structs, you could ignore that requirement in the short term and use loose variables, or begin working on something else, like displaying the main menu. Programs are developed incrementally, using temporarily simplified requirements. Re-compile your code after every change and verify that it still works.</p>
<p>Functions are a useful simplifying tool. Once you have a piece of working code in a function, you can verify its inputs and outputs on its own, then set it aside and call it when you need it, without worrying about the steps inside it, like you do when you use a C++ library function.</p>
<p>But if you haven't used functions, that's OK--parts of the program can be written without them, then you can refactor to add functions later. Same with user interaction--you can skip that and hardcode the user input initially. Likewise, you can skip the file storage requirement at first and have the program work in memory only. Then, once that's working, introduce the file storage functionality.</p>
<p>Another simplification opportunity are the student record operations. You'll eventually need to add, edit, delete, search and list student records, but for starters, set most of these operations aside and just focus on listing student records from hardcoded data. Then work in the other behaviors one by one, verifying as you go.</p>
<p>To summarize:</p>
<ol>
<li>Understand the problem. Confront any knowledge gaps as soon as possible.</li>
<li>Break the problem down into small pieces and begin working on the first one. Temporarily simplify requirements, and don't be afraid to go all the way back to first principles if necessary to find a foundation to build on.</li>
<li>Compile and run frequently, fixing errors and validating your code as you work, using multiple inputs. Debugging and testing are important skills which take practice.</li>
<li>Build on your sub-problem solutions, gradually introducing complexity until all the pieces work together and you've solved the large problem.</li>
</ol>
<p>By the way, the process I've described can take an unbounded amount of time, so I suggest beginning it as soon as you receive an assignment (or sooner, preparing your fundamentals independently by working on basic exercises, similar to learning a musical instrument).</p>
<p>See also: <a href="https://ericlippert.com/2014/03/21/find-a-simpler-problem/" rel="nofollow noreferrer">Find a Simpler Problem</a> by Eric Lippert.</p>
<hr />
<p>On a broader level, when you're facing a difficult problem, it's normal to want to blame your circumstances (professor, school, etc) but doing so will only harm yourself. You'll inevitably encounter unhelpful professors (later: coworkers, clients, etc), but don't let them stop you from reaching your goals. Try to reframe &quot;we cannot&quot; into &quot;we cannot right now, but if we develop a plan and build in small steps, we can&quot;.</p>
<p>Real world software specifications are often much less concrete than this assignment. But regardless of whether you're a student or professional, if you're truly stuck after applying the strategies in this post, you can ask professors, colleagues and clients for clarification (but sometimes you won't get much!).</p>

CC BY-SA 4.0
2024-02-15T19:48:08.633Z
2024-02-17T03:20:59.243Z
2024-02-17T03:20:59.243Z
ggorlen
<p>The lab requirements you've outlines are very concrete and straightforward.  If many students in your class are having trouble decomposing the problem into sub-problems, then that suggests to me that the course might be simply moving too quickly.</p>
<p>Since you are not free to change the pacing of the course, I strongly recommend building some side-projects in C++.  You can work on something you'd find fun, or you can use a site like <a href="https://projecteuler.net/" rel="nofollow noreferrer">Project Euler</a> to give you some interesting problems to tackle.  The goal here is to simply give yourself some time to code and absorb some of the ideas better.  This extra time can help you to construct firmer mental models of what programs do and how they work.  Even a little bit of progress in this will be likely to help you enormously in your course.</p>
<p>These core ideas (input and output, problem decomposition) take time to digest, so I recommend giving yourself that time.</p>

CC BY-SA 4.0
2024-02-15T21:00:34.330Z
2024-02-15T21:00:34.330Z
Ben I.
<p>At my university, my fellow students and I cannot apply practical subjects well... For example, when we are asked to do a software project, we cannot analyze its requirements to know the steps that must be followed to do so, and we cannot translate what we learned in theoretical subjects into practical application easily... How can I develop? My skills are in the practical aspect of programming...and what are the best ways to raise my skills in practical applications of computer skills in general?
The project requirements were:</p>
<blockquote>
<h3>Computer Programming 2: Final Project</h3>
<p>Make a C++ program to manage students records and grades. Every student record must have:</p>
<ol>
<li>id &gt;&gt; a variable of type: int.</li>
<li>first_name &gt;&gt; a variable of type: string, this variable should contain letters only [shouldn’t contain any numbers and special
characters], and the first letter should be capitalized.</li>
<li>last_name &gt;&gt; a variable of type: string, this variable should contain letters only [shouldn’t contain any numbers and special
characters], and the first letter should be capitalized.</li>
<li>major &gt;&gt; a variable of type: string, this variable should contain one of the following values (“IT”, “IS”, “CS”, “CYS”) all letters
should be capitalized.</li>
<li>level &gt;&gt; a variable of type: int, should be from 1 to 4 only.</li>
<li>marks[] &gt;&gt; an array of type: int, the content of each index in the array will represent the marks of one subject which will be between 0
– 100.</li>
<li>size &gt;&gt; a const variable of type: int, should be 6 [ no need to ask the user ] this would be the size of the marks[] array.</li>
<li>total_marks &gt;&gt; a variable of type: int, which is the sum of all the subjects in the marks[] array. This means that the number in this
variable should be between 0 – 600.</li>
<li>grade &gt;&gt; a variable of type: float, this variable contains the result of dividing total_marks and size.</li>
<li>student &gt;&gt; an array of type: Student, the type you will create as a struct.</li>
</ol>
<h3>Software Requirements Specifications (SRS) :</h3>
<ol>
<li>The program should contain:
<ul>
<li>Functions: all of the program’s main operations should be done using functions.</li>
<li>Structs: the student will be created not as a single variable, but as a struct.</li>
<li>Arrays: as mentioned in the previous section, the marks will be an array. And you will also have an array of the student struct.</li>
<li>Files: the data in the program will be stored/restored from a file.</li>
<li>Header file: this is a library that you will create and make all of the functions and structs inside of it. Then you will include it in your project as well as some of the main built-in header files you  will include such as iostream, … etc.</li>
</ul>
</li>
<li>The Main Menu of your program should look something like this:
<ol>
<li>Add a new Student Record.</li>
<li>Edit a Student Record.</li>
<li>Delete a Student Record.</li>
<li>Search for a Student Record.<br />
o Search by the student’s id<br />
o Search by the student’s name</li>
<li>Display All of the Students Records.<br />
o Display the students ordered by id.<br />
o Display the students ordered by name.<br />
o Display the students ordered by grade.</li>
<li>Exit.</li>
</ol>
</li>
</ol>
</blockquote>

CC BY-SA 4.0
2024-02-15T22:36:40.173Z
**Comments have been [moved to chat](https://chat.stackexchange.com/rooms/151507/discussion-on-question-by-black-storm-what-is-the-best-way-to-learn-practical-co); please do not continue the discussion here.** Before posting a comment below this one, please review the [purposes of comments](/help/privileges/comment). Comments that do not request clarification or suggest improvements usually belong as an [answer](/help/how-to-answer), on [meta], or in [chat]. Comments continuing discussion may be removed.
Ben I.
CC BY-SA 4.0
2024-02-16T20:45:17.307Z
"we cannot analyze its requirements" why not?
njzk2
<self-learning><programming>
What is the best way to learn practical programming when school doesn't help?
# What is the best way to learn practical programming when school doesn't help?

(Asked by: username_0 on 2024-02-15)

At my university, my fellow students and I cannot apply practical subjects well... For example, when we are asked to do a software project, we cannot analyze its requirements to know the steps that must be followed to do so, and we cannot translate what we learned in theoretical subjects into practical application easily... How can I develop? My skills are in the practical aspect of programming...and what are the best ways to raise my skills in practical applications of computer skills in general?
The project requirements were:

> ### Computer Programming 2: Final Project
>
> Make a C++ program to manage students records and grades. Every student record must have:
>
> 1. id >> a variable of type: int.
> 2. first\_name >> a variable of type: string, this variable should contain letters only [shouldn’t contain any numbers and special
>    characters], and the first letter should be capitalized.
> 3. last\_name >> a variable of type: string, this variable should contain letters only [shouldn’t contain any numbers and special
>    characters], and the first letter should be capitalized.
> 4. major >> a variable of type: string, this variable should contain one of the following values (“IT”, “IS”, “CS”, “CYS”) all letters
>    should be capitalized.
> 5. level >> a variable of type: int, should be from 1 to 4 only.
> 6. marks[] >> an array of type: int, the content of each index in the array will represent the marks of one subject which will be between 0
>    – 100.
> 7. size >> a const variable of type: int, should be 6 [ no need to ask the user ] this would be the size of the marks[] array.
> 8. total\_marks >> a variable of type: int, which is the sum of all the subjects in the marks[] array. This means that the number in this
>    variable should be between 0 – 600.
> 9. grade >> a variable of type: float, this variable contains the result of dividing total\_marks and size.
> 10. student >> an array of type: Student, the type you will create as a struct.
>
> ### Software Requirements Specifications (SRS) :
>
> 1. The program should contain:
>    * Functions: all of the program’s main operations should be done using functions.
>    * Structs: the student will be created not as a single variable, but as a struct.
>    * Arrays: as mentioned in the previous section, the marks will be an array. And you will also have an array of the student struct.
>    * Files: the data in the program will be stored/restored from a file.
>    * Header file: this is a library that you will create and make all of the functions and structs inside of it. Then you will include it in your project as well as some of the main built-in header files you will include such as iostream, … etc.
> 2. The Main Menu of your program should look something like this:
>    1. Add a new Student Record.
>    2. Edit a Student Record.
>    3. Delete a Student Record.
>    4. Search for a Student Record.  
>       o Search by the student’s id  
>       o Search by the student’s name
>    5. Display All of the Students Records.  
>       o Display the students ordered by id.  
>       o Display the students ordered by name.  
>       o Display the students ordered by grade.
>    6. Exit.

**Tags:** self-learning, programming

> **Comments:**
> **username_1**: **Comments have been [moved to chat](https://chat.stackexchange.com/rooms/151507/discussion-on-question-by-black-storm-what-is-the-best-way-to-learn-practical-co); please do not continue the discussion here.** Before posting a comment below this one, please review the [purposes of comments](/help/privileges/comment). Comments that do not request clarification or suggest improvements usually belong as an [answer](/help/how-to-answer), on [meta], or in [chat]. Comments continuing discussion may be removed.  
> **username_2**: "we cannot analyze its requirements" why not?  

---

## 4 answers

### Answer by username_4 on 2024-02-15. Score: 8 | Accepted answer

To translate a program specification like this into a working program, a few things are required.

First, you'll need an understanding of what's being asked. Define all terms in the assignment. For example, do you know what a "struct" is? How about a "function"? If a term is unclear, revisit earlier lectures or research online or in your textbook. Write down any knowledge gaps and build up from first principles, writing simple standalone programs that help you learn about one concept in isolation from the overwhelming complexity of the full app.

Once you've defined the problem, break the problem down into small enough pieces that you can begin making progress on something, even if it's just printing "hello world" on the screen. Once you have that, work on the next achievable step, such as creating an integer `id`, or a `Student` struct with an integer id, and print that. If you're not sure about how to use structs, you could ignore that requirement in the short term and use loose variables, or begin working on something else, like displaying the main menu. Programs are developed incrementally, using temporarily simplified requirements. Re-compile your code after every change and verify that it still works.

Functions are a useful simplifying tool. Once you have a piece of working code in a function, you can verify its inputs and outputs on its own, then set it aside and call it when you need it, without worrying about the steps inside it, like you do when you use a C++ library function.

But if you haven't used functions, that's OK--parts of the program can be written without them, then you can refactor to add functions later. Same with user interaction--you can skip that and hardcode the user input initially. Likewise, you can skip the file storage requirement at first and have the program work in memory only. Then, once that's working, introduce the file storage functionality.

Another simplification opportunity are the student record operations. You'll eventually need to add, edit, delete, search and list student records, but for starters, set most of these operations aside and just focus on listing student records from hardcoded data. Then work in the other behaviors one by one, verifying as you go.

To summarize:

1. Understand the problem. Confront any knowledge gaps as soon as possible.
2. Break the problem down into small pieces and begin working on the first one. Temporarily simplify requirements, and don't be afraid to go all the way back to first principles if necessary to find a foundation to build on.
3. Compile and run frequently, fixing errors and validating your code as you work, using multiple inputs. Debugging and testing are important skills which take practice.
4. Build on your sub-problem solutions, gradually introducing complexity until all the pieces work together and you've solved the large problem.

By the way, the process I've described can take an unbounded amount of time, so I suggest beginning it as soon as you receive an assignment (or sooner, preparing your fundamentals independently by working on basic exercises, similar to learning a musical instrument).

See also: [Find a Simpler Problem](https://ericlippert.com/2014/03/21/find-a-simpler-problem/) by Eric Lippert.

---

On a broader level, when you're facing a difficult problem, it's normal to want to blame your circumstances (professor, school, etc) but doing so will only harm yourself. You'll inevitably encounter unhelpful professors (later: coworkers, clients, etc), but don't let them stop you from reaching your goals. Try to reframe "we cannot" into "we cannot right now, but if we develop a plan and build in small steps, we can".

Real world software specifications are often much less concrete than this assignment. But regardless of whether you're a student or professional, if you're truly stuck after applying the strategies in this post, you can ask professors, colleagues and clients for clarification (but sometimes you won't get much!).


---

### Answer by username_1 on 2024-02-15. Score: 3

The lab requirements you've outlines are very concrete and straightforward. If many students in your class are having trouble decomposing the problem into sub-problems, then that suggests to me that the course might be simply moving too quickly.

Since you are not free to change the pacing of the course, I strongly recommend building some side-projects in C++. You can work on something you'd find fun, or you can use a site like [Project Euler](https://projecteuler.net/) to give you some interesting problems to tackle. The goal here is to simply give yourself some time to code and absorb some of the ideas better. This extra time can help you to construct firmer mental models of what programs do and how they work. Even a little bit of progress in this will be likely to help you enormously in your course.

These core ideas (input and output, problem decomposition) take time to digest, so I recommend giving yourself that time.


---

### Answer by username_3 on 2024-02-16. Score: 2

I think that one key issue I see all the time is asking students to build contrived applications. You need to give them an actual problem to solve. The final assignment you were given seems pretty lazily thrown together by the professor. This is why it's hard to take what you were taught and apply it.

Anecdote: My little brother almost dropped out of college because he just couldn't grasp calculus and failed the class. He ultimately went back the next year and had a different professor, and now he's published a paper and is on a fast track to be a professor at that college. He told me that it all came down to the difference in teaching style. He said the second time it was easy and intuitive.

The ultimate point here, is that you're paying that school to teach you. If that teacher is doing a poor job, you should find a different teacher, or a different school/program.

I've worked with quite a few people now who took an online code camp course, and they have all turned out to be good hires.

> **Comments:**
> **username_4**: Welcome to the site! Although the assignment won't win any "wow!" awards, it is a complete CRUD application with persistent storage, which seems representative of a large chunk of real-world programming. As far as professor quality: in programs I've been through, I'll inevitably run into an upper-division teacher I don't gel with in a required class. As an instructor, there are students who don't gel with me. While unfortunate, I think it's an important skill to take one's educational outcome into one's own hands at a certain point and learn the material regardless of who's at the helm.  
> **username_3**: I'm not saying that they didn't get along, they got along fine, I'm saying the teacher was not good at teaching. If the professor is being lazy with their teaching assignments, it's going to be a lot more difficult for the students to understand what's going on.  
> **username_4**: I'm not sure "not good at teaching" is an objectively measureable thing. I suspect it's more a matter of fit. I've had some great classes that were pretty hands-off from the teacher and had a blast hacking on my own most of the semester, while other students didn't care for the course. But assuming there are teachers who simply cannot teach (they probably exist, just less than many students assume), as a student, should you blame the teacher and quit as a result of that, or should you learn what you're there to learn anyway? I vote the latter option in most cases.  
> **username_5**: Im with Kelly on this. CRUD is fine; C++ is also fine (ahem). But CRUD in C++ is not. I see this as a bad question  

---

### Answer by username_6 on 2024-04-01. Score: 1

In addition to what has already been said. Learning to program at the same time as learning C++ is too hard (cognitive load theory in teaching says: Keep detractions to a minimum. Keep steps small.).

Therefore, first learn to program, then **if necessary** learn C++.


---

