Rails Test Prescriptions Blog

Keeping Your Application Healthy Since 2008

Category Archives: Mac

In The Jungle, The Mighty Jungle

A few quick notes about Lion, mostly first impressions and things I haven’t necessarily seen a ton of coverage on.

The install itself

This is, I think, my third major OS upgrade since I started using OS X all the time. It’s by far the easiest install. The biggest problem was the time it took to download the installer. I also had a problem where the XCode installer finished but didn’t register itself as finished, such that it appeared to hang. That took a little effort to track down, but wasn’t actually damaging.

Beyond that, though, nearly everything just worked. I had to reinstall exactly one Unix-y binary (ImageMagick, ever the outlier when dealing with annoying installations). I was afraid that I’d need to fuss with things like MySQL or my Ruby install, but by and large, I didn’t.

That Darn Scrolling

The most obvious change as you go to Lion is the new scrolling – it’s such a big deal, that Apple even gives you a dialog box on your first Lion boot reminding you that things have changed.

So, is the change irritating or merely annoying? Okay, for the first hour or so, it was completely unmanageable, to the point where I could feel the tension in my wrists from straining to remember which way to push the track pad.

At the risk of being obvious, what’s happening here is a metaphor shift. Rather than imagining that scrolling is the act of moving a window over your document up and down – moving the pointer down moves the window down and shows you a lower part of the document you now imagine that you are moving the document itself so moving the pointer down drags the document down and shows you a higher part of the document. As pretty much everybody has noted, this is exactly how scrolling works on iOS devices, where you the metaphor of dragging the document itself is much more concrete. (Weirdly, I used iOS devices for quite a while before I consciously started to think about how iOS was backward relative to the Mac.)

After a few days with the new scrolling I’ve basically got it. I find that if I don’t look at the scrollbars when I scroll, it’s much easier to imagine that I’m dragging the document. Also, for some reason, I took to the new scrolling most quickly in minimal apps or apps that are very similar to their iOS versions, such as Reeder. And I can’t seem to get it right in iTunes for some reason.

Is this change a good thing? Dunno. It’s clearly a thing. It’s a little weird to have something as fundamental as scroll direction be subject to user whim – I expect it’ll make pair programming interesting if it really becomes something that a significant minority of users don’t switch to the new version. There’s one problem with the new system that I think is unambiguously bad – since the scroll bars fade to the background when they aren’t used, it’s much harder to see how large a document is and where you are in the document from a quick glance. That’s a loss of information that doesn’t seem to be counterbalanced by anything. It’s also weird that you can still grab the scroller itself, and move it in the traditional direction (although since the scroller is now on top of the view in many apps, it’s sometimes hard to actually grab something at the edge of a document). My overall feeling is that this would make total sense if we had been doing it for fifteen years, but right now it’s going to feel weird for a while.

Another thing is that if the document is scrollable in two directions, it seems to be much harder to keep a pure vertical scroll without it drifting into a slight horizontal scroll. Also, I can’t imagine this working if you were using a mouse instead of a trackpad.

Overall look and feel

Broadly, it seems like there are three overlapping mandates for the look and feel changes in Lion – make interface elements less prominent (with the glaring exception of iCal), incorporate successful features from iOS, and animate anything that’s not nailed down. So scrollbars and other basic interface elements have become more muted across the board. Those changes are not dramatic, but I like them, they do tend to keep focus where it belongs.

I really like Mission Control as a re-imagining of Spaces/Dashboard/Expose. The Mission Control screen is very nice, easy to see, and it’s very easy to manipulate spaces – this is one case where the gestures really work. (I never was able to stick to using spaces before, but I have been using them a bit in Lion). The new full-screen mode doesn’t work for me, mostly because I’m often in a dual monitor situation, and the second monitor is ignored in full-screen, which seems a waste, but I can see how making each full-screen app its own space makes dealing with a bunch of full-screen apps much easier. Launchpad seems to be something that I don’t need, and it feels like it would be hard to manage.

