Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Meta

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Comments on Why using images for code, errors, logs or similar should be avoided?

Parent

Why using images for code, errors, logs or similar should be avoided?

+17
−0

I have noticed that virtually any question containing an image of some code or error got a comment asking to replace it with the actual code, error text.

Why is it so bad to include an image instead of the actual text?

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

Post
+18
−0

There are multiple reasons why using images of code, errors, logs and other text resources used in programming instead of the actual text is strongly discouraged.

Shortly put, the question should be written in a form that helps both the fellow community members to answer it (e.g. easy to copy-paste the code to provide an answer) and the future readers (e.g. read and copy-paste the code).

Reasons to avoid images of text:

  • hard to get the text - it is harder to get the text from an image than a direct copy-paste. This means wasted time for a person who wants to answer it due to extra effort involved in retyping the provided code
  • harder to read - most of the images will be shrunk to fit the post maximum width, will be unreadable and thus force the reader to open it separately to view it full width
  • non-searchability - site search or search engine will not get to the text inside the image
  • non-accessibility - screen readers need to be way smarter to get the text from an image, so it will make life harder for those with visual impairments
  • hides formatting, whitespace, or incorrect characters - prevents the readers from fully understanding some possible errors caused by incorrect indentation, non-visible characters or Unicode characters that look identical to the ANSI ones

Note: This post was inspired by a very similar SO one.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

2 comment threads

Even more relevant on Codidact than SO (1 comment)
Consider editing the "asking" help too. (3 comments)
Even more relevant on Codidact than SO
trichoplax‭ wrote about 2 months ago

On Stack Overflow, tabs in code blocks are automatically converted to 4 spaces. On Codidact, tabs are preserved.

Since Codidact preserves more of the original text, there is a stronger reason here than on SO to avoid pasting in an image instead. In some cases a bug may be due to a tab character, so preserving the original text can make the difference between being able to diagnose the bug and not.