Rails for Zombies »

Created at: 18.11.2010 21:01, source: Riding Rails - home, tagged: Activism Launches

This morning my team over at Envy Labs released a free online tutorial called Rails for Zombies. The website combines screencasts with in-browser coding to provide an interactive learning experience teaching the basics of Ruby on Rails.

Rails for Zombies

Learning Rails for the first time should be fun, and Rails for Zombies allows you to get your feet wet without any setup or configuration. At the moment the application has five episodes. Each episode consists of a single screencast followed by a group of exercises which must be completed before moving forward. Once you complete all the labs, you unlock a hidden video which shows you where to go to continue your Rails learning.

If you have any friends who need to get started with Rails, hopefully this will help.


more »

Rails Has Great Documentation »

Created at: 28.08.2010 21:08, source: Riding Rails - home, tagged: Activism Documentation Documentation Rails 3 Rails 3

To this day I still hear people complain that Rails has poor documentation. From where I’m sitting this seems far from the truth. Let me lay out the evidence piece by piece:

RailsTutorial.org

To learn Rails from scratch Michael Hartl recently finished his book Ruby on Rails Tutorial: Learn Rails by Example. The book teaches Rails 3 from the ground up and it’s available for FREE online. If you’d rather have a PDF or a book you can grab that as well (and he’s even working on some screencasts).

The source for the finalized book will be pushed to GitHub and released under a Creative Commons License shortly after Rails 3 is done. If you’d like to help translate the book to your language of choice, feel free to contact Michael and he’ll get in touch when it’s time to make it happen.

Rails Guides

If you’re not a Rails newbie don’t forget about the Rails Guides, which have been updated for Rails 3.

Rails API Docs

There are two main websites I use to do API lookups. The first is Rails Searchable API Doc, which has online and offline searchable documentation. The second is APIdock which is online only, but has the ability to comment and easily compare different versions of documentation.

Rails 3 Free Screencasts

If you’re more of a visual learner (like me) then there are plenty of free screencasts to teach you about Rails 3. About 2 months ago I produced the Rails 3 Screencasts, which will get you started.

Ryan Bates has also produced an incredible amount of Rails 3 screencasts over on Railscasts.com. Ryan has been producing Railscasts for over 3 1/2 years, isn’t that crazy?

There’s also a few good free screencasts over on Teach me to Code by Charles Max Wood.

Keeping on the Edge

If you find yourself wondering how to keep up with all of the newest features / libraries for Rails 3, both the Ruby5 Podcast and the Ruby Show are going strong. Don’t listen to audio? It doesn’t matter, just subscribe to the Ruby5 RSS feed and get links with descriptions to all the newest libraries, tutorials, and more. You might also want to checkout Peter Cooper’s new Ruby Weekly, a Ruby email newsletter.

Need to upgrade a big app to Rails 3?

Jeremy McAnally’s Rails 3 Upgrade Handbook PDF is just $12. There’s also a few paid screencasts for the upgrade over on Thinkcode.tv and BDDCasts.

Need a Book?

There’s a bunch of books that will be coming out after the release, most of which you can start reading now. The Rails 3 Way by Obie Fernandez, Rails 3 In Action by Ryan Bigg and Yehuda Katz, Beginning Rails by Cloves Carneiro Jr and Rida Al Barazi, and of course the Agile Web Development with Rails:fourth edition by Sam Ruby, Dave Thomas, and David Heinemeier Hansson.

In conclusion

No more complaining about lack of good documentation! Seriously. If you want even more Rails 3 content, check out the blog post by Kevin Faustino on 34 Ruby on Rails 3 resources to get you started.


more »

Community Highlights »

Created at: 03.05.2010 19:10, source: Riding Rails - home, tagged: Activism

It’s that time again, to summarize a few interesting Rails links to highlight some of the best of the community. All of these were initially covered on the Ruby5 Podcast, the twice weekly Ruby newscast.

Rails 3 Content

The next Rails3 Bugmash is taking place May 15th and 16th. If you’ve never contributed to Rails, this is your chance to give back a little and do your part to make Rails 3 the best version ever.

To get a complete picture of routes in Rails 3, Rizwan Reza covered it best in an article over on the Engine Yard blog. If you dig the Engine Yard Rails 3 content, they recently created Rails Dispatch, where they have articles and screencasts published weekly.

Alex Maccaw recently used the Rails 3 ActiveModel abstraction to build an ActiveRecord-like in-memory database called Supermodel. You get all of the ActiveRecord goodness, such as validations, callbacks, and observers, but with none of that database headache.

As you may already know, the arel library from Rails 3 gives us a great new syntax for creating queries. Under the covers, arel converts your where conditions into sql is by using something called a PredicateBuilder. Ernie Miller recently put out a plugin called MetaWhere that takes advantage of these PredicateBuilders to give arel even more functionality.

Lastly, if it’s still not clear to you how awesome bundler is, go read Yehuda’s recent post on the topic.

