问题无处不在我: “大佬,帮我看看这个问题错在哪了?”
大佬: “你的代码呢、你的错误提示呢?”
我: “好的,我发给你”
大佬: “。。。 再见”
留下一脸懵逼的我
如何解决问题最简单的方法是根据错误提示,查看对应位置的代码,Pycharm会提示具体是哪一行代码有问题,并抛出错误。
找到错误首先应自己想办法解决,自己解决又分为几种:有经验的大佬看到Error就知道是哪里有问题了,没经验怎么办,那就自己去搜索了。
下个结论,你遇到的问题,前人一定遇到过。
所以你只需要把你的错误提示搜索就好了。
注意下面,你懂的。(给自己一个好点的环境)
Google > 百度
stackoverflow > 知乎
github > CSDN
Github上有一个很有用的 trending ,可以显示今天或本周或本月最火的项目,例如:
techGay/91porn
Github 作为全球最大的同性交友网站,上面有很多值得我们好好学习的东西。
如何向别人提问
如果你真的像上面哪样,发一张照片,估计大佬都要吐血了。
在这里推荐大家使用Github上的 gist ,很适合分享代码片段。
Instantly share code, notes, and snippets.
例如这样
Issue in FromRequest #3144
这样看起来是不是舒服多了
如何才能 永无bug1、佛祖保佑 永无bug代码语言:javascript复制// _ooOoo_
// o8888888o
// 88" . "88
// (| -_- |)
// O\ = /O
// ____/`---'\____
// . ' \\| |// `.
// / \\||| : |||// \
// / _||||| -:- |||||- \
// | | \\\ - /// | |
// | \_| ''\---/'' | |
// \ .-\__ `-` ___/-. /
// ___`. .' /--.--\ `. . __
// ."" '< `.___\_<|>_/___.' >'"".
// | | : `- \`.;`\ _ /`;.`/ - ` : | |
// \ \ `-. \_ __\ /__ _/ .-` / /
// ======`-.____`-.___\_____/___.-`____.-'======
// `=---='
//
// .............................................
// 佛祖镇楼 BUG辟易
// 佛曰:
// 写字楼里写字间,写字间里程序员;
// 程序人员写程序,又拿程序换酒钱。
// 酒醒只在网上坐,酒醉还来网下眠;
// 酒醉酒醒日复日,网上网下年复年。
// 但愿老死电脑间,不愿鞠躬老板前;
// 奔驰宝马贵者趣,公交自行程序员。
// 别人笑我忒疯癫,我笑自己命太贱;
// 不见满街漂亮妹,哪个归得程序员?2、佛系编程 永无bugNo CodeNo code is the best way to write secure and reliable applications. Write nothing; deploy nowhere.
Getting StartedStart by not writing any code.
代码语言:javascript复制This is just an example application, but imagine it doing anything you want. Adding new features is easy too:
代码语言:javascript复制The possibilities are endless.
Building the ApplicationNow that you have not done anything it's time to build your application:
代码语言:javascript复制Yep. That's it. You should see the following output:
代码语言:javascript复制DeployingWhile you still have not done anything it's time to deploy your application. By running the following command you can deploy your application absolutely nowhere.
代码语言:javascript复制It's that simple. And when it comes time to scale the application, all you have to do is:
代码语言:javascript复制I know right?
ContributingYou don't.