Nixers Book Club - Book #4: The Art of UNIX Programming - Community & Forums Related Discussions

Users browsing this thread: 1 Guest(s)
venam
Administrators
Chapter 5 and 6 are about textuality and transparency, topics that are
inherently related to one another.

Chapter 5 - Textuality

I like the framing of problems that esr uses.
For protocols, he's asking it from the point of view of
communication/transmission of data between computers or its
storage. Marshalling and unmarshalling it.

The requirements/attributes of interest for that are laid down:

- Interoperability
- Transparency
- Extensibility
- Storage or Transaction economy

As a recurrent theme, we go back to the human and social aspects. The
premise here is that text is human, has a low cognitive load, is future
proof, and encourages interoperability.
Parsed by eyeball == Many good things happen.
But still, we can see its limitation in particular cases.
Human is easier on us, but might not be on the machine.

The learn-by-example method is great, again I advise anyone to give it
a look. There's a lot of good textual format examples.

There's a lot of good rfcs that are linked and this get me thinking
that I should read more of them. I'll probably put some time aside to
go over the classic ones as they are really great in protocol design,
and personally, I like going over such docs.


Chapter 6. Transparency

As the previous chapter, we start with the idea that textuality is more
human and thus promotes both transparency and discoverability.

Transparency = Comprehend the whole, no distance between the whole design and us.
Discoverability = Comprehend the part, be able to introspect it.

Quote:The lesson here is clear. Dumbing down your UI is only the half-smart
thing to do. The really smart thing is to find a way to leave the details
accessible, but make them unobtrusive.

I really like that. I wish it was like this more often.


I didn't know about SNG, this would have been way easier when I was playing with PNG format.

Quote:The gains here go beyond the time not spent writing special-purpose code
for manipulating binary PNGs
You don't say 😂.

Also on the image format, corkami has good resources: https://github.com/corkami/formats/tree/master/image

I love the idea of textualizers, binary as readable format. I'm sure a
many projects would benefit from these. Actually, in my day to day work,
I use these a lot.

Well, we did say it depended on the case:
Quote:The design superficially contradicts the advice we gave in Chapter 5
against binary caches, but this is actually the extreme case in which
that's a good tactic. Edits to the text masters are very rare — in fact,
Unixes normally ship with the terminfo database precompiled and the text
master serving primarily as documentation. Thus, the synchronization
and inconsistency problems that would normally militate against this
approach almost never arise.

Discoverability is a cool topic that I'm guilty of forgetting by not
adding verbose flag for introspection.
"The ways in which your code is a communication to other human beings"
Just recently, I got in a detour to learn Gstreamer and it got one of the most
excellent documentation and introspection I've seen in any project.
It even has command line tools to get information about the possible elements.
Code:
$ gst-inspect-1.0 uridecodebin


Quote:Software is maintainable to the extent that people who are not its author
can successfully understand and modify it. Maintainability demands more
than code that works; it demands code that follows the Rule of Clarity
and communicates successfully to human beings as well as the computer.

That's probably one of the most important sentence I've read.
Great chapter!


Messages In This Thread
RE: Nixers Book Club - Book #4: The Art of UNIX Programming - by venam - 22-05-2021, 02:23 AM