Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I disagree. I use screenshots all the time, because it:

- Preserves the full 80 character width without line-wrapping, which destroys readability

- Guarantees monospace, so tabular data doesn't get all misaligned

- Preserves a good coding font, so it doesn't come out as some hairline-width Courier on the other end

- Preserves syntax highlighting, very helpful

Obviously if somebody needs a whole file or whole log, then send the whole thing as an attachment. But very often I'll still include a screenshot of the relevant part. With line numbers, it's not difficult to jump to the right part of the attached file.

Screenshots are incredibly useful for keeping code and terminal output looking like code and terminal output, and not getting completely mangled in an e-mail or chat message being read on a mobile device or in a narrow column.



Key things required for posting to the chat: people reading can read it, people reading can copy and paste it, and people searching can actually find it. It doesn't need to exactly match what you might see in a text editor. Anybody wanting to look at the actual text in context won't be doing it in the chat, but will rather be opening the file of interest in the appropriate tool, and examining it that way; anybody stuck reading the text only in the chat is probably on their phone or something and will be best served by being able to easily see all of it.

For reading purposes, the question of screen width is best left to the reader. They will have the window set to their preferred width, possibly limited by screen size. If the text has to wrap, so be it. It's better that than having to try to squint at your 3713x211 screen grab on an iPhone (portrait orientation). Also bear in mind that even the most basic of font and colour choices (large/small font, dark/light mode) can cause accessibility issues for some readers.

For copying and pasting purposes, images suck. Yes, macOS can do it, sort of, and I expect Windows 11 can do it too, probably to about the same extent. But it's not as easy as having the text right there in copyable form.

For searching purposes, ditto - only worse, because at least when you copy and paste and it comes out wrong, you'll notice. When you search: you just won't find the thing. You'll never know.


> people reading can read it

Which is why screenshots help, for the reasons I gave

> people reading can copy and paste it

Why? If there's something like a user ID or error code that the person needs as text, I'll paste that separately. Stuff I include in a screenshot is for understanding, not copying and pasting.

> and people searching can actually find it.

Which is what the message text around the screenshot is for. Which actually includes the relevant keywords, not random tabular data or lines of code which just add noise to search.

> Anybody wanting to look at the actual text in context won't be doing it in the chat, but will rather be opening the file of interest in the appropriate tool, and examining it that way;

Except when they aren't/can't. The whole point of screenshots is for when they can't access something easily that way, which happens for a million different reasons.

> anybody stuck reading the text only in the chat is probably on their phone or something and will be best served by being able to easily see all of it.

Which is what images make far easier to read without being messed up.

> For reading purposes, the question of screen width is best left to the reader. They will have the window set to their preferred width, possibly limited by screen size. If the text has to wrap, so be it.

No it's not. Wrapping destroys indentation and alignment. It's not "so be it", it goes from readable to literally unreadable. I can't change the width of my phone or a lot of viewing areas. I can always scroll an image horizontally though.

> It's better that than having to try to squint at your 3713x211 screen grab on an iPhone (portrait orientation).

Which is why zooming and panning exist. I don't know where you're getting something silly like 3713 pixels though. But if that's the width of some massive table whose layout needs to be preserved, then so be it.


> Which is why zooming and panning exist.

Which loses fidelity in your raster format screenshot world. Alternatively, when text is presented as text, a user can scale it independently for readability. Or as another commenter pointed out, use a screen reader.

You focus on a kind of permissions or network limitation technical access, between the computers in the system, but don't seem to appreciate another very real type of technical access between the user and the leaf computer in the system.


I feel your argument unnecessarily obtuse.

You keep trying to frame that photo is superior, when, sure... The image is superior in your argument only when it's accompanied with text. So is it the image that is important then? No to mention, that is contingent. If that is your point, then, sure, I don't mind, add a screenshot next to the text but, please, give the text.


The main reason the argument doesn't stand up is that some people use screen readers.

Unless you know the person/people you're sending something to can read screenshots, it's only right to at least accompany them with the text.


There's nothing obtuse about it.

You're creating a strawman. Nobody is aruging that you send only a screenshot, devoid of context or explanation or any other text. That's absurd.

The point is, if you need to illustrate code or output then that part gets sent as a screenshot, to preserve readability. It provides extra details and context.

