RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 

cbpowell — 8 posts

http://cbpowell.wordpress.com/category/ruby-on-rails/

Chris Powell recently launched the
Ruby Entity-Component Framework (Github link). Entity-Component systems are an alternative to OOP and are extremely attractive for game design. The framework is documented in an 8-part blog series that starts with basic E-C principles and proceeds all the way through creating a basic "lunar lander" type game.
If you use TextMate’s “code snippets” feature to insert commonly-used templates of Ruby code, you’ll be pleased to see that Xcode 4 has a similar facility for MacRuby. It comes pre-populated with a variety of Objective-C snippets, but it’s easy to add your own Ruby snippets.
Continuing my "MacRuby notes series" aimed at Rails programmers adopting MacRuby...

In part 1 I discuss a direct comparison of Core Data and ActiveRecord to help you understand the differences between the two.

In part 2 I dig a little deeper, presenting terminology and sample code to help you understand how Core Data retrieval works. I also give you a tidy singleton class to include in your own MacRuby apps to DRY up Core Data and make using it a LOT simpler.
The MacRuby framework is a fresh and exciting way for us Ruby developers to build native Mac OS X applications. As you work your way through MacRuby's undocumented areas you’ll need to wield a lot of patience and creativity. That’s the price you pay for being on the vanguard of the MacRuby movement.

My traits are representative of many present and future MacRuby developers: Mac user, TextMate fan, Ruby on Rails developer, and former Java & C programmer. I’ve dipped my toe into the MacRuby waters and I’ve learned a few things. So with our commonalities in mind, let me share with you some observations and words of encouragement
A while ago I put together some no-nonsense, cookbook-style instructions for getting Twitter (and it's somewhat cumbersome oauth mechanism) integrated into your Rails application. But the Twitter gem changed some oauth things when it went 1.0, so I have updated my instructions to reflect the new authorization steps.

Read the new post here. (And if you stayed with Twitter 0.9, you can still read the original instructions that apply to you.)
If you run delayed_job as a daemon on a server, you'd probably like to have an init script for automatically starting it at bootup time. Let me share with you my init script for accomplishing this -- and it's even RVM-friendly!
Improving the cosmetics of your Rails application log is really quite easy. Let me show you a simple way to gain timestamping and color-coded severities.
I'd like to share with you the template that I employ for documenting Ruby methods. I like this template because it, like Javadoc, creates a somewhat standard, easily readable comment structure.