I Bow To The Wisdom Of The Console Cowboys Of Yesteryear

 Okay, maybe an overly dramatic title but I'm feeling nostalgic. I love commad line tools and so much of my TDD process is just adding console.log statements everywhere things seem troubled until I can zero in on exactly what is happening. I'm going to do a commit (changeset Fix Djehuti.parseMetaData) with the statements still in so you can run the tests in Jest and see how the output let's us trace our logic, and then I'll do another commit with them commented out (see changeset Remove console.log statements from Djehuti, where I did just that but left them in for future use if necessary, we can always remove them later, even using something like ESLINT to help us track down all violations...)

Sublime Text Sidenote: An easy way to do this in Sublime is to repeatedly CTRL+D on a "console.log" statement until you've selected all the statements in the file, then CTRL+/ to comment all the lines at once, I ABSOLUTELY LOVE HAVING MULTIPLE CURSORS. Check out Sublime Text if you haven't, it's such a great tool.

Thanks for reading, stay tuned till next time ;)



Comments

Popular Posts