Here’s a situation that might sound familiar: you’re in the middle of a project, and you realize you’re tackling a problem you haven’t seen before. Perhaps your search function query is returning too many results, which is slowing down your website. You figure you shouldn’t display the data all at once, and you’ve heard about something called “pagination,” which sounds close enough. So, you quickly look through the codebase for similar examples, and then google “pagination” + “[your stack]”. An hour later, you have 17 open tabs, a growing headache, and no actual progress on your project. Congrats, you’ve officially gone down the research rabbit hole!

As the sun is starting to come up on a new day, you stumble across some library code that seems relevant, so you copy it over, and it seems to work. You don’t fully understand why, but the code runs and the tests pass. So, you move on, and everything is fine — until a few days later, someone else pushes a change, and everything breaks.

As developers, we’re constantly researching new approaches, processing new information, and selecting the best solutions under deadlines. Having to research isn’t a signal that you don’t know enough — it’s a crucial part of the job. Terry O’Shea, a software engineer at Etsy, says she looks things up “dozens of times a day… I’ve spent more than a few sweaty half-hours phrasing and rephrasing a search query.” Learning to research effectively is a significant part of leveling up as a developer.

The trap many beginners fall into is following a solution that seems close enough. It’s incredibly easy to get lost if you only have a vague sense of what you need. At best, you’ll stumble onto a working solution without really understanding it; at worst, you’ll find yourself frustrated and way off course. I’ve been there myself while working as a software engineer at Bonus.ly and the NYC Mayor’s Office. There is no perfect process, and different approaches work for different people. However, one trick I’ve found to be quite conducive to effective research is to stay mindful through the process.

第1步:了解景观

Before you start wading through search results, start by defining your problem in the clearest way you can. Aim to understand, broadly, what the high-level moving pieces are. This may feel tricky at first, but considering how to word your question will help you understand it, remember it, and communicate it to others. James Mayr, a product manager at The Muse, finds it helpful to front-load this process: “I try to do the research long before I get to the actual coding; if I have to look something up during the middle of a coding session, it totally pulls me out of the flow.”

In the earlier example, pagination is just one possible solution to a slow page load. If you take time to explore the underlying problem you’re facing (a large, slow server response), you’ll find other possibilities. You might implement infinite scrolling, refactor your database queries, cache search results, or even redesign your UX so users initially request more specific data. Forming a sense of the landscape will help you narrow in on an appropriate, effective solution rather than chasing a close enough one.

Beware of the XY problem — where, instead of asking for your actual problem, you ask about your best hypothesis, and get an answer to a whole other question. As you research, keep asking yourself: “Does this resource help me do X, the problem I just defined?” It might sound trite, but if the answer is anything like, “Well, it helps me do Z, which helps with Y, which is how I can do X,” you’ve probably gone too far.

第2步:选择资源

You’ll need different resources at different stages of the research process, so be cognizant of the type of resource you’re looking for. For example, if you’re struggling to understand the concept of hashing (a cryptography technique commonly used to obscure sensitive data), reading a tutorial on bcrypt (a popular hashing library) is probably not the best use of your time.

As you search the internet, you’ll find roughly four types of resources:

  • 技术文档(MDN,API文档)
  • 教程(Medium,FreeCodeCamp,特定于工具)
  • 在线讨论(Stack Overflow,Reddit,HackerNews) < li>来自教程和论坛的代码示例

Start broadly — look for a Wikipedia article, MDN documentation, or W3Schools. When I was learning to research, I created a whole website, Hackterms, to crowdsource coding jargon that can sometimes be a stumbling block. Then, once you understand the concept at a high level, you can search for relevant blog posts, tutorials, and Stack Overflow responses to help you write code. If you browse message boards, don’t get caught up in the arguments about which tool is best until you understand what they actually do.

This may seem like a small change, but constantly evaluating if you’re looking at the right type of resource will force you to be more discerning, and will save you lots of time. It’s easy to get distracted reading a tutorial that sort of makes sense, but remember: your goal isn’t just to get the code working; it’s to write code you can understand and maintain.

Although the internet is full of knowledge, sometimes the most effective way to get an answer at work may be from your colleagues. Esther Leytush, a full-stack developer at Betterment, says her rule of thumb is to “google anything that I can frame as ‘How do I…’ and ask coworkers, technical leads, or managers when the question can only be framed as ‘Should we…?’ Your colleagues are the best resources on domain- and process-specific knowledge, and can often help you get unstuck. “If an obstacle that’s stopped your work for half an hour,” says Etsy’s O’Shea, “definitely take it to a colleague — maybe they’ll know the solution; maybe they’ll just commiserate.”

第3步:编写代码


As you narrow down your choices towards the solution you actually need, you can start looking for specific tutorials or documentation. Now, you can shift from trying to understand the landscape to finding and writing code that solves your problem.

At this stage, make sure you don’t copy over blocks of code without understanding every line. Many tutorials oversimplify the problem for the sake of brevity and clarity, but the sample code they use is often not suitable for production. Copying blocks of code will lead to technical issues when you can’t explain or maintain your work, and ethical issues around plagiarism and intellectual property. Moreover, by taking the time to rewrite and customize the solution now, you’ll find it easier to understand similar problems the next time.

