Live data from Hacker News

Making Hard Things Easy

jvns.ca

101–110 of 202 posts

Re: Making Hard Things Easy

#101

The point Julia makes about `grep` resonate with me alot! I have the same (call it problem if you want) issue with `ps`. There is only one variation of ps I know of (`ps aux`) and if I want to change that I have to either look for the options in the man page or google it.

ps is bad in general, the default view is almost never what you want and lots of minor formatting options make for a complicated man page. But it is especially a shitshow on linux.

fsf: which ps options should we use(bsd, systemv, solaris, sgi)?

also fsf: well that's a tricky one... why not all of them?

The linux ps man page is a wild mess.

Re: Making Hard Things Easy

#102
post #92
post #41

Earlier quoted context omitted.

Better/worse is one of those subjective things that comes with experience. No one can definitively answer such a question in a way that will apply to every circumstance. But as someone who rarely writes bash scripts but just enough to be dangerous ... I use `set -xe` at the top of every single shell script I write. The -x flag causes the script to echo every command that is executed to stdout which can be very valuab…

Mine's `set -eEuo pipefail`. I'd have to look up exactly what's what, but if you're inclined to `-e` you probably want the others too. (Off the top of my head I think E is the same thing in functions, u is bail out if a variable is used without being defined (instead of treating it as empty string), and pipefail is similar for when you pipe to something else like `this_errs | grep something`.) I don't like `-x` perso…

Yeah, `-x` can be annoying if it's always on.

My suggestion would be to run your script like this `bash -x your_script.sh` when (and only when) you need to debug something.

Re: Making Hard Things Easy

#103
post #47

To make hard things easy you have to find the right way to abstract them so you hold only some bits of the hard things in your head and all the frequently-used details too (maybe), and everything else you have to look up as needed. That's what I do, and that's roughly what TFA says. The problem is that people don't necessarily bother to form a cognitive compression of a large topic until they really have to. That's b…

The problem is that we're still using these ancient shells when we have better ones. Users shouldn't be wasting time memorizing arcana like "set -e". At least we have search engines now...

Au contraire, bash/sh is pretty much everywhere.

Also, we have ChatGPT now. That helps a lot.

Re: Making Hard Things Easy

#104
This is why the Dummy's and Idiot's series of books written in layman's are so popular.

If more people realized how great the chat AIs are for this purpose, they would be even more popular despite the hallucinations.

Re: Making Hard Things Easy

#105

Julia has to be one of the most likable people in tech! Every time I read one of her articles I feel that same bubbly rush of excitement I got when I was a kid, just starting to unfurl the secrets of reality through my own little experiments. Absolutely lovely.

For a second I thought you were talking about Julia the language. :)

Re: Making Hard Things Easy

#106
post #17
post #9

Earlier quoted context omitted.

> The man pages are readily available. True, but I find the man pages not easy and quick to parse.

Right. I don't think you're supposed to read them top-to-bottom. Use `/` and search for the things of interest (keywords, arguments, options, etc...). Use n/N to quickly jump forward/back.

Find has a particularly bad man page to find things that way.

Re: Making Hard Things Easy

#107
I think the problem with making hard things easy is that we're conflating tools and problems.

Are these hard problems? Maybe. Some HTTP problems are hard, and some are not. Some SQL problems are hard, and some are not.

Are tools intrinsically difficult? That's an even more complicated question because it is completely context dependent. A better question might be, does this particular tool make it harder to solve this particular problem than it otherwise might be?

And that's where you run into trouble. These tools have been designed to do a LOT -- to solve many different problems, both easy and hard. If you just "show everything", you may make the easy problem much harder to solve.

At the end of the day, some tools make some things easy (or possible!) to do in a way that they otherwise wouldn't. And we should appreciate that. There will always be hard problems, and for the most common ones, there are probably some better tools waiting to be written.

Re: Making Hard Things Easy

#108
post #95

The part that resonated most with me is "Show things that are normally hidden". Tools that do this make things clearer almost immediately. Consider the developer tools in a web browser. Do you remember the "dark ages" before such things existed? It was awful because you had to guess instead of seeing what was going on. Tools like Wireshark that show you every last byte of network packets that it has access to AND par…

Wireshark is great but it does not show you every byte the network carried. For example it never shows Ethernet preambles, only sometimes shows Ethernet frame checksums, and never shows interpacket gaps (which are a required part of the Ethernet protocol). So yes it comes close but it just goes to show you, there is always more detail hiding somewhere!

Yes, the toughest "hidden things" problems are pulling together data that is related, but not part of the same system. In this case, Wireshark can only show you what the OS gives to it.

In the article, it was pointed out that DNS caches can be hidden. They're especially hidden when they're upstream and in another computer!

Re: Making Hard Things Easy

#109
This was a great read. I especially liked how you can read the presentation below with the slides if you'd rather do that than watch the video. No issues with video, but sometimes I'm in the mood to read, and this was very satisfying to be able to do here.

Re: Making Hard Things Easy

#110
I enjoy the content and I feel pretty bad saying this. But while her constant laughing starts cute, ends up being like when I’m sober and I’m talking to someone high and can’t stop laughing at everything even if it’s not funny. Maybe it’s a nervous thing? It’s part of what makes her unique I know, but I enjoyed the parts when she’s talking somewhat more seriously about something and it doesn’t sound like she’s hearing a joke I’m not getting
Post reply on HN