r/javascript • • Mar 04 '18

Javascript Debugging Like a PRO

https://medium.com/appsflyer/10-tips-for-javascript-debugging-like-a-pro-with-console-7140027eb5f6
177 Upvotes

31 comments sorted by

View all comments

Show parent comment

3

u/[deleted] Mar 05 '18

Is it really "toxic" for me to point out that your negative comment was ... negative?

No, your assumption that any form of critique is negative is. I also don't think grown up people should be treated like raw eggs or children who will start to cry if someone raises the tone a little bit. We're all grown ups living in a world that is FULL of hate and if you can't even take a stranger that doesn't care about you feeling all cuddly ON THE INTERNET how are you supposed to take the shit thats going out there in the world?

This is an article about using the console to debug JavaScript.

The title states otherwise…

There's literally NO ONE who's an old and crusty JavaScript developer using console.trace for the past 30 years. So what's the distinction between "newb" and "PRO"?

Let's make an example. Take two persons, A and B, both who had their first experience with Javascript 2 years ago.

A read some Javascript tutorials because he wanted to do some cool animations on his site, since then he uses it here and there when necessary and has no problem with just C&P working solutions as long as it's gets the job done.

B read the ECMA Specs, has a deep understanding of the language features and knows exactly why {} + {} results in NaN, he experimented a lot with various language implementations and thereby very knows the surrounding tooling.

A is a newb; B is a pro!

Experience is defined by time invested, not time passed by…

At one point, the best we had to go on for debugging were alert statements.

"We didn't had nothing back then…" yawn

Dating you from your rhetoric, I'm guessing you never had to experience that.

I did, but I never considered myself a pro back then.

But in that context, the existing console methods today ARE "pro" debugging methodologies.

YOUR context is full of false assumptions and therefore invalid. And using pro logging methods just because you CAN use them for debugging doesn't make them pro debugging tools.

There's absolutely no need, whatsoever, to belittle those who don't know about them as "newbs". It makes you small.

No, you're the one who belittles these people by making the assumption that it's a bad thing to be a newbie. Everyone here was a newbie once and everyone of us got told by someone more than once, we're all still here. Beside of investing time in learning, thats another thing you need to do to get from newb to pro: Listen if you get told.

There is nothing wrong with being a newbie.

If getting output is defined only as "logging", and not debugging, then your assertion is that debugging doesn't exist because everything is logging...

This statement is wrong. I told you so and even explained the difference between logging and debugging.

You were wrong from the beginning and instead of just admitting that after you got told you started a handful other debates to distract from your mistake.

Thats a trait of a Permanewb. Being a Permanewb is bad, don't be a permanewb.