DEV Community

Cover image for 5 things a developer should do before asking for help

5 things a developer should do before asking for help

Paul Seal on July 10, 2018

We all need help at times, but sometimes we ask for help too soon, or we just find it hard to ask for help In this post I give you my opinions and...
Collapse
 
dance2die profile image
Sung M. Kim

4. Google the error

Sometimes I have trouble what to ask for.
Would it make sense to ask other dev what to search for in that case?

e.g.)
I saw a piece of ReactJS code. Someone pointed out to search for HoC (Higher Order Components) and go from there.

Collapse
 
prjseal profile image
Paul Seal

That’s true, I suppose when you have gone through these steps you will find this out when you ask the other dev.

Collapse
 
patricklafferty profile image
Patrick Lafferty

Good advice. On your first point, when debugging I find it helpful to apply the scientific method instead of just poking around the debugger and making somewhat random code changes (note: not implying that's what you meant, just as an example I see people often do).

Observe by examining values in the debugger, monitoring the application's behaviour and checking the logs like you said. Then come up with a hypothesis based on what you observed, and derive predictions from that. Then you can carry out tests based on your predictions, not strictly speaking in a TDD fashion but test by changing the data or code, and analyse the results of your changes. There you should gain more insight into the problem if not determine the cause outright.

The point being to make small, specific changes not necessarily just focused on the code, based on your predictions instead of just going on autopilot thinking "oh this tweak will probably fix it." Don't do things without a reason.

Collapse
 
prjseal profile image
Paul Seal

This is good advice as a tactic for debugging. Sometimes even just stepping though the code to see where it fails is enough. Some people don’t even do that.

Collapse
 
rafalpienkowski profile image
Rafal Pienkowski

Nice article.
Personally, I'd like the sixth point

Try to explain the problem to a rubber duck (or another kind of mascot).

I think that saying my thoughts in a way I can hear them have a magical influence of understanding the problem 😁

Collapse
 
lyon profile image
Lyon

It is shocking how helpful this actually is. I can confirm, and have read in books such as "Pragmatic Thinking and Learning" that there is actual science to why this works.

Collapse
 
andrekelvin profile image
AndreKelvin

Sleep over it. Sometimes you need to rest that brain of yours

Collapse
 
prjseal profile image
Paul Seal

Very true, but if you get stuck on this on a Monday morning, it's a long time to wait until you've had a sleep.

Collapse
 
ben profile image
Ben Halpern

"Give it the weekend to think over"

Has issue on Monday Morning

Plays Tetris for next 5 days

Collapse
 
nicostar26 profile image
Nicole Saunders πŸ’»πŸŒΉ

I'm still learning to turn to google. It really is a dev's best friend.

I had an issue just now that I was honestly going to ask about but then found the answer in stackoverflow.

Collapse
 
ctrleffive profile image
Chandu J S

Sometimes, a small break time will also help. Go for a walk.. Helps me most of the time.

Collapse
 
prjseal profile image
Paul Seal

Yes stepping back from the problem by having a small break can really help.