TDD and OOP
Allows you to write the code you wish you had.
Also, it forces you to implement with metaphors to form your test code essentially modeling the world around you. And that’s why you should always use Test Driven Development.
“Steve Jobs created the iPhone by giving(yelling…) to his team the specs he wished phones had…”
Methods and return values
Methods are used to create a desired output. Use them that way.
Methods should always return a value. Nil is also a value. Stop trying to come up with fancy one liners on the first try. Methods can be long at first. Break down each problem into single real world steps using a pen and paper, then reconstruct it with code
“Write with function, refactor with style”
DRY (Don’t Repeat Yourself)
In order to truly be lazy one must plan ahead…
Using modules with classes and proper planning will ensure that you never repeat yourself unnecessarily.
“Inheritance gives us the ability to be lazy. -Just like a real inheritance…”
Google and Stack Overflow
No one ever memorized an entire code library in 2 days… Google It.
Find yourself staring at your failed tests for hours thinking the solution will somehow present itself? It won’t. Learning from others mistakes and problems is the best way to get a deeper understanding and grasp new concepts.
“The difference between a layman and an engineer is not knowledge, but the ability to solve a problem and that is what truly counts. ”
Hope That Helps,