Tag Archives: mac

Rails and Mac dev communities

“Damon Clinkscales has a write-up”:http://damonclinkscales.com/past/lone-star-charity-workshop-wrap-up/ of the Charity Workshop that took place before the Lone Star Ruby Conference in Austin a couple weekends ago. I skipped the conference and attended these tutorials instead, enjoying some great talks by Marcel Molina, Bruce Williams, and 6 other speakers all packed into 4 hours. I definitely picked up a few good tips on Ruby blocks and ActiveRecord, but I was not-so-secretly relieved that I didn’t attend the full conference.

“Since brunch on Sunday”:http://www.flickr.com/photos/digitalnomad/1352583178/ after the conference, where I got to hear another wrap-up from co-workers, I’ve been thinking about why. Why did I sell my RailsConf ticket and book a flight to Chicago for C4 instead? Why skip a cheap Ruby conference practically in my own backyard? Why have I whittled my Ruby-themed blog subscriptions down to just a few from dozens?

Now I know: it’s about the difference in the communities. The Mac developer community is all about building unique apps, crafting an excellent user experience, and the “indie culture”:http://www.al3x.net/2007/08/c41-friday.html of building something small and useful. The Rails community by contrast seems focused on how few lines of code a controller method is. I’m lucky to work with people who care about that stuff, because it often does yield better applications, but I just don’t wake up in the morning excited about rewriting code, so why would I leave my family for a few days to hear someone talk about it?

There are many kinds of programmers. People who have hacked their whole life, dropping out of school to sell software; traditional developers with a CS degree and big company background; and even fine arts majors who fell into programming by accident as a way to build web sites. Based on that background, or what direction their passion takes them, I believe there is a balance between joy for the act of writing code vs. the pride in seeing the final product, and each programmer leans to one way or the other.

For Rails developers, at least many of the leaders in the industry who came from or were inspired by the extreme programming methodology and test-driven development, it’s the former: the art is found in the lines of code — how efficient can the logic be, how DRY, how RESTful.

For Mac developers, not just the “Delicious Generation”:http://www.rogueamoeba.com/utm/posts/Article/DeliciousGeneration-2006-11-06-10-00 but old school Mac developers as well, it’s the latter: the art is how the final product looks and behaves — being inspired to build something simply because you used another application that was great.

Cutting it this way allows me to see two things very clearly that were confusing before. It puts specifics to why I’ve drifted further away from the Rails cutting edge, and it explains why I get so annoyed with some of the newer crop of Mac developers who proclaim “bindings”:http://cocoadevcentral.com/articles/000080.php and garbage collection as beautiful gifts for programmer productivity even though they have no added value for the user experience.

Rails is a great framework, and I will continue to enjoy switching gears to write web apps in between my Mac projects. But I’m not going to tune back into that community until there is an equal focus on the bigger picture as it impacts the user (more scaling, more UI best practices), or whatever the next big thing to hit web apps ends up being.

The /Applications social network

Brent Simmons, from a “TUAW interview”:http://www.tuaw.com/2007/06/05/5-questions-with-brent-simmons-creator-of-netnewswire/:

“One of the things I love about being a Mac developer is getting to meet the folks who make the apps I use. In a way, my /Applications folder is also my social network. Which is cool.”

I never thought about it that way, but it’s definitely a great aspect of the Mac developer community. I hope to add a few more people to my /Applications social network next week at WWDC.

I’ve been to a bunch of WWDCs now, but I’m particularly excited this year because it will be the first time I’ve attended as representing both a “large-ish company”:http://www.vitalsource.com/ and an “independent one-man shop”:http://www.riverfold.com/.

I will be carrying VitalSource business cards in my wallet, but I also hope to have a printed batch of Wii Transfer serial numbers to hand out. I know a lot of Mac developers have a Nintendo Wii and it’s a shame I haven’t given out more copies. If you have a Wii and see me (I look “something like this”:http://www.manton.org/me/), please get my attention so that I can correct this oversight.

I didn’t go to C4

C4 was last weekend and looked like a lot of fun. Unfortunately I was about travelled-out this year with RailsConf and WWDC. Perhaps next time.

Daniel Jalkut was the first I saw with nice write-up. He provides “a speed-through of sessions”:http://www.red-sweater.com/blog/213/c4-abridged and closes with what is probably the biggest draw for attendees:

“As inspiring and as much fun as the scheduled speakers were, the unstructured social time both between sessions and in the evenings were just as much fun, and probably just as educational.”

I subscribe to a couple dozen Mac developer blogs, and keeping an eye on Flickr and Technorati tags for C4 is another great way to see what developers are up to. Mr. Rentzsch himself has a “set of links here”:http://rentzsch.com/c4/zeroLinkage, and Mike Zornek just posted some “short videos of the room”:http://clickablebliss.com/blog/2006/10/25/c4_photos_and_movies/ that give another view of the show.

When I go back through my older Mac programming posts, I’m reminded that I don’t really blog about Mac development as much as I used to. Perhaps that is because there are so many other good Mac guys blogging now.

RubyCocoa

I write Mac software, but over the last year I’ve increasingly been building Ruby on Rails web apps as well. Today I finally took a look at “RubyCocoa”:http://www.rubycocoa.com/. I wanted to whip up a quick Cocoa app that would involve some text parsing, and a dynamic scripting language like Ruby is a much better fit for text processing than C, C++, or Objective-C.

It turns out RubyCocoa works amazingly well. I have only scratched the surface with a small test app, but I was blown away by its ease-of-use, Xcode integration, example projects, and apparent maturity. You have full access to AppKit from Ruby-based controllers and views, and a single NIB file can even reference both Objective-C and Ruby classes. Fantastic stuff.

I don’t know if it’s ready for commercial software use yet. For distribution, I tested including the RubyCocoa.framework inside the application package and the app launches and runs correctly on a system without the full RubyCocoa install. There may be issues with requiring a recent version of Ruby, but otherwise it’s a fully native app.

My only disappointment was in the Objective-C calling conventions. There are two versions to choose from: a style using underscores to separate named values, and a slightly easier Ruby syntax using symbols and extra parameters. Here they are:

Objective-C:

[my_window setFrame:r display:YES animate:YES]

Ruby Underscores:

my_window.setFrame_display_animate(r, true, true)

Ruby Symbols:

my_window.setFrame(r, :display, true, :animate, true)

In my opinion, a better approach would be to take advantage of Ruby’s trick of allowing the last parameter to be a hash supplied without the curly braces. This feels more readable to me and more closely matches the Objective-C equivalent.

Better:

my_window.setFrame(r, :display => true, :animate => true)

In any case, that’s a minor complaint and doesn’t take much away from the beauty of writing native Mac apps in Ruby.

Last week, Joel wrote about

Last week, Joel wrote about Mac software developers:

“There are very few conditions under which it is actually the right business decision to develop software for the Macintosh. Developing for the Mac is not a whole lot different than creating a web site that only works on Netscape.”

Of course he gets some things wrong and misses the point on others. Luckily the comments in his discussion forum provided a good balance to his argument. Even Dave Winer jumped into the game this morning, bringing his perspective as a long-time Apple developer who embraced Windows development while Apple was suffering from vision and profitability problems in the 90s.

And then there’s Brent Simmons: “Why I develop for Mac OS X.” There’s also some good stuff in the comments below the essay. The essence of his argument is simple: Windows programming is boring.