DEV Community

Discussion on: Those silly mistakes we all make

Collapse
 
borisimple profile image
Boris Krstić

So you wrote that function, but it doesn't work and you have no idea why.

But did you MAKE a CALL to that function SOMEWHERE in your code or it just sits there alone and lonely? :))

Seriously, when I focus so much on functionality, sometimes I forget to call that newly created function. That's why I started calling the function first, and then start writing the function itself.

Collapse
 
philnash profile image
Phil Nash

Or even write a test for the function first 😉

Collapse
 
nandoblanco profile image
Nando

omg this happened to me the other day... but I usually call the function first so it didn't dawn on me to check for the function till after a couple of hours just to make sure and BOOM, no function... I added the function, confirmed it worked and closed my editor. Didn't code for the rest of the day.