Five Scottish Beauties08 Apr 08

Here are five of the many things I learnt at Scotland On Rails:

  1. "Is your program written in invisible ink?"
    The point of being terse is that terse code is often more understandable. When your terseness starts to make your code less understandable, stop. Put empty actions in your controllers, even though you don't have to. (Thanks to David Black for 'invisible ink').

  2. Plugins are not free.
    Every line of code is a potential failure point; don't add more than you have to. You may be better using the plugin as a skeleton to write your own functionality. If you do use it, read the code, subscribe to the author's blog, and make sure it's maintained. (Thanks to Jonathan Weiss)

  3. Reading code is more important than writing it.
    Practice makes permanent; only perfect practice makes perfect. Reading the Rails source can be particularly valuable. Every time you see syntax you haven't used, write something that uses it, just as an exercise.

  4. Move beyond MRI.
    Rubinius gives you more metaprogramming hooks; JRuby gives you a one-command application server (via Glassfish). Even if you don't use them, look at them.

  5. Write the damn tests.
    I find your lack of tests disturbing.


(Have your own? Enter the Railscast contest )




Gwyn Morfey — facebookflickrbuy the book — London UK