@davidwalshblog console prints are peak engineering, we all know the pain it gets funnier when you inspect some large websites and see the messages left by some dev trying to debug
@davidwalshblog The twenty years of experience got you to working through the issue yourself, step by step, and probably fixing it. The mechanism doesn't matter.
@davidwalshblog @kylewelch saw @steveruizok do this to debug this week and i was so vindicated
@davidwalshblog wait til you learn about the “debugger” keyword. game changer
@davidwalshblog glad to know i dont have to be embarrassed for this at 10 yrs
@davidwalshblog Lmao I do that but I use "====== Here ======" so i can see it clearly in the console xD
@davidwalshblog I add those and then for some reason set a breakpoint on them and step through the code anyway, I like to see the output as I step over it to make sure the debugger is working :) but I am QA engineer so what do I know!!
@davidwalshblog The tried and true printf("%s / %d", __FUNCTION__, __LINE__) debug method
@davidwalshblog Eso es muy largo, es mejor poner "aaa" o "caca1" XD
@davidwalshblog I use “this should never happen” in other spots 😂
@davidwalshblog Mine is: `console.log('🟢 AAA3', data)` 🤣
@davidwalshblog Well yeah, it's JavaScript, how else can you debug it.
@davidwalshblog Still and forever my number one debugging technique.
@davidwalshblog I use spontaneous and random logs like: console.log("gahahfsjsbwisns").. they are very useful as IDs
@davidwalshblog Back in the day, a colleague of mine would print a source listing and write "latest" on it, not realizing that every copy he had was the "latest".
@davidwalshblog This is extremely validating 😂
@davidwalshblog Last night I did "Gets here - line 60", "Gets here line 100" 🥲
@davidwalshblog The advanced way is to have "GETS HERE! 1" and "GETS HERE! 2"
@davidwalshblog Don't forget about it's siblings: "GET HERE 2" and "GET HERE 3 AFTER LOOP"
@davidwalshblog You bothered with “gets” rather than just “here”. How many wasted keypresses for those two words rather than one? Add it up, see how much time you’ve wasted. Then weep.
@davidwalshblog I levelled up my engineering skills by debugging with emojis now
@davidwalshblog For me it’s tons of logs for “am I here?” “Or here” “maybe here”
@davidwalshblog At the start of the code: c=console;c.log=new Proxy(c.log,{get(_,p){return(...a)=>c.log('%c ', `border-left: 5px solid ${p}`, ...a)}}); Then console.log.red(), console.log.mint(), console.log.goldenrod() & so on with any CSS colour name. peppertop.com/blog/?p=1657
@davidwalshblog 43 years. Same. Don’t have the energy for the whole shift key / caps lock deal anymore tho’ thems’ are calories I need to save for screaming at the compiler.
@davidwalshblog For testing ApplePay on my phone I had to use the speech API to speak what was going on. (I don’t have a Mac). It got pretty crazy listening to it!