If you want the code or data in text format to dig in, then go get it from the files yourself, because you probably need a broader swath anyways. My message isn't a data repository. I'm including the screenshot so you can understand the issue easily, without having to open anything else.

I'm genuinely mystified by this entire conversation. I'm baffled by this idea of needing to take some example I'm sending in a screenshot and... copy and paste it into a text editor to edit it? Huh? What the heck?


Let me give you some examples that I saw in my professional life and make me angry enough that I am genuinely miffed you can't see this.

Here, check out this hash. Snip! Screenshot! Here, try this code snippet. Screenshot! Here, go to this absurdly long URI. Screenshot! Try configuring your XML this way. Screenshot! (Bonus point for underspecified location)


You're right, those sound idiotic. If someone sent me a hash I needed to look up in a screenshot, if they had access to the selectable text, or code to run, they need to have their head looked at.

But that's not what the blog post was about. It specifically showed a section of code that was having an issue. It's not meant to be copied and pasted, like all of your examples. It's meant to be an easily readable snippet that preserves formatting.

The only problem with the example in the blog post is that the sender didn't also say which file and line number the issue was in. But the screenshot itself is often very helpful, because many times the question can be answered without having to load up anything else.

I'm really assuming that people aren't sharing URL's by screenshot. I've been working in this field a long time and haven't encountered someone dumb enough to do that yet, knock on wood...


It's completely obtuse. "I'll include the important bits in a separate text as well, because I already know everything that the other person is going to find important."


Others have made the basically the responses I would make myself, except for 3713 pixels being most of the width of a 4K display, and about the right number of pixels for the interesting part of the error list window in Visual Studio 2022.


> - Preserves the full 80-character width without line-wrapping, which destroys readability

Readability is on the eyes of the final user, they are free to use whatever narrow column width they prefer.

> - Guarantees monospace, so tabular data doesn't get all misaligned

When was the last time a computer shipped without a monospace font? This points at the rare occasion where there's a problem with the setup, but you could also argue that maybe there's a system with a broken image decompressor.

> Screenshots are incredibly useful for keeping code and terminal output looking like code and terminal output, and not getting completely mangled in an e-mail or chat message being read on a mobile device or in a narrow column.

Are you complaining about GMail's rendering maybe? Its awful[^0], but that's more of a GMail problem that could be solved if they wanted.

[^0]: Column width unbounded even on 4k monitors. Weird and inconsistent font sizes across different fonts (monospace is smaller). Reads poorly on phones too.


> Readability is on the eyes of the final user, they are free to use whatever narrow column width they prefer.

For plaintext sure. Not for code or tabular data. It destroys indentation and destroys column alignment and interleaves parts of rows. It's a horrid mess.

> When was the last time a computer shipped without a monospace font?

When was the last time I have to read something in a font I can't control that is forced to be proportional? Oh, constantly. Literally all the time.

> Are you complaining about GMail's rendering maybe?

Yes, and messaging clients, and chat clients, and everything unless it has actual dedicated code blocks that render with a horizontal scroll bar. Which are the exception as opposed to the rule.


> > Readability is on the eyes of the final user, they are free to use whatever narrow column width they prefer.

> For plaintext sure. Not for code or tabular data. It destroys indentation and destroys column alignment and interleaves parts of rows. It's a horrid mess.

I don't think I have seen unaligned html tables, nor unaligned spreadsheets made from CSV/TSV/etc. Images are worse than PDF, so I guess it's 0-stars in the 5-star data tier.

https://5stardata.info/en/


I'm not really sure what you're talking about. PDF...?

I'm talking about tables output in the terminal, in ASCII by SQL or something. By Python's tabulate. Output from a script. Or yes, even HTML tables or spreadsheet cells that get pasted into the message client as plaintext and lose their table formatting.

This isn't about a standard for publicly distributed open datasets, what are you on about? This is about quick messages in a chat or e-mail.


> even HTML tables or spreadsheet cells that get pasted into the message client as plaintext and lose their table formatting.

Sounds like a message client problem to me. You are switching to a worse data exchange format just to get around a very basic implementation of the paste API.

Pictures are a worse exchange format than the data even a PDF or CSV, which is why I mentioned the RDF data exchange tier list, not because I'm on hard drugs.

Is it convenient to send Images on whatever message client you use? Sure, but as a receiver of the data in a picture you can do nothing but type the data yourself (yeah, you can ask for the source too, but on async comm channels that may not arrive in the same day).


