Archive for June, 2007

Rake Has Never Been Easier

Monday, June 11th, 2007

Monkey with a rake

RailsEnvy has posted a long and really excellent article (filled with their trademark wit) on how to use Rake in Ruby on Rails. They give a history of Make and Rake, then walk you through the concepts and steps of creating your own Rake tasks. After their tutorial, you’ll be using Rake all the time. I know I will.

Here are a few of the built-in Rake tasks that might ease some development pain. (A full list is available by typing rake ––tasks from inside the root directory of your Rails application.

  • rake log:clear # Truncates all *.log files in log/ to zero bytes
  • rake tmp:clear # Clear session, cache, and socket files from tmp/
  • rake tmp:cache:clear # Clears all files and directories in tmp/cache
  • rake tmp:pids:clear # Clears all files in tmp/pids
  • rake tmp:sockets:clear # Clears all files in tmp/sockets
  • rake tmp:sessions:clear # Clears all files in tmp/sessions
  • rake db:sessions:clear # Clear the sessions table

Make sure you check out the links at the bottom of their article to see some of the custom Rake tasks that are already out there just waiting for you to take advantage of them.

PHP Abstract: Episodes 1 & 2

Monday, June 11th, 2007

PHP Abstract Logo

The first two episodes of PHP Abstract, a podcast by Zend Technologies for PHP developers, were posted last week.

Future podcasts should come out every Tuesday and Thursday and you can subscribe to their RSS feed.

I won’t blog about every one but I’ll highlight a few or post a summary from time to time.

Classic Pagination R.I.P.

Monday, June 11th, 2007

R.I.P. Classic Pagination

Don’t worry, classic pagination isn’t gone yet. In this case, R.I.P. stands for “rest in plug-in”.

Ryan Daigle has the news: classic pagination has been removed from Edge Rails and, as I mentioned in a previous post, classic pagination will now become a plug-in. If you are currently using Rails version 1.2.3 or earlier, of course you still have it built-in, but the next time you upgrade Rails, it will disappear and you’ll need to remember to download the plug-in (or choose another “flavor” of pagination). If you are the sort to run on Edge Rails, then you’ll need to make the change now.

Music for Coders: June 8

Friday, June 8th, 2007

One of the things I’ve realized since I started blogging is that I won’t be able to write long posts about music every week. Every now and then I may have time to pull it off, but most weeks I’ll have to be content with a quick review of the week’s highlights.

This week, I’ll look at new releases, new to iTunes releases, explain how iTunes made me miss some good music, and even give some links to free downloads.

(more…)

Rails Testing Primer

Friday, June 8th, 2007

Every programmer is familiar with some kind of testing. You click on your application or web pages to see if it does what you expect. You fill out your forms with fake data and see if it gets stored successfully in the database. But that type of testing becomes a tedious and repetitive task. You know who is really good at tedious and repetitive tasks? Computers. That’s why it’s much better to program tests the computer can perform for you and save yourself all that clicking. When it comes to testing, computers are faster, more accurate, more comprehensive and don’t complain nearly as much. And Ruby on Rails makes testing easy to add to any project.

Gregory Brown at O’Reilly has just posted a primer, “Rails Testing: Not Just for the Paranoid”, on implementing testing (Unit, Functional, and Integration) in Ruby on Rails.

If you are looking for more on testing, the Rails manual also gives a good guide to testing in Chapter 9 and nubyonrails.com has a Testing Cheat Sheet that’s helpful for remembering the testing syntax.

Railscasts: Conditional Validations

Thursday, June 7th, 2007

Railscasts has posted a free screencast on conditional validations in Ruby on Rails: “By default, validations will take place every time the model is saved. Sometimes you only want a validation to happen when certain conditions are met. See how to do that in this episode.”

Movable Type as Open Source

Wednesday, June 6th, 2007

Movable Type Logo

Six Apart, the developers of the popular, blogging-application Movable Type, are developing an open source version of Movable Type alongside their commercial offering.

Why go open source, especially if there will still be a commercial version?

“It’s simple: our customers and our community have asked for an open source version of Movable Type. Many customers and developers in the Movable Type community were looking for a version of Movable Type that they were free to modify for their own needs. Additionally, there are community members who are looking to bundle an open source distribution of Movable Type with other open source products. We have been considering this option for some time but decided to base MTOS on the MT4 line, which is why this announcement coincides with MT4.”

This week they launched a website to support the Movable Type Open Source Project (or MTOS Project) and the first open source distribution should be available for download in late summer.

Movable Type is written in Perl, which is not something I usually blog, but I think it’s interesting to watch companies adopt open source as part of their commercial strategy.

Update: Carthik Sharma made an interesting post on this announcement from the WordPress perspective. (WordPress is Movable Type’s competitor.) Sharma thinks it may be an attempt to pull back customers who have switched to free and open source tools and that it may be too little, too late.

Ask Again

Wednesday, June 6th, 2007

Ask.com Logo

This week Ask.com got a new, minimalist user interface that includes search in eight different categories including blogs, video and maps. It borrows from what Google does so well but Ask.com search pages include peripheral results grouped by category (so that web searches for text also show related images, video, music, etc. off to the sides) as well as suggested ways to narrow a search further.

While the clean interface is winning a fair amount of praise, the Ask.com search engine is generating bad press for being slow to return results. In the long term, that seems like a fixable problem. Overall, I think it’s an impressive rewrite with quite a bit of future potential. It’s a good lesson in how a languishing competitor can rally unexpectedly, and on the importance of good UI design.

07/06/05 04:03:02

Tuesday, June 5th, 2007

Today, June 5, 2007 at 2 seconds after 4:03 AM, the date and time could be written “07/06/05 04:03:02″. Last month, there was a similar number progression, if you invert the sequence: 12:34 on 5/6/07. According to Wikipedia, these date/time “alignments” are called sequential time.

Apple Updates MacBook Pro

Tuesday, June 5th, 2007

MacBook Pro

Apple updated its MacBook Pro notebooks today with the latest Intel Core 2 Duo processors (Santa Rosa), more memory, and improved graphics cards. The 15-inch models also get LED-backlit displays, while the 17-inch models get an optional high-resolution display.

I’m almost certainly going to get one of the faster 15-inch models and retire my aging 15-inch PowerBook G4. I’m only waiting for: a) WWDC next week to make sure there’s no other surprises, b) early adopters to post feedback.