Finding yourself walking through code with a debugger means it's probably time to take a step back and rethink.
Object oriented programming is supposed to make this easier.
While following the Model View Controller approach has made your code cleaner, and following conventions have reduced the need for documentation, there’s still plenty of room for improvement and too much time needed to instruct new developers. MVC was meant for reflecting the end user’s mental model but it still makes it too easy to hide the intentions of your program in your code.
“Your ability to reason about your program is critical to debugging” — Rich Hickey, Creator of the Clojure programming language.
Sending developers to read docs, wikis and tests just to understand your system is a time-consuming and oft-ignored task. Ruby code should be readable!
If there was a way to write code that un-complicated the logic and put it in plain view, that would make things so much clearer. If you could write the business use cases in easy to read Ruby code, you’d be programming with a smile every day knowing all your effort is right where it needs to be.
“His book is one of the three or so most influential Ruby books I've yet read, and easily in the Top Ten for my career.” — Jeff Dickey
“I have not come across such a revelatory approach to things since first learning OOP.” — Mike Pence, Owner at Hayduke Labs, LLC
Make your code more obvious and put the logic right where you expect it; read “Clean Ruby” and enhance your MVC design with DCI.
Data, Context, and Interaction (DCI), was created by Trygve Reenskaug (whom you may know as the creator of MVC) to make your code read the way it behaves. Pull everything out of its hiding place with “Clean Ruby” and learn how using the DCI paradigm means readable code and a super fast learning curve for your newest team members.
“The purpose of DCI is to produce code that a person can read and understand and so reason about its correctness” — Trygve Reenskaug
With this and following East-oriented Code principles you'll push responsibility into the right objects. Use it to restrict the use of if statements which reproduce like cracks in a windshield.
And with that you’ll have a team that understands the business needs better than ever leading to better code, fewer bugs, lower costs, and happier customers.
“Your approach to DCI is the most actionable, most practical explanation I’ve seen so far.” — Jeremy Weiland, Owner of 6th Density LLC
“Clean Ruby from Jim Gay will change the way you design your Rails apps.” — Hector Sansores
Grab a copy and get:
Save hours of time avoiding reading through blog posts and documentation by getting the book and these additional PDF resources for only $99
“Clean Ruby by Jim Gay is the most engaging and fun tech book I've read all year.” — David Brady
“I always get so frustrated trying to dig through a project (new or old, right?), and trying to trace the flow of execution and how things fit together. This made me think of a project I worked on a few years back (which thankfully had a substantial logging capability) where I wrote a little perl script that would parse logs files and show how things were linked together. It was a very popular utility with the other devs and I was always curious, 1) why no one had written something like it before me; and 2) why the code wasn't just organized differently.” — Anthony Burton
Or get just the ebook to:
Get just the ebook of Clean Ruby for less than the cost of an hour’s worth of your time for only $49 in PDF, ePub, and mobi.
Jim is author of Ruby DSL Handbook, the Lead Developer for Radiant CMS and is a prolific contributor to it and many open-source projects. At Saturn Flyer LLC he’s built numerous Radiant sites, custom applications, and award winning graphic design and has had his designs published in HOW Magazine and The Best of LogoLounge. He’s been a co-host of the Ruby 5 podcast, speaker at RubyConf 2013, RubyConf 2014, Ruby Kaigi, Wroclove.rb, ArrrrCamp, and RubyNation, co-founder of Arlington Ruby and has been professionally building Ruby and Rails applications since 2006.
“I wish I were living inside Jim Gay's codebase” —Pat Shaughnessy
“I’ve seen Jim present on this topic and he’s at the forefront of applying this approach to Rails projects. I’m eagerly looking forward to reading his book.” — Avdi Grimm, Author of “Exceptional Ruby” and “Objects on Rails”
“Clean Ruby, by Jim Gay, is one of the few programming books that caught my attention like this. Very well written, a perfect flow.” — Alexandre Oliveira
“Jim is one of those rare people who can crank out award winning site designs, go and implement the backend Rails functionality, and be lead engineer for his project team… all on one project. I’ve seen him do it.
Jim is someone to watch out for, and get on your project if you can. (Especially with his upcoming book, which I think will rock the Ruby on Rails world a little bit, changing how the community thinks about large/complex Rails codebases.).“ — Ryan Wilcox, Owner, Principal Engineer at Wilcox Development Solutions and former co-worker
“It’s awesome that Jim Gay wrote a book about Ruby and DCI. Finally a book about full OOP and Ruby.” — Andrzej Krzywda, Founder gameboxed.com
“Your book helps me raise my game.” — Jim Finucane
“The current version of Clean Ruby is a great start on a critical topic. Learning how to keep code clear and understandable is useful for any kind of project. I’ve already applied a couple of ideas from the book to keep a project from mumbling in the shadows. I’m excited to see the rest.” — David Richards, Fleet Ventures
Organize code differently. Buy Clean Ruby now