DEV Community

Discussion on: Coding 🤦‍♂️

Collapse
 
bfuculsion profile image
Benjamin Follis

It's sorta your fault. But no namespaces or write protection on built in functions is the environment's fault.

Collapse
 
michaelphipps profile image
Phippsy

It's not sorta my fault. It's TOTALLY my fault!

Collapse
 
bfuculsion profile image
Benjamin Follis

Eh, I'm of the opinion if your environment needs special flags to prevent you from doing obviously dangerous things then it's the one that's mostly at fault. Environments should require flags to LET you do obvious dangerous things.

Collapse
 
jamesthomson profile image
James Thomson

Yep. A simple 'use strict'; would have saved you.

We've all been there though. Typos or camel case used to get me sometimes, thankfully eslint (and typescript at times) negates about 99% of this sort of stuff.

Thread Thread
 
michaelphipps profile image
Phippsy

I see what you are doing here. While you're point out the errors of my ways, you're avoiding sharing your own coding 🤦‍♂️.

Share your shame! (If you dare) :D

Thread Thread
 
jamesthomson profile image
James Thomson

Can't think of a specific blunder lately, but I'll be sure to let you know when it happens 😂