The animations don’t bother me as much as they seem to bother other people – though ask me again about Mail.app in a few weeks. I’ve seen some complaints about the speed of the animation between spaces, but it seems reasonable to me.

That said, the iCal redesign doesn’t do much for me, but I’m not a heavy iCal user. Address book I like better, though I still think it’s a little hard to use. One feature that I do like is that, if you use iPhoto’s faces feature, Address Book can easily search iPhoto for pictures matching the name of the contact to use as the avatar for that contact.

Auto-Save and Versions

One of the biggest functional features of Lion is the auto-save and versioning. Lion-native apps auto save when idle or at a timed interval, and automatically save when the app is closed. They also automatically restore state when the app reopens. Apps have a Time Machine like interface to view old versions of the same document. Points:

  • Basically, this is awesome.
  • I think it’s going to be much harder to break my typing tic of pressing command-s at the end of every sentence then it is to adjust to the scrolling thing.
  • I also think it’s going to take some time to get used to the new “Save a Version/Duplicate/Revert To Saved” wording in the file menu.

One thing I haven’t seen commented on is that there seem to be two different kinds of version support in Lion. Which may mean that I’m getting this wrong. But it appears that there is a subtle difference between apps like Pages, Keynote, and other applications. In Pages and Keynote, you have access to every save point over the history of the document.

For other applications, if you are connected to your Time Machine drive, you have all time machine snapshots. If you aren’t you seem to have access to maybe the most recent time machine snapshot. I’m not 100% sure exactly what’s going on and I’m not sure yet if it’s an app thing or a document type thing – for example, it seems like Apple’s TextEdit can create multiple versions of a text document, but, for example, Byword can’t. But Byword is Lion-compatible, in that it has the new-style File menu. Ultimately, as cool as this is theory, it’s a little confusing in implementation.

New Apps

I’ve started playing with Mail.app, which I stopped using about two years ago on the grounds that it was really irritating. It’s a lot better now, with a more useful three-column layout (that can become a two-column layout), conversation threading, a really, really nice search feature and a bunch of animations that straddle the line between charming and annoying. For the record, the popout animation for replying I find a bit much, but they way sent messages fly up off the top of the screen kind of makes me smile. (And if you liked the animation from the App Store where the icon files into the dock, note that Safari uses something similar for downloads, and Mail uses it for replies.)

One nice touch that I haven’t seen called out much is that in Mail and iChat, and I’m not sure where else, inline url’s have a little arrow after them, which triggers a quick look preview of the web page, similar to the way Google’s quick preview works. That’s nice.

Anything else I can think of

Lion has also added a system wide autocorrect clearly based on the iOS version. I thought this was going to bug me, but actually I kind of like it. It appears to work a little better than the iOS version at identifying and correcting actual typos, the UI is a nice combination of unobtrusive but yet making you aware that a change has been made, and it’s much more responsive than TextExpander (which I love for deliberate macros, but which has always felt a little sluggish when correcting typos). Also, the autocorrect has fixed like five typos just in this paragraph, and only got one of them wrong. I’ll actually take those odds.

So

Too many words to say this: I like Lion so far, although some of the specific choices puzzle me cough iCal cough. It’s taken me less time to get used to the changes than I thought, and I’m finding some of the changes making definite improvements in my normal workflow.

June 7, 2010: Lot of Conferences Week Begins

Today is the RailsConf tutorial day, with the conference proper starting tomorrow. I was less disappointed than I thought I would be when my talks were not accepted, but I’m more disappointed than I thought I would be not to be going. Have fun, everybody.

On the other side of the country, today is the Apple WWDC keynote, which I’m sure I’ll join the rest of the internet in obsessing over.

Book Status

Over the weekend, worked on the style chapter of the book, largely trying to incorporate the ideas from the Chicago Ruby talk, and also combining some of the short chapters. Need to find out if I have a page limit.

Lots Of Links

Plasma Rails is a new Rails RDoc presentation site that claims to update Rails 3 docs nightly. It’s got a very TextMate-ish dark theme.