第4步:现在进行认真的研究=未来的障碍会更少


As with everything else in life, you’ll get better at research with practice. You’ll find it easier to reach the right resources using the right words, and the knowledge you gain from mindful research will illuminate areas of programming that used to seem daunting. “I’m more discerning about the solutions I find,” says O’Shea. “Instead of just copying and pasting someone’s hacky CSS, I’ll keep searching until I find the most idiomatic, performant, concise, or elegant way to accomplish what I want.”

So, the next time you run into a scary new problem, don’t immediately reach for Google. Define the problem, identify the resources you’ll need, stay mindful, and remember — this isn’t just how you solve the problem in front of you, it’s how you become a better developer.

Tags: bulletin, coding, mental health, mindfullness, research, software development

from:https://stackoverflow.blog/2019/07/30/find-help-online-mindfully-and-effectively/

ecw2c认真有效地在线查找帮助!相关推荐

  1. useragent在线查找

    有的时候我们在检查服务器的 Nginx 和 Apache 的日志时候,经常看到一些奇奇怪怪的 UserAgent,我们需要解析这些 UserAgent,看看是不是正常用户. 例如下面是一个比较复杂的 ...

  2. 查找所有hid设备_如何在线查找几乎所有设备的使用说明书

    查找所有hid设备 The odds are you've lost some instruction manuals over the years. Maybe they're lying in a ...

  3. 如何在线查找成千上万的免费电子书

    You've got an ebook reader (or a laptop or netbook with ebook reading software) now you just need so ...

  4. 内网计算机如何在线查找mac地址,怎么查自己电脑的ip 和mac地址 局域网ip地址怎么查?...

    类型:赛车竞技大小:30M语言:中文 评分:10.0 标签: 立即下载 我们经常听到说要设置ip地址,有时还会有要记录mac地址,办公室的电脑如果不设置一个固定ip 就会经常造成管理的混乱,那怎么查询 ...

  5. 在线学位课程_如何选择计算机科学学位课程

    在线学位课程 by Colin Smith 通过科林·史密斯 如何选择计算机科学学位课程 (How to choose a Computer Science degree program) I rem ...

  6. Excel在线常用工具

    Excel批量自动处理文档在线工具 Excel在线常用工具网址 --- www.excelfb.com 大部分功能 的使用说明点击此处 ---使用说明 Excel常用批量自动处理工具软件,方便的解决使 ...

  7. Android 源代码在线查看 目录结构 不完全指南

    Android 源代码在线查看网站 在 Android sudio 中,想要查看一个 Android 系统的源代码,仅仅需要 Ctrl+鼠标左键 点击该目标类和方法名,即可在开发软件Android s ...

  8. 180701 icon文件查找与转换网站

    在线转换 http://icoconvert.com/ 在线查找 https://www.iconfinder.com/ 右键文件夹,固定到快速访问

  9. 在线长篇英语文章翻译工具

    在线长篇英语文章翻译,整篇英语文章保留段落格式自动翻译成中文.日文.德文等多语言,并且支持多篇英语文章批量导出,批量翻译导出本地,支持txt/excel/word/html等多种格式. 在线长篇英语文 ...

最新文章

  1. python写游戏脚本-使用Python写一个小游戏
  2. java.io.IOException: No space left on device
  3. ARM的嵌入式Linux移植体验之操作系统
  4. PHP算法对获取用,连接的字符串用in进行sql查询的php处理方法
  5. python while一定要提供循环次数吗_Python语法之选择和循环(if、while)
  6. python assert 用法_Python量化投资实战营大咖开讲!
  7. android个推快速集成,个推用户画像产品(个像)Android集成实践
  8. Qt:#pragma comment(lib,“ws2_32.lib“) 报错
  9. FFT FNT 简要整理
  10. 基础VLAN划分(思科)
  11. Qt自定义对话框及调用方法
  12. CESM优化——Intel编译器编译安装NetCDF库(C+Fortran)
  13. 我的世界服务端大全-服务器插件等相关网站推荐
  14. 测试小故事74:没有计划的日子
  15. c语言错误 243什么意思,c语言编译后[Error] stray apos;\243apos; in program
  16. 注册电气工程师职业资格考试
  17. STM32F030软件SPI控制74HC165
  18. Struts2的OGNL表达式语言
  19. ros实验操作——订阅者Subscriber的编程实现
  20. 西北乱跑娃 -- python识别二维码

热门文章

  1. Vue2.0 饿了么报错: Unexpected side effect in lis tShow computed property
  2. 微信小程序选项卡swiper默认高度150px(让高度实现自适应)怎么解决?
  3. WHISTLE特征提取
  4. win10任务管理器快捷键是什么,win10系统打开任务管理器快捷键
  5. 好用的综合bim插件:Revit属性对话框中“视图范围”命令的使用
  6. “TECH数字中国 2020技术年会”盛大开幕!产学研生态共议“新基建 新金融 新安全”
  7. 有没有适合男的下班以后做的副业?
  8. 关于Yolov5在测试时,图像大小被调整的问题
  9. 总结十二:管理经验法则和名言
  10. window.requestAnimationFrame Web3D渲染帧率控制