The Common Threads Through AntiPatterns »
Created at: 24.05.2011 23:30, source: Engine Yard Blog, tagged: Tips & Tricks training Engine Yard University rails antipatterns training
For a few years, I’ve been developing content and giving talks on the theme of Rails best practices. This work came together under the name Rails AntiPatterns in the form of a book, a recent podcast and webinar, and some upcoming workshops in Boston and San Francisco.
Throughout these activities, some common themes have emerged.
- Read up on good OO practices
- Work on real software
- Work with a team that cares about craftsmanship
- Follow the Rails commit feed
- Upgrade to latest Rails quickly
Many Rails AntiPatterns can be avoided by following techniques that have been around for a long time
Last week at RailsConf there were at least three talks that mentioned SOLID prominently, as well as other principles of clean code and object oriented programming techniques. This is great to see. Ruby is a great OO programming language and by following well-proven principles you can keep your code clean and well-factored. I think it’s actually refreshing to realize that what we’re doing here isn’t particularly new or special and that there are proven techniques, learning materials, and important thought leaders we can fall back on to ensure the quality of our code and our applications. There is lots of good stuff out there on principles of object oriented design, refactoring, and clean code, but here is some good reading and watching.- Clean Code
- This is the post that introduced the grouping of concepts behind SOLID The Principles of OOD
- Here is a video about applying SOLID in Ruby SOLID Object-Oriented Design
Many Rails AntiPatterns stem from unfamiliarity with Ruby on Rails
Being the popular new kid on the block, it was inevitable that Rails receive an influx of developers from other languages and frameworks. Each of these developers brings with them the techniques, both good and bad that they’ve learned from their past experiences working with other tools. This leads to either things being done just plain wrong, such as violations in MVC, or things being more subtly just not the “Rails Way”, such as making certain things, like modeling, overly complex. The two best fixes for this that I’ve found are continued practice with Rails, and working on real software with a team of other developers that care about quality and craftsmanship. Working together, you can help each other identify improvements to your code via lightweight code reviews or Campfire discussions. An extension of this problem is not keeping up with the changes in Rails itself. With each version of Rails new features are added and existing features are refined. If you’re not keeping up with these you’re likely writing more or worse code than you need to. Combat this problem by becoming and staying invested in the framework you use. If at all possible, follow along with the Rails changelog RSS, even if its only something you skim. More importantly, keep your application on the current version of Rails and upgrade as soon as possible after a new version comes out and someone writes an “upgrade gotchas” post for this version. Once you’ve upgraded, make sure you’re refactoring your code to take advantage of new features and syntax changes. There are other important maintenance benefits to this too, so making the business case for the time shouldn’t be difficult. This is particularly relevant with Rails 3.1 coming out soon. If you haven’t upgraded your application to Rails 3 yet, that means you’re going to be two important versions behind once 3.1 is released. Some gem and plugin authors have already started to drop support for Rails 2.x, once 3.1 comes out I think you can expect the number of gems to drop support for Rails 2.x to increase dramatically.The Rails AntiPatterns Workshop
In the Rails AntiPatterns workshops we’re going to sit down with your real code and we’re going to identify problems and work on fixes as a group. In doing so I expect that we’re going to touch upon these common threads repeatedly, and we’re going to call upon proven object oriented design techniques to help improve our code. The class sizes are small so we’re going to be able to work directly with each other and get some real quality time together. I hope you’ll join me.more »
Rails AntiPatterns: The Course »
Created at: 16.05.2011 20:25, source: Engine Yard Blog, tagged: events training Engine Yard University rails antipatterns
Next month, Engine Yard University and thoughtbot are launching Rails AntiPatterns training, an instructor led course based on the book by Chad Pytel and Tammer Saleh. The course is for Rails programmers who want to identify, address and discuss some common Rails development pitfalls. It is an advanced class, and assumes at least a few months of Rails programming experience. To get a sense for the course, check out the Rails AntiPatterns Open Session webinar from last week in the embedded video below. While the hour long webinar session was more impromptu than the written course curriculum, the themes are consistent with what you will learn over the course of this two day instructor led training.
Rails Antipatterns - Open Session with Chad Pytel from Engine Yard on Vimeo.
For Rails programmers who want to take their expertise to the next level, please attend Rails AntiPatterns! The Boston session is on June 6th, and the San Francisco session, on June 13th. Signup here. Note: Scholarships and group discounts can be requested at training (at) engineyard (dot) com. We hope to see you next month!more »
Engine Yard Cloud Out Loud S01E02: Tammer Saleh »
Created at: 18.12.2010 03:27, source: Engine Yard Blog, tagged: Uncategorized podcast rails antipatterns shoulda tammer saleh Test Driven Development
If you thought we couldn't do any better than Dr. Nic, you need to listen to our interview with Tammer Saleh. Tammer was one of the Runner Ups for the top ten sexiest geeks of 2010. Who could be more attractive than this guy? Stay tuned to see if he makes the list for 2011...
Tammer's Interview
Engine Yard Cloud Out Loud
In this podcast, Josh Hamilton talks with Tammer about Test Driven Development and Rails AntiPatterns, the new book he co-authored with Chad Pytel. If you're interested in checking out the book, you're in luck. As Randall mentioned in his R(*)TFM post, we've worked out a 35% discount for you all. To snag the discount, purchase the print or ebook here using coupon code ANTIPATTERNS at checkout.
Since folks seem excited about Rails AntiPatterns, we got a hold of a couple more to giveaway. If you want one, we're giving some away on Twitter. To win a free book:
# Follow @engineyard on Twitter
# Retweet our original tweet linking to this post
# Tweet why you *need* this book (creativity and humor encouraged) using hashtags #engineyard #R(*)TFM
We'll DM winners early next week. Good luck and enjoy!
more »
