Go to check for API documentation to make sure I use API correct
Write little bit of code (code in small steps)
3.1) make sure that the code you’ve written is covered by some test
3.2) run unit tests and make sure that all the ones that used to pass
pass, and hopefully some new ones pass as well.
Run code (with or without UT)
Fix errors
Start from 1)
The main problem with just running the code (and not unit tests) is
that the way you test the code, you might not use all the
functionality. Unit tests should cover it. It’s a good idea to run
the code as a real user too, but if that’s all you’re doing, you might
never actually test the code you’ve written that covers atypical
operations.
The other thing you might want to throw in here at step 7 or so is
“refactor”. Every once in a while, maybe once you’ve added a big
functional chunk, go back over the code and say to yourself “What do I
have here that I don’t need? Do I have any repeated code? Could I
simplify any of this?”
Ben
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.