> Sounds like a message client problem to me.

More often than not, you have no control over your client thanks to proprietary protocols and interop-hostile apps. So yes, it's a message client problem, but that fact doesn't change anything.


> Sounds like a message client problem to me.

Yes, of course it is. That's the entire point.

It's a very needed workaround for most message clients, since most message clients don't support code blocks with horizontal scroll.


But at least text can be copy-pasted by the receiving user into a real text editor of their choice if there's an actual need to preserve tabular/indented/wide text.


That's an extra step that can be extremely difficult to do on mobile. I'm trying to make my messages clear immediately, not make the recipient jump through hoops. That's what good, clear communication is about.


Maybe don't work from a tiny screen if its too small for you to do basic tasks.


All of the points are mostly personal and thus should never be forced on anyone else via a screenshot (as a general rule, though depends on the content)

- no line wrapping destroys readability more since you can't toggle it in a screenshot. Imagine that url on the screenshot taking 3 lines instead of 1 and pushing useful text off screen. Also, forcing 80 on a user of a wider monitor is barbaric.

- And if there is no tabular data (and autoformatted code doesn't do tabular code) you've just lost nice proportional text for nothing

- Syntax highlighting as is commonly used (and as is shown in the blog screenshot) is useless, and is anyway unlikely to match reader's convention

> being read on a mobile device or in a narrow column.

So it can't even be read properly, you have to scroll the screenshot left and right... instead of just reading


100% this. I fully disagree with the post - screenshots show context/colour/formatting etc that often doesn't even translate properly if you DO try to paste it into some IM or other "text swapping" application.

Sure, if you want someone to reproduce the text of course you'd send them actual text. But to show a problem, a picture is, as they say, worth 1000 words.


Most of the time if someone is sending me code as text (which is by far preferable to a screenshot) I'm copying it out and pasting it into my own editor.

That way I get a width appropriate for my screen (which may be different from yours), text that's still aligned correctly, and uses the font of my choosing (which may differ from yours), and still has syntax highlighting (using the sizes/colors/styles that I'm accustomed to).

Sending the whole file (or a link to it) works well too but screenshots are absolutely likely to be some level of annoying for anyone who isn't you no matter how helpful you think you're being.

Forcing someone else to view code the way you like seeing it isn't always going to be completely obnoxious for them (although you might be surprised by what some people find acceptable) but it does make it difficult/impossible to view it the way I like seeing it (in addition to losing the ability to search/edit)


