2 – Learning the Ruby Basics, the right way | From PHP hobbyist to pro Ruby developer course
This forms part of my ‘From PHP hobbyist to pro Ruby developer” course which I’m trialling at the moment with Remi.
The purpose of this unit is to learn Ruby, and a little about professional code construction.
The two books you will need are:
- The Well Grounded Rubyist, David A Black
- Clean Code, A handbook of Agile Software Craftsmanship, Robert C. Martin (Uncle Bob)
Read the books
Don’t worry about code at this point, begin by reading the books and working through the examples. Ensure at a minimum you read the following chapters:
- The Well Grounded Rubyist, every chapter
- Clean code, chapters 1 - 7 + 1o
Don’t be tempted to work through your own code at this point, just follow along with the examples. Don’t worry about committing everything to memory, or even understanding it all. This won’t be the last time you read these books, but will give you an overview and remind you where to look when you encounter problems these books can help with in the future.
Devise your sample code project
After reading the books, come up with a simple project that will test the code you’ve learnt, under the following constraints.
- It should be a command line app
- It should collect some input from the user
- It should process that input, perhaps along with some data collected from the web and stored in a flat file
- It should return some data back
- It should be simple enough to code within a day or so
Discuss the project with me at this point if you wish.
Implement the project, using the best practices you’ve learnt
- Create a new public github project to store the code in.
- Write the code using the best practices you’ve picked up from Clean Code, and the skills in the Ruby Book.
- Use git as you go, committing each change using the process learnt in unit 1. Stick to master for now.
Notify me when you are done, and I’ll review your code in git and set up a code review ready for you to move on to the next step.comments powered by Disqus