DEV Community

Discussion on: What do you do when you're stuck?

Collapse
 
krl87 profile image
Kayley

This is super insightful Zubair! I'm definitely going to steal this from you, I think there's something special about writing things down, somehow changes the perspective of the problem.

Line by Line debugging (Scripting language) and writing output on paper

Do you have an example of what this looks like by chance?

I can't wait until the weather here get's warmer! Talking walks will definitely be my goto for when I get stuck.

Collapse
 
zubairmohsin33 profile image
Zubair Mohsin

I work with PHP and JavaScript. Both are scripting languages and are interpreted as one line of code after the other.

So I just start at the beginning and then go on logging/dumping things.

Thought process example:

  • form is submitted
  • okay so its hitting Controller class method just fine
  • before validating we had this input ( note it down roughly )
  • okay something changed during validating the input ( note it down )
  • compare these outputs and try to make sense what could go wrong

I hope this helps :)

Thread Thread
 
krl87 profile image
Kayley

Definitely! Thank you for showing me how you work through a scenario like that!