The Everyday Rails site has a quick rundown of three Rails Authentication methods, Restful Authentication, Authlogic, and Devise. Devise looks nice, and I’m considering moving the Rails Test Prescription examples to it since it seems to be an easier setup than Authlogic and also Rails 3 compatible.

Not to be outdone, I Suck At Ruby mentions a feature of the the Ruby TextMate bundle that validates Ruby code on save.

Josh Owens at RailsFreak has a suitably quick post with thoughts on how to do a quick launch of a web application.

DHH himself has released Tolk, which is a Rails engine providing a web interface to support translators entering text and converting it to the Rails YAML locale files. I think this was extracted from the recent Basecamp multiple language release, looks like it’d be useful.

Ars Technica named the winners of their design awards. I concur on two of the three apps that I use (Tweetie — please finish the Mac version 2.0 — and Dropbox), I like 1Password, but wouldn’t consider the app itself to have a particularly great design. Don’t use the others, although Soulver is pretty cool.

Finally, In Self Promotion

This has been around for a while, I think, but it just passed back in front of my eyes. Antonio Cangiano has a list of recommended Ruby books, and a separate list of Rails books.

Somewhat flattered to have my Wrox book, Professional Ruby on Rails, be included. There are parts of that book that I think are really great. And parts of it that were obsolete almost the moment it was printed (for instance the entire chapter on using Subversion with Rails…). Anyway, thanks!

May 6, 2010: The day of promoting stuff

Top Story

I’ll mention somebody else’s book, but don’t worry, I plan on doing it in a totally self-absorbed kind of way. Pragmatic released Using JRuby into beta yesterday, by the core JRuby team. Looks good, interested to see where they go with it.

Because I’m me, I can’t help but compare the structure of the book with the Jython book I did. Biggest structural difference so far is that we were unable to assume a Python-savvy audience, so we felt we had to awkwardly teach Python for 100 pages at the start of the book, where as the JRuby book is able to teach Ruby in an Appendix. Good luck to the JRuby team, and I’m looking forward to seeing this one all the way through.

Book Updates

In the spirit of an old Chevy Chase routine, Rails Test Prescriptions is still on sale. There’s a forum, which is still largely empty — I’d love some feedback.

Worked on the integration and webrat/capybara chapters, cleaning them up for beta 2.

The May, 2010 issue of the PragPub is out with my article about mocking, among other, cooler stuff.

And Then…

Today was a big day for updating software I use every day. If this blog post looks extra-shiny, it’s because I’m using MarsEdit 3, which I’ve used for every blog post I’ve written for several years. New stuff includes a rich text editor and better HTML syntax highlighting.

I also upgrated TextExpander and iStat Menus.

Matt Polito discovered that the Rails 3 API can be found at http://edgeapi.rubyonrails.org/. He did not know this. Neither did I. Neither did you, probably. Now we all know.

You probably do know about Rubular, which is an outstanding online tester for Ruby regular expressions. I just wanted to point out that it’s really cool.

If you aren’t using Dropbox, you should start right now — it’s an outstanding backup tool. (Man, I’m plugging a lot of commercial stuff today for some reason). Anyway, there’s now a Ruby library for the brand-new Dropbox API.

Also from Ruby Inside, a nice overview of three newish date-time libraries. Tickle, in particular, looks handy.

And in Yehuda news, a nice overview of Ruby 1.9 and character encodings, and in a completely different mode, a jQuery plugin for using HTML 5 offline data support.

Finally…

Randall Munroe at XKCD did a big survey asking people to name colors, and the results are really cool.

Will Leitch has a new book about baseball and dads, and this excerpt from Deadspin is all about the famous 2003 Chicago Cubs playoff loss. Since I’m a Cubs fan who loves reliving painful moments, I read it. Leitch gets the flavor of the game down correctly. As a Cubs fan, what I remember most strongly about when that ball dropped, was thinking “Oh, that’s how we’re going to blow this game” — the play was important mostly in getting across the idea that Weird Stuff was afoot.