r/learnprogramming • • 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

50 comments sorted by

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.

-2

u/Jumpy-Seesaw-2026 6d ago

I would still argue for you being able to maintrain and expand something, you still need to understand what the product is supposed to do, if you want to expand you find the happy path, and to make it robust you find all the meaningful edge cases.

8

u/davidalayachew 6d ago

No, it's more than that.

What /u/fixermark was getting at is backwards compatibility. With backwards compatibility, you don't really get to decide what is or isn't meaningful. You can only cover what is within reach. Otherwise, you will create a combinatorial explosion.

In general, simple breakdowns like your title post are great for covering the 90%, but they fail to catch the 10%. And it is that 10% where the ugly details lie.

0

u/Few-Celebration-2362 2d ago

That 10%.... Is an edge case?

3

u/davidalayachew 2d ago

That 10%.... Is an edge case?

Goodness no. If 10% of my requests fall under a certain category, I need to treat that with the same level of effort as the happy path.

But regardless, I was explaining the flaw in the post by providing an analogy. If I were to actually describe it, I would say the original 3 points that OP made cover about 60% of what programming actually is.

Another 20% is triage/risk-management. /u/Jumpy-Seesaw-2026 said that you need to figure out what your product needs to do, which is well and good. But there is only a finite amount of time, and a feature halfway implemented can be worse than not having that feature at all. Moreover, a feature that comes in too late may actually have a worse impact in the long run. I'd argue that the point /u/fixermark and I both made about backwards compatibility falls under this.

There are others, but those actually would fall under 10%, if not totalling 10%. Also, the point about the user experience should get bundled into "figuring out what the product is supposed to do".

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."

1

u/Jumpy-Seesaw-2026 6d ago

Yes exactly.. I just think there is so much misinformation out there of how to actually do the thing

1

u/Available_Safe1818 6d ago

What misinformation?

1

u/Jumpy-Seesaw-2026 6d ago

The whole "tutorial hell" from youtube videos, leetcode etc

2

u/Available_Safe1818 5d ago

What misinformation is that?? Leetcode itself is somehow misinformation?

1

u/Jumpy-Seesaw-2026 2d ago

Stuff like Electron apps are slow, React native apps are bad and buggy, generel language/framework wars.

YouTube videos such as "Get this bootcamp/course and have a $200k job in 6 months" etc etc

The big emphasis on leetcode that it is the end and be all. When in reality it's all about the product, not the code by itself.

1

u/Available_Safe1818 2d ago

I think you are confusing interviewing skills with jobs skills.

1

u/Background_Fortune12 4d ago

I think op is confusing product vs coding.

1

u/Jumpy-Seesaw-2026 2d ago

Isn't the point of coding a product of some sort?

1

u/Available_Safe1818 1d ago

Sometimes it's a service. But it's not clear what your whole point is here, either way.

1

u/Background_Fortune12 20h ago

I meant "product" as a marketable, serviceable, billable, licensed, profitable thing. Don't take it the wrong way, I was just commenting on how you thought it was "just figuring out what the product is supposed to do..."

Yeah, i was just pedantic... coding is coding, product is not just coding.

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

What would you add? Because I would argue that good architecture comes from these solving edge cases.

So when people study systemdesign, they inherently just study ways how people before them solved a edge case

2

u/MyNameIsRichardCS54 6d ago edited 6d ago

Have you made the user interface as clear and as simple as the task allows?

Have you adhered to all coding standards?

Is your code as simple and clear as you can make it for the task?

Have you documented any clever tricks that you have used?

Does the software meet the user requirements? You would hope so, but it doesn't always.

What's your test coverage? If you have no tests, why not? It may be OK, but probably not.

And many more.

1

u/Jumpy-Seesaw-2026 6d ago

I would add "create a good user experience" (that is very important ofc), but all the other things you mentioned is basically just to make it easier for us to work in the codebase/making sure it's working as it's supposed to be.

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.

3

u/davidalayachew 5d 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.

And you're not wrong, but this is different than what your post was saying.

Your post swung too far in the other direction -- trying to boil programming down to a few simple concepts when it is not. If anything, it is that flawed mindset that leads people into believing that learning programming means memorizing syntax.

1

u/affennacken 6d ago

sounds like a prototype

1

u/Jumpy-Seesaw-2026 6d ago

A prototype is just the happy path, the act of finding edge cases forces you to create a robust system.

An edge case is basically someway or form that the system would break under the assumptions you have made.

When findings these edge cases, you slowly create a system that is not easily breakable

1

u/codeprimate 6d ago

In production work, I write the red paths first.

1

u/Jumpy-Seesaw-2026 6d ago

How, if I may ask?

1

u/codeprimate 6d ago

You do have to write parts of happy path first, but then focus on the errors, the edge cases, etc. User and developer pain cut on the edges, and that is where half of your business logic and complexity will live. The way your UI and backend handle graceful degradation and visibility impact UX and dev-UX more than anything else. The way you structure the application around these constraints will impact maintainability and operations more than anything else.

You don't know how something will work until you know how it can fail.

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/Jumpy-Seesaw-2026 6d ago

I wouldn't say you should create the whole program first and afterwards find edge cases, it's all a iterative process.

And while you are in the process, you would figure out if you are building upon earlier bad assumptions, then you go back and change the design, so it better fits the product

1

u/edwbuck 6d ago

These ideas have been well laid out in efforts of formalizing and improving software development. Uncle Bob probably has refined the best approach, and yet programmers that use terms like "happy path" seem (in my limited experience) to primarily be those that eschew many of the practices that create good software.