Authorization

Do you ever find the need to access current_user in your models? This is often required when you’re logging model/table changes on a per user basis. There are many hacks to accomplish this, but David Bock has a gem called SentientUser which does this a little cleaner.

Once your websites goes big and you start to worry about malicious user attacks, you may want to take a look at Arto Bendiken and Brendon Murphy’s Rack::Throttle Middleware. Throttle does just want you think it does, allowing you to limit the number of requests a user can ping your site (per second).

Lastly, Ryan Bates released version 1.1 of CanCan, his authorization and permission library that allows you to restrict what your users can do throughout your application.

Service Libraries

You may have heard that the Facbook API is now adopting OAuth2. If you’re ready to jump in, Michael Bleigh released the OAuth2 gem just last week.

Rails makes a great RESTful backend for iPhone applications, and recently Anthony Moralez created APN_on_rails which makes it super easy to do Apple Push Notifications.

There’s no need to reinvent the wheel if your Rails application needs e-commerce, this is where the Spree gem comes in, which recently hit version 0.10.0, containing a bunch of new features.

Testing

Does your Rails application have a monster testing library that takes forever to run? Then it may be time to take a look at Hydra by Nick Gauthier, a distributed testing framework which allows you to run your tests in parallel locally or across remote servers.

Some people think cucumber can be too verbose for integration tests (which clients may never read). If you think cucumber is for vegetarians, then perhaps it’s time to taste some Steak by Luismi Cavalle. Steak is a small library which helps you generate quick and clean acceptance/integration tests using RSpec.

Talking about RSpec, there are some new conventions out there to clean up your old RSpec code. If you haven’t started using “Let”, then it may be time to look through a few of Jon Larkowski’s slides.

Additional Useful Libraries

If you ever find yourself with odd memory issues then it’s probably time to use memprof.com, a new web service by Joe Damato and Ruby Hero Aman Gupta. Memprof allows you to collect memory usage information from a Ruby process and immediately upload and view it using an intuitive web interface.

Rails applications are often full of forms, and sometimes you even need to give your clients the ability to create different types of forms or surveys. This is where the Census gem comes in, providing an admin interface for creating forms, and even the ability to search through the results.

To wrap things up, delayed_job recently hit 2.0, and you’ll want to upgrade if you have an older version. The new version has some performance improvements and adds support for non-ActiveRecord ORMs.

Additional Content

To keep track of Ruby conferences check out Ruby There, a listing of all the upcoming conferences and even when the Call for Proposals are due.

For more news and libraries check out the Ruby5 podcast. If you don’t usually listen to audio, you can just subscribe to the RSS feed which contains a summary of everything covered.

If you have any stories/libraries you’d like to spread the word about, feel free to email ruby5@envylabs.com and we’ll at least get you covered on the podcast. Thanks!

Image Credit: Blue Sky on Rails by ecstaticist, Analog Solutions 606 Mod by Formication, Rainbow by One Good Bumblebee. Orange County Security by henning, remember by tochis, Darwin Was Right About Media Players! by Neeku, remote controls by redjar.


more »

Ruby Hero Awards 2010 »

Created at: 30.03.2010 14:41, source: Riding Rails - home, tagged: Activism Awards Ruby Heroes

Ruby Heroes

It’s that time again to take a moment to think about those people who have impacted Ruby community but have not received the recognition they deserve. We have given away twelve awards in the past two years at Railsconf, and this year we are preparing to give away six more.

But we need your help.

So, if you know someone who has contributed to our community this year please take a moment to show some gratitude by nominating them on RubyHeroes.com. A month from now the Ruby Heroes from last year will look at the nominations and decide who should receive the awards (this way there’s no popularity contest). However, your nominations do matter, so please take a moment and spread the gratitude.

The winners will be announced live on stage at Railsconf 2010, and posted here shortly there after.


more »

Rails and the Enterprise »

Created at: 24.03.2010 20:00, source: Riding Rails - home, tagged: Activism enterprise

If you have been in the Rails community for a little while, you have more than likely noticed the love/hate relationship that is entertained by the community vis-à-vis the Enterprise. Some people hate the enterprise and publicly tell it to go f*ck itself (49:39), on the other hand, these same people are also proud to mention that some major players in the industry use Ruby and Rails.

The truth is that even though Ruby and Rails could still be more Enterprise ready, it is already a great combo that big corporations can start using today, and lots of then already do! Let's look at the state of Rails and the Enterprise.

