r/javascript • • Nov 04 '18

Basics: How to stop using console.log() and start using your browser’s debugger

https://medium.com/datadriveninvestor/stopping-using-console-log-and-start-using-your-browsers-debugger-62bc893d93ff
351 Upvotes

127 comments sorted by

View all comments

Show parent comments

1

u/loopsdeer Dec 24 '18

Idk how I didn't see this. Thank you for the thoughtful response.

It seems like you have uniquely strong habits when it comes to memory leaks. That makes you good at this. My point was that normal JS devs, of whom I interact with a lot and am one, are susceptible.

Perhaps it is that most JS projects don't deal with huge amounts of objects or long runtimes, and rely on the invisible GC, and so bad habits emerge in the absence of negative feedback.

Regardless, I don't think this makes a JS dev shit, tho most of us would certainly be shit at writing professional CPP out of the gate.

1

u/[deleted] Dec 24 '18 edited Dec 24 '18

My formation was on C and C++, not JS. I learned JS on my own because I had to at this moment. I'm currently developing a multi-threaded game server in C++ for a unity game.

In JS I think the problem is thinking that the GC will take care of everything magically and ending with zombie memory. JS is devious, you can get things done fairly quickly, but it's full of quirky stuff. The learning curb starts easy then there is an increase because of weird behaviors. When I started C/C++, it was more like a wall than a curb from the very beginning but the language is way more "stable".