> still has syntax highlighting (using the sizes/colors/styles that I'm accustomed to)

Where I work I find it's usually the youngins using a ridiculous light on dark color scheme that post screenshots of code. Are we still stuck in the '80s? And are they pining for a time they never experienced themselves? Computer hardware has been capable of displaying the more civilized and easier-on-the-eyes dark on light color schemes since then.


This isn't about sending 300 lines of code in a screenshot or something.

This is about, "hey, look at these 6 lines which is where I think the problem might be". It's not for pasting in a separate editor, why would you do that? It's about providing quick context even if you're on your phone.

If you want to go inspect that spot in the file once you're back at your computer then go do that. The screenshot is to save you time because often you can answer just based on it.


On my phone is a great example of why I don't want your screenshot of a desktop-wide code editor.


On my phone is exactly when I do want it, because that's where text linewraps and jumbles and becomes totally unreadable.

You understand you can just screenshot the code part that is 80 characters wide? You don't have to screenshot the entire full-screen window?

But even if someone does include extra width, it takes me about a tenth of a second to pinch-zoom. Which is way quicker than trying to decipher line-wrapped spaghetti.


> But even if someone does include extra width, it takes me about a tenth of a second to pinch-zoom. Which is way quicker than trying to decipher line-wrapped spaghetti.

Strong disagree there. It's far easier to read the line wrapped code than to pinch to zoom. I think you have your answer: you have different preferences than others do, and no amount of explaining is going to make their "I like cats" make sense to your "I like dogs" sensibilities.


So you're telling me this is easier to read:

  +-----------------------------
  ------------------------------
  ---------------------+
  | CustomerID | First Name | 
  Last Name | Email                  
  | State | Balance |
  +-----------------------------
  ------------------------------
  ---------------------+
  | 000123      | Alice      | 
  Ramirez   | 
  alice.ramirez@acme.com | NY    
  |  245.50 |
  | 000124      | Brian      | 
  Chen      | 
  bchen@northdata.io     | CA    
  | 1289.00 |
  +-----------------------------
  ------------------------------
  ---------------------+
This doesn't seem like a question of different preferences to me. This seems objectively worse. It's not even close.


> You understand you can just screenshot the code part that is 80 characters wide? You don't have to screenshot the entire full-screen window?

Why are you telling me, the recipient of the crappy text screenshot, how to do it better?

Line-wrapping is also agitating, I'll give you that. Or worse yet, if the sender doesn't know how to use monospaced fonts in whatever app. I prefer a scrolling text box, which is basically a "pre-pinch-to-zoom'ed" screenshot. But with copy and paste and select. Which is even more useful on the phone, because of its limited symbols, so I can pull the relevant part, modify it, and reply.


> I prefer a scrolling text box

So do I. But most clients and message mediums don't have support for that. Many don't even have support for monospace at all. Hence, screenshots to get around those limitations.


I think slack and other mail/chat clients rescale the image and apply aggressive compression on it. Sometimes they even crop the image or make it so that you need to scroll left and right. Also your syntax highlighting might be annoying to others and might make legibility worse for the receiver, and as other people pointed out most chat/mail clients support monospace code blocks. Plus I agree with all the things that the blog post author pointed out.


> or make it so that you need to scroll left and right

That's the point.

If have an ASCII table that is 150 character columns wide, I'm sending you a screenshot so that you can scroll left and right, rather than have everything end up in a jumble of interleaved overflowing lines that turn into unreadable spaghetti.

This is a feature, not a bug. Not everyone is opening the message on a full-width monitor.


You can do the same with text. If your messaging client is lame and forces wrapping, copy and paste the text to a real text editor with left/right scroll and your font and color scheme and other preferences of choice.


When I send a message I want the recipient to be able to understand it immediately.

I don't want to make them have to jump through hoops to reformat the text in a different application. That's absurd.


My only use of code screenshot is to emulate the "take a look at my screen workflow". It's only meant for the other person to take a quick glance at. Anything further than that is transmitted as a code block or text file.


Yeah. OP has an egocentric bias - it’s not the norm in the world of work sharing that you can faithfully reproduce the live/contextual environment of the sender given the raw string.

(OP’s blog purports to be pertinent to freelance software development).


What about accessibility?


What about it? There simply isn't any information format that's both perfectly accessible and reproduces what you're seeing with perfect fidelity. In the happy path you can make the important parts match, but almost by definition, when someone's reporting an issue it's because what they "should" see and what they are seeing don't align.


There are many accessibility issues with using a screenshot of text instead of text directly:

- displaying a white background image of text when I'm using dark mode;

- using a small font to a user with a visual imparement or on a high DPI display;

- using a colour scheme with low contrast, or colours that are indistinguishable for people with a form of colour blindness;

- using a font that is difficult to read for someone with dislexia;

- etc.

And others have mentioned not being able to search for the text within the image, or select/highlight the text (useful for copying a function name, link, or term in the text, or for keeping track of where you are when reading).


Well, that's not the scenario relevant to the article and not a scenario I encounter much these days. I'm not a designer or a front end dev anymore so I rarely encounter a situation where "perfect fidelity" is relevant to me.

I'm biased, but I can't help but feel like chances are, if the screenshot is text, the content of the text is important, not the visual aspects.

99% of the time I get a screenshot these days, it's people sending me screenshots of text logs or code, and almost always cropped in a way that eliminates any context anyway. Give me plain text or give me death.


> the content of the text is important, not the visual aspects.

Columns actually aligning in columns? Indentation being preserved? Lines not getting interrupted with overflowing previous lines?

When I send a screenshot, it's precisely because the visual aspects do matter. (Obviously, when they don't, then I just send the text.)


It sounds like we agree.

In some cases visuals are important, and in other cases, they're not. Hence why I said "chances are" and declared my bias rather than using absolutist language. However, somewhat ironically, you chopped off that part of my reply. I find it odd you chose to respond the way you did, but I digress.

I also carefully indicated my every day interactions with screenshots do not align with those requirements.

Of course there are situations where visual aspects are critical. I'm not disputing that. I'm stating my _preferences_ and my _opinion_ that situation is exceptional.