So where are we at?

  • First things first, Rails was not designed for the enterprise or for the enterprise's needs. It was extracted from a successful startup project and has grown with the contribution of people using Rails daily. But Rails is also based on Ruby which became very popular and started to be used in different places, including NASA, for instance.
  • 37signals still does NOT need "Enterprise features" and therefore don't expect any 37signals engineers to write an Oracle Adapter or a SOAP layer for ActiveResource and push for their adoption.
  • Rails is far more than a framework used by 37signals. It is an Open Source project with code being contributed daily by people on other projects. Most of the code does not directly benefit 37signals.
  • The Enterprise is evolving: economic crisis, a new generation of developers, new management, insane deadlines. Ruby and Rails have quickly become very attractive for the Enterprise and having big companies acting as startups is often something a lot of managers dream of. As a matter of fact, here is a quote from Sony Computer Entertainment America's President & CEO, Jack Tretton: "Be like a multi-billion dollar company on the outside, and act like a startup on the inside". This change has taken a while because the Enterprise is a big mammoth (or insert another of your favorite gigantic, slow-starting animal here), but it's happening.
  • Communication with/in big companies is not as straight forward as when dealing with startups who need/thrive for the outside attention and who don't have all the red tape of a PR department, etc. Here is a simple example: I work for Sony Playstation. My job description mentioned Redis, MongoDB, EventMachine and many other technologies I did not know Sony was using in production. I did not realize that my default production stack would be built on Ruby 1.9. Communicating when you're a part of a big company is more challenging than when you are a team of 5 engineers working on a cool project, and therefore a lot of people don't know what technologies are being used by Company X or Company Y.
  • Rails is used by lots of big companies. It might not be obvious and you might have to look at the job offers but people like AT&T, Sony and many others are always looking for talented Ruby developers. And, even though Java and .NET are still ruling the Enterprise kingdom, dynamic languages are slowly but surely catching up. Rubyists are climbing the social ladder and are now in positions to push the language they love.

Understanding the Enterprise's needs

It's kind of hard to define "the Enterprise's needs", however I can testify that the needs and requirements of a so called "Enterprise app" are slightly different than those encountered when you work on a startup app. What the Enterprise needs/wants:
  • reliability
  • support
  • performance
  • advantage over the competition
  • integration and transition path

Reliability

I think that it was proven many many times that Rails scales and can be very reliable as long as you know what you are doing. We are not talking anymore about a buzz framework that just got realized and that cool kids play with but rather, a stable platform used by some of the most popular web applications out there.

Support

This point is something the Rails community can be proud of. We have lots of forums, blogs, books, local meetings, conferences... Yes, Rails is OpenSource and you can't buy yearly support from the core team but you will find all the help you need out there. (If you can't, feel free to contact me and I'll direct you to people who can help, and if you are new to Rails, take a look at http://railsbridge.org/)

Performance

Based on my own experience, the level of performance we have using Ruby and Rails is more than enough for the Enterprise world. This is especially true with Ruby 1.9 greatly improving performance and Rails3 optimizations. If you really need part of your code to run as fast as C code, writing a C extension for Ruby is actually quite easy and will solve your speed issues.

Advantage over the competition

Rails comes with certain ways to do things, conventions that will get you up and running in much less time. Ruby as a language is natural, intuitive and easy to maintain. By choosing the right tools for your project, you will definitely be able to get more done in less time and increase your business value faster. Let's not forget the strong value of testing in the community that will push your team to write tested code and more than likely improve the overall code quality of your products.

Integration and transition path

This is probably the part that is the most challenging when you live in the Enterprise and look into using Ruby & Rails. I was recently talking to someone from Google who used to do a lot of Ruby before joining the Mountain View-based company. We were talking about how he loves Ruby but had such a hard time integrating with existing Enterprise solutions. He mentioned how he got frustrated by the lack of great XML tools, bad/complicated SOAP libraries and a few others I can't remember. The truth is that when my friend was using Ruby this all was true. REXML and soap4r are useful but might not perform that well. Luckily as the community has grown, new tools have come up and today Nokogiri (developed and maintained by AT&T engineer's Aaron Patterson) can easily be used instead of REXML and many libraries are known to be better than soap4r such as savon, handsoap and others. The other good news is that major IT companies such as Apple, Microsoft and Sun(RIP) have adopted Ruby and you can now write your code in Ruby and use native libraries from other languages such as Java, .NET or Objective-C. The transition path can be done smoothly without having to commit to a total rewrite.

Database-wise, Oracle is still a viable option for Rails developers thanks to the Oracle ActiveRecord adapter (by R.Simanovskis). Note that your DBA might curse you for not doing optimized queries using bind variables and all the Oracle Magic spells, in which case you can use Sequel, a great ORM supporting Oracle, and some of its unique features.

Deployment-wise, you can deploy on IIS, Tomcat, Glassfish, Apache, Nginx, or almost anything mainstream you are already using. Using Passenger, deployment is as easy as deploying a PHP app and you also get a series of great tools such as Capistrano, Vlad etc...

So basically, thanks to passionate Rubyists working 'for the man' such as Aaron Patterson, Raimonds Simanovskis and others, using Ruby in the Enterprise is much much easier. Ruby and Rails were not initially designed with the Enterprise in mind but with time, the integration has become smoother and both parties can now enjoy reciprocal benefits.


more »