- We design and build extraordinary applications for companies looking to make the next great idea a reality.
- learn more
Rails 2.2 For Me And For You
The Rails 2.2 release contains a number of big features that are going to be commented on endlessly, especially thread safety, internationalization, and ETag support. Going through the various release notes and what's new documents, I found a lot of smaller features that I'm looking forward to using in future projects, or would have made past projects easier, or are just cool in a framework-geek kind of way.
The concat method no longer needs a block binding
This may be the most subtle change I've ever been this excited about. Let's go back to the bad old days -- last week -- and say that you wanted to write a block helper method like this:
Topics: Ruby on Rails
Everything’s Coming Up Windows
I've been beating the drum of cloud computing and the advantage that it gives to companies building solutions on Linux. Microsoft needed to respond. Well, now we have two solutions for Windows on demand:
- Amazon EC2 is offering Windows on EC2, with the pricing at $0.125 per hour for a small instance running Windows Server (as compared to $0.10 for a Linux instance). You can run SQL Server Express at no extra charge. The SQL Server Standard smallest instance (Stadard Large) rings in at $1.10 per hour, however, which ain't such a good deal.
- Microsoft's Azure Services Platform. It's still in community evaluation mode, but there is one thing that is already clear about it: it's as confusing as all git out. One of the advantages of Amazon's services like S3 and EC2 is that they are simple and can form the building blocks for other applications and services.
If I'm provisioning a web application, I'm pretty comfortable thinking in terms of virtual servers or instances. Not sure how to think about scaling and cost with Azure. I think MS would have done better to start out with a KISS approach to drive adoption. Time will tell if their "it can cure cancer" approach will work out.
Review of EnvyCast: Ruby on Rails 2.2 Screencast
This week, Rails 2.2 Release Candidate one was loosed on an unsuspecting public. Friday, I'll post about the Rails 2.2 features that I'm most excited about working with. Today, I'm going to review Gregg Pollack and Jason Seifer's screencast on new Rails features (and the associated PDF document by Carlos Brando and Carl Youngblood.)
In the interests of full disclosure, I should mention that we received a review copy of the screencast. In the interest of fuller disclosure, I'll add that had the email from them come even 10 minutes later than it did, I would have already bought it myself (I really was just about to go to their site and buy when I got the email) -- I really liked their first screencast on ActiveRecord. And I really liked this one, as well.
Topics: Ruby on Rails
A Java Programmer’s transition to Ruby on Rails
There is much out there on the topic of migrating to Ruby on Rails for an experienced Java programmer. I figured I'd add my two cents, as I have finally drunk the Kool-Aid. I switched to Ruby on Rails late last year, and developed a subscription and content management system in Ruby on Rails, went back to a Java project, and then back to Ruby on Rails. The switch back to Java gave me an interesting insight into the things I love and hate about both development platforms.
GWT, Gadgets and OpenSocial
I've been developing with GWT, OpenSocial and Orkut, using the gwt-google-apis project on Google Code (specifically the gadgets subproject). It's a nice enough api that makes it relatively painless to build gadgets in GWT.
This is a bit different from Didier's gOpenSocial library, which was an early success at building OpenSocial gadgets with GWT. But the google gadget library isn't really quite ready for OpenSocial. I've skinned my knee here and there, so I thought I'd give others the benefit of my experience.
So, first thing, how the heck do I get GWT to generate the
<Require feature="opensocial-0.7" />
line into my manifest?
Topics: Google Gadgets, GWT, OpenSocial
Ruby Stylista

