During the interview, she mentioned some rules that she had come up with to give when asked about design guidelines. She was clear that the rules could be broken, but once you understand why the rules are there in the first place.
Without further ado:
Your class can be no longer than 100 lines of code
Your methods can be no longer than 5 lines of code
You can pass no more than 4 parameters, and you can’t just make it one big hash
Your controller can only instantiate 1 object to do what needs to be done
Do you want to have a shortcut that takes you from a method call to it’s definition, wherever that may be in your code?
How about another shortcut to jump back to your previous position. Here is how to do it in Sublime Text 2
If you call yourself a ruby programmer, you should read this book.
Sandi Metz has done a great job explaining how to write maintainable applications, in a way that is accessible to programmers
at any skill level. Her book is concise (less than 250 pages, including the index), but jam-packed with great nuggets
of practical advice and coding techniques that you can start applying immediately in your projects. Her style is easy
to read, with many code examples that show you the evolution of code, as an application changes and is refactored.
Among the techniques discussed:
Use dependency injection to avoid coupling between objects. (Makes them easier to test too)
To write great APIs, focus on the messages being sent between objects. (She shows why you would actually want to
use a UML diagram)
By creating role tests and applying them to test doubles, you can avoid the ‘leaving the dream’ problem, where stubs in tests obscure the fact that objects interfaces have changed.