文章摘要
作者抱怨同事经常发送代码或错误日志的截图而非直接复制粘贴文本,导致无法快速搜索、查看上下文或定位问题,增加了解决问题的难度。他建议直接分享文本、文件或GitHub链接会更高效。
文章总结
标题:我讨厌纯文本的截图
在日常工作中,我经常收到同事发来的这类"好心"截图:

这些截图通常出现在讨论代码问题的聊天中。但看着这样的截图,我满脑子都是疑问:"slug是怎么定义的?baseUrl是用slug创建的吗?为什么域名要写死在URL里?如果抛出异常会怎样?这到底是哪个模块的代码?"
为了找到源码位置,我不得不小心翼翼地手动输入代码片段进行搜索,或者让AI助手帮忙定位相关模块。其实同事完全可以直接复制粘贴文本内容,这样我就能看到更多上下文,也方便直接粘贴到IDE里搜索。更理想的做法是直接分享源文件链接——毕竟现在大家都用GitHub。
更糟糕的是错误日志截图:"Paul,构建失败了,能帮忙看看吗?"

这种截图完全无法回答关键问题:构建的具体内容是什么?在哪一行报错?错误信息到底是什么?通常我在本地完整重建时,一切又都正常了。其实只要复制完整的错误日志文本,或者把日志保存为文件发给我,问题就简单多了。

除非是要展示文本的显示效果问题,或者截图本身包含文字无法传达的关键信息,否则请不要再发送纯文本的截图了。
评论总结
以下是评论内容的总结:
支持文本截图的观点
保留格式和可读性:截图能保持代码宽度、等宽字体、语法高亮等,避免在传输过程中格式混乱。
- "Preserves the full 80 character width without line-wrapping, which destroys readability" (crazygringo)
- "Preserves syntax highlighting, very helpful" (crazygringo)
辅助记忆和上下文:截图能帮助回忆原始场景,比纯文本更有视觉提示。
- "The visual of the screenshot serves as a much stronger reminder of that situation" (albert_e)
- "recapture all kinds of things that I wouldn’t have thought to explicitly record" (bnj)
反对文本截图的观点
缺乏上下文和可操作性:截图可能截断关键信息,且无法直接复制或搜索。
- "screenshots of text that are cut off from essential context are enough to make me pull my hair out" (bnj)
- "I have to go dig around myself figuring out where it came from" (ddxv)
OCR技术的局限性:依赖OCR可能增加错误率,尤其是处理长字符串或复杂内容时。
- "Typing that from a picture is infinitely more error prone than just cut/paste" (drewg123)
- "The sheer, prodigious waste of computing power" (romaniitedomum)
技术解决方案
自动OCR工具:如macOS的文本识别功能,能直接从图片中提取文本。
- "Preview on Mac does automatic OCR" (nippoo)
- "The ability to highlight/copy/etc text on Macs/iOS these days is such a killer feature" (sen)
元数据和混合方式:建议在截图中嵌入来源链接或同时提供文本附件。
- "include a screenshot of a relevant portion... along with link or attachment" (albert_e)
- "metadata in screenshots, especially on phones" (gyomu)
其他观点
平台责任:部分用户认为聊天工具(如Slack、Teams)应优化代码粘贴功能。
- "Slack... can’t bother themselves to implement such a useful feature" (elzbardico)
- "Teams’ support for code blocks is so horrible" (pavon)
幽默与调侃:部分评论以幽默方式表达对问题的无奈。
- "This poor man is in a losing battle with modern computing" (shortformblog)
- "Screenshots of text! Luxury! In my day, the screenshots were embedded in a Word document too" (romaniitedomum)