We’ve been offering a video version of The Playbook for some time, and now we’re happy to announce the evolution of that concept, the new Playbook Workshop.
This workshop is the real-time, expanded version of The Playbook. We’ll start with the video lessons and then work together on practical examples and your own real ideas. We will go through an example of building an actual application and we’ll explore all of the pieces of the web design and development process, including the tools and team.
The first session of this new workshop runs from April 8th to the 19th, and is available for registration individually for $499, or you can subscribe to Learn Prime, to get access to this workshop, and all our other workshops, books, and screencasts for just $99/month.
Learn more and register today. I hope to see you in the workshop!
This February 6th we are launching a new workshop: Advanced Rails. The workshop draws content from the Scaling Rails and Rails Antipatterns workshops, replacing them and creating best-of-breed content that will take your skill to the next level in creating well-crafted Rails applications that scale.
One of the topics we touch on is profiling and benchmarking your app. There are a number of tools available to achieve this, one of which is baked into Rails itself. Although we do discuss all of the great ways you can perform caching in a Rails app, experience has shown us that caching should be your last resource in your scaling strategy. Remember the two hardest things in computer science: Cache invalidation, naming things and off-by-one errors.
On to benchmarking, say you have identified an expensive method in one of your models that needs to be tuned. One easy and straight-forward way to measure your refactored process is to use the built in benchmarker to run quick tests. To get set up, you need to add the
ruby-prof gem to your Gemfile, and have a properly patched ruby interpreter. I’m using the gcdata patch for MRI 1.9.2:
rvm install 1.9.2-p180 --patch gcdata --name gcdata
Now let’s assume the following expensive method in the Account class:
class Account def self.expensive_method sleep(1) end end
We can now run a quick benchmark on that method by running it 10 times and taking some benchmarking measurements:
bundle exec rails benchmarker --runs 10 'Account.expensive_method' Loaded suite script/rails Started BenchmarkerTest#test_10 (0 ms warmup) wall_time: 0 ms memory: 0 Bytes objects: 0 gc_runs: 0 gc_time: 0 ms BenchmarkerTest#test_user_expensive_method (1.10 sec warmup) wall_time: 1.00 sec memory: 0 Bytes objects: 0 gc_runs: 0 gc_time: 0 ms Finished in 24.933979 seconds.
You can even run a profiler with
rails profiler 'Account.expensive_method' 10 flat and get more information on what’s being called and which components in your system are taking longer.
With this quick benchmark, you can now create a second, hopefully optimized,
Account.expensive_method_fast and run them side-by-side, allowing you to quickly measure two implementations of the same behavior, and allowing you to quickly iterate to find the best solution.
This is just the tip of the iceberg. If you have some Rails experience and want to take it to the next level to grow your app into a well-factored and scalable system, check out our new Advanced Rails workshop.
We’ve received a lot of positive feedback from our re-worked Intro to Ruby and Rails workshop but attendees have been asking about an intermediate course to follow up with. Today we’ve scheduled our first Intermediate Ruby on Rails workshop for December 12-13.
The workshop has been designed for developers who are currently familiar with Ruby and have built a few small Rails applications, but would like to focus on topics such as advanced associations, complex routing, and unit testing. The course will be entirely hands on and will have each student working with a partner to develop an application from start to finish.
We’re excited to offer this new workshop and look forward to seeing you there. If you have any other questions about this workshop contact firstname.lastname@example.org or visit workshops.thoughtbot.com and talk to one of us live.
We’ve got a full schedule of awesome workshops running in the next few months, including a few special offerings.
Chad Pytel will be teaching a new workshop aimed at experienced developers on Rails Antipatterns, following up on the Rails Antipatterns book that he wrote with Tammer Saleh. The workshop will run first in our Boston office on June 6 and 7, and then again a week later at the Engine Yard office in San Francisco. A big thanks to the folks at Engine Yard for helping to make this workshop a reality.
Another workshop aimed at experienced developers is our Scaling Rails workshop. We’ll be covering architecture, front-end performance, making SQL fast, background processes, caching, load testing, and debugging. In other words, how to make your app go “vrrrrroooom!” If you’re interested in attending this workshop, fill our your email address on the workshop page and we’ll notify you when we schedule a date.
We’ll also be running an Intro to iOS workshop on June 20 & 21. It will be taught by Marshall Huss — winner of the the 2009 Railsconf Poker Tournament — from Two Guys, who we previously teamed up with to bring the iOS notifer to Hoptoad. We contacted Marshall because we wanted internal iOS training for developers at thoughtbot. That conversation led to us opening the workshop to others who want top quality training.
June will also see our next session of Design for Developers on June 13 and 14. The feedback we received from the first two sessions was that students wanted more time in class to learn and work on their projects. In response, we’re now running this workshop for two full days, from 9am to 5pm.
We hope to see you at one of our workshops soon!