Readit News logoReadit News
pixelworm commented on The key to getting MVC correct is understanding what models are   stlab.cc/tips/about-mvc.h... · Posted by u/csb6
pixelworm · 6 months ago
I think nearly every definition of MVC I've read has been different. At this point it just means you split something into three classes as far as I can tell.
pixelworm commented on Ask HN: Best codebases to study to learn software design?    · Posted by u/pixelworm
artpar · 7 months ago
I made a small list long while ago, but it still holds today

https://medium.com/@012parth/what-source-code-is-worth-study...

pixelworm · 7 months ago
Thanks! I appreciate it!
pixelworm commented on Ask HN: Best codebases to study to learn software design?    · Posted by u/pixelworm
pydry · 7 months ago
I dont think this is a good idea, actually. Good design is about making good trade offs at the right point in time.

A code base with excellent design will show you the end state but not how it got there but probably not the trade offs and decisions involved.

Practicing refactoring on subpar code bases and dealing with the consequences of your decisions is a better way to improve.

pixelworm · 7 months ago
Are there any books or websites you'd recommend I read to learn more about design instead? I 100% need to learn by doing, but wouldn't it also be good to learn what has already been discovered so I don't have to reinvent the wheel? Or is it best to discover good design on your own?
pixelworm commented on Ask HN: Best codebases to study to learn software design?    · Posted by u/pixelworm
chickenzzzzu · 7 months ago
Your own. Everyone else's is trash. Never understand someone else's code-- the whole point is that there should be just a handful of functions of yours I can call, and shouldn't ever care to see how the sausage is made. Otherwise, your abstraction sucks
pixelworm · 7 months ago
I agree that the internals of my code should be abstracted away from my users. But don't I still want the internals to be well designed so they are maintainable and extendable?
pixelworm commented on Ask HN: Best codebases to study to learn software design?    · Posted by u/pixelworm
rgovostes · 7 months ago
These are several years old at this point, but many open source project leaders contributed to the series "The Architecture of Open Source Applications", which is free to read online: https://aosabook.org/en/index.html
pixelworm · 7 months ago
Thank you!
pixelworm commented on Ask HN: Best codebases to study to learn software design?    · Posted by u/pixelworm
koliber · 7 months ago
Trying to learn software design by looking at code is kind of like trying to learn about architecture looking at the bricks that make up a building.

To learn about design you need a wider perspective. You can theoretically learn it from code but it won’t be most effective. Look at great documentation and literature about design instead.

pixelworm · 7 months ago
Yeah, I guess without the context I wouldn't really understand why it was designed that way. Or know what situations a design like that would be good for.

Is there any documentation or literature that has helped you?

pixelworm commented on Ask HN: Best codebases to study to learn software design?    · Posted by u/pixelworm
pfannkuchen · 7 months ago
Maybe I’m just not good enough at paying attention, but for me it seems like you have to actually run into problems over and over and figure out how to avoid the problems. Then you end up being able to mentally simulate what problems you will run into, and design is basically all about avoiding future problems of various kinds (and balancing tradeoffs about which future problems to avoid and how much effort to put into each, whether you can solve multiple with one design play, etc).
pixelworm · 7 months ago
This is pretty much how I've learned up to this point (and will of course continue). Trying to learn from real world code will be a new experience for me. Not sure how valuable it will be but should be fun either way.
pixelworm commented on Ask HN: Best codebases to study to learn software design?    · Posted by u/pixelworm
teiferer · 7 months ago
What if the question is born out of the insight that his team's software is poorly designed, motivating the desire to get outside input?

What if the question is asked by a college student?

pixelworm · 7 months ago
I would be interested in recommendations for those who have a poor example or no examples

In my case, I'm a junior engineer that has recently been given more responsibility designing aspects of our product. I'm just trying to learn all I can so my designs will be good!

pixelworm commented on Ask HN: Best codebases to study to learn software design?    · Posted by u/pixelworm
crystal_revenge · 7 months ago
My immediate reaction to this question is: "your team's". Nothing will teach you more about how to design software then really understanding why good and bad solutions were adapted to solve a certain real problem.

Software exists precisely because there is still a messy layer connecting user requirements to actions on a computer. If there was not messiness then we could just automate it all. Approaching software from some sort of Platonic ideal of what software should be will frequently lead to bad decisions on it's own.

When you start to see how certain pressures lead to certain paths you learn to recognize the wrong decisions that are often good at the time, and avoid them. At the same time, you need to learn to develop methods that work quickly and effectively. By far the biggest real challenge in real world software is time constraints. This is almost never discussed in theoretical views of software, but the truth is you're always going to be writing code under pressure to ship. You will come across situations where you do not have time to do what you want to do or think is best.

Good software is software that runs and solves the user need, but you will come to realize that there are design solutions that will make successfully running happen more often. The best way to find these is to study the real software you're writing.

pixelworm · 7 months ago
I haven't considered time to implement as a metric for evaluating design, but it makes a lot of sense.

I definitely learn so much from my team's codebase. Most of what I learn is either from the good designs I see in there or from my googling trying to fix the not so good parts.

u/pixelworm

KarmaCake day44June 27, 2025View Original