Live data from Hacker News

Kernighan and Pike were right: Do one thing, and do it well

medium.com

111–120 of 256 posts

Re: Kernighan and Pike were right: Do one thing, and do it well

#111
post #59

Earlier quoted context omitted.

Have your teams use façade pattern and you no longer need microservices to "isolate it"

Can your "facade" "isolate" interns making change in your service as well so that the whole service which powers the system doesn't go down. Microservices can.

If that happens it's an organizational problem (lack of mentoring, code reviews, access control), not an architectural problem...

Re: Kernighan and Pike were right: Do one thing, and do it well

#112
post #104

Earlier quoted context omitted.

Can your "facade" "isolate" interns making change in your service as well so that the whole service which powers the system doesn't go down. Microservices can.

You let interns push to production without code review?

Totally missed the point. Even with Code reviews, Unit/Integration Testing, Automated CI/CD and more can a person broke the prod.

One intern was told to deploy the app and I guess he made a mistake and updated k8 configs which deleted all the pods. Tell me how code reviews are supposed to catch it.

If you think "why not restrict config actions" etc, it's because the dev can go there and tweak those actions too. And each step added means less velocity of development. It's a game of cat and mouse. With isolation, you can limit the blast radius and loss of revenue.

Re: Kernighan and Pike were right: Do one thing, and do it well

#113
post #89
post #69

Earlier quoted context omitted.

> I think of enshitification primarily as an organisational/business phenomenon rather than a technical one. I will second this. I can't count how many projects were started with a clean design and clean early releases (what worked well), to be later messed up with business changes because the original (business) idea didn't work. And those sudden changes are expected to be implemented usually "yesterday", which adds…

> to be later messed up with business changes because the original (business) idea didn't work If the point of a project was to run a business, I would argue the project was messed up from the start if it could not adapt to the changes. Very little software survives contact with the real world.

I think software should always be written with a known half-life. Code I write for some one-off script is incredibly different than code I write when I expect the code to outlive me (eg in an opensource library that people depend on).

Scrappy prototype code is written with developer velocity as the most important property. I’ll throw everything in one file. Stick to tools I know well. Copy from other projects. Use crap variable names and generally make a bit of a mess. Something made fast can be remade fast if it’s wrong.

Code you expect to last a long time should have tests, CI and documentation. If I’m serious, I’ll often rewrite the code several times before deciding on a final design.

A good engineer should be able to switch between styles based on the needs of the project. And a good company will make those needs explicit to the engineering team and they’ll be transparent and trustworthy when expectations change. (Eg if a prototype is going to stay in production long term, they need to tell the engineering team).

It’s fine for businesses to pivot. And it’s fine for engineers to make quick prototypes to test a business idea. But everyone needs to be on the same page the whole way along.

Re: Kernighan and Pike were right: Do one thing, and do it well

#114
I think this is an oversimplification. Having something that does one thing and does it well works for simple things that can be composed. Sometimes this is not the case, as the composition would be too cumbersome or too slow.

The example of Obsidian (in my eyes) confirms this. Markdown is a very simple and elegant way to produce simple documentation, but as soon as one needs more it just crumbles.

I agree that the big tools (Word, excel, photoshop, etc) are bloated. These applications have crossed the bridge into 'they do everything about X' long time ago and they work well in their very wide problem space. Just taking excel (or Calc) as an example, I cannot see how using simpler tools I could create pivot tables and aggregate values across multiple sheets.

Re: Kernighan and Pike were right: Do one thing, and do it well

#115

You don't need a damn network between two pieces of code just to "do one thing and do it well", for God's sake, I'm so sick of this rampant cluelessness in the industry. Do you saturate the resources of one machine and need to split things off? Do you have multiple teams each taking care of their own stuff? Do multiple services, it's fine in those cases. For almost any other reason you are just adding complexity, boi…

I think you are misunderstanding the whole topic. Obviously it's about software at scale. Picking the right solution for a problem is kind of the whole job of software development. I have gone through the migration of monoliths to microservices (yes, at scale with multiple teams and requirements to scale individual components etc.) and it solved a lot of problems. The benefits outweigh the costs in my opinion (and dr…

