Live data from Hacker News

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

medium.com

51–60 of 256 posts

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

#51
Can't say I love Obsidian being held up as the best we can do for program design. It's closed source. It could be an elaborate system of duct tape and string holding the thing together.

I mean it likely is quite good based on their velocity and quality. But if we're to learn anything I'd really like to see its source code.

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

#52

The basic point is right, but I think a lot of the details are off. The core idea is composition. A system is compositional if you can build it from small reusable parts. It's one of the key ideas in functional programming, and it's somewhat core to object-oriented programming. (OO is too big to be able to claim their is a consistent philosophy behind it.) But ... firstly, let's stop with the Unix worship. They didn'…

>But ... firstly, let's stop with the Unix worship. They didn't deliver, even in the domain of the terminal. My copy of `ls` has at least 40 flags GNU is Not Unix. I count 13 flags on both Unix V10 [1] and on Plan 9 [2], its spiritual successor. [1] http://man.cat-v.org/unix_10th/1/ls [2] http://man.cat-v.org/plan_9/1/ls

I think you’re actually making the point for him here. You are correct that GNU is not Unix. And what version of ls has the most installations? I betcha it’s the ls from GNU Coreutils. I do agree that GNU tools are sometimes too maximalist. But they are also more useful than the minimalist alternatives.

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

#53
post #51

Can't say I love Obsidian being held up as the best we can do for program design. It's closed source. It could be an elaborate system of duct tape and string holding the thing together. I mean it likely is quite good based on their velocity and quality. But if we're to learn anything I'd really like to see its source code.

It’s okey to prefer open source over proprietary applications. But obviously we can still learn lessons about interface design from proprietary systems. We don’t need the source code in order to observe those aspects of the application.

(And if we need understand how to application operates under the hood, it’s entirely possible to use tools like IDA and Ghidra.)

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

#54

Earlier quoted context omitted.

Wow, I didn't realise. I haven't paid attention to Windows APIs for a long time. I really thought it would have died a long time ago.

The core of COM is about allowing binary code to be used from any language through a standardized interface. As pjmlp mentioned, this part was very successful and all new Windows APIs are based on it. The COM which failed and which you are thinking about was related to OLE and the idea of embedding Excel sheets inside Photoshop drawings, ...

> the idea of embedding Excel sheets inside Photoshop drawings, ...

that's still a thing isn't it?

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

#55
post #52

Earlier quoted context omitted.

>But ... firstly, let's stop with the Unix worship. They didn't deliver, even in the domain of the terminal. My copy of `ls` has at least 40 flags GNU is Not Unix. I count 13 flags on both Unix V10 [1] and on Plan 9 [2], its spiritual successor. [1] http://man.cat-v.org/unix_10th/1/ls [2] http://man.cat-v.org/plan_9/1/ls

I think you’re actually making the point for him here. You are correct that GNU is not Unix. And what version of ls has the most installations? I betcha it’s the ls from GNU Coreutils. I do agree that GNU tools are sometimes too maximalist. But they are also more useful than the minimalist alternatives.

seems like you agree that the extra flags make sense

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

#56

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…

> If you think that microservices solve the "spaghetti code problem", well, good luck to you, you'll need it.

That is a very good point. In fact, good monolithic code layout is a precursor for microservices, as only once you have identified your boundaries and isolated your concerns can you begin splitting them out into their own services.

I will say this however - microservices might not solve the "spaghetti code problem", but it definitely helps isolate it. When we get consultants in to speedboat a new system, we give them their own separate service. Saves a lot of time and de-risks our beautiful monolith.

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

#57
post #55
post #52

Earlier quoted context omitted.

I think you’re actually making the point for him here. You are correct that GNU is not Unix. And what version of ls has the most installations? I betcha it’s the ls from GNU Coreutils. I do agree that GNU tools are sometimes too maximalist. But they are also more useful than the minimalist alternatives.

seems like you agree that the extra flags make sense

In many cases, yes! On my Mac, which has a userland derived from FreeBSD, I have voluntarily installed stuff like GNU Findutils and GNU sed to get that extra functionality.

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

#58
post #52

Earlier quoted context omitted.

>But ... firstly, let's stop with the Unix worship. They didn't deliver, even in the domain of the terminal. My copy of `ls` has at least 40 flags GNU is Not Unix. I count 13 flags on both Unix V10 [1] and on Plan 9 [2], its spiritual successor. [1] http://man.cat-v.org/unix_10th/1/ls [2] http://man.cat-v.org/plan_9/1/ls

I think you’re actually making the point for him here. You are correct that GNU is not Unix. And what version of ls has the most installations? I betcha it’s the ls from GNU Coreutils. I do agree that GNU tools are sometimes too maximalist. But they are also more useful than the minimalist alternatives.

To me, the point is you don't need many flags for ls to be useful. You will learn a few idioms early, such as ls -a and ls -lR but after that, the rest of the flags are nice to haves: if you wish there was a certain feature, you can look it up on the man pages etc. "I wish I could sort by time - oh there's -t"

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

#59
post #56

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…

> If you think that microservices solve the "spaghetti code problem", well, good luck to you, you'll need it. That is a very good point. In fact, good monolithic code layout is a precursor for microservices, as only once you have identified your boundaries and isolated your concerns can you begin splitting them out into their own services. I will say this however - microservices might not solve the "spaghetti code pr…

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

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

#60

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 also don't get the comparison to UNIX philosophy into the domain of service development. These are totally different domains with their own patterns of resource usage and interaction. Piping "fairly" simple input -> output code that is sharing machine resources and releasing them at the end of execution is total different than running a micro service architecture across multiple containers/hosts. Even if some of them share the same host there is still extra resource overhead from their allocations that will have a constant baseline.
Post reply on HN