<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Perspx</title>
	
	<link>http://perspx.com</link>
	<description>Musings of a teenage programmer</description>
	<lastBuildDate>Mon, 15 Feb 2010 16:25:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Perspx" /><feedburner:info uri="perspx" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>The Psychology of Software</title>
		<link>http://feedproxy.google.com/~r/Perspx/~3/W8GFx0kez4I/</link>
		<comments>http://perspx.com/blog/archives/1298/the-psychology-of-software/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 18:22:22 +0000</pubDate>
		<dc:creator>Perspx</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[users]]></category>

		<guid isPermaLink="false">http://perspx.com/?p=1298</guid>
		<description><![CDATA[Attending Matt Gemmell&#8217;s workshop last week was a great exercise for thinking from the user&#8217;s perspective – something which we, as software developers, often do not usually spend enough time doing because of being wrapped up in other things.
As developers, it is hard for us to detach ourselves from what we do and cater to the user. We live on  ... ]]></description>
			<content:encoded><![CDATA[<p>Attending <a href="http://perspx.com/blog/archives/1193/the-world-according-to-gemmell/">Matt Gemmell&#8217;s workshop</a> last week was a great exercise for thinking from the user&#8217;s perspective – something which we, as software developers, often do not usually spend enough time doing because of being wrapped up in other things.</p>
<p>As developers, it is hard for us to detach ourselves from what we do and cater to the user. We live on the other side of the fence and are often restrained from making the right decisions because of the way we think, and usually need an objective opinion. We have the curse of knowledge by being so deeply focused in on our software, and what seems intuitive and easy for us is unlikely going to be the same for the people who use our creations.</p>
<h2>Thinking from the user&#8217;s perspective</h2>
<p>The amazing thing about a lot of usability and application design is that <strong>most decisions come down to simple thought</strong> of how your software is going to be used, and to anticipate and accommodate the user&#8217;s various needs. It&#8217;s about thinking &#8220;I shouldn&#8217;t put that text field there because the relation to that other form is confusing&#8221; or &#8220;I should relabel that button because the current label is misleading&#8221;.</p>
<p>As software developers, <strong>our main subjects are not computers</strong> (even though we do instruct them on what to do) but rather <em>people</em>. We have to be psychologists to some degree and accommodate <em>their</em> needs – our software of which is an end to a means.</p>
<h2>The reality</h2>
<p>As Matt stated on an earlier MDN show podcast, users want to spend as <em>little</em> time in an application as possible, so that they can get on with their lives. But because we have an affinity with the software we produce it is often hard to detach ourselves from the way we go about our business and think in this way.</p>
<p>Of course this doesn&#8217;t mean that we shouldn&#8217;t design and architect our applications in a maintainable way, and doesn&#8217;t mean that we should write crap code that looks like something the dog threw up. However bear in mind that the user doesn&#8217;t actually <em>see</em> any of this. To paraphrase Gemmell again, all the user sees of our applications is the interface.</p>
<p>At the end of the day, users couldn&#8217;t care less whether you have a PHP backend or the UI implemented using Rails; they have such a different perspective of what we create. What they care about is <strong>how your software solves their problem</strong> and how it makes their life easier by doing so.</p>
<img src="http://feeds.feedburner.com/~r/Perspx/~4/W8GFx0kez4I" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://perspx.com/blog/archives/1298/the-psychology-of-software/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://perspx.com/blog/archives/1298/the-psychology-of-software/</feedburner:origLink></item>
		<item>
		<title>NSConference 2010: Mac Developer Conference (Day 2)</title>
		<link>http://feedproxy.google.com/~r/Perspx/~3/uhyyohq4o-E/</link>
		<comments>http://perspx.com/blog/archives/1253/nsconf-2010-mac-developer-conference-day-2/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 17:29:32 +0000</pubDate>
		<dc:creator>Perspx</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[nsconf]]></category>
		<category><![CDATA[nsconference]]></category>

		<guid isPermaLink="false">http://perspx.com/?p=1253</guid>
		<description><![CDATA[
It was the second and final day of the NSConference 2010 Mac Developer Conference and most delegates were tired and a little hungover. But there was another great line up of speakers for the day, and it was another day of socialising and fun, as well as all that other learning stuff.
Perhaps the biggest things I took away from the  ... ]]></description>
			<content:encoded><![CDATA[<div id="attachment_1275" class="wp-caption aligncenter" style="width: 610px"><img class="size-full wp-image-1275 " title="Core Audio" src="http://perspx.com/wp-content/uploads/2010/02/Core_audio.jpg" alt="" width="600" height="382" /><p class="wp-caption-text">Rentzsch on Core Audio: The API of Rock Stars</p></div>
<p style="text-align: center;">
<p>It was the second and final day of the <code>NSConference</code> 2010 Mac Developer Conference and most delegates were tired and a little hungover. But there was another great line up of speakers for the day, and it was another day of socialising and fun, as well as all that other learning stuff.</p>
<p>Perhaps the biggest things I took away from the Mac conference was taking a pragmatic approach to anything which became a recurring theme in a lot of the talks – like yesterday&#8217;s conference, extremes were presented such as Dave on not using singletons, but at the end of the day it&#8217;s a judgement call and you shouldn&#8217;t do or not do something &#8216;because Dave said it&#8217;, but rather because it&#8217;s either right or not right for what you want to do. There was also some recurring memes, such as The Matrix and kitties, which snuck their way into certain presenters&#8217; talks, but most of all, I learnt that people <em>can</em> be (fairly) civil when discussing version control, and also that the GPL <em>sucks</em>.<strong> </strong></p>
<h2>Jeff LaMarche – Writing Super Superclasses</h2>
<p><a href="http://perspx.com/wp-content/uploads/2010/02/lamarche_objc_runtime.jpg"><img class="alignleft size-full wp-image-1264" title="Jeff LaMarche" src="http://perspx.com/wp-content/uploads/2010/02/jeff_lamarche.jpg" alt="" width="288" height="230" /></a>Jeff was still jetlagged and tired, and made <em>several</em> comments as such throughout his talk. However, despite this, his talk on the Objective-C runtime was very interesting and informative to listen to. He started the talk off with a cliché – &#8216;you can&#8217;t see the forest through the trees&#8217; – and likened this to software development. As developers we are often too pedantic and only focus on the little things, but we also need to be able to step back and look at our projects as a whole on a larger scale.</p>
<p>He then went into the guts of his talk, talking about such things as dynamic method resolution and introspection at a lower level. He introduced Objective-C as different from other languages in terms of the patterns used and also touched on a criticism by others that it is missing things, however this is <em>by design</em> and not simply an oversight.</p>
<p>He then started talking about his <a href="http://code.google.com/p/sqlitepersistentobjects/">SQLitePersistentObjects</a> project which leverages the Objective-C runtime in several ways, and then demonstrated some of these features such as dynamic method resolution using IMPs and was well explained with the associated pros and cons of using certain runtime features.  Like many of the other talks, he explained the limitations of using the runtime, for example Apple <em>may</em><em> not</em> approve apps for the App store that use it, and also to be pragmatic about its use and not simply use it because you can.</p>
<h2>Andy Finnell – Brushing up on OpenCL</h2>
<p><a href="http://perspx.com/wp-content/uploads/2010/02/finnell_opencl.jpg"><img class="alignright size-full wp-image-1266" title="Andy Finnell" src="http://perspx.com/wp-content/uploads/2010/02/andy_finnell.jpg" alt="" width="288" height="194" /></a>I&#8217;ll be honest, after listening to Andy&#8217;s talk, I felt stupid. And I think there were other attendees around the room who were in a similar boat. He opened up with a demo, which was a great start to his talk, a demo which simulated the effect of watercolours on a canvas, and leveraged OpenCL to provide the graphics and calculate the drawing of the pigment and the interaction with the surface.</p>
<p>Although the maths and physics was way above me (and wasn&#8217;t helped by lack of sleep) it was still an informative and interesting talk, and I liked the structure of the presentation – cool demo at the beginning which made you interested then the rest of the time spent explaining how it all worked.</p>
<p>Andy also opened with a short intro on OpenCL and how it operated which was nice for those who hadn&#8217;t been at Drew&#8217;s Concurrency workshop on Sunday, however it would have been nice for this section to be expanded a bit, with less of a focus on the mechanics of the demo.</p>
<p>The presentation was also entertaining with accommodation for British spellings (&#8220;watercolo(u)r&#8221;) which is always a nice touch and other comical remarks and slides which helped a bit when it came to digesting the hardcore code samples. The coding side was also a nice contrast from the higher-level talks that were presented over both days of the Mac conference which also made it a useful and informative talk.</p>
<h2>Dave Dribin – Version Control System Shoot Out</h2>
<p>[Apologies for not having an accompanying photo]</p>
<p>Dave&#8217;s talk was all about version control and mostly a history or comparison of the different VCS&#8217;s out there. There was a feeling before the talk that <a href="http://twitter.com/creednmd/status/8539677234">it could go</a> <a href="http://twitter.com/pilky/status/8539592251">horribly wrong</a> but Dave kept it pretty objective and didn&#8217;t particularly favour any of the VCS&#8217;s.</p>
<p>He presented the history of version control systems first, with SCCS, RCS, CVS, SVN and other systems that use similar acronyms, before moving onto distributed version control with Git, Mercurial and Bazaar, quoting Linus&#8217;s talk where he explained the naming for Git: &#8216;I&#8217;m an egotistical bastard and I name all my products after myself, first Linux and now Git&#8217;. With all the version control systems he presented the pros and cons, and only discredited Git slightly. Overall a pretty well rounded talk for the allotted time of about 35 mins.</p>
<h2>Graham Lee – Code Signing</h2>
<p><a href="http://perspx.com/wp-content/uploads/2010/02/code_signing.jpg"><img class="alignleft size-full wp-image-1271" title="Graham Lee" src="http://perspx.com/wp-content/uploads/2010/02/graham_lee.jpg" alt="" width="320" height="206" /></a>Graham had been given the opportunity to present at very short notice, and it was very well executed. It was astounding the quality and detail of his talk despite the little preparation time that he had, and he had a great presentation style which was very entertaining. He also included lots of puns and other fun comments, such as a reference to a hypothetical harmful piece of injected code which he called Malicious Monster and also referenced as Malicious Library. For those who didn&#8217;t attend, the reference to the Matrix had become kind of a meme by this point and even though Graham had prepared his presentation in about 24 hours he still managed to fit it in.</p>
<p>He also did a live demo which was very useful and demonstrated some of the code signing in action; he also anticipated our needs well by cutting a few minutes short in aid of food. Overall a brilliant, informative presentation.</p>
<h2>Aaron Hillegass – The Many Faces of Data Persistence</h2>
<p><a href="http://perspx.com/wp-content/uploads/2010/02/hillegass_data_persistence.jpg"><img class="alignright size-full wp-image-1272" title="Aaron Hillegass" src="http://perspx.com/wp-content/uploads/2010/02/aaron_hillegass.jpg" alt="" width="320" height="269" /></a>Aaron&#8217;s talk was – as you probably guessed – focused on data persistence and the what the options are on Mac OS X. He started off by stating &#8216;The file is dead&#8217; and explaining how his HDD is essentially a cache for data that is stored in the Cloud, which prompted him to comment &#8216;Long live the cache!&#8217;. He used the example of iWork on the iPad in that it uses a &#8220;Library&#8221; to store files which is essentially an abstraction for the filesystem and that this is the way forward.</p>
<p>He then went on to talk about archiving in Cocoa and Cocoa Touch, discussing Keyed vs Unkeyed archiving and the associated pros and cons. He also presented a timeline of events in terms of data persistence, from the early 90&#8217;s with NeXT right up until Core Data in 2005. He presented some nicely formatted object graphs of some of the Core Data things which was also useful.</p>
<p>He spent most of the second half of the presentation talking about his new data persistence project, <a href="http://github.com/hillegass/BNRPersistence">BNRPersistence</a>, which provides classes that wrap Tokyo Cabinet which is used to store the data, which received much applause from everyone when he announced that it was open-source, available on GitHub, and <em>not</em> licensed under the GPL. It was certainly an interesting project and he had some numbers for certain cases compared to Core Data and it performed much faster. But he was dealing with object graphs that had 1K and 1M objects and for &#8220;everyday&#8221; use with smaller objects it was unclear whether BNRPersistence would be better than Core Data because he didn&#8217;t have any figures on it.</p>
<p>What I liked about Aaron&#8217;s talk which I don&#8217;t think any of the other speakers did was that he was more engaging with everyone whilst he was talking – his style was like a lecture, but he periodically checked that we were all following everything, something which I guess comes from the teaching which he does, and was a nice touch.</p>
<h2>Cocoa Rumble</h2>
<p><a href="http://perspx.com/wp-content/uploads/2010/02/cocoa_rumble.jpg"><img class="alignleft size-full wp-image-1285" title="Cocoa Rumble" src="http://perspx.com/wp-content/uploads/2010/02/cocoa_rumble_small2.jpg" alt="" width="320" height="192" /></a>The rest of the allotted time had been reserved for something different, in the form of a &#8220;Cocoa Rumble&#8221;. Earlier in the day, Scotty had announced that people could put their names in a hat to be chosen for this mystery event. Names were picked out of this hat and each person chosen was assigned a speaker from the conference.</p>
<p>The combined speakers and delegates were then split up into three groups and had to pick from the hat which now contained another set of slips of paper, which had written on them different &#8220;Core–&#8221; frameworks. The three chosen were Core Text, Core Audio and Core Image, and the teams had some time to prepare a presentation for why their framework was the &#8220;Core of the Year&#8221;. All presentations were very entertaining, with talks from Mike, Wolf and Graham and at the end, Core Image (presented by Graham) won for the compelling reasons that he had put into a table.</p>
<p>Whilst the teams were preparing, there was also a chance for the speakers and some of the delegates to provide tips, and there were some great tips from such people as <a href="http://twitter.com/uliwitness">Uli</a> who provided a load of cool Xcode tips, Aaron on <a href="http://twitter.com/Perspx/status/8549070326">having the old Xcode documentation browsing behaviour</a>, and Jeff on conditional build settings.</p>
<p>A nice fun end to the day, with something different and all in the community and social spirit.</p>
<h2>Final thoughts</h2>
<p>It was my last day of <code>NSConference</code> and what a brilliant conference it had been, with Matt Gemmell&#8217;s workshop on Sunday and the Mac developer conference too. It was great to socialise with loads of Mac developers who were all really friendly and I entered into some interesting discussions, and I took a great deal away from the conference which was something that Scotty laid out as one of the goals at the beginning.</p>
<p>I would like to thank Scotty, Tim, Dave, Rob, Simon and all the other people who made <code>NSConference</code> possible, because it was a great experience indeed, and to all the great people that I met there. Thanks also to Uli for setting up the <a href="http://twitter.com/nsconfr">NSConference Reflector</a>.</p>
<img src="http://feeds.feedburner.com/~r/Perspx/~4/uhyyohq4o-E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://perspx.com/blog/archives/1253/nsconf-2010-mac-developer-conference-day-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://perspx.com/blog/archives/1253/nsconf-2010-mac-developer-conference-day-2/</feedburner:origLink></item>
		<item>
		<title>NSConference 2010: Mac Developer Conference (Day 1)</title>
		<link>http://feedproxy.google.com/~r/Perspx/~3/L6_wOQ3Xp6A/</link>
		<comments>http://perspx.com/blog/archives/1210/nsconference-2010-mac-developer-conference-day-1/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 08:21:54 +0000</pubDate>
		<dc:creator>Perspx</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[nsconf]]></category>
		<category><![CDATA[nsconference]]></category>

		<guid isPermaLink="false">http://perspx.com/?p=1210</guid>
		<description><![CDATA[
It was the first day of the NSConference 2010 Mac developer conference and a great lineup was ahead.
In terms of the day generally, it was a brilliant experience. It was well organised and many thanks go to Scotty, Tim, Dave and all the other NSConference staff. The WiFi (although irritating that you had to keep filling out the signup form)  ... ]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://perspx.com/wp-content/uploads/2010/02/nsconf.jpg"><img class="aligncenter size-full wp-image-1249" title="NSConference" src="http://perspx.com/wp-content/uploads/2010/02/nsconf.jpg" alt="" width="640" height="330" /></a></p>
<p>It was the first day of the <code>NSConference</code> 2010 Mac developer conference and a great lineup was ahead.</p>
<p>In terms of the day generally, it was a brilliant experience. It was well organised and many thanks go to Scotty, Tim, Dave and all the other <code>NSConference</code> staff. The WiFi (although irritating that you had to keep filling out the signup form) worked quite well and you could get some pretty good speeds, which was good considering that the room was filled with over 100 developers, almost all of which I imagine had a Mac or iPhone for most of the day.</p>
<p>It was also a great social event, and the breaks were a nice chance to go around and talk to someone you&#8217;d never met before and have some interesting discussions. It was also nice to be in this tight community, separated from all the &#8220;normal&#8221; people who were also around at the venue.</p>
<p>In terms of the talks generally, I felt that they were all very well done and it was clear that they had put a lot of work into them. The presentations were very well laid out and simple, and not wordy and the speakers all obviously knew what they were talking about and had lots of interesting things to say. However one big thing that I felt could be improved on was the interaction with the audience – that is, many of the slides were in more of a lecture-style and although a couple made up for this with a Q&amp;A at the end I thought this could be improved upon.</p>
<h2>The Speakers</h2>
<h3>Scotty</h3>
<p><a href="http://perspx.com/wp-content/uploads/2010/02/IMG_1426.jpg"><img class="alignleft size-full wp-image-1224" title="Scotty" src="http://perspx.com/wp-content/uploads/2010/02/scotty_thumb.jpg" alt="" width="294" height="211" /></a>Scotty kicked off the morning with a nice introduction to the conference, welcoming everyone and thanking us all for being here. He presented his recent case of being rushed into hospital for a &#8220;routine&#8221; operation as a metaphor for what we&#8217;re doing here, and he explained how even though he has little knowledge of the detailed ins and outs of the medical profession, he had a respect for them due to the reputation that the collective members have earned over the years. This was related to Mac development and <em>our</em> collective &#8216;responsibility to the platform&#8217; and what we do, and the expectations of the Mac or iPhone platforms which is ultimately our responsibility. He also talked about how there is pioneering but also sharing of ideas in the medical profession and again linked this to our role in the Mac/iPhone/iPad community.</p>
<p>He also went on to talk about the community spirit, and emphasised that all the speakers had given up their own time (and money) to be here which because of this, and was a nice to start the day.</p>
<h3>Mike Lee – Conference Keynote: Engineering Life</h3>
<p><a href="http://perspx.com/wp-content/uploads/2010/02/IMG_1430.jpg"><img class="alignright size-full wp-image-1226" title="Mike Lee" src="http://perspx.com/wp-content/uploads/2010/02/mike_lee_thumb.jpg" alt="" width="294" height="218" /></a>Mike&#8217;s presentation was evidently something slightly different and original to start the day but was a nice sideline to our ability to crank code, and was more thinking at a higher level about what we do, and perhaps being a bit more philosophical about it. He was relating what we do and our profession to life in general, and how we can &#8216;engineer life&#8217;. He defined <em>problems</em> as &#8216;reality we do not like&#8217; which was a topical tie-in with software development since problem solving is one of the key aspects to what we do.</p>
<p>Mike also used several anecodes during his presentation which brought in a realistic sense rather than something purely theoretical, reality which is often missed when talking about software and software development, with purely theoretical statements. He also likened the Universe to a computer in that both are simply entities which are constantly changing state.</p>
<p>The next part of the talk became perhaps a little morbid with discussion on &#8216;Death 101&#8242; with the conclusion that &#8216;death sucks&#8217; but you can&#8217;t really do anything about it and you&#8217;ll be dead in the ground so won&#8217;t care about it anyway. However he also likened this to fear and how you can engineer your way around fear and tackle it head-on rather than let it get the better of you. He also talked about having a legacy and a part of you that lives on when you die by accomplishing something that you are remembered for, which can perhaps give you a kind of immortality.</p>
<p>He finished on the note of &#8216;be the hero&#8217;, and overall the talk was an interesting and somewhat unusual. I heard later on that there was about a 50/50 split on people who liked/disliked the presentation but I thought it was an interesting, though-provoking topic and good to be a part of.</p>
<h3>Wolf Rentzsch – Spelunking OS X</h3>
<p><a href="http://perspx.com/wp-content/uploads/2010/02/IMG_1434.jpg"><img class="alignleft size-full wp-image-1227" title="Wolf Rentzsch" src="http://perspx.com/wp-content/uploads/2010/02/wolf_rentzsch_thumb.jpg" alt="" width="294" height="221" /></a>Wolf started with the statement that he had &#8216;90 slides in 60 minutes&#8217; and it was pretty fast-paced, although for the most part fine to follow. He dug into Mac OS X under the hood and ways you can access this information and interact with it, introducing such tools as otx, otool and class-dump.</p>
<p>The low-level nature of his talk was a great contrast to Mike&#8217;s previous talk which was a demonstration of the breadth of talks within <code>NSConference</code> and was more of a code and tool-based talk. He introduced hexadecimal editors such as HexFiend, which &#8216;are your friend&#8217;, then went on to deal with different sections with prying into OS X internals such as static analysis with strings and files, and code injection.</p>
<p>The great part of presenting these tools was the accompanying screenshots of a terminal and the associated output, and also examples of useful commands and how they could be used, which was probably the killer feature of the presentation for me. He also had a clear presentation style and after talking to him later at the bar was a nice, bubbly person to talk to and obviously knows his stuff.</p>
<p>As a suggestion for improvement it would have been nice to see a live demo of some of the tools in action – he had some screenshots of probing applications such as TextEdit, but a live demo of the tools live would have been a nice addition.</p>
<h3>Dave Dribin – Clean Code</h3>
<p><a href="http://perspx.com/wp-content/uploads/2010/02/IMG_1437.jpg"><img class="alignright size-full wp-image-1229" title="Dave Dribin" src="http://perspx.com/wp-content/uploads/2010/02/dave_dribin_thumb.jpg" alt="" width="294" height="230" /></a>I think that Dave&#8217;s presentation was perhaps my favourite of the day and talked about different ways of writing clean code and bad ways that can introduce &#8220;code smell&#8221; and ways to get around this and I agree that it is an important part of being a programmer.</p>
<p>He used the analogy of the iPhone as a way into the presentation; with the divide between internal and external quality – the external beauty is the interface that is seen by the user but the internals are the code that we write and sits behind the scenes. With an application it&#8217;s the difference between a beautiful interface and the underlying implementation of that in code.</p>
<p>The presentation was filled with quite a lot of tips, such as guidelines on naming classes and common principles such as DRY (Don&#8217;t Repeat Yourself) and OAOO (Once and Only Once) with the example of using enumerations or constants for dictionary keys instead of repeating strings throughout your code.</p>
<p>The Q&amp;A was also useful and for most of the other talks there wasn&#8217;t time so it was a nice feature to be able to ask questions about the content discussed.</p>
<h3>Drew McCormack – Data Presentation in Mac Apps</h3>
<p><a href="http://perspx.com/wp-content/uploads/2010/02/IMG_1438.jpg"><img class="alignleft size-full wp-image-1230" title="Drew McCormack" src="http://perspx.com/wp-content/uploads/2010/02/drew_mccormack_thumb.jpg" alt="" width="294" height="214" /></a>Drew lead into the presentation by talking about his scientific background and explaining how different data can be displayed and visualised in different ways. His presentation was also nice because it was one of the ones that wasn&#8217;t directly related to churning code and was more about the UI and talking about the various controls – standard or custom – and where they are best used.</p>
<p>I liked the format of looking at these different controls – he presented images of each and then talked about the advantages and disadvantages of each. This was particularly useful when comparing controls, such as the <code>NSTableView</code> and the <code>NSCollectionView</code>, and his slides were perhaps the best of the day and contained very little text on them, just visual cues such as images and the likes.</p>
<p>To this end I learnt a lot about how different views are implemented – he explained using Tweetie (Mac) as an example that it uses an <code>NSTableView</code> to display its list of data, and also Versions implements some of its custom controls using HTML, CSS and Javascript with WebKit.</p>
<p>Near the end he did talk about non-standard controls and focused on drawing graphs with CorePlot. However he spent quite a long time talking about this, which although interesting it would have been nicer if he&#8217;d demonstrated a few more, different controls.</p>
<h3>Marcus Zarra – Core Animation</h3>
<p><a href="http://perspx.com/wp-content/uploads/2010/02/IMG_1440.jpg"><img class="alignright size-full wp-image-1231" title="Marcus Zarra" src="http://perspx.com/wp-content/uploads/2010/02/marcus_zarra_thumb.jpg" alt="" width="294" height="209" /></a>Marcus started his talk by explaining how Core Animation wasn&#8217;t just for designers, and used himself as an example of a non-designer, but that it could still be used to enhance or help create sleek interfaces. However he also warned that Core Animation can easily be overused and turn a simple, clean UI into something horrible and even very unintuitive. He also explained how Core Animation, although its interface is quite simple, it is also very powerful.</p>
<p>He gave a few examples of using Core Animation, and then gave a live demo of an application that was doing lots of complex animations using Core Animation and how smooth and seamless they all were. It was evident that he had spent a lot of time on the project and he explained how the rotating gears displayed were constructed as paths which was a nice touch to the talk, to get a real demo application.</p>
<p>However even though he had an hour slot, he only used about 35 minutes talking and left the rest of the time for questions, which was quite a nice idea since it was more engaging with everyone rather than simply a lecture. However, it would have been nice for him to use more of his allotted time to show some more Core Animation examples.</p>
<img src="http://feeds.feedburner.com/~r/Perspx/~4/L6_wOQ3Xp6A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://perspx.com/blog/archives/1210/nsconference-2010-mac-developer-conference-day-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://perspx.com/blog/archives/1210/nsconference-2010-mac-developer-conference-day-1/</feedburner:origLink></item>
		<item>
		<title>NSConference 2010: The World According to Gemmell</title>
		<link>http://feedproxy.google.com/~r/Perspx/~3/F1hi-pIq8s4/</link>
		<comments>http://perspx.com/blog/archives/1193/the-world-according-to-gemmell/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 19:47:29 +0000</pubDate>
		<dc:creator>Perspx</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[matt gemmell]]></category>
		<category><![CDATA[nsconf]]></category>
		<category><![CDATA[nsconference]]></category>
		<category><![CDATA[workshop]]></category>

		<guid isPermaLink="false">http://perspx.com/?p=1193</guid>
		<description><![CDATA[
The first day of NSConference 2010 kicked off with two workshops – Concurrency Programming on Snow Leopard by Drew McCormack, and The World According to Gemmell, by the Legend himself, of which I was an attendee.
The session started with a discussion about a certain recently released Apple product which was very interesting and allowed us to present our thoughts on  ... ]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter size-full wp-image-1194" title="Matt Legend Gemmell at NSConference 2010" src="http://perspx.com/wp-content/uploads/2010/01/IMG_1420.jpg" alt="" width="600" height="428" /></p>
<p>The first day of <a href="http://nsconference.com/"><code>NSConference</code> 2010</a> kicked off with two workshops – <em>Concurrency Programming on Snow Leopard</em> by Drew McCormack, and <em>The World According to Gemmell</em>, by <a href="http://mattgemmell.com/">the Legend himself</a>, of which I was an attendee.</p>
<p><a href="http://perspx.com/wp-content/uploads/2010/01/andy_ipad.jpg"><img class="alignright size-full wp-image-1295" title="Andy's iPad mockup" src="http://perspx.com/wp-content/uploads/2010/01/andy_ipad_small.jpg" alt="" width="235" height="314" /></a>The session started with a discussion about a <a href="http://www.apple.com/ipad/">certain recently released Apple product</a> which was very interesting and allowed us to present our thoughts on the device. We covered such areas as the human psychology behind it, the display of &#8220;real&#8221; objects as the interface and the much more emphasised touch interaction including two-handed UI, as well as getting &#8220;wanky&#8221; about the emotional connection with the device.</p>
<p><a href="http://twitter.com/creednmd">Andy</a> had also created a great model of the device, that was the exact dimensions (although the back didn&#8217;t slope like the real thing) and half the weight of an actual iPad. This was really useful in the talk from Matt, when he was explaining such things as how people would hold the device.</p>
<p>We also discussed the changing seeds of user interfaces and the switch away from clutter-based interfaces, such as inspector panels which &#8216;can edit anything that has ever lived&#8217;.</p>
<h2 style="clear: both;"><em>Our</em> workshop</h2>
<p>A few weeks ago Matt sent an email round to all the workshop attendees asking whether we had any UX topics that we wanted to discuss that could form the basis of the workshop. This was a great structure and in the session we got through 7 or 8 discrete topics, from such topics as the evolution of your app and removing features to when the best time to release your 1.0 is.</p>
<p>Although Gemmell said that he had put the slides together quickly and a bit haphazardly (and <a href="http://twitter.com/macdevnet">Scotty</a> had been fiddling around with the slide animations<span class="required">*</span>), the slides were well arranged, and contained only a few – although thought-provoking – bullet points for each topic, and allowed us to really discuss the ins and outs and how one would go about dealing with these problems. The workshop dynamic really helped this section and the group discussion bit was great as we could all have our opinions heard and commented on, with Matt being the suspiciously-bearded ringleader of the event.</p>
<h2>Workshop dynamic</h2>
<p>Matt&#8217;s talk was arranged as a workshop and consisted of around 30 people. The tables had also been arranged into groups of about 5 or 6 and all of this combined made a great, much more personal dynamic for the session, because as Matt himself put it, we were all participants and it was <em>our</em> workshop, not just his.</p>
<p>It was a great social occasion to this end, and allowed for group collaboration which was a real strength of the workshop and made it a really enjoyable event.<em></em></p>
<h2>Final thoughts</h2>
<p>A brilliant first day to <code>NSConference</code> and a great thought experiment with lots of things to take away and think about. As I mentioned when speaking to Matt in one of the breaks, the Mac/iPhone/iPad platforms are so brilliant partially due to the fusion and interwoven nature of code <em>and </em>design, the latter of which is given a lot of thought in most instances, which made the workshop a very topical and interesting one indeed.</p>
<p>The Mac conference (Monday 1st Jan &#8211; Tuesday 2nd Jan) has a lot to live up to but a great start to what I&#8217;m sure will be a great conference.</p>
<div style="font-size: 10px; color: #606060;">* I&#8217;m kidding, we all know that it was <a href="http://twitter.com/tarasis">Rob</a> – he was being suspiciously quiet.</div>
<img src="http://feeds.feedburner.com/~r/Perspx/~4/F1hi-pIq8s4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://perspx.com/blog/archives/1193/the-world-according-to-gemmell/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://perspx.com/blog/archives/1193/the-world-according-to-gemmell/</feedburner:origLink></item>
		<item>
		<title>Are you sure?</title>
		<link>http://feedproxy.google.com/~r/Perspx/~3/ebbY6NdaFsQ/</link>
		<comments>http://perspx.com/blog/archives/1157/are-you-sure/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 17:28:53 +0000</pubDate>
		<dc:creator>Perspx</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[bad design]]></category>
		<category><![CDATA[destructive actions]]></category>
		<category><![CDATA[modal dialogs]]></category>

		<guid isPermaLink="false">http://perspx.com/?p=1157</guid>
		<description><![CDATA[We&#8217;ve all seen it before: dialogs which ask you whether you are absolutely, completely, invariably sure that you want to close without saving changes. And you click &#8220;Yes&#8221; in your haste, and then realise that you actually kind of needed that unsaved presentation that you&#8217;d been working on all evening.

A flawed design
It&#8217;s a pretty common design in applications even today,  ... ]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve all seen it before: dialogs which ask you whether you are absolutely, completely, <em>invariably</em> sure that you want to close without saving changes. And you click &#8220;Yes&#8221; in your haste, and then realise that you actually <em>kind of</em> needed that unsaved presentation that you&#8217;d been working on all evening.</p>
<p><a href="http://perspx.com/wp-content/uploads/2010/01/alertpanel.jpg"><img class="aligncenter size-full wp-image-1174" title="Alert Panel" src="http://perspx.com/wp-content/uploads/2010/01/alertpanel.jpg" alt="" width="464" height="218" /></a></p>
<h2>A flawed design</h2>
<p>It&#8217;s a pretty common design in applications even today, although flawed. The problem is that it is often linked with a permanent, destructive action, and doesn&#8217;t take two important behaviours into account:</p>
<ol>
<li><a href="http://www.codinghorror.com/blog/archives/000114.html">People don&#8217;t read</a></li>
<li>Humans being humans, we all make mistakes</li>
</ol>
<p>It also offloads the responsibility of managing data – which often is important – to the user, and forces them to make a choice about what they want to do, a choice which often cannot be undone. But hang on, <strong>why should an action that I want to perform be completely, irreversibly destructive anyway? </strong>We have the Recycle Bin to provide a safety net for accidental deletion in the filesystem, so why shouldn&#8217;t closing a Word document without saving or unsubscribing from an RSS feed be reversible too?</p>
<p>Alongside this, the dialog is irritating in <em>most</em> situations:</p>
<ol>
<li><em>&#8220;Why are you asking me this?! I clicked on the button because I </em>wanted<em> to perform the action&#8230; duh&#8221;</em> – when we&#8217;re in a hurry and just want to delete something, <strong>we have to then go through another modal dialog</strong> to accomplish the action.</li>
<li><em>&#8220;Shiii- I needed that and I just clicked on Delete&#8221;</em> – due to the fundamental flaw in nature of the design, <strong>it&#8217;s easy to accidentally go ahead with the action anyway</strong>.</li>
</ol>
<h2>A better design</h2>
<p>I like the design that <a href="http://mail.google.com/">Gmail</a> have implemented when you want to delete a message: the message is soft-deleted and a bar is displayed prominently notifying the user that a potentially destructive action has just taken place, but that it isn&#8217;t permanent and can be quickly undone by clicking the Undo button.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-1161" title="Gmail: delete mail" src="http://perspx.com/wp-content/uploads/2010/01/gmail_delete.jpg" alt="" width="527" height="85" /></p>
<p>This is a great design because it caters for most use cases: if you want to quickly go through and delete messages, you can do without being inhibited by modal dialogs. However if you accidentally delete something that you don&#8217;t want to, the action can be easily reversed.</p>
<img src="http://feeds.feedburner.com/~r/Perspx/~4/ebbY6NdaFsQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://perspx.com/blog/archives/1157/are-you-sure/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://perspx.com/blog/archives/1157/are-you-sure/</feedburner:origLink></item>
		<item>
		<title>Parsing command line arguments with NSUserDefaults</title>
		<link>http://feedproxy.google.com/~r/Perspx/~3/UikfHORxCY8/</link>
		<comments>http://perspx.com/blog/archives/1122/parsing-command-line-arguments-nsuserdefaults/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 19:18:29 +0000</pubDate>
		<dc:creator>Perspx</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[command line arguments]]></category>
		<category><![CDATA[NSArgumentDomain]]></category>
		<category><![CDATA[NSUserDefaults]]></category>

		<guid isPermaLink="false">http://perspx.com/?p=1122</guid>
		<description><![CDATA[The NSUserDefaults class provides Cocoa applications access to the underlying Mac OS X defaults system, and can be used to store and persist user preferences.
Whilst providing an interface to the defaults system, the NSUserDefaults class can also be used to access command line arguments that were passed when the executable was launched, which have already been parsed and are accessed  ... ]]></description>
			<content:encoded><![CDATA[<p>The <code>NSUserDefaults</code> class provides Cocoa applications access to the <a href="http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man1/defaults.1.html">underlying Mac OS X defaults system</a>, and can be used to store and persist user preferences.</p>
<p>Whilst providing an interface to the defaults system, the <code>NSUserDefaults</code> class can also be used to access command line arguments that were passed when the executable was launched, which have already been parsed and are accessed in the same way that other defaults are. This can be a great convenience when dealing with applications that accept command line arguments, such as command line tools.</p>
<h2>Defaults domains</h2>
<p>Defaults are organised into <em>domains</em>, each of which are assigned a name and are used to separate defaults intended for different purposes. Domains can either be <em>persistent</em> or <em>volatile</em> – persistent domains persist their defaults to disk and remain if the application is terminated and relaunched. Volatile domains only exist from the point at which they are created to when the user defaults object is deallocated.</p>
<p>The standard defaults domains – listed in order of precedence – are:</p>
<ol>
<li><code>NSArgumentDomain</code> – this is a volatile domain that contains any command line arguments that were passed when the application was executed.</li>
<li>The application-specific domain – the persistent domain that is based on the application&#8217;s bundle identifier. At current the defaults for this domain are stored in a .plist file at <code>~Library/Preferences/&lt;ApplicationIdentifier&gt;.plist</code></li>
<li><code>NSGlobalDomain</code> – a global defaults domain that is intended for use by all applications running under the user that the domain applies to.</li>
<li>Languages Domain – these are volatile domains used for language-specific defaults based on languages set in the <code>NSGlobalDomain</code> under the <code>AppleLanguages</code> key.</li>
<li><code>NSRegistrationDomain</code> – a volatile domain that allows &#8220;factory settings&#8221; to be set by the application. This provides a fallback so that the application can always rely on <code>NSUserDefaults</code> to return a value for certain defaults, even if they have not yet been overridden and saved in the defaults database in the application-specific or global domain (this is useful on first launch, for example).</li>
</ol>
<p>The order of precedence is important – when you request a value for a given key, the defaults domains are searched in this order. The first key that is found that matches the requested key is used. This means that, for example, if a key is present in the application-specific domain and also in the global domain, the value set in the application-specific domain will always be found first and used.</p>
<h2>Parsing command line arguments with the NSArgumentDomain</h2>
<p>The <code>NSArgumentDomain</code> is a particularly useful domain for applications that use command line arguments.  The domain is volatile, and when created the defaults dictionary is populated with any command line arguments that were passed when the application was executed.</p>
<p>Command line arguments that can be parsed and used by the <code>NSArgumentDomain</code> must take the format:</p>
<pre>-name value</pre>
<p>The argument is stored as a default with key of <em>name</em> and value of <em>value</em>.</p>
<p>At this point accessing values passed in on the command line is the same process for accessing any other defaults. For example running an application as such:</p>
<pre>MyApplication -aString "Hello, World" -anInteger 10</pre>
<p>Allows the command line arguments to be retrieved as such:</p>
<pre class="prettyprint">NSUserDefaults *standardDefaults = [NSUserDefaults standardUserDefaults];

NSString *aString = [standardDefaults stringForKey:@"aString"];
NSInteger anInteger = [standardDefaults integerForKey:@"anInteger"];

NSLog (@"aString argument: %@\nanInteger argument: %d", aString, anInteger);</pre>
<p>With the following output:</p>
<pre>aString argument: Hello, World
anInteger argument: 10</pre>
<h2>The importance of domain precedence</h2>
<p>The <code>NSArgumentDomain</code> has the highest precedence when a key is searched for in the user defaults, and as such defaults set in different domains with the same keys as the command line arguments will be temporarily overridden. For example, if the application is invoked from the command line as follows:</p>
<pre>MyApplication -myKey "Foo"</pre>
<p>but <code>myKey</code> also exists in the application-specific defaults domain with a value of &#8220;Bar&#8221;, then calling:</p>
<pre class="prettyprint">[[NSUserDefaults standardUserDefaults] valueForKey:@"myKey"];</pre>
<p>will return &#8220;Foo&#8221;. The default set in the application-specific domain is <em>not</em> overwritten, but the default in the <code>NSArgumentDomain</code> is encountered first as it has the highest precedence.</p>
<img src="http://feeds.feedburner.com/~r/Perspx/~4/UikfHORxCY8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://perspx.com/blog/archives/1122/parsing-command-line-arguments-nsuserdefaults/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://perspx.com/blog/archives/1122/parsing-command-line-arguments-nsuserdefaults/</feedburner:origLink></item>
		<item>
		<title>PXSourceList: Source List Control for Mac OS X</title>
		<link>http://feedproxy.google.com/~r/Perspx/~3/TIjHUp1pFuU/</link>
		<comments>http://perspx.com/blog/archives/1096/pxsourcelist/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 17:02:31 +0000</pubDate>
		<dc:creator>Perspx</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[source list]]></category>

		<guid isPermaLink="false">http://perspx.com/?p=1096</guid>
		<description><![CDATA[Source Lists feature in many Mac OS X applications. From iTunes to iCal to Versions, they are a great navigation control.
But for us Cocoa developers, they aren&#8217;t that easy to implement. You can easily create an NSOutlineView and set its highlight mode to &#8220;Source List&#8221; but none of the other Source List features come built in out of the box,  ... ]]></description>
			<content:encoded><![CDATA[<p><a href="http://developer.apple.com/Mac/library/documentation/UserExperience/Conceptual/AppleHIGuidelines/XHIGWindows/XHIGWindows.html#//apple_ref/doc/uid/20000961-CHDDIGDE" target="_blank">Source Lists</a> feature in many Mac OS X applications. From iTunes to iCal to Versions, they are a great navigation control.</p>
<p>But for us Cocoa developers, they aren&#8217;t that easy to implement. You can easily create an <code>NSOutlineView</code> and set its highlight mode to &#8220;Source List&#8221; but none of the other Source List features come built in out of the box, such as the ability to display badges or icons for items.</p>
<div id="attachment_1103" class="wp-caption aligncenter" style="width: 595px"><a href="http://perspx.com/wp-content/uploads/2010/01/pxsourcelist1.jpg"><img class="size-full wp-image-1103" title="PXSourceList" src="http://perspx.com/wp-content/uploads/2010/01/pxsourcelist1.jpg" alt="" width="585" height="322" /></a><p class="wp-caption-text">PXSourceList</p></div>
<p>I created <code>PXSourceList</code> to help address this issue. It is a reusable control (within the context of Source Lists) compatible with Mac OS X 10.5 and higher. It makes implementing Source Lists in your applications easier by adding the following main features:</p>
<ul>
<li>Automatic <em>Group</em> highlighting of top-level items – the text for Group items appears in a dark blue colour and is normally displayed as capitalized.</li>
<li>Support for <em>Badges</em> – these are dark blue capsules displayed to the right of certain items that display a number.</li>
<li>The option to display an <em>Icon</em> for each row – a small image that provides extra visual information for each row.</li>
<li>Right-clicking support to display context menus.</li>
</ul>
<h2>Getting the control</h2>
<p>The source is available to download <a href="http://github.com/Perspx/PXSourceList">from GitHub</a>.</p>
<h2>More Information</h2>
<p>More information about <code>PXSourceList</code> is available from the <a href="http://perspx.com/software/PXSourceList/">project page</a>.</p>
<p>There is also documentation available – a link to this can be found on the <a href="http://perspx.com/software/PXSourceList/">main project page</a> or from the <a href="http://github.com/Perspx/PXSourceList/">page on GitHib</a>.</p>
<p>If you have any other questions then feel free to <strong><a href="http://perspx.com/contact/">get in touch</a></strong> and I&#8217;ll be happy to help.</p>
<img src="http://feeds.feedburner.com/~r/Perspx/~4/TIjHUp1pFuU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://perspx.com/blog/archives/1096/pxsourcelist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://perspx.com/blog/archives/1096/pxsourcelist/</feedburner:origLink></item>
		<item>
		<title>Useful Interface Builder Features</title>
		<link>http://feedproxy.google.com/~r/Perspx/~3/1IyBXiMOmCg/</link>
		<comments>http://perspx.com/blog/archives/1003/useful-interface-builder-features/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 20:26:05 +0000</pubDate>
		<dc:creator>Perspx</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[cocoa-touch]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[interface builder]]></category>
		<category><![CDATA[user interface]]></category>

		<guid isPermaLink="false">http://perspx.com/?p=1003</guid>
		<description><![CDATA[Interface Builder is one of Apple&#8217;s developer tools, used to design interfaces for both Mac OS X and iPhone applications, and in most instances saves developers huge amounts of time from having to write the equivalent code, whilst also providing a useful visual representation of the interfaces they are working on.
Some developers try and fight Interface Builder, and would rather  ... ]]></description>
			<content:encoded><![CDATA[<p>Interface Builder is one of Apple&#8217;s developer tools, used to design interfaces for both Mac OS X and iPhone applications, and in most instances saves developers huge amounts of time from having to write the equivalent code, whilst also providing a useful visual representation of the interfaces they are working on.</p>
<p>Some developers <a href="http://stackoverflow.com/questions/717442/how-do-i-create-cocoa-interfaces-without-interface-builder" target="_blank">try and fight</a> Interface Builder, and would rather code up the interfaces rather than let Interface Builder do most of the work for them. Of course, there are instances where this may be useful, but in the grand scheme of things IB is a tool which has lots of useful features that makes interface design a much easier process.</p>
<h2>Layout and alignment</h2>
<p>Interface Builder provides blue guides to aid positioning of objects, in accordance with the <a href="http://perspx.com/blog/archives/454/apple-human-interface-guidelines/" target="_blank">Apple Human Interface Guidelines</a>. However, if you want a tighter grain of control over the layout, there are other guides which help you with this.</p>
<p>Pressing <strong>option</strong> with an interface object selected causes red arrows to be displayed on the four sides of the object, with labels displaying the number of pixels from the frame of the object to the edges of the container.</p>
<p style="text-align: center;"><a href="http://perspx.com/wp-content/uploads/2010/01/option-spacing-guides.jpg"><img class="aligncenter size-full wp-image-1017" title="IB Layout: Spacing guides" src="http://perspx.com/wp-content/uploads/2010/01/option-spacing-guides.jpg" alt="" width="337" height="262" /></a></p>
<p>With the option key still held down, placing the cursor over another interface object will show you the spacing between the frame of the selected object and the frame of the object you have the cursor over. This can be useful in times when making sure objects have equal alignments with neighbouring objects, or within the window itself.</p>
<p style="text-align: center;"><a href="http://perspx.com/wp-content/uploads/2010/01/option-spacing-guides2.jpg"><img class="aligncenter size-full wp-image-1018" title="IB Layout: Spacing guides" src="http://perspx.com/wp-content/uploads/2010/01/option-spacing-guides2.jpg" alt="" width="332" height="255" /></a></p>
<p>There are also the <em>Align Vertical Center in Container</em> and <em>Align Horizontal Center in Container</em> options from the <em>Layout &gt; Alignment</em> menu which are useful in centering objects within their container (and which I personally think should also have keyboard shortcuts associated with them).</p>
<p style="text-align: center;"><a href="http://perspx.com/wp-content/uploads/2010/01/alignment.jpg"><img class="aligncenter size-full wp-image-1019" title="IB Layout: Alignment menu" src="http://perspx.com/wp-content/uploads/2010/01/alignment.jpg" alt="" width="410" height="309" /></a></p>
<h2>Option-drag to duplicate objects</h2>
<p>It really does what it says on the tin. To duplicate objects just hold down the option key then drag an object. A clone of the object will be created which you can then move to the desired location.</p>
<p style="text-align: center;"><a href="http://perspx.com/wp-content/uploads/2010/01/option-drag.jpg"><img class="aligncenter size-full wp-image-1021" title="IB: Option-drag to duplicate objects" src="http://perspx.com/wp-content/uploads/2010/01/option-drag.jpg" alt="" width="377" height="247" /></a></p>
<h2>Decompose and Simulate Interface</h2>
<p>These are two useful options that are accessible from the <em>File</em> menu.</p>
<p style="text-align: center;"><a href="http://perspx.com/wp-content/uploads/2010/01/decompose_simulate_interface.jpg"><img class="aligncenter size-full wp-image-1022" title="IB File Menu" src="http://perspx.com/wp-content/uploads/2010/01/decompose_simulate_interface.jpg" alt="" width="341" height="309" /></a></p>
<p>The first is <em>Decompose Interface</em>. An advantage of using NIBs is that they can be loaded lazily – that is, only when the contained objects are actually needed by the application. This can reduce the memory footprint and loading times, which is particularly useful when developing iPhone applications due to the somewhat limited system resources available.</p>
<p>Therefore a common design pattern for Cocoa/Cocoa-Touch applications is to share different objects – be that menus, windows, view controllers and such – across multiple nibs – not necessarily one per nib, but perhaps two or three that are needed for a particular part of the application and have to be loaded together. What the <em>Decompose Interface</em> action does is split objects in the current nib into separate nibs, which can then be saved and then loaded lazily by the application in this way.</p>
<p>The other action, <em>Simulate Interface</em>, is a convenience when designing an interface; instead of having to go back to Xcode and Build and Run to see what the interface looks like, you can do it straight from Interface Builder, which will simulate the current window and its contents.</p>
<p>However, note that if you use any custom views, any custom visual or behavioural attributes will not be implemented by the simulator – it does not build your application, just simulates the available objects used by your interfaces from the Library.</p>
<h2>Size to Fit</h2>
<p><em>Size to Fit</em> is an option available from the <em>Layout</em> menu (or ⌘=) which resizes a view to a size just large enough to fit its contents.</p>
<p><a href="http://perspx.com/wp-content/uploads/2010/01/sizetofit.jpg"><img class="aligncenter size-medium wp-image-1023" title="IB: Size To Fit menu option" src="http://perspx.com/wp-content/uploads/2010/01/sizetofit-300x155.jpg" alt="" width="300" height="155" /></a></p>
<p>This is useful after changing the contents of an element to then resize it to just the right size to fit its contents.</p>
<h2>Precise selection of Views in the view hierarchy</h2>
<p>This is another really useful feature of Interface Builder; when making a selection, hold down <strong>shift</strong> and then <strong>right-click</strong> on an element. A menu will pop up, which lists the views in the view hierarchy for that element, from the enclosing Window (or other appropriate top-level container) to the interface object that you have clicked on. For example, when clicking on an <code>NSButton</code>, the menu lists <em>Window, Content View, Push Button</em> and<em> Button Cell</em>.</p>
<p style="text-align: center;"><a href="http://perspx.com/wp-content/uploads/2010/01/rightclickselection.png"><img class="aligncenter size-full wp-image-1024" title="rightclickselection_thumb" src="http://perspx.com/wp-content/uploads/2010/01/rightclickselection_thumb.png" alt="" width="290" height="315" /></a></p>
<p>Where I&#8217;ve found this to be particularly useful is with Table Views; the particular part of the table that you want to select very much depends on what you want to do; if you are binding to a column for instance, you will want to select the table column; if you are resizing the headers, you will want to select the header view; if you want to change the row height, you want to select the Table View itself, and so forth.</p>
<p>Selection of these individual components is rather difficult and annoying, and you often have to time your clicks appropriately to select the part of the Table View that you want. However, shift-right-clicking on the Table View means that you can select the appropriate item – be that the table column, the cell for a column or the Table View itself – by selecting the appropriate item from the popup menu.</p>
<h2>Smart Groups</h2>
<p>Smart Groups can be created in Interface Builder much like smart groups in applications such as the Finder or iTunes. These are listed in the Library window, along with the other object groupings.</p>
<p style="text-align: center;"><a href="http://perspx.com/wp-content/uploads/2010/01/smart-groups.png"><img class="aligncenter size-full wp-image-1027" title="smart groups_thumb" src="http://perspx.com/wp-content/uploads/2010/01/smart-groups_thumb.png" alt="" width="464" height="264" /></a></p>
<p>Smart Groups provide a means of filtering objects based on a predicate (or filter) based on such properties as object label, the most recently used objects, or the kind of class an object is. This last property can be especially useful. For example, if you want a Smart Group that lists all <code>NSView</code> objects or subclasses, you can set the predicate to:</p>
<pre>&lt;Is A Kind Of&gt; NSView</pre>
<p>And the group will contain all <code>NSView</code> classes or subclasses.</p>
<p>Smart Groups can be created by clicking on the actions button at the bottom of the Library window and selecting <em>New Smart Group</em>.</p>
<p style="text-align: center;"><a href="http://perspx.com/wp-content/uploads/2010/01/new_smart_group.jpg"><img class="aligncenter size-full wp-image-1038" title="IB: New Smart Group" src="http://perspx.com/wp-content/uploads/2010/01/new_smart_group.jpg" alt="" width="290" height="259" /></a></p>
<h2>Font Menu</h2>
<p>Another useful menu is the <em>Font</em> menu, which allows you to set the font and font attributes of items in your interface. This can be useful when setting fonts of controls or cells, such as changing the font size, weight or colour of a cell in an <code>NSTableView</code>, for example, which saves you having to do it with code.</p>
<p><a href="http://perspx.com/wp-content/uploads/2010/01/fontsmenu.jpg"><img class="aligncenter size-full wp-image-1030" title="IB Font Menu" src="http://perspx.com/wp-content/uploads/2010/01/fontsmenu.jpg" alt="" width="241" height="342" /></a></p>
<h2>Info Panel</h2>
<p>The Info panel provides useful information about the nib that you are currently editing and its contained objects. It allows you to specify a deployment and development target, and shows any errors that your interface may have when deploying to that target.</p>
<p style="text-align: center;"><a href="http://perspx.com/wp-content/uploads/2010/01/Info-panel.jpg"><img class="aligncenter size-full wp-image-1029" title="IB Info Panel" src="http://perspx.com/wp-content/uploads/2010/01/Info-panel.jpg" alt="" width="462" height="265" /></a></p>
<p>For example, placing an <code>NSCollectionView</code> instance in a window and selecting a deployment target of Mac OS X 10.4 will show an error that the <code>NSCollectionView</code> class is not supported on versions of OS X prior to 10.5.</p>
<p>The Info panel can also show useful information about layout, for example if a window lies partially hidden off the screen which means that it will be partially hidden from view when unarchived and displayed.</p>
<img src="http://feeds.feedburner.com/~r/Perspx/~4/1IyBXiMOmCg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://perspx.com/blog/archives/1003/useful-interface-builder-features/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://perspx.com/blog/archives/1003/useful-interface-builder-features/</feedburner:origLink></item>
		<item>
		<title>When people don’t like clicking</title>
		<link>http://feedproxy.google.com/~r/Perspx/~3/TKjmtOSihd4/</link>
		<comments>http://perspx.com/blog/archives/976/when-people-dont-like-clicking/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 17:50:09 +0000</pubDate>
		<dc:creator>Perspx</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[batch operations]]></category>
		<category><![CDATA[multiple items]]></category>

		<guid isPermaLink="false">http://perspx.com/?p=976</guid>
		<description><![CDATA[People like clicking; after all, wasn&#8217;t the mouse the main piece of hardware that lead to the GUI and made computers more accessible?

But people don&#8217;t like repetitive, boring tasks. And one of the areas where this is done especially poorly is when performing batch operations on large sets of data, where the user has to go through several stages to  ... ]]></description>
			<content:encoded><![CDATA[<p><strong>People like clicking</strong>; after all, wasn&#8217;t the mouse the main piece of hardware that lead to the GUI and made computers more accessible?</p>
<p style="text-align: center;"><a href="http://www.veryfunnycats.info/wp-content/uploads/2007/02/funny_cat_pictures_pc_2.jpg" target="_blank"><img class="aligncenter size-full wp-image-988" title="Cat Clicking Mouse" src="http://perspx.com/wp-content/uploads/2009/12/cat_clicking_mouse.jpg" alt="" width="387" height="354" /></a></p>
<p>But <strong>people don&#8217;t like repetitive, boring tasks</strong>. And one of the areas where this is done especially poorly is when performing batch operations on large sets of data, where the user has to go through several stages to accomplish a task – each time for every item they want to perform the operation(s) on.</p>
<h2>Dealing with multiple items</h2>
<p>It really does amaze me how badly this is done with lots of services that are on offer, most of which play with large quantities of data – manipulating all of this can be something of a nightmare.</p>
<p>A great example of this is on Facebook. In the settings, there are a list of applications that you have granted privileges to – 85 in my case. What I want to do now is remove a load of these from this list. The procedure to do this is:</p>
<ol>
<li>Click on the X in the right-hand corner.<a href="http://perspx.com/wp-content/uploads/2009/12/facebook_app_removal.jpg"><img class="aligncenter size-full wp-image-986" title="Facebook App Removal" src="http://perspx.com/wp-content/uploads/2009/12/facebook_app_removal.jpg" alt="" width="572" height="121" /></a></li>
<li>Click on &#8220;Remove&#8221; in the are you sure..? dialog box (as a side note, the &#8220;Remove&#8221; button shouldn&#8217;t be the default option since it is a destructive action)<br />
<a href="http://perspx.com/wp-content/uploads/2009/12/facebook_app_removal_2.jpg"><img class="aligncenter size-full wp-image-978" title="Facebook App Removal: Are you sure..?" src="http://perspx.com/wp-content/uploads/2009/12/facebook_app_removal_2.jpg" alt="" width="378" height="150" /></a></li>
<li>Click on OK in the confirmation dialog<br />
<a href="http://perspx.com/wp-content/uploads/2009/12/facebook_app_removal_3.jpg"><img class="aligncenter size-full wp-image-979" title="Facebook App Removal: Confirmation" src="http://perspx.com/wp-content/uploads/2009/12/facebook_app_removal_3.jpg" alt="" width="378" height="100" /></a></li>
</ol>
<p>For those who are mathematically inclined, you probably have guessed that to remove all 85 applications from the list takes <strong>255 clicks</strong> (perhaps more taking into account accidental/mis-clicking). And guess what? There is no way of removing privileges from multiple applications at once.</p>
<p>This is when people don&#8217;t like clicking – when <strong>they have to perform batch operations by clicking the same things over and over again </strong>to do the same job on lots of items.</p>
<h2>Solving the Problem</h2>
<p>I feel that iTunes solves this problem very well when editing multiple items at once in the &#8220;Get Info&#8221; panel. The panel is generic and works with different kinds of media, and allows batch editing of all properties that are shared by items in the current selection, something which is very useful especially when dealing with large media libraries. This means that the user can change a load of common properties of items in their media library in one fell swoop, then go through and change the unique properties, such as song name afterwards.</p>
<p style="text-align: center;"><a href="http://perspx.com/wp-content/uploads/2009/12/iTunes.jpg"><img class="aligncenter size-full wp-image-993" title="iTunes Get Info dialog" src="http://perspx.com/wp-content/uploads/2009/12/iTunes.jpg" alt="" width="430" height="355" /></a></p>
<h2>Final word</h2>
<p>When designing an interface that deals with lots of data, make sure you have a way of changing or removing multiple items at once, rather than the user having to repeat several actions for each item – something which becomes tedious very quickly, and means they have to waste more time dealing with fairly minor actions, rather than the main focus of your application.</p>
<img src="http://feeds.feedburner.com/~r/Perspx/~4/TKjmtOSihd4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://perspx.com/blog/archives/976/when-people-dont-like-clicking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://perspx.com/blog/archives/976/when-people-dont-like-clicking/</feedburner:origLink></item>
		<item>
		<title>Search Engine Optimization is for dummies</title>
		<link>http://feedproxy.google.com/~r/Perspx/~3/RFxX-eufIVY/</link>
		<comments>http://perspx.com/blog/archives/963/search-engine-optimization-is-for-dummies/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 20:03:11 +0000</pubDate>
		<dc:creator>Perspx</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://perspx.com/?p=963</guid>
		<description><![CDATA[I came across Search Engine Optimization for Dummies on Amazon today: After a quick tweet fuelled by my thoughts on the topic, I thought that I should perhaps elaborate on exactly what I meant.
I&#8217;m all for optimizing your website so that it is searchable; for example, from a development point of view you can do things like:

&#8220;prettify&#8221; URLs
create semantic page  ... ]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">I came across <a href="http://www.amazon.co.uk/gp/product/0470262702/ref=s9_sima_gw_s1_p14_t2?pf_rd_m=A3P5ROKL5A1OLE&amp;pf_rd_s=center-1&amp;pf_rd_r=0KQH230NZPHERERJ7BCP&amp;pf_rd_t=101&amp;pf_rd_p=467198433&amp;pf_rd_i=468294" target="_blank">Search Engine Optimization for Dummies</a> on Amazon today:<a href="http://www.amazon.co.uk/gp/product/0470262702/ref=s9_sima_gw_s1_p14_t2?pf_rd_m=A3P5ROKL5A1OLE&amp;pf_rd_s=center-1&amp;pf_rd_r=0KQH230NZPHERERJ7BCP&amp;pf_rd_t=101&amp;pf_rd_p=467198433&amp;pf_rd_i=468294" target="_blank"><img class="aligncenter size-full wp-image-964" title="SEO for Dummies" src="http://perspx.com/wp-content/uploads/2009/12/SEO_for_dummies.jpg" alt="" width="240" height="240" /></a> After a <a href="http://twitter.com/Perspx/status/6931895278" target="_blank">quick tweet</a> fuelled by my thoughts on the topic, I thought that I should perhaps elaborate on exactly what I meant.</p>
<p>I&#8217;m all for optimizing your website so that it is searchable; for example, from a development point of view you can do things like:</p>
<ul>
<li>&#8220;prettify&#8221; URLs</li>
<li>create semantic page layouts</li>
<li>create a sitemap to make pages easier to find by crawlers</li>
</ul>
<p>That&#8217;s good practise, and that will always help your website; if not from a search perspective, doing things like URL prettifying will make more sense to your users, rather than loads of random text, numbers, question marks and ampersands spewed all over the address bar.</p>
<h2>Selling a lie</h2>
<p>But this kind of &#8220;optimization&#8221; is just a farce – a form of business which just goes to screw people over by charging them for the belief that they can be in the top 20 search results – something they&#8217;re not <em>actually</em> going to be able to achieve, and often in cases don&#8217;t deserve. Not because the content isn&#8217;t good (necessarily) but because there are a million other sites out there doing what they do, and a proportion of them are better than they are.</p>
<p><a href="http://calacanis.com/" target="_blank">Jason Calacanis</a> noted this on <a href="http://blog.stackoverflow.com/2009/06/podcast-56/" target="_blank">Episode #56</a> of the Stack Overflow podcast:</p>
<blockquote><p>[Google] can&#8217;t tell you how to make a perfect result and how to get that top 10/20 ranking and so then everybody goes to the next best thing which is an SEO. And <strong>the SEO sells them the belief that they actually deserve it</strong>.</p></blockquote>
<h2>All about the content</h2>
<p>The best thing you can do is <strong>focus on creating great content</strong>, and do some of the web development basics to make your pages semantically clear to search engines. Nothing comes for free, so if you want to be in the top results, you&#8217;d better make sure you have top content that is presented in an easy to digest manner. If your content is good, then people will start to like what you&#8217;re doing, which in turn will make you index better (through links, etc).</p>
<p>If you do that and invest your time and effort into your site, you don&#8217;t need a conman to sell you a lie.</p>
<img src="http://feeds.feedburner.com/~r/Perspx/~4/RFxX-eufIVY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://perspx.com/blog/archives/963/search-engine-optimization-is-for-dummies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://perspx.com/blog/archives/963/search-engine-optimization-is-for-dummies/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 0.357 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-02-15 17:03:32 --><!-- Compression = gzip -->
