2.1.3 错误的提问姿态
现状
我们假定一个情况,如果你是一个医生,患者过来告诉你,我浑身都疼,医生我该怎么办啊。
然后你要慢慢询问他的问题,接着你要问各种问题各种检查然后去看,如果有十个人一百个人都这么问,你肯定会受不了的吧。
事实上,如果希望能提高得到回答的概率,提问者应该学会如何更好地提问。换句话说,提问者应该去积极思考 "我可以主动做些什么来让对方更方便地帮助我诊断问题".
如果你的提问方式非常不专业,很可能没有人愿意关注你的问题,因为这不仅让人觉得你随便提的问题没那么重要,而且大家也不愿意花费大量的时间向你来回地咨询.
解决
一种非常合适的提问方式是:
我在写 xxx 的时候遇到了 xxx 的错误(请发截图不要复制粘贴)
我的版本是 XXX,官方文档给的版本是 XXX
我做了这个来试着修正(贴图)根据的是 XXX 上的方法
然后出现了 XXX
···········
最后我做的尝试是 XXX
问题还是没有解决,现在我该怎么做?
欢迎大家阅读
Stop-Ask-Questions-The-Stupid-Ways/README.md at master · tangx/Stop-Ask-Questions-The-Stupid-Ways 别像弱智一样提问
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md 提问的智慧
关于如何搜索代码
如果我现在想要把图片读取并转换成灰度图,我该怎么去搜索呢?
首先,我打算使用 python,所以我会搜索:“python 图片转灰度图”
以下是我从搜索到的博客中找到的代码:
python
import cv2 as cv
img = cv.imread('lbxx.jpg',1)
img_1 = cv.cvtColor(img,cv.COLOR_BGR2GRAY)
cv.imshow('gray',img_1)
cv.imshow('colour',img)
cv.waitKey(0)
接下来,我会去搜索每行代码的作用:(以下是搜索后我做的注释)
python
import cv2 as cv # 调opencv库
img = cv.imread('lbxx.jpg',1) # 读取图片(“图片路径”)
img_1 = cv.cvtColor(img,cv.COLOR_BGR2GRAY) # 转换成灰度图(图片, 颜色模式)
cv.imshow('gray',img_1) # 展示图片(展示img_1为灰度图)
cv.imshow('colour',img) # 展示图片(展示img为彩色图)
cv.waitKey(0) # 保存展示窗口打开
于是,我就不仅学会了如何转换灰度图,还学会了相关函数的用法。