All posts tagged ‘ruby’

File Under: Programming

Development Tips to Improve Your Code Quality

quality you can taste

Any good programmer can tell you writing code is an art form, and as with most art forms, the key to success is good habits and lots of practice.

The Ruby Learning blog recently posted an interesting list of ways to improve your code quality and, perhaps more importantly, develop habits that will lead to better code creation. Developer James Schorr’s tips range from the obvious, like using a good version control system, to the more subtle: “realize that just because we “can” doesn’t mean that we “should”… anything’s possible, but not everything’s advisable.”

The article is broken into the three major parts of any programming workflow: pre-development, development and post-development. There are a number of great suggestions in each, but our favorite parts are the fourth category: Enjoying Your Development. Almost any project is fun and enjoyable in the beginning, but then there seems to come that point at which the fun evaporates and we get bogged down in the grunt work of writing code. Schorr has few tips to help break you out of those boring stretches:

Give yourself time to think and rest. There are some days where I just can’t write code well; other days where it’s just flowing. This is due to how your brain functions. You need sleep and a change of pace and scenery now and then.

Walk away for a while. It’s easy to get “tunnel vision” and think that you’re close to solving a problem and to think that more effort will solve it… You would be surprised at the ideas or solutions that will spring into your mind as you are thinking about or doing other things.

Head over to the Ruby Learning blog to read some of the other helpful tips and tricks for producing quality code.

Photo: Christian Hellman/Flickr/CC

See Also:

File Under: Frameworks, Programming

Ruby on Rails Steams Ahead With 3.0 Release

It’s been two years in the making, but Ruby on Rails 3.0 is finally here. You can grab the third generation of the popular web framework from the official website, or update via the command line with: gem install rails --version 3.0.0

Rails 3 is a major overhaul for the framework and merges the Rails and Merb frameworks to create a single lightweight code base for web applications written in Ruby.

The goal for this release was to make Ruby on Rails faster and more modular. Developers can now mix and match libraries, swapping out their favorites for Rails’ default choices.

If you’d like to know what’s new, what’s changed and why you might want to upgrade to Rails 3.0, head over to the Ruby on Rails screencast page, which has videos covering the biggest changes in the new release, as well as a number of smaller, but very useful new features.

See Also:

File Under: Uncategorized

Rails 2.1 Has Been Released

The latest version of the popular web framework, long awaited in some circles, is now available, half a year or so after 2.0.

Significant new features include built-in handling of time zones; improvements to caching; named_scope functionality in ActiveRecord, and more.

It’s neatly synchronized with the release of Ruby 1.8.7, which includes support for SSL/TLS, experimental provision for passing a block to a proc, and quite a bit more.

See Also: