Please critique my program design

  • Thread starter Thread starter JonnyG
  • Start date Start date
  • Tags Tags
    Design Program
Click For Summary
SUMMARY

The discussion centers on the design of a recipe management program, where the user contemplates the necessity of a Recipe class in C++. The user initially proposed a class structure to manage recipes but questions its relevance since recipes will be stored in .txt files. Participants suggest that object-oriented design (OOD) can encapsulate related data and behaviors, such as unit conversions, and recommend considering a Model-View-Controller (MVC) architecture. They also highlight the importance of understanding data structures and suggest using simpler text file formats like Markdown for storing recipes.

PREREQUISITES
  • Understanding of C++ programming concepts, particularly classes and objects.
  • Familiarity with file I/O operations in C++.
  • Knowledge of basic data structures, such as vectors.
  • Awareness of object-oriented design principles and patterns, including MVC.
NEXT STEPS
  • Explore C++ class design and its advantages in managing related data and behaviors.
  • Learn about Model-View-Controller (MVC) architecture and its implementation in C++.
  • Research Markdown file format for storing and organizing recipe data.
  • Investigate unit conversion techniques and how to implement them in C++.
USEFUL FOR

Self-taught programmers, aspiring software developers, and anyone interested in applying object-oriented design principles in C++ for practical applications like recipe management.

  • #31
I appreciate all of the advice everyone in this thread has given me. Thank you all very much!
 
  • Like
Likes   Reactions: berkeman
Technology news on Phys.org
  • #32
Vanadium 50 said:
To be clear, I wasn't encouraging subterranean lagomorphic voids. I was encouraging him to think about what he wants this to do before jumping into coding. A simple electronic equivalent index card might be fine. Or it might not. But you don't want to be in the middle of writing and discover you missed a requirement that would cause you to redesign.

I did suggest that it is better to design data structures before leaping into coding. I think this is a good idea, and my experience is that much grief can be avoided by thinking data structures before leaping into coding.

@Vanadium 50 I wasn’t attacking you or your suggestions, merely pointing how design can go wild to the point of failure. I myself am guilty of this sometimes. I will design something with a lot of potential features and then look at the core features I need and place the others in quarantine to be evaluated later on.

In general, it’s a better approach than designing a toy version and then extending it beyond its original capabilities only have you go through a thorough redesign and refactoring of code. But I guess that's what time pressure and programmers do all the time.
 
  • #33
yungman said:
[...] My advice to you is find something that you REALLY LOVE, don't look at programming just because of good pay. You literally marry to the job, you better love it. [...]

Wise words indeed. Getting stuck programming something you know is never gonna get used (and yes that happens in industry, I've tried - for the military even) or is boring is not even remotely funny.
 
  • #34
Vanadium 50 said:
First, I would try and understand the data structures you want.
As an add-on to this good advice, if your wife is going to be the primary user of the program, it helps a lot if the program's data model matches her mental model. For example, what is her mental model of a recipe? Finding that out will require taking some time to ask her questions.

For a language, since it looks like C++ is what you are most familiar with, I don't see any major issue with using it. My personal language of choice for something like this would be Python, but I have done a lot more coding in Python than I have in C++. If you haven't done any coding in Python, I would say this is at the upper end of difficulty for a "learning project" where you're trying to learn the language as well as produce a working application.
 
  • #35
Vanadium 50 said:
my experience is that much grief can be avoided by thinking data structures before leaping into coding
This is my experience as well. With well-designed data structures, much of the code will more or less write itself. But with a tangle of code that isn't backed by well-designed data structures, it can take forever to find your way out.
 
  • #36
PeterDonis said:
Finding that out will require taking some time to ask her questions.
But maybe not two years ... :woot:
 
  • #37
This thread just got raised from the dead...

I appreciate everybody that helped me out. I start full time as a software developer in May :) (finally)
 
  • Like
Likes   Reactions: pbuk, berkeman and FactChecker
  • #38
JonnyG said:
I start full time as a software developer in May :)
Congrats! Enjoy the ride :smile:
 
  • #39
JonnyG said:
This thread just got raised from the dead...

I appreciate everybody that helped me out. I start full time as a software developer in May :) (finally)
Yeah, enjoy the ride. In another thread the OP seemed to be lacking some self-confidence. Don't make that mistake. Demand what you and your work are worth (and what your education entitles you to of course).

(Or was it the same thread? Still a valid point though.)
 
Last edited:
  • #40
DaveC426913 said:
But maybe not two years ..
All time spent with the wife is happy time.
 
  • #41
Vanadium 50 said:
All time spent with the wife is happy time.
Some of you have never been on a big lake in a small sailboat with my wife and it shows.
 
  • Haha
Likes   Reactions: berkeman
  • #42
DaveC426913 said:
Some of you have never been on a big lake in a small sailboat with my wife and it shows.
I REALLY[/size] hope she does not have access to your account here!
 
  • Haha
Likes   Reactions: DaveC426913

Similar threads

  • · Replies 8 ·
Replies
8
Views
4K
Replies
65
Views
5K
  • · Replies 22 ·
Replies
22
Views
2K
  • · Replies 75 ·
3
Replies
75
Views
6K
Replies
19
Views
4K
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 30 ·
2
Replies
30
Views
4K
  • · Replies 89 ·
3
Replies
89
Views
6K
  • · Replies 4 ·
Replies
4
Views
7K