The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
A Project Naming Recommendation

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Eric Hodel

Posts: 660
Nickname: drbrain
Registered: Mar, 2006

Eric Hodel is a long-time Rubyist and co-founder of Seattle.rb.
A Project Naming Recommendation Posted: May 20, 2009 5:40 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Eric Hodel.
Original Post: A Project Naming Recommendation
Feed Title: Segment7
Feed URL: http://blog.segment7.net/articles.rss
Feed Description: Posts about and around Ruby, MetaRuby, ruby2c, ZenTest and work at The Robot Co-op.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Eric Hodel
Latest Posts From Segment7

Advertisement

I’ve gone through many different styles of project names, but I think I’ve finally found a naming scheme I like.

In the past, I’ve used class names with uppercase letters, dashed names and underscored names, and I think the underscores are the best for projects I’m packaging in ruby.

Rails solidified the convention of mapping CamelCase class names to underscored file names (class IMAPProcesor is defined in imap_processor.rb). Using underscored gem names makes it easy for people to figure out what file to require (same as the project name) or what class name to look for in ri.

If I have a plugin gem or an extension I’ll tack on the sub-project’s name with a dash. If I wanted to add a new handler for imap_to_rss for Chase bank email, the gem would be named imap_to_rss-chase.

This makes it easy to find in gem list -p and it conveniently namespaces the extension. It also would look nice with gems from github which break up author and project with a dash (drbrain-imap_to_rss-chase, if I used github). As an added bonus, when double-clicking any underscored part OS X only highlights a part of the name making cut-and-paste a little more convenient for picking apart gem names.

Currently almost 95% of gem names start with lowercase letters, 6% contain uppercase letters anywhere in the name, a little over 20% use dashes, 16% use underscore. Sixteen use both underscores and dashes (my favorite name being what_does_this_error_mean-merb).

Read: A Project Naming Recommendation

Topic: Interview: Author David Griffiths Previous Topic   Next Topic Topic: orca_card 1.0

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use