
The Complete Guide to Writing More Maintainable, Manageable, Pleasing, and Powerful Ruby Applications Ruby's widely admired ease of use has a downside: Too many Ruby and Rails applications have been created without concern for their long-term maintenance or evolution. The Web is awash in Ruby code that is now virtually impossible to change or extend. This text helps you solve that problem by using powerful real-world object-oriented design techniques, which it thoroughly explains using simple and practical Ruby examples. This book focuses squarely on object-oriented Ruby application design. Practical Object-Oriented Design in Ruby will guide you to superior outcomes, whatever your previous Ruby experience. Novice Ruby programmers will find specific rules to live by; intermediate Ruby programmers will find valuable principles they can flexibly interpret and apply; and advanced Ruby programmers will find a common language they can use to lead development and guide their colleagues. This guide will help you Understand how object-oriented programming can help you craft Ruby code that is easier to maintain and upgrade Decide what belongs in a single Ruby class Avoid entangling objects that should be kept separate Define flexible interfaces among objects Reduce programming overhead costs with duck typing Successfully apply inheritance Build objects via composition Design cost-effective tests Solve common problems associated with poorly designed Ruby code
https://www.poodr.com/ https://www.youtube.com/watch?v=PJjHfa5yxlU
Practical Object-Oriented Design, An Agile Primer Using Ruby (POODR)
Practical Object Oriented Design in Ruby by Sandi. She has a lot of great talks on YouTube as well.
- Believes most business logic doesn't belong in models/controllers
- Understands the importance of naming things (classes, variables, etc.) well
- Writes tests, even if not fully TDD
- Intelligently applies SOLID engineering principles
^^ this type of thing.
I think the books "Code Complete" [0] and "Practical Object-Oriented Design: An Agile Primer Using Ruby" [1] embody a lot of what I'm looking for, if you're familiar with them.
[0] https://www.amazon.com/Code-Complete-Practical-Handbook-Cons...
Edit: Formatting
Sounds like you are unhappy with the quality of code and error handling. Seems like it was written by junior devs? I would recommend having the team read the usually recommended books if they haven't. At the bare minimun:
* Refactoring by Fowler
* Clean Code by Robert Martin
If you are using an OO language:
* Practical Object-Oriented Design in Ruby
The book has "in Ruby" in the title but it's a general purpose book on what make OO design "good"
Then follow it up with
* Patterns of Enterprise Architecture
* Clean Architecture
These books are not perfect or the be all end all, there are parts of them that might be slightly dated but they get you to a large chunk of the way to the promised land.
Lastly, if the application is working, the users are happy, there is no bug infestation and you are not having issues with releasing new features, don't feel the pressure to immediately "fix" the code.
