Bug or Bad UI: Find and Replace in XCode 4

Lee Winder
Engineering Game Development
3 min readFeb 26, 2012

As applications get larger and more complicated with every iteration it sometimes becomes difficult to know if incorrect behaviour is down to a bug or badly designed user interface. XCode 4 is an application that has some quirky design choices, some which I really like and some which just baffle.

Here’s one a I found recently when trying something as simple as ‘Find and Replace’

Go to the search tab and search for something (preferably something that exists!). So in the following screenshot I’m searching for ‘defgroup’ which is a Doxygen documentation tab.

Now switch over to ‘Find’ and, as you would do if you did this a while later, change what you last searched for to what you want to replace. In this example, I’m now looking to change ‘client’ to ‘user’. Looking at the following screenshot, what would you expect to be replaced?

In my mind, I expected ‘client’ to be replaced with ‘user’. After all, that’s what I’ve put next to the Magnifying Glass icon — a universal icon for ‘search’ — and the results are for the last search I did, not this one.

But if I select Preview…

It’s actually replacing the results of the original search for ‘defgroup’ and not what I actually asked for, which was to replace ‘client’ with ‘user’. If I’d gone and selected Replace All then the same thing would have happened.

To get it to replace ‘client’ rather than ‘defgroup’ I need to either

  • Go back to Find search for ‘client’ then switch back to Replace and do it again
  • When entering the new search term, hit enter after typing ‘client’. This won’t do the replace, it’ll redo the search.

So, is this a bug or a failure of UI design? Should Preview and Replace All take what I’ve just put in the search box (in which case it’s a bug) or should it use what I last searched for (in which case it’s a UI issue).

Personally, I see this as a bug. As I work down the panel, I add what I what to replace with the new term then select Replace All. Since we read from left to right and top to bottom, information at the top of the screen is more important (the new term) than at the bottom (the results of the last search).

But then, some people could argue it’s a UI issue, and in that case an improvement to this work-flow from a UI perspective would cause this bug to never appear in the first place.

--

--