<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:iweb="http://www.apple.com/iweb" version="2.0">
  <channel>
    <title></title>
    <link>http://www.mentalfaculty.com/mentalfaculty/Blog/Blog.html</link>
    <description> </description>
    <generator>iWeb 3.0.2</generator>
    <item>
      <title>WHY NATIVE APPS ARE HERE TO STAY</title>
      <link>http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2011/9/8_WHY_NATIVE_APPS_ARE_HERE_TO_STAY.html</link>
      <guid isPermaLink="false">f25387e0-3e16-47cb-baab-3b5ca5635d4c</guid>
      <pubDate>Thu, 8 Sep 2011 09:29:01 +0200</pubDate>
      <description>&lt;a href=&quot;http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2011/9/8_WHY_NATIVE_APPS_ARE_HERE_TO_STAY_files/wide%20web.jpg&quot;&gt;&lt;img src=&quot;http://www.mentalfaculty.com/mentalfaculty/Blog/Media/object001_4.jpg&quot; style=&quot;float:left; padding-right:10px; padding-bottom:10px; width:254px; height:135px;&quot;/&gt;&lt;/a&gt;I've just returned from the inaugural &lt;a href=&quot;http://updateconf.com/&quot;&gt;Update Conf&lt;/a&gt; in Brighton, UK. Aral Balkan (&lt;a href=&quot;http://twitter.com/#!/aral&quot;&gt;@aral&lt;/a&gt;) is a popular presenter at other tech conferences, and his first venture in the role of conference organizer was a raging success. Everyone thoroughly enjoyed themselves at the pre- and post-conference activities, and the day itself was a diverse mix of music, tech talks, and onstage interviews, a bit like a Tech Variety Show. Very unique, and I for one thoroughly enjoyed it.&lt;br/&gt;&lt;br/&gt;One of the talking points of the conference was a presentation by &lt;a href=&quot;http://adactio.com/&quot;&gt;Jeremy Keith&lt;/a&gt;, which was followed by an onstage debate. Keith presented the case that we should forget about developing native apps for mobile platforms, and move everything to the web browser. He is a very good speaker, and his conviction seemed to leave his fellow presenters a bit overwhelmed, incapable of launching a good defense of native apps. Despite the fact that I did not meet anyone else who actually shared his views — not even any web developers — he controlled the debate, and deserves full credit for that. (To be honest, he was so unrelenting that I thought he may be under instructions to play Devil's Advocate, but let's assume for now that he was being earnest.)&lt;br/&gt;&lt;br/&gt;Of course, just because someone speaks well does not mean he/she is right. There are actually many good arguments against what he was espousing, and I heard many of them from fellow audience members throughout the conference. I think it is an important discussion, and I want to make a belated case for native app development here.&lt;br/&gt;&lt;br/&gt;Keith made a number of key points in his talk. The web, he said, comprised of HTML, delivered over HTTP, with one-way hyperlinking in the form of URLs. He claimed that native apps broke this model, mainly because you couldn't link to them in any universal way. Even if an app does support a URL scheme, linking to it will only work on devices that both support the app and have it installed, whereas web sites will work anywhere (in principle).&lt;br/&gt;&lt;br/&gt;He also strongly emphasized the fleeting nature of native apps, and the permanence of web sites. I believe he described native apps as being part of a 'flow', like a stream of disposables with no lasting benefit. Web sites, on the other, will continue to work in future browsers, and in that way contribute to the betterment of humankind in a more permanent way.&lt;br/&gt;&lt;br/&gt;Finally, he invoked the ubiquity of the web to implore developers to reach out to a broader audience, and stop limiting their apps to particular devices or operating systems. Developing in HTML, according to Keith, means anyone can utilize and benefit from your app. How could that be a bad thing?&lt;br/&gt;&lt;br/&gt;On the face of it, the arguments seem reasonable enough, and it is easy to see why you would struggle to counter them if you were put on the spot, with no forewarning, in front of several hundred onlookers. But the arguments are unquestionably flawed, and conveniently fail to acknowledge many realities of mobile software development.&lt;br/&gt;&lt;br/&gt;Probably the biggest hole in Keith's argument is that it artificially partitions web and native apps. By claiming that HTML is integral to the web, he is attempting to segregate native apps, isolating them from the web, when anyone who uses native mobile apps knows that many, even most, are closely coupled to the web. In fact, I would argue that most native apps are 'web apps', despite the fact that they don't use HTML. &lt;br/&gt;&lt;br/&gt;In fact, it is wrong to view HTML and the web browser as anything more or less than the most successful cross-platform development environment that we have. A virtual machine, like Java's JVM or Adobe's Flash, it runs on every device, and — in the same vain as the JVM — offers the same lowest common-denominator user experience on all devices. HTML, together with JavaScript and CSS, has become little more than a presentation technology. It only differs from other solutions in its ubiquity, and non-proprietary nature. These factors are important, but should not be confused with any technical advantage.&lt;br/&gt;&lt;br/&gt;The permanence of web sites is also highly questionable. Most web sites undergo regular design changes, the equivalent of a native app getting an update. In this respect, the two are equally fleeting: the HTML of a site is as likely to change as the controls in an app. Both are in constant flux, and if neglected, will become less useful and may eventually fail to work at all. How many unmaintained web sites do you visit regularly? It's a nice thought that web sites could theoretically survive in perpetuity, but in practice it doesn't happen, and even if it did, would not have any great benefit, other than perhaps for historians.&lt;br/&gt;&lt;br/&gt;In any case, what you want to survive forever is not the visual presentation of the web site, but the content it contains, and this is completely independent of the presentation medium used on the device. A well designed web service is many times more useful than a web page. The content is well structured, and can just as easily be presented in a web page as passed to a native app. The data can also link to other resources, whether they be web pages or apps.&lt;br/&gt;&lt;br/&gt;To finish off, I want to address the idea that as developers we should be aiming to reach as wide an audience as possible. This is not my own objective, nor the objective of many other developers. Personally, I want to develop the best user experience for my customers that I can. I forego a broader audience to build a better product for fewer users. &lt;br/&gt;&lt;br/&gt;Keith would claim that I am doing a disservice to mankind, but that is not the case. I will develop the best app that I can for iOS users; my counterpart on Android will do the same; together we will deliver a high-quality experience tailored to our respective audiences. This scenario is far superior to each developing poorer-quality web apps in an effort to reach as broad an audience as possible. Two wrongs don't make a right. (And, yes, web apps are by their very nature unoptimized for the native platform, and thereby offer a 'poorer' experience.)&lt;br/&gt;&lt;br/&gt;This whole discussion is to some degree moot, because the people have already spoken. It may be tempting to suggest that the App Store was a ruse forced upon us by Apple, but the truth is actually completely the opposite: Apple did not want to allow native apps on the iPhone, and was pushed into it by the overwhelming strength of the jailbreak community. People wanted the better user experience provided by native apps, and if Apple wouldn't allow it, they would do it themselves. In a pinch, a browser will do, but it will never supplant native apps, and why should it?&lt;br/&gt;&lt;br/&gt;Want to comment? Head on over to our &lt;a href=&quot;https://mentalfaculty.tenderapp.com/discussions/blog-comments/10-why-native-apps-are-here-to-stay&quot;&gt;Tender&lt;/a&gt; site</description>
      <enclosure url="http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2011/9/8_WHY_NATIVE_APPS_ARE_HERE_TO_STAY_files/wide%20web.jpg" length="350138" type="image/jpeg"/>
    </item>
    <item>
      <title>Mental Case 2.0 Progress Report</title>
      <link>http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2011/1/11_Mental_Case_2.0_Progress_Report.html</link>
      <guid isPermaLink="false">0149e2ad-4174-4b00-aeac-a19f7b080446</guid>
      <pubDate>Tue, 11 Jan 2011 09:33:47 +0100</pubDate>
      <description>&lt;a href=&quot;http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2011/1/11_Mental_Case_2.0_Progress_Report_files/Vapour%20Trails.jpg&quot;&gt;&lt;img src=&quot;http://www.mentalfaculty.com/mentalfaculty/Blog/Media/object000_1.jpg&quot; style=&quot;float:left; padding-right:10px; padding-bottom:10px; width:254px; height:135px;&quot;/&gt;&lt;/a&gt;Some of you have been waiting a long time for Mental Case 2.0. No doubt you expect it is vaporware by now, but we are here to tell you that it exists, and now dominates our focus. While we can’t give a definitive date for release, it is safe to say that if it were to come out after the summer, we would be very disappointed. It’s a question of months, not years.&lt;br/&gt;&lt;br/&gt;We thought we would release a few details, to help you understand why it is taking so long, but also so that you have something to look forward to. It is worth pointing out that if you purchase &lt;a href=&quot;http://itunes.apple.com/us/app/mental-case/id402688205?mt=12&quot;&gt;Mental Case on the Mac App Store&lt;/a&gt; now, Mental Case 2.0 will be a free upgrade. Mental Case 2.0 will only be available via the Mac App Store, and will require Mac OS X 10.6 or later.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;We have rewritten Mental Case 2.0 from scratch. Only small parts of Mental Case 1.x have been incorporated. We wanted to take what we had learned from users over the last four years, and make a more rounded, and hopefully much better designed application.&lt;br/&gt;&lt;br/&gt;Mental Case 2.0 incorporates many of the most requested features. Notes can be manually ordered, and can appear in multiple cases. There are tags, flagging of notes, and smart cases. You can have formatted text in notes (eg color, font, font size, bold, italic), and in Mental Case 2.0 there is no limit to the number of sides on a note.&lt;br/&gt;&lt;br/&gt;You can still include an image, text, and audio on one ‘side’, but we now also have support for video. All data is stored in a more scalable way, similar to how iTunes does it, with media files stored separate to the main database. &lt;br/&gt;&lt;br/&gt;The study options in Mental Case 2 have not yet been developed, but the plan is that there will be more modes of study. Not just long-term memory retention, but scheduling to target a particular date, such as an examination, and other variations. In the longer term, scheduling should be the same across all devices.&lt;br/&gt;&lt;br/&gt;In Mental Case 2.0, you have much more control over the appearance of slideshows. You can set text size and color, as well as background color. You can also resize the slides any way you like, and run slideshows in windowed mode, or in full screen mode. There will also be a navigation strip for jumping around in your slides. Overall, it is much more flexible.&lt;br/&gt;&lt;br/&gt;Initially, we intend only to update the Mac app. It is too much work to update the iOS apps at the same time — it would mean Mac users would have to wait too long. So the Mac app will be released, and after that, we will overhaul the iOS versions to introduce some of the same improvements. In the meantime, you will be able to keep syncing notes to iOS, but with some restrictions, such as only two sides will appear on the touch device.&lt;br/&gt;&lt;br/&gt;So we are working on it. And in the meantime, consider saving yourself a few bob by heading over to the &lt;a href=&quot;http://itunes.apple.com/us/app/mental-case/id402688205?mt=12&quot;&gt;Mac App Store&lt;/a&gt; and purchasing the current version of Mental Case for Mac OS X. (On the day of publication, there is a one-week half price migration sale beginning.) That way, when Mental Case 2.0 does arrive, you will be first in line, and won’t have to pay a thing.&lt;br/&gt;&lt;br/&gt;Want to comment? Head on over to our &lt;a href=&quot;http://mentalfaculty.tenderapp.com/discussions/blog-comments/5-mental-case-20-progress-report&quot;&gt;Tender&lt;/a&gt; site&lt;br/&gt;</description>
      <enclosure url="http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2011/1/11_Mental_Case_2.0_Progress_Report_files/Vapour%20Trails.jpg" length="103955" type="image/jpeg"/>
    </item>
    <item>
      <title>Mac’s Law of App Store Pricing</title>
      <link>http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2011/1/2_Macs_Law_of_App_Store_Pricing.html</link>
      <guid isPermaLink="false">15923744-9fae-4cb6-8b3a-b627be53a30e</guid>
      <pubDate>Sun, 2 Jan 2011 14:51:38 +0100</pubDate>
      <description>&lt;a href=&quot;http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2011/1/2_Macs_Law_of_App_Store_Pricing_files/Particle%20tracks%20in%20a%20cloud%20chamber.jpg&quot;&gt;&lt;img src=&quot;http://www.mentalfaculty.com/mentalfaculty/Blog/Media/object001_3.jpg&quot; style=&quot;float:left; padding-right:10px; padding-bottom:10px; width:254px; height:135px;&quot;/&gt;&lt;/a&gt;The Mac App Store (MAS) is just around the corner. Time to get in last minute predictions.&lt;br/&gt;&lt;br/&gt;One topic that is on every developer's mind is how the MAS will affect app pricing. I predicted in an &lt;a href=&quot;Entries/2010/10/23_Selling_Software_in_the_Mac_App_Store.html&quot;&gt;earlier post&lt;/a&gt; that the sweet spot for Mac apps will be about $20. I'm still hoping this will be the case, but at the same time I have noticed that there seems to be a relationship between the average price of apps in the App Store, and the entry level price of the device they are built to run on. It is quite a simple relationship at that. &lt;br/&gt;&lt;br/&gt;        Mac's Law of App Store Pricing&lt;br/&gt;        Cost of entry level device / 100 = average app price&lt;br/&gt;&lt;br/&gt;The entry level device for iPhone format devices is the iPod touch, at around $200, giving an average app price of $2. Although the evidence is completely anecdotal, that sounds about right for the average price of an iPhone app. You could say it is the price people would expect to pay for an app.&lt;br/&gt;&lt;br/&gt;What about the iPad? Entry price is $499, giving an app price of $4.99. Again, that seems on the money. There are a hell of a lot of iPad apps around that price.&lt;br/&gt;&lt;br/&gt;The bad news for Mac developers, including yours truly, is that if this 'law' holds for the Mac App Store, with full entry level Macs starting at $999, Mac apps might be expected to come in at around $10 on average. (I've ignored the Mac mini because it is not a complete system.) That's quite a bit lower than what many Mac developers would be hoping. &lt;br/&gt;&lt;br/&gt;Does that mean all existing software must drop to $9.99 to compete? I don't think so. Some may, depending on the market served, but I think most existing developers will play the same game that &lt;a href=&quot;http://www.omnigroup.com/&quot;&gt;OmniGroup&lt;/a&gt; have played with their iOS app store offerings, charging a premium price for a premium product. I see no reason why this strategy would not work, seen as OmniGroup &lt;a href=&quot;http://www.omnigroup.com/company/press/the_omni_group_sells_five_thousand_copies_of_omnigraffle_for_ipad/&quot;&gt;seem to have profited&lt;/a&gt; by it.&lt;br/&gt;&lt;br/&gt;So if existing developers won't drop their prices to $10, who will? I think there will be a new breed of Mac app developers migrating from iOS. This type of developer is exemplified by the developers of &lt;a href=&quot;http://reederapp.com/&quot;&gt;Reeder&lt;/a&gt;, a very popular RSS feed reader for iOS. They are in the last stages of beta testing their new Mac app. What's the bet it comes in at about $9.99?&lt;br/&gt;&lt;br/&gt;Want to comment? Visit our &lt;a href=&quot;https://mentalfaculty.tenderapp.com/discussions/blog-comments/4-macs-law-of-app-store-pricing?unresolve=true&quot;&gt;Tender&lt;/a&gt;</description>
      <enclosure url="http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2011/1/2_Macs_Law_of_App_Store_Pricing_files/Particle%20tracks%20in%20a%20cloud%20chamber.jpg" length="137761" type="image/jpeg"/>
    </item>
    <item>
      <title>LINES OF CODE IN C SOFTWARE</title>
      <link>http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2010/12/15_LINES_OF_CODE_IN_C_SOFTWARE.html</link>
      <guid isPermaLink="false">08aaae78-b185-43cf-bcce-8f03253ad862</guid>
      <pubDate>Wed, 15 Dec 2010 10:47:09 +0100</pubDate>
      <description>&lt;a href=&quot;http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2010/12/15_LINES_OF_CODE_IN_C_SOFTWARE_files/anonymously%20untitled.jpg&quot;&gt;&lt;img src=&quot;http://www.mentalfaculty.com/mentalfaculty/Blog/Media/object003_1.jpg&quot; style=&quot;float:left; padding-right:10px; padding-bottom:10px; width:254px; height:135px;&quot;/&gt;&lt;/a&gt;A &lt;a href=&quot;http://www.zennaware.com/blog/2010/12/cornerstone-2-in-numbers/&quot;&gt;post&lt;/a&gt; on the Zennaware blog has ignited quite a discussion between developers on Twitter about the merit of the lines-of-code (LOC) metric for measuring code quality. &lt;br/&gt;&lt;br/&gt;Zennaware develop &lt;a href=&quot;http://www.zennaware.com/cornerstone/&quot;&gt;Cornerstone&lt;/a&gt;, one of the best Subversion clients around. I used Cornerstone for several years, and if I were still using Subversion, probably still would be. It is a very capable and well designed app for Mac OS X.&lt;br/&gt;&lt;br/&gt;The Zennaware post itself seems to be born out of a desire to defend their pricing of $59. Personally, I don’t think they need to do that. Quite aside from the fact that it is a pro tool, and $59 is not unreasonable, they have a right to charge anything they like and let the market decide. &lt;br/&gt;&lt;br/&gt;But whether the post is necessary or not, it does bring up some interesting facts. The Cornerstone source code is apparently 180k lines, excluding whitespace, comments, and third party code. When I read that, it surprised me. As good as Cornerstone is, I found it difficult to imagine that an app of that kind would require 180k LOCs. My impression was that a codebase that big may not be adhering to the &lt;a href=&quot;http://en.wikipedia.org/wiki/Don't_repeat_yourself&quot;&gt;Don’t-Repeat-Yourself (DRY)&lt;/a&gt; principle, ie, may not be designed that well internally. (There is no question that the app’s user interface is very well designed.)&lt;br/&gt;&lt;br/&gt;Several people, including &lt;a href=&quot;http://zathras.de/angelweb/home.htm&quot;&gt;Uli Kusterer&lt;/a&gt;, pointed out that LOCs are not a good measure of the size of a C code base. Whether you put your braces on a separate line, or spread out your method calls, could make a big difference to the number. &lt;br/&gt;&lt;br/&gt;I found this an interesting question quite aside from the whole Cornerstone issue: How much do LOCs vary for algorithmically-equivalent code under different coding styles? So I did a test: I took a 1000 line piece of my code. I altered it to be as contracted as reasonable, putting method calls on one line, avoiding local variables, moving opening braces to the ends of lines, and things like that. I then made a second copy, spreading things out as much as I thought was reasonable: braces on separate lines; lots of local variables for intermediate results; method calls over multiple lines; that sort of thing.&lt;br/&gt;&lt;br/&gt;And the results? Spread out code came to 798 LOCs (excluding empty lines and comments). Contracted code came to 604 LOCs. So contracted is around 25% less than spread out. That is more than I had expected. It still doesn’t make the 180k of Cornerstone seem compact — even assuming they have a spread-out code base, it would only drop to 140k or so with a contracted style — but it is a useful rule-of-thumb when considering the LOC metric in C-based code.&lt;br/&gt;&lt;br/&gt;Want to comment? Go to our &lt;a href=&quot;https://mentalfaculty.tenderapp.com/discussions/blog-comments/3-lines-of-code-in-c-software&quot;&gt;Tender&lt;/a&gt;.</description>
      <enclosure url="http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2010/12/15_LINES_OF_CODE_IN_C_SOFTWARE_files/anonymously%20untitled.jpg" length="398802" type="image/jpeg"/>
    </item>
    <item>
      <title>Why Wait to Go 'Back to the Mac'?</title>
      <link>http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2010/11/20_Why_Wait_to_Go_Back_to_the_Mac.html</link>
      <guid isPermaLink="false">cee4aa18-06bd-4d52-a62f-c9ad78b3c639</guid>
      <pubDate>Sat, 20 Nov 2010 14:36:26 +0100</pubDate>
      <description>&lt;a href=&quot;http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2010/11/20_Why_Wait_to_Go_Back_to_the_Mac_files/Fishing%20Rod%20Reel-1.jpg&quot;&gt;&lt;img src=&quot;http://www.mentalfaculty.com/mentalfaculty/Blog/Media/object002_6.jpg&quot; style=&quot;float:left; padding-right:10px; padding-bottom:10px; width:254px; height:135px;&quot;/&gt;&lt;/a&gt;When Apple developed iOS, they had the luxury of starting from scratch, something which is quite rare in the world of software development. And for the most part, they have made good decisions in the design of UIKit, the user interface framework of iOS. Though arguably less powerful than the Mac’s AppKit framework, it is much easier to use in the most common situations, and that makes a big difference to a developer’s mental well being.&lt;br/&gt;&lt;br/&gt;Apple have already promised to bring back parts of iOS in Mac OS X Lion, but how it plans to do that is not yet clear. Will UIKit be ported in its entirety, such as I &lt;a href=&quot;Entries/2010/11/10_Tap._Swipe._Pan._Pinch..html&quot;&gt;postulated&lt;/a&gt; recently, or will they &lt;a href=&quot;http://cocoawithlove.com/2010/11/back-to-mac-12-features-from-ios-i-like.html&quot;&gt;cherry pick bits&lt;/a&gt; for inclusion in AppKit? We’ll probably need to wait a few months to find out for sure.&lt;br/&gt;&lt;br/&gt;That doesn’t mean iOS doesn’t already have something to offer the Mac developer. I am currently hard at work on Mental Case 2.0, a major revision to our flagship Mac app, and many aspects of the app’s design have been inspired by UIKit. For example, view controllers are used throughout, and navigation controllers are used to control the view stack in some parts of the UI. These design patterns are derived directly from UIKit.&lt;br/&gt;&lt;br/&gt;A &lt;a href=&quot;http://cocoawithlove.com/2010/11/back-to-mac-12-features-from-ios-i-like.html&quot;&gt;post&lt;/a&gt; on the Cocoa with Love blog lists twelve aspects of UIKit which are ripe to bring ‘Back to the Mac’. This has inspired me to open source a couple of classes which I have developed for Mental Case, and which were inspired by my experience on iOS. The code includes&lt;br/&gt;&lt;br/&gt;	•	An NSImage category that allows you to create ‘stretchable’ images&lt;br/&gt;	•	An editable WebView that looks and behaves like a NSTextField&lt;br/&gt;&lt;br/&gt;The latter does not have a direct counterpart on iOS, though Apple do implement UITextField with a web view behind the scenes. Having a WebView-based text field on the Mac can be useful if it is more convenient for your application to represented formatted text with HTML, rather than the NSAttributedString class. An example of where HTML would be preferred is when you have to exchange formatted text with iOS: although iOS now has the NSAttributedString class, the attributes on the two platforms are not compatible. HTML works on both.&lt;br/&gt;&lt;br/&gt;The classes are included in a simple project, and should be self explanatory. To instantiate the web view, you should use a Custom View in Interface Builder, so that the designated constructor initWithFrame: gets called. You can get and set the HTML content using the htmlString property. There is also a textFieldDelegate which can receive notifications of changes to content and editing state.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;You can make stretchable images in much the same way you make them on iOS: take an existing NSImage, and invoke the factory method &lt;br/&gt;&lt;br/&gt;-(NSImage *)stretchableImageWithLeftCapWidth:(CGFloat)leftCapWidth topCapHeight:(CGFloat)topCapHeight;&lt;br/&gt;&lt;br/&gt;You then call drawInRect: to render the image in ‘stretched’ format. In the example project, a stretchable image is used in a custom view class to draw the background. As an added bonus, this background view class is centered in its superview, and snaps to the left and top margins if the superview becomes smaller than the background.&lt;br/&gt;&lt;br/&gt;You can download the code &lt;a href=&quot;Entries/2010/11/20_Why_Wait_to_Go_Back_to_the_Mac_files/BackToTheMac.zip&quot;&gt;here&lt;/a&gt;. (Update: The source code is now also &lt;a href=&quot;https://github.com/drewmccormack/BackToTheMac&quot;&gt;on github&lt;/a&gt;.) It assumes garbage collection is used throughout, and is released under the new BSD license.&lt;br/&gt;&lt;br/&gt;To comment, visit our &lt;a href=&quot;https://mentalfaculty.tenderapp.com/discussions/blog-comments/2-why-wait-to-go-back-to-the-mac&quot;&gt;Tender&lt;/a&gt;.</description>
      <enclosure url="http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2010/11/20_Why_Wait_to_Go_Back_to_the_Mac_files/Fishing%20Rod%20Reel-1.jpg" length="161373" type="image/jpeg"/>
    </item>
    <item>
      <title>Tap. Swipe. Pan. Pinch.</title>
      <link>http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2010/11/10_Tap._Swipe._Pan._Pinch..html</link>
      <guid isPermaLink="false">99a135df-2264-4170-8837-02cb279d4a29</guid>
      <pubDate>Wed, 10 Nov 2010 10:09:59 +0100</pubDate>
      <description>&lt;a href=&quot;http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2010/11/10_Tap._Swipe._Pan._Pinch._files/Oil%20%26%20Water.jpg&quot;&gt;&lt;img src=&quot;http://www.mentalfaculty.com/mentalfaculty/Blog/Media/object001_2.jpg&quot; style=&quot;float:left; padding-right:10px; padding-bottom:10px; width:254px; height:135px;&quot;/&gt;&lt;/a&gt;Apple’s ‘Back to the Mac’ presentation has caused an enormous amount of discussion amongst software developers about what it all means, and where they are headed. I’ve already &lt;a href=&quot;Entries/2010/10/23_Selling_Software_in_the_Mac_App_Store.html&quot;&gt;presented&lt;/a&gt; my views on what the Mac App Store means for existing Mac software, but just as big a question is what it means for iOS developers. For now, iOS developers are faced with learning a whole new legacy framework — AppKit — if they want to port their software to the Mac. There may be some brave soles who dare, but I think many will be put off by this prospect. So what are Apple’s plans for luring iOS developers to the platform?&lt;br/&gt;&lt;br/&gt;Why Now?&lt;br/&gt;One thing that bothers me about the Mac App Store is the timing. Technically, there isn’t much new in the store over and above the iOS App Store. Apple could have done this a year or two ago. Alternatively, they could have waited for the introduction of Mac OS X Lion next year. They could have used it as a feature to get people to pay for the upgrade. As it is, they are introducing the store in January for Snow Leopard, and that doesn’t sit right.&lt;br/&gt;&lt;br/&gt;So what are they up to? My theory is that the Mac App Store will involve a two-stage rollout. We have only been given a glimpse of the first stage, which includes existing Mac software titles, and the few iOS apps ported to AppKit. The second stage would come with the release of Lion, when iOS apps will be allowed into the Mac App Store. The scenario goes something like this&lt;br/&gt;&lt;br/&gt;	✓	Apple introduce Mac App Store in January 2011, and add existing Mac apps&lt;br/&gt;	✓	They release the first beta of Lion, either at WWDC in June or earlier&lt;br/&gt;	✓	With the Lion release comes the knowledge that UIKit is supported&lt;br/&gt;	✓	iOS developers have 3 months or so to get their apps ‘Mac-compliant’&lt;br/&gt;	✓	Apple starts to accept iOS apps for the Mac App Store at WWDC or shortly thereafter&lt;br/&gt;	✓	Lion comes out in Spring, and iOS apps start appearing in the Mac App Store&lt;br/&gt;&lt;br/&gt;With this in mind, the early launch of the Mac App Store makes much more sense. Apple don’t want to be inundated with all existing Mac and iOS apps at exactly the same time. It would overwhelm their app reviewers. So they get the Mac apps out of the way early, and leave the iOS apps for Lion. &lt;br/&gt;&lt;br/&gt;This could also explain why no Lion beta has been forthcoming. Apple usually release betas of their operating system more than a year in advance. Usually developers hear about the upcoming release at two consecutive WWDCs. Not this time. Seems like they will hold it back until the last minute. Why? Most likely because it has things in it that they can’t release at this time, like, say, UIKit.&lt;br/&gt;&lt;br/&gt;iOS Apps are the New Widgets&lt;br/&gt;Remember when Apple introduced iPhone, and told developers that they should develop apps with HTML? The idea was that the 3rd party app scene would be just like the Dashboard app scene — iPhone would become a portable Dashboard.&lt;br/&gt;&lt;br/&gt;As we now know, it didn’t really work out that way. A completely different system — native apps with app store delivery — won the day in a big way. The iPhone did become that portable Dashboard, but not in the way originally anticipated. And so it is today. Most Mac users rarely visit Dashboard anymore; instead, they pull out their iPhone when they need widget-like functionality.&lt;br/&gt;&lt;br/&gt;What if you didn’t have to pull out your iPhone to access those same apps? Dashboard has become a backwater, but what if it could run iOS apps? Immediately, you have access to 250k great widgets, the same ones you use on your iPhone or iPad. &lt;a href=&quot;http://itunes.apple.com/us/app/twitter/id333903271?mt=8&quot;&gt;Twitter&lt;/a&gt; for iPad on your Mac? You bet. &lt;a href=&quot;http://reederapp.com/&quot;&gt;Reeder&lt;/a&gt; as your RSS viewer? Why not? Sometimes the best apps on any platform are on iOS.&lt;br/&gt;&lt;br/&gt;One of the strongest arguments I have heard against this happening is that iOS apps have a different look-and-feel to the Mac, and a different interaction model. I’ll leave interaction for later, but let’s take the look-and-feel issue. The argument usually goes like this: “Have you ever used &lt;a href=&quot;http://www.vmware.com/&quot;&gt;VMWare&lt;/a&gt;? The windows look awful when on a Mac desktop. They just don’t fit. The same would be true of iOS apps. Apple would never do that. Way too ugly.”&lt;br/&gt;&lt;br/&gt;Absolutely right — Apple wouldn’t do that. We know that, because Dashboard provides the perfect reference point for what Apple would do. Dashboard widgets don’t fit well with the look-and-feel of the Mac multi-window environment. That’s why Apple put them behind a partition, in their own space. With a modal environment like Dashboard, it doesn’t feel ‘wrong’ when the widgets don’t fit with existing interface styles.&lt;br/&gt;&lt;br/&gt;And that is exactly what I think will happen with iOS apps running on the Mac. They will only run in full screen mode, separate from the multi-window Mac space. And because they will run in a separate mode, it won’t grate that they don’t look anything like existing Mac apps. Apple know this from their experience with Dashboard. The prominence of full-screen mode in Lion can’t just be for existing Mac apps, which can already drop into full-screen mode with ease.&lt;br/&gt;&lt;br/&gt;Touchy Feely&lt;br/&gt;Now let’s turn to the question of the different interaction paradigms used for iOS devices and the Mac, which is perhaps an even more important objection. The Mac uses a legacy, mouse-driven interface, and the iOS devices use multitouch. Judging by the reactions I got on Twitter, many see these two as irreconcilable.&lt;br/&gt;&lt;br/&gt;The fact is, Apple has been busy reconciling these paradigms for several years now. Wasn’t it strange that they added multitouch support to a mouse, and then added a multitouch trackpad for desktop Macs? These devices are quite underutilized at this point in time. Most people use a gesture to scroll, but they could already do that with a scroll wheel. I guarantee very few are rotating photos with their multitouch mouse. So why bother introducing these devices at all?&lt;br/&gt;&lt;br/&gt;In my view, Apple is preparing their hardware for apps from iOS. Using iOS apps on a Mac with a traditional single-button mouse is not a great user experience. Any developer who works with the iPhone or iPad simulator can attest to this. It’s doable, but not fun. Even simple things like scrolling feel unnatural with a traditional mouse.&lt;br/&gt;&lt;br/&gt;Enter the multitouch mouse. If you could use multitouch gestures in the iPhone simulator, it would be a whole different story. Tapping, scrolling, pinch zooming, panning...all are not only possible, but also quite natural, with a multitouch mouse. What’s more, these gestures are already in use today by millions of Mac users. &lt;br/&gt;&lt;br/&gt;In other words, you don’t have to re-learn how to scroll an iOS app with a mouse, because you already do it in your Mac apps. The gesture for scrolling on the Mac is different to the one used on iOS — to scroll down, you drag your finger downwards on the Mac and upwards on iOS — but users are already comfortable with this distinction. It doesn’t confuse anyone. The population has already been indoctrinated.&lt;br/&gt;&lt;br/&gt;The Gesture Abstraction&lt;br/&gt;The key to all of this is that Apple have started to move the emphasis away from low-level event handling to high-level, abstract gesture handling. UIGestureRecognizer is a class that Apple added in iOS 3.2. Its subclasses represent multitouch gestures such as tapping, pinching, panning, and swiping. With these basic gestures, you probably cover the needs of 95% of all apps on the platform.&lt;br/&gt;&lt;br/&gt;The importance of this abstraction should not be underestimated. If a developer uses gesture recognizers, she doesn’t need to deal with the low-level differences in event handling that arise between operating systems. A pinch gesture on iOS involves two fingers moving toward a centroid. The same gesture on the Mac could be represented by two fingers moving together, with the location of the mouse pointer playing the role of centroid. The event model is completely different, but the two can be readily mapped to the same abstraction, a pinch gesture.&lt;br/&gt;&lt;br/&gt;My guess is that Apple will simply advise developers to use gesture recognizers wherever possible in order to port their iOS apps to the Mac. Classes like UIScrollView will automatically interpret the gestures differently on the Mac and iOS platforms to give the expected behavior.&lt;br/&gt;&lt;br/&gt;Of course, not all iOS apps will readily translate to the Mac. Some really are married to the multitouch paradigm, and would feel clunky on the Mac. But these apps are in the minority. Most iOS apps use standard gestures, with tap being by far the most common. These apps would need very little adjustment to work on the Mac with a multitouch mouse.&lt;br/&gt;&lt;br/&gt;Retro Platform Wars&lt;br/&gt;This is where it all gets a little hairy and far fetched, but I’m going to throw this out there anyway. The overriding question in all of this discussion is “What are Apple’s intentions for the Mac?”. Will it remain a standalone platform, or will it be merged in some way with iOS? Does it have a future in the consumer space at all, or will it be supplanted by iPad and other touch devices?&lt;br/&gt;&lt;br/&gt;In my view, Apple’s agenda for the Mac is starting to become clearer, and it may surprise many to hear that I think they are targeting Microsoft. I know, I know, I don’t live in a box, that war was fought years ago, but by targeting a particular segment of Microsoft’s market, Apple have found a way to continue to grow the Mac business even when the PC business itself is in gradual decline.&lt;br/&gt;&lt;br/&gt;Apple has something like 20-25% of the US consumer PC market. That’s pretty good, but wouldn’t it be better if that were 50% or 70%? The Mac App Store is Apple’s play for dramatically increased market share. If the Mac runs several hundred thousand cool iOS apps, it will attract consumer PC users to buy Macs in the droves. Apple want to dominate the consumer PC market.&lt;br/&gt;&lt;br/&gt;They’ll leave the enterprise market to Microsoft. The demise of the Xserve just confirms that Apple is no longer interested in competing in this space. They just want to dominate every consumer market on Earth, starting with the one that slipped through their fingers in 1984.</description>
      <enclosure url="http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2010/11/10_Tap._Swipe._Pan._Pinch._files/Oil%20%26%20Water.jpg" length="101518" type="image/jpeg"/>
    </item>
    <item>
      <title>Pad’l Boat: iPad in the Bath</title>
      <link>http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2010/11/4_Padl_Boat__iPad_in_the_Bath.html</link>
      <guid isPermaLink="false">deae1db8-9dc3-4dcc-9090-bb45707728c9</guid>
      <pubDate>Thu, 4 Nov 2010 20:16:41 +0100</pubDate>
      <description>&lt;a href=&quot;http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2010/11/4_Padl_Boat__iPad_in_the_Bath_files/Paddleboat.jpg&quot;&gt;&lt;img src=&quot;http://www.mentalfaculty.com/mentalfaculty/Blog/Media/object001_3.jpg&quot; style=&quot;float:left; padding-right:10px; padding-bottom:10px; width:254px; height:135px;&quot;/&gt;&lt;/a&gt;I've got a nasty habit: I regularly take a hot bath ... with my iPad. Most people think I'm crazy, but I've been doing it since day 1, and I was doing it with my Kindle for a year before that. I've never had a mishap or even had any fear that the iPad would be damaged.&lt;br/&gt;&lt;br/&gt;The secret, of course, is not to bath naked, or at least not to make the iPad bath naked. There is at least one waterproof bag on the market specially designed for the iPad, but I just use standard zip-seal freezer bags from the supermarket. The purpose of the bag is really only to keep your wet fingers off the device, and hopefully keep water out should you accidentally drop it, something which I have never had happen. (When I first tried the freezer bags, I was very surprised to find that the touch screen works perfectly well through the plastic.)&lt;br/&gt;&lt;br/&gt;With a watertight bag, you're most of the way there, but recently I've been experiencing another problem: The iPad is small compared to a laptop, but damned if it doesn't get heavy when you're holding it in your hands, and not resting it on anything. (Any lewd suggestions for things to rest it on will be resolutely ignored.)&lt;br/&gt;&lt;br/&gt;I thought about a stand or swinging arm, but these solutions seemed difficult to implement, and would probably get in the way of a relaxing bath. Eventually I decided upon a boat. With a few plastic microwave containers and some gaffer tape, I came up with a raft that would make the cast of Lost proud. Meet Pad'l Boat.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;It floats like a middle-aged Kevin Costner, and is stable to boot. During my first test flight, I didn't have any fear that it would capsize, though typing is a bit troublesome when every tap pushes your screen a half inch closer to the taps at the other end of the bath.&lt;br/&gt;&lt;br/&gt;It's not all rosy though. The gaffer tape was not terribly water-resistant and has already started coming off. I'm already thinking about Pad'l Boat 2, and this time, I think I'll go with fiberglass.</description>
      <enclosure url="http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2010/11/4_Padl_Boat__iPad_in_the_Bath_files/Paddleboat.jpg" length="62624" type="image/jpeg"/>
    </item>
    <item>
      <title>Selling Software in the Mac App Store</title>
      <link>http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2010/10/23_Selling_Software_in_the_Mac_App_Store.html</link>
      <guid isPermaLink="false">b5869a88-1099-4355-b6ee-9be1dac57938</guid>
      <pubDate>Sat, 23 Oct 2010 19:45:47 +0200</pubDate>
      <description>&lt;a href=&quot;http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2010/10/23_Selling_Software_in_the_Mac_App_Store_files/Rusty%20Dodge.jpg&quot;&gt;&lt;img src=&quot;http://www.mentalfaculty.com/mentalfaculty/Blog/Media/object002_5.jpg&quot; style=&quot;float:left; padding-right:10px; padding-bottom:10px; width:254px; height:135px;&quot;/&gt;&lt;/a&gt;Apple's Back to the Mac event last week has left developers with a lot to think about.  Mac OS and iOS are clearly on a course to convergence in Lion and beyond, and even more pressing —given that it is due to appear on desktops within 3 months — is the Mac App Store.&lt;br/&gt;&lt;br/&gt;Many have been anticipating the Mac App Store for a while, so it isn't really a big surprise, but it does raise a lot of issues for developers, some of whom have made their crust on the Mac for many years, and are used to selling their products in a particular way. There is no question that the Mac App Store will change the way desktop software is sold, but in what ways, and what can developers expect in the transition?&lt;br/&gt;&lt;br/&gt;I have given this a lot of thought over the past few days, and have formulated some opinions. I want to present them here, with a morsel or two of salt, and hopefully fuel some discussion.&lt;br/&gt;&lt;br/&gt;Apple haven't played their hand completely yet. Many aspects of the store agreement Mac developers will have to sign up to are unknown, and will probably only become clear when submissions open in November. &lt;br/&gt;&lt;br/&gt;This hasn't stopped some developers starting to formulate their approach to the store. Some have expressed a hope that Apple will allow for paid upgrades. Many indie developers currently rely on costumers to pay for regular upgrades to make ends meet.&lt;br/&gt;&lt;br/&gt;I very much doubt Apple will support this. They have shown no intention of doing so on iOS, and it goes against the simplicity of purchase upon which the App Store is based. I don't think they want the complexity of paid upgrades, for themselves, or for customers. Apple don't have paid upgrades for their own software either, which shows where they stand on the issue.&lt;br/&gt;&lt;br/&gt;(I do think we will eventually get all of the options available to iOS developers, including in-app purchase and iAds, but probably not in the first iteration.)&lt;br/&gt;&lt;br/&gt;The model generally used to sell desktop software today is to offer potential customers a free time-limited demo. Apple do not support this model for iOS, though they do allow developers to release less-capable (crippled) iOS apps.&lt;br/&gt;&lt;br/&gt;Expect to see this policy in the Mac App Store too. Apple don't want to have to deal with irate customers annoyed that an app stopped working and has locked down their data. It isn't going to happen, which means Mac developers are going to have to make changes to the way they sell their products if they want to be listed in the App Store. I'll come back to what I think those changes will be.&lt;br/&gt;&lt;br/&gt;I have seen quite a few tweets from well-known Mac developers suggesting they will continue to offer their software in the traditional way, in addition to offering it through the Mac App Store. Most seem to have assumed this will be allowed, but I haven't seen any evidence to that effect. Steve Jobs did say that you will be able to keep selling software outside the App Store, but he didn't say you could do both. &lt;br/&gt;&lt;br/&gt;I expect Apple to make developers chose one or the other. The confusion to customers, and accompanying support requests, resulting from having the same software sold under two completely different sets of terms will not appeal to Apple. Neither would it appeal to them to have to compete with other sales outlets that offer cheap upgrades. Expect to see Apple require exclusivity.&lt;br/&gt;&lt;br/&gt;This could also put a dampener on the plans of some to offer free demos outside the store. Not only does this go against the whole one-click philosophy of the App Store, it could also lead to customer confusion, as they end up with two different versions of the app. I don't think Apple will find this scenario appealing, and I think it will take a stink from developers to get them to allow it.&lt;br/&gt;&lt;br/&gt;All of this has been building to the big question on every developer’s mind: How much should I charge for my app? The issues above — no demos and no paid upgrades — together with the no refund policy of the store, mean that the typical $40 price tag on Mac consumer software is probably going to have to drop some.&lt;br/&gt;&lt;br/&gt;But there is an even more important reason I think prices will need to drop: The whole reason we have been waiting in baited breath for a Mac App Store is that a large portion of Mac users, think 90%, have never bought any independently developed software. They either don't know it exists, or don't trust it. The Mac App Store promises to put apps right under the customer's collective nose, in a fenced garden where you never need enter your credit card number. It happened on iOS, and now it will happen on the Mac. &lt;br/&gt;&lt;br/&gt;The pool of customers will rise immensely, and the new blood will not be your grandfather's indie software customer. Today, people who buy software are often developers themselves, or fall under the category of 'power user'. The Mac App Store will bring a whole new type of user, one who has never paid $40 for an app. To reach this group, I expect that prices will have to drop somewhat.&lt;br/&gt;&lt;br/&gt;Judging by the heated reactions I have received on Twitter, this is not a scenario that many developers are willing to entertain. They are determined to uphold their current pricing structure, and approach to selling. They are missing the transition, and think they are still in Kansas.&lt;br/&gt;&lt;br/&gt;So what should software cost in the Mac App Store? Well, as always it depends on the app, but let's assume a typical consumer app sells for $40 now. With no trial demo, no refunds, no upgrade pricing, reduced support costs, and a customer history of purchasing apps from the iOS App Store, I'm thinking about $20. You could charge more, but I suspect you will miss the stream of potential new customers that the App Store will bring.&lt;br/&gt;&lt;br/&gt;Another way to estimate the 'right' price is to look at the prices for iOS devices. iPhone software typically comes in under $5. iPad apps are priced higher, in the $5-10 range. The Mac should be higher again, but a jump to $40 seems excessive. The $10-30 range feels about right for most apps. There will always be outliers, just as there are on iOS, but I think this is where most apps will end up, and — more importantly — be most profitable.&lt;br/&gt;&lt;br/&gt;Many developers seem determined to maintain current pricing because they fear a race to the bottom like the one that took place in the iOS App Store. I don't think that will happen in the Mac App Store. There simply will not be the excessive supply of apps that are available on the iPhone. &lt;br/&gt;&lt;br/&gt;Although I expect a few apps to be migrated back to the Mac from iOS, I don't expect a rush. Developing Mac apps is frankly much more difficult and time consuming than developing iOS apps, and with a smaller market, I doubt many iOS developers will be tempted.&lt;br/&gt;&lt;br/&gt;Want to comment? Join the discussion on our &lt;a href=&quot;https://mentalfaculty.tenderapp.com/discussions/blog-comments/1-selling-software-in-the-mac-app-store&quot;&gt;Tender&lt;/a&gt;.</description>
      <enclosure url="http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2010/10/23_Selling_Software_in_the_Mac_App_Store_files/Rusty%20Dodge.jpg" length="213454" type="image/jpeg"/>
    </item>
    <item>
      <title>EXPLOITING Human Imperfection in Your hUMAN INTERFACEs</title>
      <link>http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2010/10/16_EXPLOITING_Human_Imperfection_in_Your_hUMAN_INTERFACEs.html</link>
      <guid isPermaLink="false">2a4ac62c-387d-4ad8-a53c-3e65c3d3919f</guid>
      <pubDate>Sat, 16 Oct 2010 15:19:20 +0200</pubDate>
      <description>&lt;a href=&quot;http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2010/10/16_EXPLOITING_Human_Imperfection_in_Your_hUMAN_INTERFACEs_files/Father%20of%20the%20Eye%20-%20HDR.jpg&quot;&gt;&lt;img src=&quot;http://www.mentalfaculty.com/mentalfaculty/Blog/Media/object002_6.jpg&quot; style=&quot;float:left; padding-right:10px; padding-bottom:10px; width:254px; height:135px;&quot;/&gt;&lt;/a&gt;In my recent &lt;a href=&quot;Entries/2010/9/30_HIIT_for_NECK_BEARDs.html&quot;&gt;bid&lt;/a&gt; for fitness, I've put in quite a few hours on the bike, and watched a lot of videos on my iPad to kill the time. A great source for entertaining and educational videos is the &lt;a href=&quot;http://itunes.apple.com/us/app/ted/id376183339?mt=8&quot;&gt;TED&lt;/a&gt; app, which has just appeared on the iPad, but which has been on the iPhone for some time. The talks on cognitive science — how the brain works — are particularly good.&lt;br/&gt;&lt;br/&gt;Many of these talks allude to the fact that the brain is easily fooled with optical illusions (&lt;a href=&quot;http://www.ted.com/talks/lang/eng/al_seckel_says_our_brains_are_mis_wired.html&quot;&gt;1&lt;/a&gt;, &lt;a href=&quot;http://www.ted.com/talks/lang/eng/beau_lotto_optical_illusions_show_how_we_see.html&quot;&gt;2&lt;/a&gt;). In short, the brain receives an ambiguous signal from the eyes, and in order to interpret the signal, it has to make a number of assumptions based on past experience. If you generate an image that deliberately violates the assumptions of the brain, you cause it to perceive things wrongly.&lt;br/&gt;&lt;br/&gt;The TED talks introduce a number of interesting examples, from misinterpreting colors to classic vase-or-face images, and even 3D models that send your brain in completely the wrong direction. All great fun, but it doesn't seem very useful other than as a tool for learning how the brain works.&lt;br/&gt;&lt;br/&gt;At least, that's what I thought until last week. Understanding how to trick the brain is actually essential to anyone working with visual media. Web site designers, for example, have to know that exactly the same color on light and dark backgrounds will appear differently to an observer. They have to deliberately make the colors different to ensure that they are perceived to be the same.&lt;br/&gt;&lt;br/&gt;I've always been taken by the picker wheel that Apple built into the iPhone for choosing dates, and anything else that is cyclic for that matter. The wheel feels like a round 3D cylinder. I used to ponder just what technologies they might be using to make the rows of information rotate in the third dimension.&lt;br/&gt;&lt;br/&gt;Last week, I wanted to have a similar effect in one of my own projects, and I realized that the whole thing is an optical illusion — a simple trick. If you cover a standard flat table view with a gradient that begins dark at the top and bottom edges, and becomes fully transparent as you move to the middle, your eyes perceive it as if the rows in the table wrap around a cylinder (see screenshot). It is quite amazing, but even when I look closely, and know the trick, I can't convince my brain that the rows are not rotating as they approach the edges.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;For the iOS developers in the audience, a simple way to do this is simply to add a CAGradientLayer on top of a standard UITableView. You can literally copy Apple's picker with less than 20 lines of code, and you don't need to go through any geometric gymnastics to do it. Here are the lines I used:&lt;br/&gt;&lt;br/&gt;	// Prepare colors&lt;br/&gt;    CGFloat alphaValues[] = {0.9, 0.6, 0.35, 0.2, 0.1, 0.01, 0.0, 0.01, 0.1, 0.2, 0.35, 0.6, 0.9};&lt;br/&gt;    NSUInteger numberOfValues = sizeof(alphaValues) / sizeof(*alphaValues);&lt;br/&gt;    NSMutableArray *cgColors = [NSMutableArray arrayWithCapacity:numberOfValues];&lt;br/&gt;    for ( NSUInteger i = 0; i &amp;lt; numberOfValues; ++i ) {&lt;br/&gt;    	CGColorRef color = [[UIColor colorWithWhite:0.0 alpha:alphaValues[i]] CGColor];&lt;br/&gt;        [cgColors addObject:(id)color];&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;	// Gradient layer&lt;br/&gt;    CAGradientLayer *gradientLayer = [CAGradientLayer layer];&lt;br/&gt;    gradientLayer.colors = cgColors;&lt;br/&gt;    gradientLayer.zPosition = 10.0f;&lt;br/&gt;    CGRect layerFrame = tableView.layer.frame;&lt;br/&gt;    gradientLayer.frame = layerFrame;&lt;br/&gt;    [self.view.layer addSublayer:gradientLayer];&lt;br/&gt;&lt;br/&gt;The CAGradientLayer is almost opaque black at the top and bottom, and becomes quickly transparent as you move to the middle. This non-linear drop off in shade is what makes the brain think it is looking at a round object.&lt;br/&gt;&lt;br/&gt;I put this code in the viewDidLoad: method of the view controller responsible for the table view, but you may even be able to put it in a table view subclass. I didn’t try.</description>
      <enclosure url="http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2010/10/16_EXPLOITING_Human_Imperfection_in_Your_hUMAN_INTERFACEs_files/Father%20of%20the%20Eye%20-%20HDR.jpg" length="166304" type="image/jpeg"/>
    </item>
    <item>
      <title>HIIT for NECK BEARDs</title>
      <link>http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2010/9/30_HIIT_for_NECK_BEARDs.html</link>
      <guid isPermaLink="false">1e1f28b4-128e-4663-9f62-06ddbd86324c</guid>
      <pubDate>Thu, 30 Sep 2010 09:56:52 +0200</pubDate>
      <description>&lt;a href=&quot;http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2010/9/30_HIIT_for_NECK_BEARDs_files/laptop%20%26%20pizza.jpg&quot;&gt;&lt;img src=&quot;http://www.mentalfaculty.com/mentalfaculty/Blog/Media/object002_7.jpg&quot; style=&quot;float:left; padding-right:10px; padding-bottom:10px; width:254px; height:135px;&quot;/&gt;&lt;/a&gt;I’ve struggled with my weight through the years as much as the next guy. I’ve dieted a few times; it usually works for a few months, then your metabolism adjusts to its more meagre intake, and you end up yoyo-ing back to your original weight or worse. Even if it does stick, you are basically stuck on the diet for the rest of your life, which few could maintain, and — let’s face it — why should you?&lt;br/&gt;&lt;br/&gt;Quite by accident, I recently came across something that is working for me, at least for the time being. It’s not a diet, it’s a fitness regime. Before you switch off, what I like about this regime is that it takes very little time, and involves a lot of rest.&lt;br/&gt;&lt;br/&gt;It’s called HIIT: High-Intensity Interval Training. In all honestly, I’d never heard of it, but it is a system that has been the subject of scientific research, and seems to deliver on its promises. The idea is quite simple: instead of doing continuous, low-intensity exercise, which is what most of us do, you do short bursts of high-intensity exercise, interspersed with periods of rest.&lt;br/&gt;&lt;br/&gt;The particular technique I have adopted is called the &lt;a href=&quot;http://en.wikipedia.org/wiki/High-intensity_interval_training#Little_Method&quot;&gt;Little Method&lt;/a&gt;, and was developed for a scientific study in 2009 [J Physiol 588 (Pt 6): 1011–22]. It is very straightforward: You begin and end with a few minutes warm up and cool down. The interval training itself involves 8–12 intervals of 60 seconds high-intensity, and 75 seconds rest. That’s all. Go hard for 60 seconds, rest 75 seconds, go hard 60 seconds, and so forth, for around 10 cycles. I use an exercise bike, but you can adopt any form of physical exercise you like.&lt;br/&gt;&lt;br/&gt;In all, it takes me about 25 minutes a day, which is considerably shorter than going to the gym. One of the reasons I didn’t exercise in the past was simply that I couldn’t seem to find the time. Now I have integrated the 25 minute routine into my daily schedule, and so far it is all going to plan.&lt;br/&gt;&lt;br/&gt;“But I already do 40 minutes a day on the exercise bike. Why would I bother with this?” I hear you say. One of the advantages of HIIT is that you get big benefits from the short time you exercise. Your metabolism increases dramatically, helping you burn fat for up to 48 hours after a session. Three 20 minute sessions a week using the Little Method was shown to be equivalent to 5 hours of standard training.&lt;br/&gt;&lt;br/&gt;Weight loss is one advantage of a training scheme like this, but there are others. Fitness training really helps reduce stress, and I use the time I’m on the bike to watch WWDC videos. Mind and body, both. &lt;br/&gt;&lt;br/&gt;Best of all, I haven’t changed my eating habits at all, so I can keep eating what I like, making it much more likely I will be able to sustain the regime in the longer term.&lt;br/&gt;&lt;br/&gt;Before signing off, I found a little gem on the App Store which is perfect for this type of interval training. It’s an iPhone app call &lt;a href=&quot;http://itunes.apple.com/us/app/intervals/id308038640?mt=8&quot;&gt;Intervals&lt;/a&gt;. If you are going to give HIIT a try, it’s the best $5 you can spend.</description>
      <enclosure url="http://www.mentalfaculty.com/mentalfaculty/Blog/Entries/2010/9/30_HIIT_for_NECK_BEARDs_files/laptop%20%26%20pizza.jpg" length="225436" type="image/jpeg"/>
    </item>
  </channel>
</rss>

