Friday, December 10, 2021

puts_debuggerer is State of the Art Rails in 2021

There is a project on GitHub that lists/demonstrates state of the art Rails technologies in 2021:

https://github.com/DanielVartanov/state-of-the-art-rails

Interestingly enough, one of my gems, puts_debuggerer, made the list!

https://github.com/AndyObtiva/puts_debuggerer

Here is a summary of what it does from its GitHub page:

"Debuggers are great! They help us troubleshoot complicated programming problems by inspecting values produced by code, line by line. They are invaluable when trying to understand what is going on in a large application composed of thousands or millions of lines of code.

In day-to-day test-driven development and simple app debugging though, a puts statement can be a lot quicker in revealing what is going on than halting execution completely just to inspect a single value or a few. This is certainly true when writing the simplest possible code that could possibly work, and running a test every few seconds or minutes. Still, there are a number of problems with puts debugging, like difficulty in locating puts statements in a large output log, knowing which methods and line numbers were invoked, identifying which variables were printed, and seeing the content of structured hashes and arrays in an understandable format.

Enter puts_debuggerer! A guilt-free puts debugging Ruby gem FTW that prints file names, line numbers, code statements, headers, footers, stack traces, and formats output nicely courtesy of awesome_print.

puts_debuggerer automates tips mentioned in this blog post by Aaron Patterson using the pd method available everywhere after requiring the gem."

No comments: