snake_case or camelCase?

Vote here

Happy coding, Todd Werth (@twerth)

Articles, News, and Blog Posts

RubyMotion Tips

Today’s tip by Ken Miller (@seriousken):

If you’re overriding a built-in initializer method like initWithFrame, you should always call super or another built-in initializer first, check its value, and then do your setup.  If you don’t, there’s no guarantee your storage has been set up.  It might work fine in the simulator, or even your device, but can cause random crashes in production:

def initWithFrame(frame)
if super
@my_var = stuff()

RubyMotion Apps of the Week

Warning: this is shameless self promotion. It’s true, I have near zero shame.

Updated 11/24/2013 – Temple Wellness & Fitness
“The health and fitness tracker so easy and fun you’ll actually use it.”

iOS Control of the Week

Updated 9 months ago – JMImageCache
Language: ObjectiveC
“JMImageCache is an NSCache based remote-image caching mechanism for iOS projects
There are three states an image can be in: Cached In Memory, Cached On Disk, Not Cached”

Todd – I’ve used this in projects, and it works really well. In your rake file:
app.pods do
pod ‘JMImageCache’

your_image_view.setImageWithURL NSURL.URLWithString(your_url)


RMQ Tips

What is RubyMotionQuery (RMQ) you ask? Check out this video.

Today’s tip by Ken Miller (@seriousken):
If you have a view and want to style it internally, but the view is reused across several different controllers, just create a module and include it in as many stylesheets as you need. That way you have reusable styles that you can still override in each controller if you need to.

One more thing