用于创建最小完整的错误示例的新手指南 [英] Good newbie instructions for creating minimal complete bug examples?

查看:101
本文介绍了用于创建最小完整的错误示例的新手指南的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我们一直在回答问题和处理bug报告一段时间的人都非常熟悉完整的,最小的例子的概念。你开始一个巨大的代码堆,这是一个奇怪的错误,你想问一个人关于它。但是,您不希望将其全部发送给您,因此您可以将代码堆放入较小的部分,直到您获得了一个仍然具有相同错误的小结晶20线宝石。



(然后,至少有一半的时间,你会意识到这个bug是什么,因为它像una蛾一样盯着你,而且你根本不必问。但是这是一个副作用。)



这样的代码减少不是每个人都有的技能 - 它需要一些实践,除了这个事实很多新手尚未了解到他们应该首先做到这一点。有几个关于如何提出好问题的新手的指导手册(例如,ESR的经典如何向智慧提问)。有没有很好的说明,说明一个最小的完整例子,以及如何和为什么要创建它们?

解决方案

所有的名字。完整的最小示例是完整和最小的示例。完整意味着它包含所有相关信息,最小意味着它不包含不相关的信息。识别什么是不相关的能力只是实践中的一部分 - 试图提供这方面的说明似乎有点像提供骑自行车的说明。您可以给出技术说明,并描述机制(和您所链接的TeX常见问题),但最终,唯一的方法是真正学习。


So, those of us who've been answering questions and dealing with bug reports for a while are all deeply familiar with the concept of a "complete, minimal example". You start with a gnarly huge pile of code that's got a weird error, and you want to ask someone about it. But you don't want to send them the whole mess, so you start cutting the pile of code down into smaller pieces, until you get this little crystalized 20-line gem that still has the same bug you started with.

(And then, at least half the time, you realize what the bug is because it's staring you in the face like a luna moth, and you don't have to ask after all. But that's a side effect.)

Doing that sort of code-reduction isn't a skill that everyone has -- it takes a bit of practice, beyond the fact that a lot of newbies haven't yet learned that they ought to do it in the first place. There are several excellent sets of instructions for newbies on how to ask good questions (e.g., ESR's classic "How To Ask Questions The Smart Way"). Are there good instructions out there that explain what exactly a minimal complete example is, and how and why to create them?

解决方案

It's all in the name. A complete minimal example is an example that is complete and minimal. Complete means that it contains all pertinent information, and minimal means it contains no information that is not pertinent. The ability to identify what is an is not relevant is something that only comes with practice - trying to provide instructions for this seems a little like trying to provide instructions on riding a bicycle. You can give the technical explanation and describe the mechanics (and the TeX FAQ you linked to does that very well) but in the end the only way to really learn is by doing.

这篇关于用于创建最小完整的错误示例的新手指南的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