The thing is, like a lot of programming language fans, I'm fascinated by programming as communication, and therefore also by thing like style guides that bridge the gap between the formal requirements of the compiler and the cognitive needs of the programmer writing and reading the code. At best, consistent style makes code easier to produce and read in much the same way that Rails itself makes code easier to produce and read -- by suggesting a consistent placement for your code and reducing unneeded choice in the name of useful conventions.
For me, at least, there's also something of a pride in workmanship issue, in much the same way that a professional chef will take pride in keeping their kitchen area clean even in the midst of chaos.
So, thanks to those of you who took the time to comment on the style guide I posted last week. I am planning to put the guide up someplace more permanent where the conversation on these issues can continue, but in the meantime, I wanted to promote some comments and talk a little bit more about a couple of issues that were flagged by commenters.
Continue reading »
Topics: Ruby on Rails
JSONWrapper now on Google Code
The JSON utility library for GWT that I blogged about last week is now up on google code.
To recap, the idea is that you can write code like this
JSONValue root = JSONParser.parse(json); JSONWrapper obj = new JSONWrapper(root); String result = obj.get("map").get(1).stringValue();
when dealing with JSONValue objects.
As it's only one class, you could just include it in your source tree as code instead of using the jar.
8 Tips & Tricks When Starting Objective-C iPhone Apps: [self.paradigm shiftFrom:@"ruby" to:@"objective-c"];
All languages have something interesting to teach us about the art of programming -- and as a Ruby developer almost exclusively, I've always been afraid of strongly typed languages like Java and C++, or the great-grand-daddy of them all, C. So when I decided to tackle Cocoa to work on iPhone apps I went in somewhat leery of how I'd have to change, but hopeful that I'd become a better, more versatile programmer. After a few weeks I would say I've achieved my goal, but it's certainly taken a lot of blood, sweat, and tears to get here.
I think a lot of people are in a similar position to me: trying to pick up Objective-C to do iPhone programming, and coming in with only a book or two as their guide. Most of the books out there for learning Cocoa and the iPhone SDK are very good but there are a lot of gotchas and stylistic tricks that really mean the difference between comprehending a statement and staring at it in horror and confusion until Google comes to your rescue. The aim of this blog post is to come to your rescue instead of Google. These are the 8 biggest foul-ups that I wish I had known before I started learning Objective-C. Hopefully you'll learn something here that will prevent you from making an idiotic mistake I already made.
Will Q4 iPhone Sales Surpass Expectations?
I went to the AT&T store on Friday to buy another testing phone for our developers, who are busily churning out more iPhone applications, and to switch one of my cell lines over from T-Mobile to my iPhone. It was an interesting experience, with T-Mobile's very friendly and courteous customer service reps pitching me strongly on the G phone, and my service getting switched over in the middle of a business call. I asked the AT&T store manager what percentage of their sales were iPhones, and after a bit of thought, he said about 65%.
Granted, that's only one location, but based on all of the annecdotal evidence I have, as well as how well the T-Mobile folks were trained to deal with the iPhone switch (not only on my request, but on my wife's similar call last week) I am expecting some pretty strong numbers form Apple tomorrow.
I'm also expecting decent G phone numbers for Q4, but I'm not sure how well they'll hold up later.
Update: It looks like Apple's Q4 iPhone sales topped 6.9 million, about 800,000 units more than RIM's 6.1 million in the equivalent period, beating most analyst expectations by a mile.
Interesting discussion on this over at Daring Fireball (of course) as well as a piece on Fortune on traditional analysts versus bloggers on Apple sales and earnings. The bloggers got the iPhone numbers better than the analysts, but everyone missed on mac sales.
Web 2.0 context menus vs. Web 1.0 link lists: Style over usability?
As Ajax spreads new UI conventions to the masses, it's important to apply a critical eye to the usability of those conventions. Several big-name sites have launched extensive redesigns in the last few months, from Twitter and FriendFeed to Flickr and Facebook. Certain trends are solidifying, especially the use of context menus that are hidden until a user mouses over an item, then displayed as a series of icons, text or both.
First up we have
Topics: Facebook, Flickr, FriendFeed, Twitter, Usability, user experience design
Elements of Ruby Style
Next week marks the publication of the 50th Anniversary edition of the Strunk & White's The Elements of Style, a critically important work for anybody who puts words together on a regular basis.
In that spirit, here are some thoughts on good Ruby & Rails style -- I'm mostly focusing on Ruby-specific guidelines here. This is somewhat closer to a brain dump than a fully-baked style guide, so it's something I intend to come back to, especially after hearing everybody tell me exactly where I'm wrong, wrong, wrong.
UPDATE: There were some comments about the formatting being messed up. Apparently whatever tool we're using for code coloring doesn't work well with Safari. In Firefox, the formatting is as intended. We've cleaned this up -- thanks for your patience.
Topics: Ruby on Rails
Defining RIA Interaction Patterns on time in Flex Agile Development
Putting more attention to User Interaction Design is naturally becoming a standard practice with RIA.
With RIA technologies, classic Interaction Patterns are only building blocks, not solutions. With raised possibilities, Patterns have become more complex.
Topics: agile, Flash, Flex, interaction patterns design, Patterns, project management, ria
Walk-Through Test Coverage
This week, I wrote up a little Rake task to improve coverage reporting by doing what I'm calling "walk-through" coverage testing. To explain what I mean, let met give an example.
I'm adding a new feature to my Rails app. In the finest tradition of Test-Driven Development, I start with a test. Something like this:
should "correctly associate a new address with the current user" do login_as :john_q_public put :update, :address => {:street => "123 Sesame", :zip => 00001} assert_response :success assert_equal ("123 Sesame", users(:john_q_public).address.street) assert_equal ("NY", users(:john_q_public).address.state) end
Topics: Ruby on Rails
Where minimalism fails: The problem with Apple’s less-is-more approach
So I'm watching the big Apple notebook event and getting totally excited about the impressive new graphics capabilities. Finally I'll be able to get decent visuals on World of Warcraft on a Mac laptop. Then we get to the part about the new trackpads and my excitement wanes. Once again, Apple is opting for ultra-minimalist hardware and then using software to compensate (poorly) for that design choice.
Here's Steve Jobs:
We've got a new trackpad for notebooks. It's a gorgeous, large, multitouch glass trackpad for notebooks. It's 39 percent larger tracking area than before, it's multi-touch for gestures, it's glass for silky-smooth travel. And we've optimized the coefficient of friction on the glass, so it's really beautiful. And the entire trackpad is the button. It gives you more area on the trackpad and keeps you from hunting for that button. You can get multi-button support from software. And we've added some new four-finger gestures that are really nice.
Four-finger gestures may be really nice, but I'd opt for two hardware buttons any day. Whether you're playing video games or simply using productivity and development apps, you should be able to summon context menus without having to resort to arcane gestures. Apple's obsession with scaling hardware down to its essence may result in beautiful products, but usability almost always suffers. Need some more examples?
jQuery goodness with ASP .NET
This piece of news has brought about great cheer in the Web Developers community. jQuery has been fast gaining reputation in the world of web-development as a light-weight, flexible and easy-to-use Javascript library. Integration of jQuery with Microsoft's development platform should provide web developers with new capabilities and opportunities.
This is very smart move by Microsoft given the fact they have always hesitated to incorporate open-source technologies into their products. It is planning to ship jQuery with the ASP .NET MVC very soon. Integration with Visual Studio is something that is going to happen later. There are plans to enable intellisense support for jQuery in Visual Studio which would be really cool I think.
Some of the high-points of jQuery integration with ASP .NET could be :
- JQuery provides an attractive alternative to conventional Javascript making client-side DOM and HTML manipulation much easier and quicker.
- It could complement ASP .NET Ajax and play with it really well
- The original jQuery libraries are going to be ported into ASP .NET without any change which would enable developers to leverage jQuery's true potential
image-source : www.webmonkey.com
I have posted a few links below that discuss more about what the MS-jQuery marriage means for the web development community and how it can make life easier for developers out there.
http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx
http://jquery.com/blog/2008/09/28/jquery-microsoft-nokia/
About Pathfinder
Recent
- iPhone SDK: UIViewController Testing & TDD
- Icons are evil; so are menus - unless you do them right
- The Truth About Designing For Security
- GWT, Gadgets and OpenSocial, Part 2
- Has Many has_many: A Refactoring Story
- The Hidden Power of Canvas
- Review of fixture_replacement2 plugin
- Chess Game Viewer in GWT
- From JSP to Ruby on Rails: First thoughts on front-end coding conventions
- Helpers and Partials
Archives
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006







