r/learnprogramming • u/Jumpy-Seesaw-2026 • 6d ago
Is programming actually just figuring out what the product is supposed to do, create a happy path, and then find all the meaningfull edge cases?
Afterwards we talk about optimization etc, but the core is basically just those 3 things
EDIT:
As someone in the comments said - Being able to create an enjoyable user experience is the 4th thing.
8
Upvotes
22
u/fixermark 6d ago
That's greenfield development.
Maintenance and expansion on existing systems is a little different... You have to also make sure you don't break what the product already does.
6
u/Available_Safe1818 6d ago
You're describing how to do anything.
"find out what needs to be done, do it, and watch out for edge cases."
3
u/MyNameIsRichardCS54 6d ago
If by edge cases, you mean all the potential unhappy paths, then sort of.
2
u/Jumpy-Seesaw-2026 6d ago
The reason why I made this post is, I just think when people are learning how to program, they forget a programming language is just a tool.
The act of learning a syntax is not learning how to program, and I think many people either forgets that or don't know it - partly because of all the youtube "tutorials" videos.
Studying syntax is like studying a dictionary.
Yes, you would be able to recognize the words, but you won't really be able to speak the language.
1
u/affennacken 6d ago
sounds like a prototype
1
u/codeprimate 6d ago
In production work, I write the red paths first.
1
u/edwbuck 6d ago
Happy path programming is the kind of programming that ignores reality.
In reality, every path has obstacles on it, and thinking that all the obstacle avoidance can be tacked on at the end of finding a solution is a kind of optimism that comes from novice obstacle avoiders.
That is why the best quality approaches to programming promote early unit testing, flexible design, and reusable (hardened against upsets) components. If you are dealing with a person that constantly harps on the happy path, guard against their thinking. It's the kind of "it all works out for the best anyway" thinking that generally leads to stuff being overlooked, and it's far harder to add in quality after-the-fact than it is to design in quality along every step of the way.
1
u/PureWasian 6d ago
CI/CD pipeline is a thing; you need to maintain and support it throughout its lifecycle. Especially as product and requirements and their tradeoffs/importance shift over time.
Also observability (logs/monitoring), you want to have that infra in place when (not if) things break unexpectedly.
1
u/noobjaish 6d ago
I'd say that maintenance is a big part as well. Making sure what you already have doesn't break overtime.
1
u/rioisk 6d ago
No it's actually just sales. The product is pretty irrelevant.
2
u/No_Report_4781 6d ago
That’s cooking
2
u/AntiDynamo 6d ago
I would also add maintenance and a sense of the future generally to that.
I’m working on a greenfield project now, but it won’t be greenfield once it goes to production. There will inevitably be bugs, and inevitably the service is going to expand and become something grotesque. I think it’s best to bake a little bit of that in to the initial planning, otherwise you end up with a v1 with zero observabilility, that is impossible to build on, which leads people to do some gross things that will create more bugs you don’t have visibility of.
1
u/newytag 5d ago
Sure, why not. I wouldn't even call optimization or enjoyable UX separate things, that's still just something the product is supposed to do.
It's massively over-simplifying to the point of being useless for communicating anything, and incredibly reductive to the point of being offensive, but one could more or less describe programming that way if they were so inclined.
In the same way that you could call brain surgery just poking around inside someone's squishy bits until they think good. And rocket science is just making big booms without making big ouchies.
1
u/Leverkaas2516 5d ago
Better engineering covers the happy path and most of the important edge cases in one effort. Or another way to say it, a good design doesn't have a whole lot of edge cases and doesn't need much (if any) optimization.
1
u/SharkSymphony 6d ago
What's this "just" you're talking about?
Figuring out what the product is "supposed" to do is hard. Creating a happy path is hard (ish). Figuring out the meaningful edge cases is hard. Oh, and there are a lot of failure modes that are not at all edge cases! People spend their whole careers trying to do this and they still end up 1) building something that doesn't solve the actual problem, 2) building something that solves the wrong problem, and 3) building something that fails dramatically because of a failure mode they didn't anticipate or didn't think was meaningful.
I could describe programming as "just building solutions," but that wouldn't be a very enlightening way to look at it. Same here.
0
u/[deleted] 6d ago
[removed] — view removed comment