Ruby Science is a book written by the popular Rails shop, Thougtbot. I had the opportunity to try out their upcase program a few months ago but cancelled it because it wasn't what I was looking for.
I however have recently acquired their Ruby Science book and absolutely love it. If you like myself, are newer to programming, Ruby, or just look for better ways to write your code, then I highly suggest this book.
I began reading this book last Friday and accidentally read the whole thing by Sunday, it was that good. I have usually taken the approach of reading books slowly and pondering on the concepts to really get them but this book was just too good. It might be hard to tell but I am pretty excited about this book.
I did not realize at first but the way this book is written is sort of a choose your own adventure style, where the book is broken up in 3 sections., Code Smells, Solutions, and Principles.
The Code Smell section is full of code that looks like what I would write, good code but bad practices, for example a "Long Method." Methods are meant to be short 3-7 lines and if they are larger they can probably be refactored. This chapter was so eye opening I went back to a pull request I created that Friday morning and made tons of changes and got some pretty awesome comments from my coworkers on my abstraction, little did they know it was because me reading this book.
The second section is on Solutions. You hear a lot of talks and know the buzzwords about writing clean code, but this book really breaks it down to the point where you just get it. There is definitely no fluff and extravagant examples but I really enjoyed this approach in the book. To get an idea of what I am talking about, the book is as straight as the front cover, right to the point of everything.
The final section is on Principles in programming. I learned what the Law of Demeter was because of this section, as well some other really big terms. I have heard of so many of the terms but never really knew their meanings. I actually knew of the Law of Demeter Concept but did not realize what it was called. It's the idea keeping your method calls to one and not chaining method onto to method on to method, i.e. `run.forest.run` .
When I first started this programming journey, I watched a fair bit of conference talks, most that went over my head. I recently was re-watching CatchupConf, specifically Ben Orenstein's talk on Refactoring and found that so many of those concepts explained that I didn't understand, I now understand and even have been using these past 3 months working as a developer.
Here is a sample of the book: Ruby Science
This is my personal blog and journey in learning a new skill, Web Developing. In only 7 months I made a career change into this field by dedicating 25(avg) hours a week in studying Ruby. #All words are my own, except the ones I copy and pasted.
Showing posts with label refactoring. Show all posts
Showing posts with label refactoring. Show all posts
Thursday, October 2, 2014
Thursday, April 3, 2014
Refactoring Rails
I am very pleased with my experience with the Refactoring Rails workshop with @kytrinx. I started overwhelmed and unable to refactor the provided code within 20mins. I was however able to follow along and understand the solution.
I also got some exposure to Sinatra and Minitest which I had no problem understanding. It seems as minitest are the VIM to Ruby test. Most people I talked to to said they use Rspec, but I guess its still good to learn how to read.
The test look no different from ruby classes and methods and simple to read. I might look into doing some more exercises with them down the road. I also need to sign up for exercism.io
I also got some exposure to Sinatra and Minitest which I had no problem understanding. It seems as minitest are the VIM to Ruby test. Most people I talked to to said they use Rspec, but I guess its still good to learn how to read.
The test look no different from ruby classes and methods and simple to read. I might look into doing some more exercises with them down the road. I also need to sign up for exercism.io
Wednesday, April 2, 2014
2 days and no Ruby
For the first time in months, I have not commit a session to git or typed a line of code. The past 2 days I have been focused on getting school work done and traveling to St. Augustine for the Ancient Ruby Conference. I am super stoked today and attending a Refactoring Rails course today, presented by Katrina Owen (exercism.io). Today I will be spending 7+ hours working on specifically Ruby.
Ancient Ruby officially starts tomorrow an I hope network with individuals in the community. Despite me missing 2 days of coding time, I am sure to get 30+ hours of valuable learning.
Stay tuned for notes an tweets.
Subscribe to:
Posts (Atom)
