关于程序员有没有必要记一些API什么的讨论有很多,我个人觉得能Google到的就没必要刻意去记,可以简单的做个笔记,需要用的时候查一下就好了。真正有必要记的东西,用得多了自然也就能记住了。 文章不难,不浪费时间翻译了。原文链接
Software developers, especially those who are new to the field, often ask this question or at least wonder whether they are good developers or just good at googling up solutions.
“Do experienced programmers use Google frequently?”
The resounding answer is YES, experienced (and good) programmers use Google… a lot. In fact, one might argue they use it more than the beginners. (有经验的程序员经常用Google,并且比初级程序员用的多得多) Using Google doesn’t make them bad programmers or imply that they cannot code without Google. In fact, truth is quite the opposite: Google is an essential part of their software development toolkit and they know when and how to use it.
A big reason to use Google is that it is hard to remember all those minor details and nuances especially when you are programming in multiple languages and using dozens of frameworks. As Einstein said:
“Never memorize something that you can look up.” - Albert Einstein(绝不要去死记硬背那些可随手能查阅到的东西 爱因斯坦)
Aside from that, good programmers also know that they cannot be the first one to have encountered a problem. They use Google to research possible solutions, carefully evaluating the results and consciously separating the wheat from the chaff; they don’t blindly follow or copy-paste any solution they come across. Expert programmers are also paranoid, living in self-doubt and questioning their competence. Whenever their spidey senses start tingling, they know they may be going the wrong hole; they rely on Google on validate their logic. (不要盲目的复制粘贴代码,要去思考评估别人的代码,然后提炼出你需要的东西)
Going by the definition, I would be considered an experienced programmer. Recently, I had to write web server using Netty in Java to handle persistent sockets from mobile games. I had never used Netty before. Here are my Google searches I did:
代码语言:javascript复制1. netty tutorial
2. netty maven dependency
3. netty bytebuf to string
4. netty bytebuf release
5. netty 4 changes
6. setOption("child.bufferFactory") netty 4
7. ByteBuf netty
8. opensource projects using netty framework
9. netty 4 examples
10. netty 4 adding json encoder
11. netty channel pipeline
12. netty 4 messagetomessage encoder
13. netty serverbootstrap childhandler
14. ByteBuf netty
15. lengthfieldbasedframedecoder netty 4
16. netty 4 client examples
17. netty 4 bytebuf to bytebuffer
18. netty 4 endianness
19. netty channelhandlercontext
20. netty channelhandlercontext thread safe
21. netty user authentication
22. netty heartbeat handling 23. load test netty with 10k concurrent sockets
I wrote 255 lines of code that included a working server and a client. I queried google 23 times mostly landing on StackOverflow, Netty 4 website, GitHub, and JavaDocs. If you do the math, that averages out to 1 query every 10 lines of code! I had no idea. Let me know in the comments what your average is.
So sit back, relax and remember that Google is software developer’s best friend.(记住 谷歌永远是开发者最好的伙伴)