4 ms·
These lists tend to be trite, and this one is no exception. For example, "Experts are not satisfied with just any abstraction, they deliberately seek elegant a
by WalterBright 7y ago
These lists tend to be trite, and this one is no exception. For example,
"Experts are not satisfied with just any abstraction, they deliberately seek elegant abstractions through which complex structures can be introduced, understood, and referred to efficiently."
Every developer I've ever talked to believed down to their core that this was what they were doing. Yet 99% of software is utter bilge.
This includes mine. I look at everything I've written 5 or more years ago, and it's all garbage. Most of the work I do is rewriting it.
There's no way around it, it takes a lot of experience to be even able to recognize a good design, let alone write one. No list of 10 rules is going to help much.
It's like painting. No "10 Habits of Famous Artists" is going to help you become a great artist.
- erikpukinskis 7y ago> > they deliberately seek elegant abstractions through which complex structures can be introduced, understood, and referred to efficiently." > Every developer I've ever talked to believed down to their core that this was what they were doing. Really? I’ve worked with a lot of people who are just trying to make the thing do the thing. Even most of the people who are interested in good abstractions often are under such pressure to perform “I’m just shipping here don’t mind me” that they largely stop thinking about the right abstraction. Maybe I’ve worked at too many troubled startups though lol.
- hinkley 7y agoNot all developers are doing this, no. But pretty much all the ones I’d like to strangle are. It’s elegant! No, your dumpster fire of a Second System Syndrome is not elegant. Fractal designs are not elegant. Also you are in your late 30’s. Why are you just having your second system syndrome now? </oddly specific>
- andrewstuart 7y ago>>I look at everything I've written 5 or more years ago, and it's all garbage. From Walter Bright? Sorry I don't buy this. I can accept that you might feel it could be better, but garbage? No.
- hinkley 7y agoNo, I know exactly what he means. I sometimes get irritated with code I wrote a year or so ago, and that feeling is compounded the farther back you go. And that’s not counting the spots where I catch myself doing things I’ve told others to avoid doing.
- WalterBright 7y ago> I catch myself doing things I’ve told others to avoid doing. Now and then I'll publish some guidelines for writing better code, and someone always points out that I violate them myself and contradict earlier dicta :-)
- WalterBright 7y agoHere's a piece I was proud of 20 years ago. Can you count all the ways it's a steaming pile? https://github.com/dlang/dmd/blob/master/src/dmd/root/outbuffer.d https://github.com/dlang/dmd/blob/master/src/dmd/root/outbuf... I've recently fixed a number of its problems, but it's got a ways to go. Am working on it this evening. It needs to be better because earlier today I found a bug enabled by its poor design: https://github.com/dlang/dmd/pull/10462 https://github.com/dlang/dmd/pull/10462
- UweSchmidt 7y agoProgramming is finding abstractions, and those change as a program, and the understanding of the problem grows. Abstractions then have to change again as the program interacts with other systems, and to accomodate typical patterns of changes in the requirements which can't be predicted beforehand. Abstractions then have to change again to facilitate understanding the entire thing, and to accomodate technical changes, or allow easier bug finding. I'd say, a real-world program that's beautiful 5 years later is ...something special :)
- KajMagnus 7y ago> "deliberately seek elegant abstractions" This advice is too abstract, to be practically useful in real life. ? Is it a bit like saying: To be a good runner, do this: Run fast. — Needs to be broken down into smaller more actionable steps. Still the other advice about talking with users, and looking around at other things out there, and spending time "thinking into the future" about how one's ideas will work out, and what to not include in the software — I like that advice :- )