Ruby on Rails – What I’ve learnt so far

I’ve been spending around 10 hours on the weekends learning the ropes of coding. Also, if I wake up at 6.30am and don’t go to yoga / exercise, I’ll put in an hour of coding before going to work. So far I was stuck thrice, which is frustrating. You can’t really skip it and work on something else when you’ve hit a roadblock.

1st week – Javascript, jQuery, Ruby, Bash

I did section 1 to 6 of The Complete Web Developer Bootcamp – Beginner to Expert. You can pay for this using your SkillsFuture credits. I skipped the HTML and CSS parts, instead focused on Javascript, jQuery, Ruby and Rails. It gave me a brief overview of each language. I also learnt how to use the command line and to fire up the rails server.

Console & Command Center
Rails Skeleton
Rails Server
Control Flow
Prototypes & Inheritance
Events & Callbacks
AJAX & jQuery
jQuery Selectors
jQuery Gets Classy
jQuery Events
jQuery This
jQuery Effects
Files & IRB
Numbers & Strings
Variables & Interpolation
Control Flow
Arrays & Methods
Methods Are Functions
Class Attributes

2nd week – Git, Heroku, Static Pages, Create Users & Microposts, Testing

Ruby on Rails Tutorial (Learn Web Development with Rails) by Michael Hartl was the book most recommended for learning Ruby on Rails. I started with the free online tutorial then got the screencasts. This week I got my first application deployed on the web, “Hello World”. Also created some static pages and tested them. The book is easy to follow and teaches you best practices like version control with git and lots of testing.

Chapter 1: Deploy
rails server
Model-View-Controller (MVC)
Version control with Git
Branch, edit, commit, merge
Heroku setup
Heroku commands
Chapter 2: Toy app
Toy model for users
Toy model for microposts
Users resource
MVC in action
Microposts resource
User has_many microposts
Inheritance hierarchies
Deploying the toy app
Chapter 3: Static pages
Generated static pages
Custom static pages
First test
Slightly dynamic pages
Testing titles
Adding page titles
Layouts and embedded Ruby
Setting the root route
Advanced testing setup
-minitest reporters
-Backtrace silencer
-Automated tests with Guard

3rd week – Ruby, Site & Links, User Model

Chapter 4 was on the Ruby language, the material was very dry as I was just interacting with the command line. I didn’t understand all of it, will have to revisit it again. Chapters 5 and 6 were fun, I prefer working on interactive webpages. This book teaches you how to build a Twitter clone. I learnt how to style the website, create links and routes. Then, setup the user model and validations, and test it.

Chapter 4: Ruby
-Strings and methods
-Objects and message passing
-Method definitions
-Arrays and ranges
-Hashes and symbols
Chapter 5: Layout
Site navigation & structure
Bootstrap and custom CSS
Layout links
Rails routes
Layout link tests
Users controller
Chapter 6: Users
User model
Database migrations
User objects
User validations & tests
-Validating presence
-Length validation
-Format validation
-Uniqueness validation
Add secure password
-Hashed password
-User has secure password
-Minimum password standards
Creating and authenticating user

Chapter 7 is going to be tough and Chapter 8 is said to be the hardest one in this book. I’ll be doing both chapters over the next few weeks, wish me luck!

Leave a Reply

Your email address will not be published. Required fields are marked *