The problem is that most of people don't work in a giant ass company and so don't have the same problems you've had have, and thus they can achieve the same easier, faster and cheaper with monoliths - but they don't because of the hype.

Re: Kernighan and Pike were right: Do one thing, and do it well

#116

You don't need a damn network between two pieces of code just to "do one thing and do it well", for God's sake, I'm so sick of this rampant cluelessness in the industry. Do you saturate the resources of one machine and need to split things off? Do you have multiple teams each taking care of their own stuff? Do multiple services, it's fine in those cases. For almost any other reason you are just adding complexity, boi…

I agree with you. MS can be a solution to a few problems, and as you mentioned 'do one thing and do it well' is not one of them.

In my head MS works well for - Teams with different approaches. - Different tech stacks

I cannot think of another good reason in which MSs would be a better solution than a good monolith (and communication).

Re: Kernighan and Pike were right: Do one thing, and do it well

#117
Taking Obsidian and VsCode as examples of the unix/microservices philosophy is very bizarre.

VsCode is in many ways a philosophical successor to Emacs and sits on the opposite end. Yes, it has plugins but it is designed from the top down to work in a particular way, and everything integrates with it. VsCode Extensions don't function on their own, they're not composable tools, they don't expose any agnostic interfaces (except for the LSP). They're designed to work well within the existing ecosystem of VsCode.

It's essentially a lesson in systems thinking. Paraphrasing Russ Ackoff, the complexity of a system is the consequence of the interaction of its parts, not the parts themselves. Microservices and unix tools always ignored this, which is why they fell out of favor. I can split one complex thing into a dozen simple things, but that doesn't make my life easier, because then all the complexity is in glueing them back together. And even worse improving one part doesn't mean you improve the system you care about.

Ackoff always used to give the example of a car. You take the best part of all cars in the world an put them together, you don't have a great car but a pile of junk, the parts don't fit. This is also the issue of unix tooling and microservice architectures, people optimize for the wrong thing.

Re: Kernighan and Pike were right: Do one thing, and do it well

#118

You don't need a damn network between two pieces of code just to "do one thing and do it well", for God's sake, I'm so sick of this rampant cluelessness in the industry. Do you saturate the resources of one machine and need to split things off? Do you have multiple teams each taking care of their own stuff? Do multiple services, it's fine in those cases. For almost any other reason you are just adding complexity, boi…

Exactly what the article said. I feel like you are strongly asserting a key premise of the article as if you are saying something new.

Re: Kernighan and Pike were right: Do one thing, and do it well

#119

You don't need a damn network between two pieces of code just to "do one thing and do it well", for God's sake, I'm so sick of this rampant cluelessness in the industry. Do you saturate the resources of one machine and need to split things off? Do you have multiple teams each taking care of their own stuff? Do multiple services, it's fine in those cases. For almost any other reason you are just adding complexity, boi…

I think you are misunderstanding the whole topic. Obviously it's about software at scale. Picking the right solution for a problem is kind of the whole job of software development. I have gone through the migration of monoliths to microservices (yes, at scale with multiple teams and requirements to scale individual components etc.) and it solved a lot of problems. The benefits outweigh the costs in my opinion (and dr…

[deleted]

Re: Kernighan and Pike were right: Do one thing, and do it well

#120

You don't need a damn network between two pieces of code just to "do one thing and do it well", for God's sake, I'm so sick of this rampant cluelessness in the industry. Do you saturate the resources of one machine and need to split things off? Do you have multiple teams each taking care of their own stuff? Do multiple services, it's fine in those cases. For almost any other reason you are just adding complexity, boi…

> Do you saturate the resources of one machine and need to split things off?

No, of course not. We divide a single machine in an uncountable number of virtual ones; write some code to make sure they don't talk to each other; write some code to make them able to talk to each other; write some code make more or fewer divisions on the run, automatically; and write some code so we can set them up automatically too every time we get a new split.

That's how you use software scalability and create a simple, predictable ops environment.

Post reply on HN