I genuinely thought this was a satire until I read `Preserves syntax highlighting, very helpful`.


> Preserves the full 80 character width without line-wrapping, which destroys readability

How line wrapping interacts with readability is for the reader software to worry about, not the control-freak author. Line length higher than the device width can handle can be even worse for readability than lines wrapped in the wrong places. It's one of the reasons I loathe PDFs.

> Preserves a good coding font, so it doesn't come out as some hairline-width Courier on the other end

If the reader wants to have their code in hairline-width Courier, that's their right. It's not for the control-freak with awful taste in fonts to decide.

> Preserves syntax highlighting, very helpful

Forces a particular style of syntax highlighting upon the reader without giving them an easy recourse to change it. No thanks.

> Guarantees monospace, so tabular data doesn't get all misaligned

The closest thing to a decent argument. Except pretty much any text input that accepts embedded images will usually also provide a monospace formatting option, so there is no need to screenshot text here either.


It also allows drawing on top. I find it convenient to screenshot / take picture of some code / error log / terminal output then circle some bit, draw some arrows, or do other types of drawings to draw attention to things.

Emphasizing bits on code-formatted text is not as straightforward and would typically be ambiguous (was this punctuation meant for emphasis or was it part of the original text?).

Pictures are also quick to make and grasp, which is a plus when having to quickly diagnose something with others.

The main complaint in the article about having to type into a search bar instead of copying and pasting doesn't make sense. It's like a word or two at most which you'd have to search. It might even be faster to type than to copy and paste (moving cursor around, etc.).

The error log complaint would also be valid had it been text instead of a screenshot. That was a problem of not sharing enough context, not the format of the message.


```

Is widely supported to add code. E.g. in Slack, Confluence...


Both examples you gave have pretty rough or nonexistent syntax highlighting support.


Who cares? If I really really really need that (I probably won't), I can open up vim, type `:set filetype=whatever`, and paste it in.


Many people care. Hence, the screenshots.


If it is that essential do both.


Uh oh, even Discord has syntax highlighting support with "```".


It's not widely supported. It's not in e-mail or SMS or Gmail or Docs or Word or a hundred other pieces of software where I communicate.

Yes, I use that wherever it exists. It's great, and you're lucky when it's there. I wish it was everywhere. But as long as it's not, for everything else, there's screenshots.


SMS does not support images either, and email supports HTML. I'm not all that familiar with Word, but I believe it supports some formatting options too.


But all of the software you mention has a monospace option.


The discussion isn't about monospace. It's about horizontal scroll rather than wrapping lines.

And no, no SMS client I've ever seen uses a monospaced font.


It's so bad in teams and they put a rather small character limit on it....


Slack seems to always wrap code blocks. It makes python particularly shit to read.


In my experience copying from some programs preserves long lines. Copying from other programs breaks them at the wrap point. Once the text is cut into lines, pasting can't fix it. I'm not at my computer now so I can't give factual examples. I guess that copying from the output of cat file on a terminal is one of those unfortunate cases.


> I guess that copying from the output of cat file on a terminal is one of those unfortunate cases.

It depends on the terminal. Some will actually preserve the line breaks vs soft wraps. Those terminals will reflow the text when you resize the window.

But if you already have the file you might as well run something like `xclip <file` to copy its contents directly to the clipboard.


If it is that much code attach a file or github link to gist or PR.


That's too much friction - especially since managed users cannot even create Gists in GitHub Enterprise Cloud (ugh). https://docs.github.com/en/enterprise-cloud@latest/admin/man...

As for attaching a file, I'm usually screenshotting small amounts of code - usually of the ephemeral variety.


Even Google chat can do it.


I feel like I've seen good solutions to both problems before, aren't there vscode extensions that let you just select the code and create a sharable link with all the view type options to appear everyone?

e.g. https://snippetshare.dev/


I do not care about any of those criteria you mention. I want something I can copy and paste myself. Send me text. Just the text.


Except it doesn't use my preferred font, not my don't size, not my colors and I can't copy parts of it as easily and then the stupid chat app scales the image for some reason ot another.


Many greatly appreciate receiving an accurate image instead of garbled text.


> Preserves a good coding font, so it doesn't come out as some hairline-width Courier on the other end

Let me introduce you to Putty users who never change the default font...


See, imo this is why having a good embedding for code is so important. The best of both worlds is available.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: