7 Things to Try Before Asking for Help From a Senior Dev

thinking-emoji

I put together a list of tips I learned while working as a software engineer that help me learn faster, implement new technologies, and debug my code efficiently.

Read the documentation

Reading the docs is the canonical advice you'll receive when learning a technology. Many established technologies typically come with comprehensive documentation and tutorials, which serve as the optimal resource for understanding how they work. And docs are especially useful if you need to master a technology with which you work on a daily basis. Nonetheless, I sometimes find that documentation alone is not sufficient when I'm learning about a complex technology, so I try to supplement my reading material with video explanations practical work.

Visit Youtube/Udemy

Youtube is my go-to way of getting exposed to technologies for the first time. I especially love videos from Fireship and IBM Technology.
When it comes to in depth learning, don't sleep on Udemy, there are some amazing courses out there, like this course on React/Redux by Stephen Grider.
My rule of thumb is that I use youtube for high-level or quick explanations and Udemy for in depth learning of important technologies I use on a daily basis.

Use the duck debugging technique

Here’s how it works:

  1. Get a rubber duck
  2. Walk it through your code out loud step-by-step
  3. Magically realize what caused the bug

The logic behind this is that many programmers have had the experience of explaining a problem to someone else, possibly even to someone who knows nothing about programming, and then hitting upon the solution in the process of explaining the problem. By using an inanimate object, you can try to accomplish this without having to bother someone else.

Google it

Here are some of the sites I use to find answers to coding questions:

  • Stack Overflow: This used to be every programmer’s go-to website to find answers to coding problems, but it has lost a great deal of traction since ChatGPT came out. Nonetheless, Stack Overflow is still useful to find insight related to newer technologies or to niche bugs. I recently found the solution to an odd bug I was experiencing with NextJS 13 thanks to a good samaritan on Stack Overflow.
  • Github Issues: Usually, when an issue is raised by a developer on an open-source library, it might be a question of luck as to whether the issue was resolved or not. Regardless, you can follow the thread to learn about how others dealt with the problem. It's also good to know if you should spend more time implementing a library or find another (better maintained) one.

Ask ChatGPT

Sounds trivial, but here are some tricks I use to improve the quality of the AI-generated answers:

  • Chain of thought (CoT) reasoning: Instruct the model to “outline your reasoning step-by-step then provide your answer”. According to this study, CoT significantly improves GPT’s problem-solving abilities.
  • More context: GPT-4 takes an 8,000 word context window, which is enough to provide it with (recent) documentation or relevant code that can help with your query. Here’s an example of how I added relevant information in a message: “The Analysis package for GoLang recently released a new feature called ‘suggestedFixes’. Here is the relevant snippet from the docs [RELEVANT TEXT]. Based on this new knowledge, write the code to implement X”
  • Edit messages: If you’re not happy with the response you got from the AI, just modify your message until you get a satisfactory response. This feature is simple yet powerful because it allows you to keep the part of the conversation prior to the message you want to edit (no need to restart the whole conversation).

Find a code that is similar to what you’re working on

It can be helpful to take inspiration from someone else's code rather than to reinvent the wheel.
You can find a repo through Medium, Github, Google, Youtube etc. then fork it and modify it based on your specifications or you can copy relevant code snippets. For example, my Tracecheck linter is a fork of the code in Loggercheck. Another tip is finding a blog post with an easy-to-follow guide from another dev on how to implement a given feature or library.

Read the library's code

If you are working with an open-source library and the docs/readme are not clear enough or omit important information, you can always take a look at the codebase. Github lets you search for a specific function, class, or variable name, and read its implementation. You can then get a low-level understanding on how to use the tools available in the library.

I hope you enjoyed reading this post. Feel free to email me any feedback.