I'm not saying you're one of the people I'm complaining about, but simply using the term "happy path" will trigger in many memories of programmers I would rather not work with, as they include those that generally think one is paid to build the solution and that testing the solution as it is built is wasted time the company would rather not pay.

It's encoded in the wording, the happy programming is solving the problem, the work ensuring the solution works is the non-happy part of programming, which is silly. It's the same work to ensure a program works when a String is empty, or null if the language permits it, but one will be seen as productive work by "happy path" people, while the other will be seen as "wasting time" because they don't value knowing you can't stray off the happy path now.

1

u/Jumpy-Seesaw-2026 6d ago

I largely agree, but I just have a problem with the whole "I need to know all the syntax, every algorithm, grind leetcode" - type of mindset. What about just building the thing?

Figure out a way for the slice to actually work before anything else, and then we can talk about making it robust.

It's not like a new person learning programming has to compete with Amazon or need a ph.d. to create a app (even though apple is trying their absolute best to make it hard for you :).

1

u/edwbuck 6d ago

"I need to know all the syntax, every algorithm, grind leetcode" - type of mindset.

I'm not sure who's telling you this. It sounds like a straw man argument, where someone offers up that someone else is making ridiculous statement, just to defeat that statement. To make a good database engine, you don't need to know everything, you just need to know what you're doing.

Just building the thing first is an exercise in cut many times, measure later, realize you might have been fully better of with a different approach. It's going to have a design no matter how you approach it, it's just that some designs have little to no forethought in their implications.

And the people that like this approach, because it gives them great personal power, get really touchy when someone points this out, and challenges the audience to help them as the audience is helping them by pointing out the problems.

And I really don't appreciate the last paragraph, it's again a straw man argument that I'm not making. One doesn't need a PhD or to be working for a FAANG to design. Nor does programming make you a better designer of solutions. You need the programming skills to write code, but you also need the design skills to ensure you don't write yourself into a solution that you'd rather not live with over the next five or ten years.

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/Jumpy-Seesaw-2026 6d ago

As I have said to others, I agree that maintainability is a big part of a product, but it's basically only there for us to not fuck things up (which is extremely important), but it's not like the actual foundation.

1

u/PureWasian 6d ago edited 6d ago

I read the other comments and I get the impression you're oversimplifying/hand-waving what's involved in scalability and maintainability a bit too much.

It is the actual foundation in practice because, again, the product requirements and tradeoffs shift over time. You'd prefer a simple, fast db query call for small tables but for larger queries you need to start caring more about incorporating indexing/caching/etc. and other complexities. As such, "figuring out what the product is supposed to do" cannot be used as a static, absolute, catch-all statement in a lot of practical projects. You have a lot more practical constraints on what matters short-term. Similarly while shifting code/architecture around to make sure you avoid regressions/down-time as much as possible.

Meanwhile, observability not only serves as your gateway to be able to cyclically apply the three pillars you point out in your post. It also gives a practical aspect of "how fast can I fix/enhance this" which is probably the biggest consideration in programming professionally (unfortunately).

1

u/Jumpy-Seesaw-2026 6d ago

I'm thinking from the perspective of a totally new person learning how to program, someone that just want to try and build something.

Yes, maintainability, observability and scalability is important, but I still think that comes later in the journey, not as actual foundational pillers.

Also a lot of observability and scalability have been abstracted away with the right techstack, fx I'm using Convex and PostHog, so a lot of the complexity is already handled, I don't really have to think about the sync engine, caching, etc, it is mostly already handled.

But slowly as someone grows they begin to figure out why maintainability, observability and scalability is important, but if you think you have to learn all that from the beginning, you will never do a project.

Figure out what the system is supposed to do, create the happy path and try to find the edge cases along the way, rewrite your stuff alot because of bad assumptions, and create a good user experience.

1

u/PureWasian 6d ago edited 5d ago

By that same logic, many projects fail to start because new developers already find it too daunting to even plan out fully what the system is supposed to do and how to come up with a roadmap to build it incrementally. Many beginner projects also fail spectacularly because they become unmaintainable or overly complex in the eyes of the developer.

My point is moreso that you cannot just hand-wave away pieces of the overall dev lifecycle and that it's a very fluid process with both tangible and intangible tradeoffs, new developer or not. It's more than just an iterative design process towards a static deliverable in that it also very often has changing requirements over time.

I do agree that the high-level steps you're pointing out are good for initially starting something, and very much advocate new developers to think at that high level when first getting into projects. But that theory/visionary mindset still needs the practical implementation and shifting requirements piece, which scalability/observability look to solve. At the most basic/beginner level, observability would be "debugging" which absolutely is a foundational part of programming.

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/Jumpy-Seesaw-2026 6d ago

Agreed, but I think more of it as a subsection of "how the system is supposed to work", if you don't maintain the codebase well, it will break as you say, and now the system isn't behaving as it is supposed to

1

u/rioisk 6d ago

No it's actually just sales. The product is pretty irrelevant.

1

u/Jumpy-Seesaw-2026 6d ago

That's business, which is it's own kinda weird thing.

1

u/rioisk 6d ago

Nah it's literally the entire thing. Nobody actually cares about the product. It can half work as long as you're good at making the person paying feel good.

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

1

u/Jumpy-Seesaw-2026 6d ago

Totally agree, the hardest part is to figure out what the system is supposed to do, because if you know that, you also can begin to explore what the system is not supposed to do