DEV Community

Discussion on: What's Your Coding Quirk?

Collapse
 
svemaraju profile image
Srikanth
  • In early days of coding used to put lots of print statements like print(100, value) .... print(200, value) instead of using the debugger.
  • I like pretty printing JSON in terminal.
  • If I have 10 files to commit, I will do git diff on each file and observe the changes before committing.
Collapse
 
sjmulder profile image
Sijmen J. Mulder

I feel like print statements are great for debugging, they're good at showing the order of things or changes over time.

For git, try git add -p. Lets you review and stage one change at a time. Or just git diff (for unstaged changes) or git diff --cached (for staged changes), then you don't need to run 10 diff commands in sequence.