December 29, 2007 @ 12:09 PM by nap · 2 comments
So I updated this blog from Mephisto 0.7.3 to the latest trunk yesterday and I'm happy to report that the process was 100% painless. Edge has a number of nice nuggets missing from 0.7.x, which is over a year old at this point. In any case, thanks to Rick and the rest of the Mephisto team for the smooth upgrade path. I can't wait for 1.0, which I hear is rumored for a January release ;-).
While I was in the blog tweaking mood I also decided to install the mephisto_feedreader plugin and wired it up to display my shared items from Google Reader. This replaces the static "reading list" that was previously in the sidebar. I scan / read a good number of blogs, probably too many, and I often tag 2-3 things a day on average that I feel are useful / interesting / irreverent. Sharing is good and I have nothing to hide. For great justice!
December 26, 2007 @ 11:51 AM by nap · 1 comment
Happy holidays everybody. In case you haven't heard, Ruby 1.9 was released yesterday. If you're not exhausted from overeating and traveling, I'd encourage you to spend a few minutes taking it for a spin.
Ruby now runs on top of YARV, and these benchmarks indicate that there are some pretty impressive performance increases over 1.8.6. That said, 1.9 is a development release; it's not currently intended for production use and don't expect Mongrel or Rails (or various other gems) to run on it just yet.
For more information, Dave Thomas has written a nice, concise list of pros and cons over on his blog, and Mauricio Fernandez has been maintaining a full list of changes found in 1.9. Enjoy!
December 21, 2007 @ 12:37 PM by nap · 0 comments
Sam released DataMapper 0.2.5 on Wednesday. It includes a bunch of tasty bugfixes before our next leap to 0.3.x. Give it a try if you haven't, I think you'll like it. And if you don't, well, you're... whatever.
One of the changes that I'm particularly fond of is proper method visibility for properties:
class Person < DataMapper::Base
property :ssn, :private => true
property :login, :protected => true
property :name
property :address
has_many :dogs
belongs_to :alien_overlord
end
The private and protected options are really just shortcuts for (:reader => :public, :writer => :private) and (:reader => :public, :writer => :protected), respectively. In most cases you'll want your reader to be public, but if you want to apply the same visibility modifier to both reader and writer, there's an ':accessor' option too. The property visibility is respected for mass assignment, which is a nice natural way to do things imo, unlike the hacky attr_protected stuff in ActiveRecord, which never felt right to me.
In any case, we've also updated the Website and Getting Started page, which was a little out of date. See those links for installation instructions and feel free to pop into the #datamapper channel on IRC, hit up the mailing list, or even leave blog comments here if you have any issues.
Other important changes (see the changelog for a complete list):
MyModel#[] only accepts a primary key now, not an options hash (use first, all)
database.get (equivalent to AR's find_by_id) is approximately 25% faster than before!
- Persistence module added (you no longer have to inherit from DM::Base, although I still prefer this approach)
- You can now set indexes with
:index => true and :index => :unique
- Validatable gem now used for handling validations
December 17, 2007 @ 11:17 PM by nap · 0 comments
Some git goodies, updates to both Rails and Merb, and other stuff this week. Here's the breakdown:
December 17, 2007 @ 10:38 PM by nap · 0 comments
Assaf Arkin is right, and I stand corrected. SimpleDB ain’t RESTful. Hell, it’s not really even GETSful. But it sure sounds nice when they put it in the marketing literature. Sigh.
From Subbu’s blog: “The technology powering SimpleDB is definitely impressive [..] However, as a REST API, it is a disappointment. The API failed (a) to identify resources, and (b) to specify operations on resources in a RESTful way. It uses a single verb GET to create, delete, update, or get data from the store.”
In any case, Assaf whipped up DeHorrible, a Rails proxy that appropriately RESTifies (GETStifies) SimpleDB. lol.
I’m still psyched about the SimpleDB announcement, and looking forward to trying it out, but I really wish Amazon would clean up their supposedly RESTful APIs. Yes, I’m looking at you, Flexible Payments.
Is it really that hard?
December 16, 2007 @ 12:56 PM by nap · 3 comments
So the big web service of the week announcement goes to Amazon, for their AWS SimpleDB hosted service. This should place nicely with EC2, which is an interesting service except for the fact that persistent data across sessions is problematic (every time you boot an EC2 node it's a clean slate).
So what is SimpleDB? It's:
- Built in Erlang (wow, maybe Erlang is worth learning after all, right?)
RESTful(see comments); API returns XML
- Schema-less
- Non-relational
Wait, what? Schema-less? Non-relational? Yup. In case you haven't noticed, there's been a groundswell of interest in this area lately... Perhaps most buzz-worthy is the CouchDB project, which also uses REST for inserts and queries, storing your data in schema-less databases which Amazon confusingly refers to as "domains" (see other differences). CouchDB is pretty neat, and all the cool kids seem to like it. RDDB has similar goals. And then there's DBSlayer, which takes the approach of wrapping a REST API around traditional relational databases (MySQL, etc).
So why the interest in moving away from traditional RDBMS, which have served us well for so many years? Simplicity. Ease of scaling. The emphasis on removing business logic from the database and keeping it in the application, where it belongs. At least, those are the arguments. I'm no expert, but I'm certainly interested. Assaf Arkin summarizes the argument much better than I can, and his article Read Consistency: Dumb Databases, Smart Services should be required reading for anyone who's interested in the future of (dumb) databases on the web. Assaf also has a follow-up article on the merits of CouchDB, specifically. There's a lot to think about here.
Of course, another key value prop with the Amazon service is that it's hosted. By Amazon. They claim it's fast and reliable (they should know a thing or two about that), and it looks to be relatively inexpensive, when you consider that the alternative is clustering your own databases for the same kind of speed and reliability. It'll be interesting to see how this turns out and I'm anxious to play around with it.
All that said, there's no Ruby library wrapper for SimpleDB yet. However, as Chad Fowler notes, there are already three different projects registered with RubyForge. None of them have checked in even a single file as of this writing, but you know that somebody out there is hard at work (hint hint), and I'm sure you'll see it before too long. Alternatively, you can build one yourself.
Me? I've already got too much on my plate this week. And I still have to get that DataMapper cheat sheet done, too.
/me apologizes again
/me goes outside to shovel snow
December 13, 2007 @ 02:02 PM by nap · 1 comment
So, NetBeans 6.0 Final was released a few weeks ago. v6.0 is all about the Ruby love, right out of the box. If you haven't tried it, I implore you to give it a shot. Even if you're not a fan of traditional "heavyweight" IDEs, I think you'll be impressed with what they've done. There's even a slimmed-down Ruby-only version. But sometimes, I must admit, I still miss the power and (relative) simplicity of vim.
I'm in the process of re-reading The Pragmatic Programmer, and was just pawing through the passage on "power editing", in which Dave and Andy suggest that you "choose [one] editor, know it thoroughly, and use it for all editing tasks". For me, that editor is most definitely vim. I've used it for quite some time, it's familiar, I don't even have to think about the keybindings when I'm working in vi, and I'm spoilt by the easy text manipulations that just aren't possible with some fancy graphical editing tools. I use vim for practically everything text-related.
Everything, that is, except writing Java and Ruby code (and a few random tasks that have to be performed in a word processor, sadly). Yep, you read that right. I use vim for sysadmin tasks, hacking quick scripts, editing config files, and even taking notes, but lately I haven't been using it where I'd probably see the single largest productivity boost from it.
Since switching to NetBeans, my comfort level with having all the tools I need in one place has increased dramatically, including things such as easy access to a console, in-IDE debugging, test output, solid class introspection, integrated rdocs, and so on. But I also realize that I've been doing myself a bit of a disservice when in "heavy edit" mode. Fortunately, that's easily fixed, as there's a vi plugin for NetBeans. YES. No idea why I didn't bother to search for something like this before.
So in any case, if you're interested, you can retrieve the NetBeans plugin from the jVi homepage. The file named nbvi-FOR-NB-RC1-1.1.2.x6 is the one you want (as of this writing, anyway). Once you've downloaded the package, you can install it in NetBeans by going to tools => plugins. Choose the downloads tab, click 'add plugins', select the vim core and keybindings plugins, install them, and be happy. Thanks guys, this is so awesome.
Oh and speaking of plugins, here are a few other helpful Ruby-related plugins for NetBeans that you may be interested in. Most of them are available through the plugins browser built into the IDE.
- Rspec Support (nice!)
- Ruby dark pastels color scheme (hrmm looks familiar...)
- HAML and SASS plugin (if that's the way you roll)
- Extra Source Code Hints
December 09, 2007 @ 04:54 PM by nap · 3 comments
I really enjoy the technology conference ritual, make it a point to get to at least a few every year. I particularly enjoy the smaller regional conferences. Where else can you (a) get exposure to new technologies, (b) meet the smart hackers who created your favorite OSS tools, (c) get away from home for a long weekend, and (d) get schooled at werewolf, all at the same time?
Alas, with winter upon us, it appears that the 2007 conference circuit is winding down. That means it’s time to look forward to… Why, the 2008 conference circuit, of course!
The Third Annual Emerging Technologies for the Enterprise Conference has been announced; it will be held in Philadelphia, March 26-27th. Last year they had some great talks by high-profile Rubyists such as David Black, Geoff Grosenbach, and Amy Hoy. Rod Johnson, father of the Spring framework, also gave a talk last year.
This year, Floyd Marinescu of InfoQ will be giving one of the keynotes. Obie Fernandez and Peter Armstrong (the author of Flexible Rails, which I’m really looking forward to reading) have already been announced as Ruby community speakers.
Got something worth talking about? Tracey asked me to note that there’s an open call for presenters. The submission deadline is 1/7/08.
Dates for RailsConf (5/29-6/1), Mountain West RubyConf (3/28-3/29) and GoRuCo (4/26) have already been announced as well. Feel free to mention any other interesting events that I’ve omitted in the comments!
December 07, 2007 @ 12:29 PM by nap · 4 comments
It’s official; Rails 2.0 was officially released this morning. Gem update rails to snag it. There’s some great stuff in there, if you haven’t been keeping track, including further augmentation to RESTful conventions, multiview, HTTP authentication, sexy migrations, and on and on and on.
You can read all about it here and also make sure to check out the feature summaries that Ryan Daigle has put together as well as the series of Railscasts Ryan Bates has been doing on the new features. Thanks for the hard work everyone.
December 05, 2007 @ 08:07 PM by nap · 0 comments
Waiting at IAD for a connecting flight home (en route from Beijing). It's snowing. That means delays. I'm tired. But at least I have some time to catch up on blog reading and link posting. Here's the rundown of goodies on my reading list atm: