Live data from Hacker News

Be careful of the examples you use. They stick

blog.thinkst.com

81–90 of 129 posts

Re: Be careful of the examples you use. They stick

#81

Reminds me of a large company I worked at, I had some documents for developers how to set up some local environment thing they had to do exactly 1 time and never again. It was just a handful of terminal commands, all starting with the traditional shell notation like: $ (some command) Over the course of a year I got periodic complaints that it "wasn't working" and I tried to find issues on my end and couldn't. One par…

Is there a reason websites put that $ in front of commands you are fully expected to mindlessly copy and paste? I've seen it happen more and more and it simply baffles me.

> you are fully expected to mindlessly copy and paste

I think this is the disconnect. Don't mindlessly copy and paste things. Take the time to understand what's going on.

Re: Be careful of the examples you use. They stick

#82

Reminds me of a large company I worked at, I had some documents for developers how to set up some local environment thing they had to do exactly 1 time and never again. It was just a handful of terminal commands, all starting with the traditional shell notation like: $ (some command) Over the course of a year I got periodic complaints that it "wasn't working" and I tried to find issues on my end and couldn't. One par…

Is there a reason websites put that $ in front of commands you are fully expected to mindlessly copy and paste? I've seen it happen more and more and it simply baffles me.

> Is there a reason websites put that $ in front of commands you are fully expected to mindlessly copy and paste?

As well as the answers you've already been given (distinguishes input from output, distinguishes root from non-), one answer is contained in your own question - it prevents mindless copy-pasting.

Re: Be careful of the examples you use. They stick

#84

Earlier quoted context omitted.

Is there a reason websites put that $ in front of commands you are fully expected to mindlessly copy and paste? I've seen it happen more and more and it simply baffles me.

“$” for non-root shells and “#” for root shells instead of writing out sudo/su.

This is exactly why. If you are doing linux maintenance, this is really helpful because you can tell if you should be running a specific command as root or user. If you are just giving instructions on what to do for a normal user, omitting it is probably fine. If you are doing something that will require both, it might be good to explain it at the beginning of your instructions.

Re: Be careful of the examples you use. They stick

#85
post #82

Earlier quoted context omitted.

Is there a reason websites put that $ in front of commands you are fully expected to mindlessly copy and paste? I've seen it happen more and more and it simply baffles me.

> Is there a reason websites put that $ in front of commands you are fully expected to mindlessly copy and paste? As well as the answers you've already been given (distinguishes input from output, distinguishes root from non-), one answer is contained in your own question - it prevents mindless copy-pasting.

Except it doesn't, removing $ has no positive effect on your mind

Re: Be careful of the examples you use. They stick

#86

Reminds me of a large company I worked at, I had some documents for developers how to set up some local environment thing they had to do exactly 1 time and never again. It was just a handful of terminal commands, all starting with the traditional shell notation like: $ (some command) Over the course of a year I got periodic complaints that it "wasn't working" and I tried to find issues on my end and couldn't. One par…

Another trouble source I've had has been been fixed by some wikis. When I first ran into one that supported this about a dozen years ago it made my life a lot easier.

And that is having a function that injects the current user's username into the wiki page. Any instructions that require you to log in as you can then be blindly cut and pasted, without people coming and telling me "it doesn't work" when they try to log in as me. Yeah of course that doesn't work, mate.

People reading runbooks aren't fully engaged. They may actually be in a war room. The moral of this story is that you are not entitled to carve out a chunk of your coworker's attention. Those periods should be brief, and tied to an active initiative/epic. After that 'work' is done, everything you wrote should be something that they can operate at 2:00 am.

Because sooner or later, they well.

Re: Be careful of the examples you use. They stick

#87

Reminds me of a large company I worked at, I had some documents for developers how to set up some local environment thing they had to do exactly 1 time and never again. It was just a handful of terminal commands, all starting with the traditional shell notation like: $ (some command) Over the course of a year I got periodic complaints that it "wasn't working" and I tried to find issues on my end and couldn't. One par…

Is there a reason websites put that $ in front of commands you are fully expected to mindlessly copy and paste? I've seen it happen more and more and it simply baffles me.

Because that's how it looks in their terminals, and it's a bit of a challenge to think through how users use something

Re: Be careful of the examples you use. They stick

#88
post #81

Earlier quoted context omitted.

Is there a reason websites put that $ in front of commands you are fully expected to mindlessly copy and paste? I've seen it happen more and more and it simply baffles me.

> you are fully expected to mindlessly copy and paste I think this is the disconnect. Don't mindlessly copy and paste things. Take the time to understand what's going on.

Even when I understand, copypasting is often faster and skipping or removing the $ is slightly annoying.

Re: Be careful of the examples you use. They stick

#89

Reminds me of a large company I worked at, I had some documents for developers how to set up some local environment thing they had to do exactly 1 time and never again. It was just a handful of terminal commands, all starting with the traditional shell notation like: $ (some command) Over the course of a year I got periodic complaints that it "wasn't working" and I tried to find issues on my end and couldn't. One par…

Is there a reason websites put that $ in front of commands you are fully expected to mindlessly copy and paste? I've seen it happen more and more and it simply baffles me.

This goes back to pre-Web, originally to distinguish normal user (`$`) from `root` user (`#`), and sometimes from C-shell or some non-shell interactive line-oriented program.

I used to think it was dumb and annoying.

I partly changed my mind recently, when I found myself copy&pasting lots of quick wiki-like documentation into Markdown fenced code blocks that involved multiple hosts.

Just having the hostname in the prompt reduces the text I have to type in addition to the copy&past, to explain where this command is happening, such as on the workstation vs. one of the servers.

(But it didn't quite help the other day, when I was documenting some self-hosted LLM procedures, and needed to be copy&pasting examples from multiple Screen terminals on the same host, where the prompt didn't distinguish them.)

Re: Be careful of the examples you use. They stick

#90
I've run into a number of networks in my area (private businesses, a couple municipalities, a couple law enforcement agencies) all using the 192.9.1.0/24 subnet.

There was some overlap in these sites w/ respect to IT service companies involved in their setup. Best as I can guess it came down to one person who floated between the employ of a couple (or three) IT service companies leaving a swath of 192.9.1.0/24 in their wake (or maybe training other technicians during their time at these companies). It seems like this work might have been done pre-RFC 1597 (which is, I think, the first place that what is today's RFC 1918 address space shows up) but I think they were just following examples.

I'd love to know what examples motivated the us of this address space. I find some old Sun docs[0] referencing this address space, and RFC 2328[1] makes reference to it.

[0] http://bitsavers.informatik.uni-stuttgart.de/pdf/sun/sunos/3...

[1] https://www.ietf.org/rfc/rfc2328.txt

Post reply on HN