Please critique my program design

  • Thread starter Thread starter JonnyG
  • Start date Start date
  • Tags Tags
    Design Program
Click For Summary
The discussion revolves around the design of a simple recipe management program, where the creator is contemplating the necessity of a Recipe class versus using primitive data structures. Key points include the potential redundancy of creating a class when data can be directly manipulated from text files, and the importance of understanding object-oriented design (OOD) principles to avoid spaghetti code. Suggestions include considering a model-view-controller design and exploring GUI options in Python or Java. The creator is also encouraged to think about the structure of recipes and their ingredients, as well as the implications of using C++ for this project, with advice leaning towards simpler languages for such applications. Overall, the conversation emphasizes the balance between learning programming concepts and practical application in software development.
  • #31
I appreciate all of the advice everyone in this thread has given me. Thank you all very much!
 
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 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.
 
  • #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 DaveC426913

Similar threads

  • · Replies 8 ·
Replies
8
Views
4K
Replies
65
Views
4K
  • · 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
2K
  • · Replies 30 ·
2
Replies
30
Views
4K
  • · Replies 89 ·
3
Replies
89
Views
6K
  • · Replies 4 ·
Replies
4
Views
7K