-
You can choose tools that make you happy (borretti.me) on hacker-news
-
Ask HN: Programmers who don’t use autocomplete/LSP, how do you do it? on hacker-news
-
It’s probably time to stop recommending Clean Code clean-code
-
Global variables are not the problem (codestyleandtaste.com) on hacker-news
let counter = { count:0 } let obj = { counter:counter }; function simple(obj) { console.log(++obj.counter.count) if (obj.counter.count == 123) { //let's set a breakpoint before the exception } /* rest of func with buggy logic */ } function complex(obj) { let temp = structuredClone(obj) simple(temp) simple(temp) } simple(obj) simple(obj) complex(obj) simple(obj)