<?xml version="1.0"?>
<rss version="2.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:yt="http://gdata.youtube.com/schemas/2007" xmlns:atom="http://www.w3.org/2005/Atom">
   <channel>
      <title>Symbian Planet Community</title>
      <description>A combined feed of the latest posts from individual Symbian community members</description>
      <link>http://pipes.yahoo.com/pipes/pipe.info?_id=cbb2844f78686836ed0fdb22ea5b91c8</link>
      <atom:link rel="next" href="http://pipes.yahoo.com/pipes/pipe.run?_id=cbb2844f78686836ed0fdb22ea5b91c8&amp;_render=rss&amp;page=2"/>
      <pubDate>Thu, 01 Oct 2015 21:13:29 +0000</pubDate>
      <generator>http://pipes.yahoo.com/pipes/</generator>
      <item>
         <title>iOS 7: Using NSURLSession for Asynchronous Networking</title>
         <link>http://mymobilecorner.blogspot.com/2015/03/ios-7-using-nsurlsession-for.html</link>
         <description>In iOS 7, Apple introduced&amp;nbsp;&lt;span style=&quot;color:#666666;font-family:monospace;font-size:13.3900003433228px;&quot;&gt;NSURLSession&lt;/span&gt;, which is a suite of classes that replaces&amp;nbsp;&lt;span style=&quot;color:#666666;font-family:monospace;font-size:13.3900003433228px;&quot;&gt;NSURLConnection&lt;/span&gt;&amp;nbsp;as&amp;nbsp;the&amp;nbsp;preferred method of networking. In this article, we cover the benefits of using&amp;nbsp;&lt;span style=&quot;color:#666666;font-family:monospace;font-size:13.3900003433228px;&quot;&gt;NSURLSession&lt;/span&gt;, and when and how to use it.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;font-family:Verdana, sans-serif;&quot;&gt;What are the benefits of using NSURLSession?&lt;/span&gt;&lt;/b&gt;  &lt;br /&gt;&lt;b&gt;&lt;span style=&quot;font-family:Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;There are a number of new advantages and benefits of using NSURLSession:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Uploads and Downloads can be done in the Background&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;When the&amp;nbsp;&lt;span style=&quot;color:#666666;font-family:monospace;font-size:13.3900003433228px;&quot;&gt;NSURLSession&lt;/span&gt;&amp;nbsp;is created, a configuration option can be selected to allow background&amp;nbsp;networking. This helps to save battery life, supports multitasking and allows developers to use the same delegate model as in-process transfers.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Allows the pause and resume for network operations&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;When the&amp;nbsp;&lt;span style=&quot;color:#666666;font-family:monospace;font-size:13.3900003433228px;&quot;&gt;NSURLSession&lt;/span&gt;&amp;nbsp;API is utilized, any networking task can be paused, stopped and restarted.&amp;nbsp;There is no NSOperation subclassing required.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Configurable container for storing network request configuration&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Each&amp;nbsp;&lt;span style=&quot;color:#666666;font-family:monospace;font-size:13.3900003433228px;&quot;&gt;NSURLSession&lt;/span&gt;&amp;nbsp;provides a configurable container for storing network requests. For instance, for&amp;nbsp;setting an HTTP header option, we will need to only do this once and each subsequent request will utilize the same configuration&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Allows a private storage which is subclassable&lt;/b&gt;.&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Each&amp;nbsp;&lt;span style=&quot;color:#666666;font-family:monospace;font-size:13.3900003433228px;&quot;&gt;NSURLSession&lt;/span&gt;&amp;nbsp;is subclassable and one can configure a session to use private storage on a per&amp;nbsp;session basis. This allows one to have private storage objects outside of the global state.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Improved authentication handling&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;When using&amp;nbsp;&lt;span style=&quot;color:#666666;font-family:monospace;font-size:13.3900003433228px;&quot;&gt;NSURLConnection&lt;/span&gt;, if an authentication challenge was issued, the challenge would come back&amp;nbsp;for an arbitrary request, so one would not know exactly what request was getting the challenge. However, with&amp;nbsp;&lt;span style=&quot;color:#666666;font-family:monospace;font-size:13.3900003433228px;&quot;&gt;NSURLSession&lt;/span&gt;, the delegate handles the authentication.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Rich delegate model&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;color:#666666;font-family:monospace;font-size:13.3900003433228px;&quot;&gt;NSURLConnection&lt;/span&gt;&amp;nbsp;does have some asynchronous block based methods. However, a delegate cannot be used with them.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Uploads and downloads allowed through the file system.&amp;nbsp;&lt;/b&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;This encourages a separation of the data (i.e. file contents) from the metadata (i.e. URL and settings)&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;NSURLSession&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;font-size:13px;font-stretch:normal;margin-bottom:0.833em;&quot;&gt;&lt;span style=&quot;color:#666666;font-family:monospace;font-size:13.3900003433228px;&quot;&gt;NSURLSession&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;is designed as a replacement API for&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#666666;font-family:monospace;font-size:13.3900003433228px;&quot;&gt;NSURLConnection.&lt;/span&gt;&lt;span style=&quot;color:#666666;font-family:monospace;font-size:13.3900003433228px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;An&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#666666;font-family:monospace;font-size:13.3900003433228px;&quot;&gt;NSURLSession&lt;/span&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;is made using an&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#666666;font-family:monospace;font-size:13.3900003433228px;&quot;&gt;NSURLSessionConfiguration&lt;/span&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;with an optional delegate. After the session is established, the&amp;nbsp;network requirements are&amp;nbsp;satisfied by creating&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#666666;font-family:monospace;font-size:13.3900003433228px;&quot;&gt;NSURLSessionTask&lt;/span&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size:13px;font-stretch:normal;margin-bottom:0.833em;&quot;&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;According to Apple's URL Loading Programming Guide, you can use the&amp;nbsp;&lt;code style=&quot;color:#666666;font-size:13.3900003433228px;&quot;&gt;NSURLSession&lt;/code&gt;&amp;nbsp;API in two ways: with a system-provided delegate or with your own delegate. In general, you must use your own delegate if your app does any of the following:&lt;/span&gt;&lt;/div&gt;&lt;ul class=&quot;ul&quot; style=&quot;font-size:13px;list-style-position:outside;margin:0px 0px 0.833em 1.35em;padding:0px 0px 0.5em;&quot;&gt;&lt;li class=&quot;li&quot; style=&quot;margin-top:0.583em;&quot;&gt;&lt;div style=&quot;display:inline;font-stretch:normal;margin-bottom:0.833em;margin-top:0.667em;&quot;&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;Uses background sessions to download or upload content while your app is not running.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=&quot;li&quot; style=&quot;margin-top:0.583em;&quot;&gt;&lt;div style=&quot;display:inline;font-stretch:normal;margin-bottom:0.833em;margin-top:0.667em;&quot;&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;Performs custom authentication.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=&quot;li&quot; style=&quot;margin-top:0.583em;&quot;&gt;&lt;div style=&quot;display:inline;font-stretch:normal;margin-bottom:0.833em;margin-top:0.667em;&quot;&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;Performs custom SSL certificate verification.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=&quot;li&quot; style=&quot;margin-top:0.583em;&quot;&gt;&lt;div style=&quot;display:inline;font-stretch:normal;margin-bottom:0.833em;margin-top:0.667em;&quot;&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;Decides whether a transfer should be downloaded to disk or displayed based on the MIME type returned by the server or other similar criteria.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=&quot;li&quot; style=&quot;margin-top:0.583em;&quot;&gt;&lt;div style=&quot;display:inline;font-stretch:normal;margin-bottom:0.833em;margin-top:0.667em;&quot;&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;Uploads data from a body stream (as opposed to an&amp;nbsp;&lt;code style=&quot;color:#666666;font-size:13.3900003433228px;&quot;&gt;NSData&lt;/code&gt;&amp;nbsp;object).&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=&quot;li&quot; style=&quot;margin-top:0.583em;&quot;&gt;&lt;div style=&quot;display:inline;font-stretch:normal;margin-bottom:0.833em;margin-top:0.667em;&quot;&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;Limits caching programmatically.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class=&quot;li&quot; style=&quot;margin-top:0.583em;&quot;&gt;&lt;div style=&quot;display:inline;font-stretch:normal;margin-bottom:0.833em;margin-top:0.667em;&quot;&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;Limits HTTP redirects programmatically.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;font-size:13px;font-stretch:normal;margin-bottom:0.833em;&quot;&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;If your app does not need to do any of these things, your app can use the system-provided delegates.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size:13px;font-stretch:normal;margin-bottom:0.833em;&quot;&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;Basic sequence of method calls that your app needs to make and completion handler calls that your app receives when using&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#666666;font-family:monospace;font-size:13.3900003433228px;&quot;&gt;NSURLSession&lt;/span&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;with the system-provided delegate :&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size:13px;font-stretch:normal;margin-bottom:0.833em;&quot;&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;Create the NSURLSessionConfiguration&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;Create a session specifying a configuration object and a nil delegate.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;Create task objects within a session that each represent a resource request.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;&quot;&gt;The task objects are subclasses of&lt;/span&gt;&lt;span style=&quot;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSURLSessionTask_class/index.html#//apple_ref/occ/cl/NSURLSessionTask&quot; style=&quot;color:#3366cc;text-decoration:none;&quot;&gt;NSURLSessionTask&lt;/a&gt;&lt;/code&gt;&lt;span style=&quot;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;&quot;&gt;—&lt;/span&gt;&lt;code style=&quot;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSURLSessionDataTask_class/index.html#//apple_ref/occ/cl/NSURLSessionDataTask&quot; style=&quot;color:#3366cc;text-decoration:none;&quot;&gt;NSURLSessionDataTask&lt;/a&gt;&lt;/code&gt;&lt;span style=&quot;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSURLSessionUploadTask_class/index.html#//apple_ref/occ/cl/NSURLSessionUploadTask&quot; style=&quot;color:#3366cc;text-decoration:none;&quot;&gt;NSURLSessionUploadTask&lt;/a&gt;&lt;/code&gt;&lt;span style=&quot;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;&quot;&gt;, or&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSURLSessionDownloadTask_class/index.html#//apple_ref/occ/cl/NSURLSessionDownloadTask&quot; style=&quot;color:#3366cc;text-decoration:none;&quot;&gt;NSURLSessionDownloadTask&lt;/a&gt;&lt;/code&gt;&lt;span style=&quot;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;&quot;&gt;, depending on the behavior you are trying to achieve. &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;&quot;&gt;These objects are analogous to&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSURLConnection_Class/index.html#//apple_ref/occ/cl/NSURLConnection&quot; style=&quot;color:#3366cc;text-decoration:none;&quot;&gt;NSURLConnection&lt;/a&gt;&lt;/code&gt;&lt;span style=&quot;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;&quot;&gt;objects, but give you more control and a unified delegate model.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;&quot;&gt;We need to have our delegate implement the required methods from the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color:#f0f3f7;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;font-style:inherit;font-weight:inherit;&quot;&gt;NSURLSessionDownloadDelegate protocol&lt;/span&gt;&lt;span style=&quot;background-color:#f0f3f7;color:#666666;font-size:13.3900003433228px;font-style:inherit;font-weight:inherit;&quot;&gt;&lt;span style=&quot;font-family:Lucida Grande, Lucida Sans Unicode, Helvetica, Arial, Verdana, sans-serif;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;&quot;&gt;When a task completes, the&amp;nbsp;&lt;span style=&quot;color:#666666;font-family:monospace;font-size:13.3900003433228px;&quot;&gt;NSURLSession&lt;/span&gt;&amp;nbsp;object calls the task's completion handler.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;&quot;&gt;When your app no longer needs a session, invalidate it by calling either either&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSURLSession_class/index.html#//apple_ref/occ/instm/NSURLSession/invalidateAndCancel&quot; style=&quot;color:#3366cc;text-decoration:none;&quot;&gt;invalidateAndCancel&lt;/a&gt;&lt;/code&gt;&lt;span style=&quot;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;&quot;&gt;&amp;nbsp;(to cancel outstanding tasks) or&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSURLSession_class/index.html#//apple_ref/occ/instm/NSURLSession/finishTasksAndInvalidate&quot; style=&quot;color:#3366cc;text-decoration:none;&quot;&gt;finishTasksAndInvalidate&lt;/a&gt;&lt;/code&gt;&lt;span style=&quot;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;&quot;&gt;&amp;nbsp;(to allow outstanding tasks to finish before invalidating the object).&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;background-color:#f0f3f7;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;font-size:13px;font-weight:700;&quot;&gt;Important:&lt;/span&gt;&lt;span style=&quot;background-color:#f0f3f7;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;font-size:13px;&quot;&gt;&amp;nbsp;If you are using the&lt;/span&gt;&lt;span style=&quot;background-color:#f0f3f7;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;font-size:13px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color:#f0f3f7;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;&quot;&gt;NSURLSession&lt;/code&gt;&lt;span style=&quot;background-color:#f0f3f7;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;font-size:13px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color:#f0f3f7;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;font-size:13px;&quot;&gt;class without providing delegates, your app must create tasks using a call that takes a&lt;/span&gt;&lt;span style=&quot;background-color:#f0f3f7;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;font-size:13px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color:#f0f3f7;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;&quot;&gt;completionHandler&lt;/code&gt;&lt;span style=&quot;background-color:#f0f3f7;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;font-size:13px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color:#f0f3f7;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;font-size:13px;&quot;&gt;parameter, because otherwise it cannot obtain data from the class.&lt;/span&gt;&lt;div style=&quot;background-color:white;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;font-size:13px;font-stretch:normal;margin-top:0.583em;&quot;&gt;&lt;span style=&quot;font-weight:700;&quot;&gt;Note:&lt;/span&gt;&amp;nbsp;&lt;code style=&quot;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;&quot;&gt;NSURLSession&lt;/code&gt;&amp;nbsp;does not report server errors through the error parameter. The only errors your app receives through the error parameter are client-side errors, such as being unable to resolve the hostname or connect to the host. The error codes are described in&amp;nbsp;&lt;code style=&quot;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Constants/index.html#//apple_ref/doc/constant_group/URL_Loading_System_Error_Codes&quot; style=&quot;color:#3366cc;text-decoration:none;&quot;&gt;URL Loading System Error Codes&lt;/a&gt;&lt;/code&gt;. Server-side errors are reported through the HTTP status code in the&amp;nbsp;&lt;code style=&quot;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;&quot;&gt;NSHTTPURLResponse&lt;/code&gt;&amp;nbsp;object. For more information, read the documentation for the&amp;nbsp;&lt;code style=&quot;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSHTTPURLResponse_Class/index.html#//apple_ref/occ/cl/NSHTTPURLResponse&quot; style=&quot;color:#3366cc;text-decoration:none;&quot;&gt;NSHTTPURLResponse&lt;/a&gt;&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code style=&quot;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSURLResponse_Class/index.html#//apple_ref/occ/cl/NSURLResponse&quot; style=&quot;color:#3366cc;text-decoration:none;&quot;&gt;NSURLResponse&lt;/a&gt;&lt;/code&gt;&amp;nbsp;classes.&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;font-size:13px;font-stretch:normal;margin-bottom:0.833em;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-size:13px;font-stretch:normal;margin-bottom:0.833em;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;Step #1: Creating the NSURLSessionConfiguration&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-size:13px;font-stretch:normal;margin-bottom:0.833em;&quot;&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;There are three ways to create an NSURLSessionConfiguration:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-stretch:normal;margin-bottom:0.833em;&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size:13px;&quot;&gt;defaultSessionConfiguration&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size:13px;&quot;&gt;creates a configuration object that uses the global cache, cookie and credential storage objects. This configuration provides a session to look very much like the NSURLConnection.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size:13px;&quot;&gt;ephemeralSessionConfiguration&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size:13px;&quot;&gt;This configuration is for &quot;private&quot; sessions and has no persistent storage for cache, cookie or credential storage objects&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size:13px;&quot;&gt;backgroundSessionConfiguration&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size:13px;&quot;&gt;This configuration is used for making networking calls from remote push notifications or while the app is suspended.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size:13px;&quot;&gt;Once the NSURLSessionConfiguration is created, then the setting of various properties on it can be done as follows:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;wp_codebox&quot; style=&quot;background-color:#f9f9f9;border:1px solid silver;color:#110000;font-family:'Open Sans', sans-serif;font-size:16px;line-height:25.8799991607666px;margin:0px 0px 0.5em;outline:0px;overflow:auto;padding:0px;vertical-align:baseline;width:842px;&quot;&gt;&lt;table style=&quot;border-collapse:collapse;border-spacing:0px;border:0px;font-family:inherit;font-size:16px;font-style:inherit;font-weight:inherit;margin:0px !important;outline:0px;padding:0px;vertical-align:baseline;width:842px;&quot;&gt;&lt;tbody style=&quot;border:0px;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;tr id=&quot;p511277&quot; style=&quot;border:0px;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;td class=&quot;code&quot; id=&quot;p51127code7&quot; style=&quot;border:0px;font-family:inherit;font-style:inherit;margin:0px;outline:0px;padding:2px 4px;vertical-align:top;&quot;&gt;&lt;pre class=&quot;objc&quot; style=&quot;background:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;font-weight:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;NSURLSessionConfiguration &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;*&lt;/span&gt;sessionConfig &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;=&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;[&lt;/span&gt;NSURLSessionConfiguration defaultSessionConfiguration&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;]&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style=&quot;border:0px;color:#11740a;font-family:inherit;font-style:italic;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;// restricts network operations to Wifi&lt;/span&gt;&lt;br /&gt;sessionConfig.allowsCellularAccess &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;border:0px;color:#a61390;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;NO&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style=&quot;border:0px;color:#11740a;font-family:inherit;font-style:italic;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;// sets all requests to only accept JSON responses&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;[&lt;/span&gt;sessionConfig setHTTPAdditionalHeaders&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;:&lt;/span&gt;&lt;br /&gt;          @&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;border:0px;color:#11740a;font-family:inherit;font-style:italic;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;border:0px;color:#bf1d1a;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&quot;Accept&quot;&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;border:0px;color:#11740a;font-family:inherit;font-style:italic;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;border:0px;color:#bf1d1a;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&quot;application/json&quot;&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;]&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style=&quot;border:0px;color:#11740a;font-family:inherit;font-style:italic;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;// configures timeouts &amp;amp; restricts app to only have one network connection to a host&lt;/span&gt;&lt;br /&gt;sessionConfig.timeoutIntervalForRequest &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;border:0px;color:#2400d9;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;30.0&lt;/span&gt;;&lt;br /&gt;sessionConfig.timeoutIntervalForResource &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;border:0px;color:#2400d9;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;60.0&lt;/span&gt;;&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;font-weight:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;sessionConfig.HTTPMaximumConnectionsPerHost &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;border:0px;color:#2400d9;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;1&lt;/span&gt;;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;font-stretch:normal;margin-bottom:0.833em;&quot;&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size:13px;&quot;&gt;&lt;b&gt;Step #2: Creating the Session&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-stretch:normal;margin-bottom:0.833em;&quot;&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size:13px;&quot;&gt;With&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color:#f0f3f7;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;&quot;&gt;NSURLSession&lt;/span&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size:13px;&quot;&gt;, you can create the tasks using the block based convenience methods, set up a delegate or both. For&amp;nbsp;instance, if you want to download an image, then you will need to create an&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color:#f0f3f7;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;&quot;&gt;NSURLSessionDownloadTask&lt;/span&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size:13px;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;table style=&quot;border-collapse:collapse;border-spacing:0px;border:0px;color:#110000;font-family:'Open Sans', sans-serif;font-size:16px;line-height:25.8799991607666px;margin:0px !important;outline:0px;padding:0px;vertical-align:baseline;width:842px;&quot;&gt;&lt;tbody style=&quot;border:0px;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;tr id=&quot;p511278&quot; style=&quot;border:0px;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;td class=&quot;code&quot; id=&quot;p51127code8&quot; style=&quot;border:0px;margin:0px;outline:0px;padding:2px 4px;vertical-align:top;&quot;&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;font-weight:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;span style=&quot;border:0px;color:#11740a;font-family:inherit;font-style:italic;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;// set the image URL&lt;/span&gt;&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/&quot; style=&quot;border:0px;color:#006837;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;span style=&quot;border:0px;color:#400080;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;NSString&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;*&lt;/span&gt;imageUrl &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;border:0px;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;border:0px;color:#11740a;font-family:inherit;font-style:italic;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;border:0px;color:#bf1d1a;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&quot;http://someImage.png&quot;&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style=&quot;border:0px;color:#11740a;font-family:inherit;font-style:italic;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;// create the default session configuration&lt;/span&gt;&lt;br /&gt;NSURLSessionConfiguration &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;*&lt;/span&gt;sessionConfig &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;=&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;[&lt;/span&gt;NSURLSessionConfiguration defaultSessionConfiguration&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;]&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style=&quot;border:0px;color:#11740a;font-family:inherit;font-style:italic;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;// create a session using the current class as a delegate&lt;/span&gt;&lt;br /&gt;NSURLSession &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;*&lt;/span&gt;session &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;=&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;[&lt;/span&gt;NSURLSession sessionWithConfiguration&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;:&lt;/span&gt;sessionConfig&lt;br /&gt;                                delegate&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;:&lt;/span&gt;self&lt;br /&gt;                           delegateQueue&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;border:0px;color:#a61390;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;nil&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;]&lt;/span&gt;;&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;font-weight:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;b&gt;Step #3: Download the image by creating a task with a completion handler&lt;/b&gt;&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;div class=&quot;wp_codebox&quot; style=&quot;background-color:#f9f9f9;border:1px solid silver;font-family:'Open Sans', sans-serif;font-size:16px;line-height:25.8799991607666px;margin:0px 0px 0.5em;outline:0px;overflow:auto;padding:0px;vertical-align:baseline;white-space:normal;width:842px;&quot;&gt;&lt;br /&gt;&lt;table style=&quot;border-collapse:collapse;border-spacing:0px;border:0px;font-family:inherit;font-size:16px;font-style:inherit;font-weight:inherit;margin:0px !important;outline:0px;padding:0px;vertical-align:baseline;width:842px;&quot;&gt;&lt;tbody style=&quot;border:0px;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;br /&gt;&lt;tr id=&quot;p511279&quot; style=&quot;border:0px;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;td class=&quot;code&quot; id=&quot;p51127code9&quot; style=&quot;border:0px;font-family:inherit;font-style:inherit;margin:0px;outline:0px;padding:2px 4px;vertical-align:top;&quot;&gt;&lt;pre class=&quot;objc&quot; style=&quot;background:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;font-weight:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;span style=&quot;border:0px;color:#11740a;font-family:inherit;font-style:italic;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;// the task is created from a session&lt;/span&gt;&lt;br /&gt;NSURLSessionDownloadTask &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;*&lt;/span&gt;getImageTask &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;=&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;[&lt;/span&gt;session downloadTaskWithURL&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;[&lt;/span&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/&quot; style=&quot;border:0px;color:#006837;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;span style=&quot;border:0px;color:#400080;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;NSURL&lt;/span&gt;&lt;/a&gt; URLWithString&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;:&lt;/span&gt;imageUrl&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;]&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;    completionHandler&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;:^&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;(&lt;/span&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/&quot; style=&quot;border:0px;color:#006837;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;span style=&quot;border:0px;color:#400080;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;NSURL&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;*&lt;/span&gt;location,&lt;br /&gt;                        &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSURLResponse_Class/&quot; style=&quot;border:0px;color:#006837;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;span style=&quot;border:0px;color:#400080;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;NSURLResponse&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;*&lt;/span&gt;response,&lt;br /&gt;                        &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSError_Class/&quot; style=&quot;border:0px;color:#006837;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;span style=&quot;border:0px;color:#400080;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;NSError&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;*&lt;/span&gt;error&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;border:0px;color:#11740a;font-family:inherit;font-style:italic;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;// the image is uploaded as NSData&lt;/span&gt;&lt;br /&gt;        UIImage &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;*&lt;/span&gt;downloadedImage &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;=&lt;/span&gt;&lt;br /&gt;          &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;[&lt;/span&gt;UIImage imageWithData&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;:&lt;/span&gt;&lt;br /&gt;              &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;[&lt;/span&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/&quot; style=&quot;border:0px;color:#006837;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;span style=&quot;border:0px;color:#400080;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;NSData&lt;/span&gt;&lt;/a&gt; dataWithContentsOfURL&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;:&lt;/span&gt;location&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;]&lt;/span&gt;;&lt;br /&gt;      &lt;span style=&quot;border:0px;color:#11740a;font-family:inherit;font-style:italic;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;// update UIImageView image to show the new file&lt;/span&gt;&lt;br /&gt;      dispatch_async&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;(&lt;/span&gt;dispatch_get_main_queue&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;)&lt;/span&gt;, &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;^&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;border:0px;color:#11740a;font-family:inherit;font-style:italic;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;// do stuff with image&lt;/span&gt;&lt;br /&gt;        _imageWithBlock.image &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;=&lt;/span&gt; downloadedImage;&lt;br /&gt;      &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;]&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style=&quot;border:0px;color:#11740a;font-family:inherit;font-style:italic;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;// start up the task&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;[&lt;/span&gt;getImageTask resume&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;]&lt;/span&gt;;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;ul&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;div&gt;&lt;br /&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;b style=&quot;font-family:Arial, Helvetica, sans-serif;font-size:13px;font-style:inherit;&quot;&gt;Step #4 Implementing the delegate methods&lt;/b&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;font-size:13px;font-style:inherit;font-weight:inherit;&quot;&gt;We need to have our delegate implement some methods from the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color:#f0f3f7;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;font-style:inherit;font-weight:inherit;white-space:normal;&quot;&gt;NSURLSessionDownloadDelegate&lt;/span&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;font-size:13px;font-style:inherit;font-weight:inherit;&quot;&gt; protocol. For instance,&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;font-size:13px;font-style:inherit;font-weight:inherit;&quot;&gt;we need to get notified when the download is complete:&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;div class=&quot;wp_codebox&quot; style=&quot;background-color:#f9f9f9;border:1px solid silver;color:#110000;font-family:'Open Sans', sans-serif;font-size:16px;line-height:25.8799991607666px;margin:0px 0px 0.5em;outline:0px;overflow:auto;padding:0px;vertical-align:baseline;white-space:normal;width:884.375px;&quot;&gt;&lt;br /&gt;&lt;table style=&quot;border-collapse:collapse;border-spacing:0px;border:0px;font-family:inherit;font-size:16px;font-style:inherit;font-weight:inherit;margin:0px !important;outline:0px;padding:0px;vertical-align:baseline;width:884px;&quot;&gt;&lt;tbody style=&quot;border:0px;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;br /&gt;&lt;tr id=&quot;p5112712&quot; style=&quot;border:0px;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;td class=&quot;code&quot; id=&quot;p51127code12&quot; style=&quot;border:0px;font-family:inherit;font-style:inherit;margin:0px;outline:0px;padding:2px 4px;vertical-align:top;&quot;&gt;&lt;pre class=&quot;objc&quot; style=&quot;background:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;font-weight:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;border:0px;color:#a61390;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;)&lt;/span&gt;URLSession&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;(&lt;/span&gt;NSURLSession &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;)&lt;/span&gt;session&lt;br /&gt;     downloadTask&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;(&lt;/span&gt;NSURLSessionDownloadTask &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;)&lt;/span&gt;downloadTask&lt;br /&gt;didFinishDownloadingToURL&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;(&lt;/span&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/&quot; style=&quot;border:0px;color:#006837;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;span style=&quot;border:0px;color:#400080;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;NSURL&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;)&lt;/span&gt;location&lt;br /&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;border:0px;color:#11740a;font-family:inherit;font-style:italic;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;// see code above from completion handler&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;div&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;Here we are provided with the location that the file is downloaded to so you can use it to work with the image.&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;b&gt;Tracking Download Progress.&lt;/b&gt;&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;To track the download progress for either task creation method, do the following:&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;/pre&gt;&lt;div class=&quot;wp_codebox&quot; style=&quot;background-color:#f9f9f9;border:1px solid silver;color:#110000;font-family:'Open Sans', sans-serif;font-size:16px;line-height:25.8799991607666px;margin:0px 0px 0.5em;outline:0px;overflow:auto;padding:0px;vertical-align:baseline;white-space:normal;width:884.375px;&quot;&gt;&lt;table style=&quot;border-collapse:collapse;border-spacing:0px;border:0px;font-family:inherit;font-size:16px;font-style:inherit;font-weight:inherit;margin:0px !important;outline:0px;padding:0px;vertical-align:baseline;width:884px;&quot;&gt;&lt;tbody style=&quot;border:0px;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;tr id=&quot;p5112713&quot; style=&quot;border:0px;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;td class=&quot;code&quot; id=&quot;p51127code13&quot; style=&quot;border:0px;font-family:inherit;font-style:inherit;margin:0px;outline:0px;padding:2px 4px;vertical-align:top;&quot;&gt;&lt;pre class=&quot;objc&quot; style=&quot;background:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;font-weight:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;border:0px;color:#a61390;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;)&lt;/span&gt;URLSession&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;(&lt;/span&gt;NSURLSession &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;)&lt;/span&gt;session&lt;br /&gt;     downloadTask&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;(&lt;/span&gt;NSURLSessionDownloadTask &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;)&lt;/span&gt;downloadTask&lt;br /&gt;     didWriteData&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;(&lt;/span&gt;int64_t&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;)&lt;/span&gt;bytesWritten&lt;br /&gt;totalBytesWritten&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;(&lt;/span&gt;int64_t&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;)&lt;/span&gt;totalBytesWritten&lt;br /&gt;totalBytesExpectedToWrite&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;(&lt;/span&gt;int64_t&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;)&lt;/span&gt;totalBytesExpectedToWrite&lt;br /&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;  NSLog&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;border:0px;color:#11740a;font-family:inherit;font-style:italic;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;border:0px;color:#bf1d1a;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&quot;%f / %f&quot;&lt;/span&gt;, &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;border:0px;color:#a61390;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;double&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;)&lt;/span&gt;totalBytesWritten,&lt;br /&gt;    &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;border:0px;color:#a61390;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;double&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;)&lt;/span&gt;totalBytesExpectedToWrite&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;div&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;font-size:13px;font-style:inherit;&quot;&gt;&lt;b&gt;Step #5: When the task is finished&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;font-size:13px;font-style:inherit;font-weight:inherit;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;background-color:#f0f3f7;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;font-style:inherit;font-weight:inherit;white-space:normal;&quot;&gt;URLSession:downloadTask:didFinishDownloadingToURL:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;font-size:13px;font-style:inherit;&quot;&gt;&lt;b&gt;is called&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;font-size:13px;font-style:inherit;font-weight:inherit;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;font-size:13px;font-style:inherit;font-weight:inherit;&quot;&gt;In the case of a file download, this is when you can save the file from the temporary location to a permanent one.&lt;/span&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;font-size:13px;font-style:inherit;font-weight:inherit;&quot;&gt;When the download fails or is cancelled, you can get the data to resume the download.&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;b style=&quot;font-family:inherit;font-style:inherit;&quot;&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;NSURLSessionTask&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;Both &lt;span style=&quot;background-color:#f0f3f7;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;font-style:inherit;font-weight:inherit;white-space:normal;&quot;&gt;NSURLSessionDataTask&lt;/span&gt;&lt;span style=&quot;font-family:inherit;font-style:inherit;font-weight:inherit;&quot;&gt; and &lt;/span&gt;&lt;span style=&quot;background-color:#f0f3f7;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;font-style:inherit;font-weight:inherit;white-space:normal;&quot;&gt;NSURLSessionDownloadTask&lt;/span&gt;&lt;span style=&quot;font-family:inherit;font-style:inherit;font-weight:inherit;&quot;&gt; are derived from &lt;/span&gt;&lt;span style=&quot;background-color:#f0f3f7;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;font-style:inherit;font-weight:inherit;white-space:normal;&quot;&gt;NSURLSessionTask&lt;/span&gt;&lt;span style=&quot;font-family:inherit;font-style:inherit;font-weight:inherit;&quot;&gt;, which is the&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;base class as illustrated below.&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;/pre&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left:auto;margin-right:auto;text-align:center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://2.bp.blogspot.com/--YASKiy2I8Q/VQyIuoS5VRI/AAAAAAAABbI/bkZ_bI0TOpE/s1600/NSURLSessionTask.png&quot; style=&quot;font-family:inherit;font-style:inherit;font-weight:inherit;margin-left:auto;margin-right:auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/--YASKiy2I8Q/VQyIuoS5VRI/AAAAAAAABbI/bkZ_bI0TOpE/s1600/NSURLSessionTask.png&quot; height=&quot;227&quot; width=&quot;320&quot;/&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align:center;&quot;&gt;&lt;span style=&quot;font-size:xx-small;&quot;&gt;Image: Courtesy of Ray Wenderlick's NSURLSession Tutorial&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://4.bp.blogspot.com/-OnZwKOmOxHg/VQqbyHJmDDI/AAAAAAAABa0/a7wI9Vw3G6E/s1600/NSURLSessionTask.png&quot; style=&quot;clear:left;float:left;margin-bottom:1em;margin-right:1em;&quot;&gt;&lt;span style=&quot;font-family:inherit;font-size:xx-small;font-style:inherit;font-weight:inherit;&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://4.bp.blogspot.com/-OnZwKOmOxHg/VQqbyHJmDDI/AAAAAAAABa0/a7wI9Vw3G6E/s1600/NSURLSessionTask.png&quot; style=&quot;clear:left;float:left;margin-bottom:1em;margin-right:1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;b style=&quot;font-family:inherit;font-style:inherit;&quot;&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;NSURLSessionTask&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;This is the base class for creating session tasks, which are generally one of the following subclasses.&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;NSURLSessionDataTask&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;This task is used for issuing HTTP GET requests to pull down data from servers.&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;The data is returned in the form of NSData, which needs to be converted to the appropriate&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;XML, JSON, etc. format.&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;div class=&quot;wp_codebox&quot; style=&quot;background-color:#f9f9f9;border:1px solid silver;color:#110000;font-family:'Open Sans', sans-serif;font-size:16px;line-height:25.8799991607666px;margin:0px 0px 0.5em;outline:0px;overflow:auto;padding:0px;vertical-align:baseline;white-space:normal;width:884.375px;&quot;&gt;&lt;br /&gt;&lt;table style=&quot;border-collapse:collapse;border-spacing:0px;border:0px;font-family:inherit;font-size:16px;font-style:inherit;font-weight:inherit;margin:0px !important;outline:0px;padding:0px;vertical-align:baseline;width:884px;&quot;&gt;&lt;tbody style=&quot;border:0px;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;br /&gt;&lt;tr id=&quot;p5112714&quot; style=&quot;border:0px;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;td class=&quot;code&quot; id=&quot;p51127code14&quot; style=&quot;border:0px;font-family:inherit;font-style:inherit;margin:0px;outline:0px;padding:2px 4px;vertical-align:top;&quot;&gt;&lt;pre class=&quot;objc&quot; style=&quot;background:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;font-weight:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;NSURLSessionDataTask &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;*&lt;/span&gt;jsonData &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;[&lt;/span&gt;session dataTaskWithURL&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;:&lt;/span&gt;yourNSURL&lt;br /&gt;      completionHandler&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;:^&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;(&lt;/span&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/&quot; style=&quot;border:0px;color:#006837;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;span style=&quot;border:0px;color:#400080;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;NSData&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;*&lt;/span&gt;data,&lt;br /&gt;                          &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSURLResponse_Class/&quot; style=&quot;border:0px;color:#006837;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;span style=&quot;border:0px;color:#400080;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;NSURLResponse&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;*&lt;/span&gt;response,&lt;br /&gt;                          &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSError_Class/&quot; style=&quot;border:0px;color:#006837;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;span style=&quot;border:0px;color:#400080;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;NSError&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;*&lt;/span&gt;error&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;        &lt;span style=&quot;border:0px;color:#11740a;font-family:inherit;font-style:italic;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;// handle NSData&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;]&lt;/span&gt;;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;background-color:white;border:0px;font-family:'Open Sans', sans-serif;font-size:16px;line-height:25.8799991607666px;outline:0px;padding:0px 0px 10px;vertical-align:baseline;white-space:normal;&quot;&gt;&lt;b style=&quot;background-color:transparent;font-family:inherit;font-style:inherit;&quot;&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;NSURLSessionUploadTask&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;This class is used to upload something to a web service using HTTP POST or PUT commands.&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;The delegate for the tasks also allows you to watch the network traffic while it is being &lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;transmitted.&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;div style=&quot;background-color:white;border:0px;font-family:'Open Sans', sans-serif;font-size:16px;line-height:25.8799991607666px;outline:0px;padding:0px 0px 10px;vertical-align:baseline;white-space:normal;&quot;&gt;&lt;br /&gt;Upload an image:&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;wp_codebox&quot; style=&quot;background-color:#f9f9f9;border:1px solid silver;color:#110000;font-family:'Open Sans', sans-serif;font-size:16px;line-height:25.8799991607666px;margin:0px 0px 0.5em;outline:0px;overflow:auto;padding:0px;vertical-align:baseline;white-space:normal;width:884.375px;&quot;&gt;&lt;br /&gt;&lt;table style=&quot;border-collapse:collapse;border-spacing:0px;border:0px;font-family:inherit;font-size:16px;font-style:inherit;font-weight:inherit;margin:0px !important;outline:0px;padding:0px;vertical-align:baseline;width:884px;&quot;&gt;&lt;tbody style=&quot;border:0px;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;br /&gt;&lt;tr id=&quot;p5112715&quot; style=&quot;border:0px;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;td class=&quot;code&quot; id=&quot;p51127code15&quot; style=&quot;border:0px;font-family:inherit;font-style:inherit;margin:0px;outline:0px;padding:2px 4px;vertical-align:top;&quot;&gt;&lt;pre class=&quot;objc&quot; style=&quot;background:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;font-weight:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSData_Class/&quot; style=&quot;border:0px;color:#006837;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;span style=&quot;border:0px;color:#400080;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;NSData&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;*&lt;/span&gt;imageData &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;=&lt;/span&gt; UIImageJPEGRepresentation&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;(&lt;/span&gt;image, &lt;span style=&quot;border:0px;color:#2400d9;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;0.6&lt;/span&gt;&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;)&lt;/span&gt;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;NSURLSessionUploadTask &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;*&lt;/span&gt;uploadTask &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;=&lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;[&lt;/span&gt;upLoadSession uploadTaskWithRequest&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;:&lt;/span&gt;request&lt;br /&gt;                              fromData&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;:&lt;/span&gt;imageData&lt;span style=&quot;border:0px;color:#002200;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;]&lt;/span&gt;;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style=&quot;background-color:white;border:0px;font-family:'Open Sans', sans-serif;font-size:16px;line-height:25.8799991607666px;outline:0px;padding:0px 0px 10px;vertical-align:baseline;white-space:normal;&quot;&gt;&lt;span style=&quot;background-color:transparent;font-family:inherit;font-style:inherit;font-weight:inherit;&quot;&gt;The task above is created from a session and the image is uploaded as NSData. Separate methods are available for uploading using files or a stream.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color:transparent;font-family:inherit;font-style:inherit;font-weight:inherit;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;NSURLSessionDownloadTask&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;&lt;div style=&quot;border:0px;outline:0px;padding:0px 0px 10px;vertical-align:baseline;&quot;&gt;&lt;span style=&quot;background-color:#f0f3f7;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;font-style:inherit;font-weight:inherit;line-height:normal;&quot;&gt;NSURLSessionDownloadTask&lt;/span&gt;&lt;b style=&quot;font-style:inherit;line-height:normal;&quot;&gt;&lt;span style=&quot;font-family:Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-style:inherit;font-weight:inherit;&quot;&gt;makes it super-easy to download files from remote service and/or pause and resume the download at will. This subclass is a little different than the other two.&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;border:0px;margin:0px 0px 3px 30px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;li style=&quot;border:0px;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px 0px 10px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;This type of task writes directly to a temporary file.&lt;/li&gt;&lt;li style=&quot;border:0px;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px 0px 10px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;During the download the session will call&amp;nbsp;&lt;span style=&quot;background-color:#f0f3f7;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;font-style:inherit;font-weight:inherit;line-height:normal;&quot;&gt;NSURLSessionDownload URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:&lt;/span&gt;&lt;span style=&quot;font-family:inherit;font-style:inherit;font-weight:inherit;&quot;&gt;&amp;nbsp;to update status&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family:inherit;font-style:inherit;font-weight:inherit;&quot;&gt;information&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;border:0px;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px 0px 10px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;When the task is finished,&amp;nbsp;&lt;span style=&quot;background-color:#f0f3f7;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;line-height:normal;&quot;&gt;URLSession:downloadTask:didFinishDownloadingToURL&lt;/span&gt;: is called. This is when you can save the file&amp;nbsp;from the temp location to a permanent one.&lt;/li&gt;&lt;li style=&quot;border:0px;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px 0px 10px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;When the download fails or is cancelled you can get the data to resume the download.&lt;/li&gt;&lt;li style=&quot;border:0px;font-family:inherit;font-style:inherit;font-weight:inherit;margin:0px 0px 10px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;This feature can be useful for downloading photos to your device's camera roll.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;We have covered the essential sequence of method calls required for&amp;nbsp;&lt;span style=&quot;background-color:#f0f3f7;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;line-height:normal;&quot;&gt;NSURLSession&lt;/span&gt;&amp;nbsp;when using a system provided delegate. &amp;nbsp;&lt;span style=&quot;font-style:inherit;font-weight:inherit;&quot;&gt;For further thorough documentation and detailed information on the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color:#f0f3f7;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.3900003433228px;line-height:normal;&quot;&gt;NSURLSession&lt;/span&gt;&lt;span style=&quot;font-style:inherit;font-weight:inherit;&quot;&gt;&amp;nbsp;and associated APIs, please refer to the Apple's &lt;/span&gt;&lt;span style=&quot;font-weight:inherit;&quot;&gt;&lt;i&gt;URL&amp;nbsp;Loading System Programming Guide or Ray Wenderlick's NSURLSession Tutorial .&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;If you find this post helpful or want to share your experiences, feel free to send me comments here or follow me on Twitter &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.twitter.com/tasneemjsayeed/&quot;&gt;@tasneemsayeed&lt;/a&gt;. &amp;nbsp;&lt;span style=&quot;font-style:inherit;font-weight:inherit;&quot;&gt;Have fun with NSURLSession Coding!&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;pre class=&quot;objc&quot; style=&quot;background-position:0px 50%;border:0px;clear:none;float:none;font-size:12px;font-style:inherit;line-height:1.333;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;white-space:pre-wrap;width:auto;word-wrap:break-word;&quot;&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div&gt;&lt;ol style=&quot;background-color:white;border:0px;font-family:'Open Sans', sans-serif;font-size:16px;line-height:25.8799991607666px;margin:0px 0px 11px 30px;outline:0px;padding:0px;vertical-align:baseline;&quot;&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;</description>
         <author>Tasneem Sayeed</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-248726242367252546.post-6692430504833893602</guid>
         <pubDate>Thu, 19 Mar 2015 13:50:00 +0000</pubDate>
         <media:thumbnail height="72" url="http://2.bp.blogspot.com/--YASKiy2I8Q/VQyIuoS5VRI/AAAAAAAABbI/bkZ_bI0TOpE/s72-c/NSURLSessionTask.png" width="72" xmlns:media="http://search.yahoo.com/mrss/"/>
      </item>
      <item>
         <title>iOS: How to Send Asynchronous Requests</title>
         <link>http://mymobilecorner.blogspot.com/2015/03/ios-how-to-send-asynchronous-requests.html</link>
         <description>Many of the applications we build often have to fetch some sort of data through the network. While there are a number of ways one could fetch the data in our iOS application and a number of networking libraries available, it is still useful to understand how NSURLConnection actually works.&lt;br /&gt;&lt;br /&gt;Step #1:&lt;br /&gt;Need to have your class to conform to the NSURLConnectionDelegate protocol and declare a var to store the response data&lt;br /&gt;&lt;br /&gt;Step #2:&lt;br /&gt;Implement the NSURLConnectionDelegate protocol methods&lt;br /&gt;&lt;br /&gt;Step #3:&lt;br /&gt;Create an instance of NSURLRequest and NSURLConnection to kick off the request&lt;br /&gt;&lt;br /&gt;In Step#1, when you class conforms to the NSURLConnectionDelegate protocol, it means that your class will need to implement all the required methods, which takes you to Step#2.&lt;br /&gt;The idea is that when you kick off the request in Step #3, you want to be notified of events that will happen such as when the response comes back, and need to handle them appropriately.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step #1:&lt;/b&gt;&lt;br /&gt;Within the class that you will be using NSURLConnection, specify in the header file that it conforms to the NSURLConnectonDelegate protocol. Also, declare an instance variable &amp;nbsp;for holding the response data.&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://1.bp.blogspot.com/-qTLyLp0oYAk/VQjWtpPDwpI/AAAAAAAABaM/9-8_6uwVDxE/s1600/NSURLConnection%2B-%2BStep%2B1.png&quot; style=&quot;clear:left;float:left;margin-bottom:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-qTLyLp0oYAk/VQjWtpPDwpI/AAAAAAAABaM/9-8_6uwVDxE/s1600/NSURLConnection%2B-%2BStep%2B1.png&quot; height=&quot;31&quot; width=&quot;400&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step #2:&lt;/b&gt;&lt;br /&gt;Next, implement the NSURLConnection protocol methods&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://4.bp.blogspot.com/-itttAxbcnnU/VQjXYUe3IuI/AAAAAAAABaU/ZsS_K-rXXoQ/s1600/NSURLConnection%2B-%2BStep%2B2.png&quot; style=&quot;clear:left;float:left;margin-bottom:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-itttAxbcnnU/VQjXYUe3IuI/AAAAAAAABaU/ZsS_K-rXXoQ/s1600/NSURLConnection%2B-%2BStep%2B2.png&quot; height=&quot;251&quot; width=&quot;400&quot;/&gt;&lt;/a&gt;&lt;/div&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;b&gt;Step #3&lt;/b&gt;&lt;br /&gt;Now, we are finally ready to perform the asynchronous request. &lt;br /&gt;Let's start by creating an instance of NSURLRequest, and assign it to the URL. &amp;nbsp;Next, create an instance of a NSURLConnection and call the initWithRequest method, passing it your NSURLRequest.&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://1.bp.blogspot.com/-WKUGy8HLqog/VQjYYMLVfrI/AAAAAAAABag/xLXqXArHc3E/s1600/NSURLConection%2B-%2BStep%2B3.png&quot; style=&quot;clear:left;float:left;margin-bottom:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-WKUGy8HLqog/VQjYYMLVfrI/AAAAAAAABag/xLXqXArHc3E/s1600/NSURLConection%2B-%2BStep%2B3.png&quot; height=&quot;42&quot; width=&quot;400&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;After the NSURLRequest is dispatched and the request is handled, the callback handler, didReceiveResponse will be invoked to indicate that the server has responded. Then, the callback handler, connection:didReceiveData will be invoked. This is where you will append the new data to the instance variable you declared. &amp;nbsp;In connectionDidFinishLoading callback is invoked when the request is complete and the data has been received, so you can parse the response data and do whatever you want to do with the data. &amp;nbsp;That's all there's to it!&lt;br /&gt;&lt;br /&gt;In the next blog post, I will cover how to send an asynchronous request using NSURLSession and Blocks!&lt;br /&gt;&lt;br /&gt;</description>
         <author>Tasneem Sayeed</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-248726242367252546.post-1057404265515622888</guid>
         <pubDate>Tue, 17 Mar 2015 20:40:00 +0000</pubDate>
         <media:thumbnail height="72" url="http://1.bp.blogspot.com/-qTLyLp0oYAk/VQjWtpPDwpI/AAAAAAAABaM/9-8_6uwVDxE/s72-c/NSURLConnection%2B-%2BStep%2B1.png" width="72" xmlns:media="http://search.yahoo.com/mrss/"/>
      </item>
      <item>
         <title>The fastest scope in the store… or Formula one in 5 minutes with Twitter</title>
         <link>http://victorpalau.net/2015/03/11/the-fastest-scope-in-the-store-or-formula-one-in-5-minutes-with-twitter/</link>
         <description>I recently blogged about making a scopes in 5 minutes using youtube. I have seen also a fair amount of new scopes being created using RSS. By far, my favourite way to use scopecreator is Twitter. If you want to check a few examples, I have published previously twitter-based scopes like breaking news, la liga and [&amp;#8230;]&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=victorpalau.net&amp;#038;blog=8255180&amp;#038;post=1622&amp;#038;subd=victorpalau&amp;#038;ref=&amp;#038;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;</description>
         <guid isPermaLink="false">http://victorpalau.net/?p=1622</guid>
         <pubDate>Wed, 11 Mar 2015 11:19:13 +0000</pubDate>
         <content:encoded><![CDATA[<p>I recently blogged about making a scopes in 5 minutes using <a rel="nofollow" target="_blank" href="http://victorpalau.net/2015/02/16/make-a-scope-for-your-youtube-channel-in-5-minutes/">youtube</a>. I have seen also a fair amount of new scopes being created using RSS. By far, my favourite way to use scopecreator is <a rel="nofollow" target="_blank" href="https://code.launchpad.net/~vtuson/scopecreator/twitter-template">Twitter</a>.</p>
<p>If you want to check a few examples, I have published previously twitter-based scopes like<a rel="nofollow" target="_blank" href="https://appstore.bhdouglass.com/app/com.ubuntu.developer.vtuson.breakingnews"> breaking news</a>, <a rel="nofollow" target="_blank" href="https://appstore.bhdouglass.com/app/com.ubuntu.developer.vtuson.laliga">la liga</a> and a few others. Today, I give you Formula One:</p>
<p><a rel="nofollow" target="_blank" href="https://victorpalau.files.wordpress.com/2015/03/f1.png"><img class=" size-medium wp-image-1625 alignnone" src="https://victorpalau.files.wordpress.com/2015/03/f1.png?w=169&#038;h=300" alt="f1" width="169" height="300"/></a> <a rel="nofollow" target="_blank" href="https://victorpalau.files.wordpress.com/2015/03/f1_2.png"><img class=" size-medium wp-image-1626 alignnone" src="https://victorpalau.files.wordpress.com/2015/03/f1_2.png?w=169&#038;h=300" alt="f1_2" width="169" height="300"/></a> <a rel="nofollow" target="_blank" href="https://victorpalau.files.wordpress.com/2015/03/f1_3.png"><img class=" size-medium wp-image-1627 alignnone" src="https://victorpalau.files.wordpress.com/2015/03/f1_3.png?w=169&#038;h=300" alt="f1_3" width="169" height="300"/></a></p>
<p>The interesting thing about twitter is that many brands upload minute by minute new updates, which make a really good source for scopes.</p>
<p>To create a Formula One scope,I started by going to twitter and creating a <a rel="nofollow" target="_blank" href="https://twitter.com/canonical_scope/lists/f1">list</a> under my scope account (you can use your personal account). The list contains several relevant &#8220;official&#8221; Formula One <a rel="nofollow" target="_blank" href="https://twitter.com/canonical_scope/lists/f1/members">accounts</a>.  Using Twitter, I can then update the sources by adding and removing accounts from the list without the user needing to download an update for the scope.</p>
<p>Again, it took me about 5 min to get a working version of the scope.  Here is what needed to do:</p>
<ul>
<li>First, we followed Chris&#8217; instructions to install the <a rel="nofollow" target="_blank" href="http://chrismwayne.com/?p=277">scope creator tool.</a></li>
<li>Once we had it set up on my laptop, I run:<br />
<code>scopecreator create twitter vtuson f1<br />
cd f1</code></li>
<li>Next, I configured the scope. The configuration is done in a json file called manifest.json. This file describes the content of what you will publish later to the store. You need to care about: &#8220;title&#8221;, &#8220;description&#8221;, &#8220;version&#8221; and &#8220;mantainer&#8221;. The rest are values populated by the tool:<br />
<code>scopecreator edit config<br />
{<br />
"description": "Formula One scope",<br />
"framework": "ubuntu-sdk-14.10",<br />
"architecture": "armhf",<br />
"hooks": {<br />
"f1": {<br />
"scope": "f1",<br />
"apparmor": "scope-security.json"<br />
}<br />
},<br />
"icon": "icon",<br />
"maintainer": "Your Name &lt;yourname@packagedomain&gt;",<br />
"name": "f1.vtuson",<br />
"title": "Formula One",<br />
"version": "0.2"<br />
}</code></li>
</ul>
<ul>
<li>The following step was to set up the branding: Easy!<a rel="nofollow" target="_blank" href="https://developer.ubuntu.com/api/scopes/sdk-14.10/index/#deployment"> Branding is define on an .ini file</a>. &#8220;Display name&#8221; will be the name listed on the &#8220;manage&#8221; window once installed, and also will be the title of your scope if you don&#8217;t use a &#8220;PageHeader.Logo&#8221;. the [Appearance] section describes the colours and logos to use when banding a scope.<br />
<code><code>scopecreator edit branding<br />
[ScopeConfig]<br />
ScopeRunner=./f1.vtuson_f1 --runtime %R --scope %S<br />
DisplayName=Formula One<br />
Description=This is an Ubuntu search plugin that enables information from Yelp $<br />
Author=Canonical Ltd.<br />
Art=<br />
Icon=images/icon.png<br />
SearchHint=Search<br />
[Appearance]<br />
PageHeader.Background=color:///#D51318<br />
PageHeader.ForegroundColor=#FFFFFF<br />
PreviewButtonColor=#D51318</code></code></li>
<li>The final part is to define the departments (drop down menu) for the scope. This is also a json file and it is unique the twitter scope template. You can either use &#8220;list&#8221; or &#8220;account&#8221; (or both) as departments.  The id is the twitter handle for the list or the account. For lists you will need to specify in the configuration section what account holds the list. As I defined a single entry, the formula one scope will have no drop down menu.<br />
<code><code>scopecreator edit channels</code></code><br />
{<br />
&#8220;departments&#8221;: [<br />
{<br />
&#8220;name&#8221;:&#8221;Formula One&#8221;,<br />
&#8220;type&#8221;:&#8221;list&#8221;,<br />
&#8220;id&#8221;:&#8221;f1&#8243;<br />
}<br />
],<br />
&#8220;configuration&#8221;: {<br />
&#8220;list-account&#8221;:&#8221;canonical_scope&#8221;,<br />
&#8220;openontwitter&#8221;:&#8221;See in Twitter&#8221;,<br />
&#8220;openlink&#8221;:&#8221;Open&#8221;,<br />
&#8220;retweet&#8221;:&#8221;Retweet&#8221;,<br />
&#8220;favorite&#8221;: &#8220;Favourite&#8221;,<br />
&#8220;reply&#8221;:&#8221;Reply&#8221;<br />
}<br />
}</li>
</ul>
<p>After this, the only thing left to do is replace the placeholder icon, with a relevant logo:<br />
<code>~/f1/f1/images/logo.png</code><br />
And build, check and publish the scope:<br />
<code>scopecreator build</code></p>
<p>This last command generates the click file that you need to upload to the store. If you have a device (for example a Nexus4 or an emulator ), it can also install it so you can test it. If you get any issues getting the scope to run, you might want to check your json files on http://jsonlint.com/. It is a great web tool that will help you make sure your json doc is ship shaped!</p>
<p>It is super simple to create a scope for a twitter list! so what are you going to create next?</p><br />  <a rel="nofollow" target="_blank" href="http://feeds.wordpress.com/1.0/gocomments/victorpalau.wordpress.com/1622/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victorpalau.wordpress.com/1622/"/></a> <img alt="" border="0" src="http://pixel.wp.com/b.gif?host=victorpalau.net&#038;blog=8255180&#038;post=1622&#038;subd=victorpalau&#038;ref=&#038;feed=1" width="1" height="1"/>]]></content:encoded>
         <media:content medium="image" url="http://2.gravatar.com/avatar/58e2c8a57cdd4841f98672a6059b6858?s=96&amp;amp;d=identicon&amp;amp;r=G">
            <media:title type="html">Victor Palau</media:title>
         </media:content>
         <media:content medium="image" url="https://victorpalau.files.wordpress.com/2015/03/f1.png?w=169">
            <media:title type="html">f1</media:title>
         </media:content>
         <media:content medium="image" url="https://victorpalau.files.wordpress.com/2015/03/f1_2.png?w=169">
            <media:title type="html">f1_2</media:title>
         </media:content>
         <media:content medium="image" url="https://victorpalau.files.wordpress.com/2015/03/f1_3.png?w=169">
            <media:title type="html">f1_3</media:title>
         </media:content>
      </item>
      <item>
         <title>Make a scope for your YouTube channel in 5 minutes</title>
         <link>http://victorpalau.net/2015/02/16/make-a-scope-for-your-youtube-channel-in-5-minutes/</link>
         <description>Not long back Chris Wayne published a post about a scope creator tool.  Last week, I was visiting bq and we decided with Victor Gonzalez  that we should have a scope for Canal bq. The folks at bq do an excellent job at creating &amp;#8220;how to&amp;#8221; and &amp;#8220;first steps&amp;#8221; videos, and they have started publishing some for [&amp;#8230;]&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=victorpalau.net&amp;#038;blog=8255180&amp;#038;post=1612&amp;#038;subd=victorpalau&amp;#038;ref=&amp;#038;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;</description>
         <guid isPermaLink="false">http://victorpalau.net/?p=1612</guid>
         <pubDate>Mon, 16 Feb 2015 14:00:26 +0000</pubDate>
         <content:encoded><![CDATA[<p>Not long back Chris Wayne<a rel="nofollow" target="_blank" href="http://chrismwayne.com/?p=277"> published a post</a> about a scope creator tool.  Last week, I was visiting bq and we decided with <a rel="nofollow" target="_blank" href="https://plus.google.com/114411551119829280597/posts">Victor Gonzalez </a> that we should have a scope for Canal bq. The folks at bq do an excellent job at creating &#8220;how to&#8221; and &#8220;first steps&#8221; videos, and they have started publishing some for the bq Aquaris E4.5 Ubuntu Edition.</p>
<p>Here is a few screenshots of the scope that is now available to download from the store:</p>
<p><a rel="nofollow" target="_blank" href="https://victorpalau.files.wordpress.com/2015/02/bq1.png"><img class=" size-medium wp-image-1616 alignnone" src="https://victorpalau.files.wordpress.com/2015/02/bq1.png?w=180&#038;h=300" alt="bq1" width="180" height="300"/></a><a rel="nofollow" target="_blank" href="https://victorpalau.files.wordpress.com/2015/02/bq2.png"><img class=" size-medium wp-image-1615 alignnone" src="https://victorpalau.files.wordpress.com/2015/02/bq2.png?w=180&#038;h=300" alt="bq2" width="180" height="300"/></a><a rel="nofollow" target="_blank" href="https://victorpalau.files.wordpress.com/2015/02/bq3.png"><img class=" size-medium wp-image-1614 alignnone" src="https://victorpalau.files.wordpress.com/2015/02/bq3.png?w=180&#038;h=300" alt="bq3" width="180" height="300"/></a><a rel="nofollow" target="_blank" href="https://victorpalau.files.wordpress.com/2015/02/bq4.png"><img class=" size-medium wp-image-1613 alignnone" src="https://victorpalau.files.wordpress.com/2015/02/bq4.png?w=180&#038;h=300" alt="bq4" width="180" height="300"/></a></p>
<p>The impressive thing is that it took us about 5 min to get a working version of the scope.  Here is what needed to do:</p>
<ul>
<li>First, we followed Chris&#8217; instructions to install the <a rel="nofollow" target="_blank" href="http://chrismwayne.com/?p=277">scope creator tool.</a></li>
<li>Once we had it set up on my laptop, we run:<br />
<code>scopecreator create youtube com.ubuntu.developer.victorbq canalbq<br />
cd canalbq</code></li>
<li>Next, we configured the scope. The configuration is done in a json file called manifest.json. This file describes the content of what you will publish later to the store. You need to care about: &#8220;title&#8221;, &#8220;description&#8221;, &#8220;version&#8221; and &#8220;mantainer&#8221;. The rest are values populated by the tool:<br />
<code>scopecreator edit config<br />
{<br />
"name": "com.ubuntu.developer.victorbq.canalbq",<br />
"description": "Canal bq",<br />
"framework": "ubuntu-sdk-14.10",<br />
"architecture": "armhf",<br />
"title": "Canal bq",<br />
"hooks": {<br />
"canalbq": {<br />
"scope": "canalbq",<br />
"apparmor": "scope-security.json"<br />
}<br />
},<br />
"version": "0.3",<br />
"maintainer": "Victor Gonzalez &lt;anemailfromvictor@bq.com&gt;"<br />
}</code></li>
</ul>
<ul>
<li>The following step was to set up the branding: Easy!<a rel="nofollow" target="_blank" href="https://developer.ubuntu.com/api/scopes/sdk-14.10/index/#deployment"> Branding is define on an .ini file</a>. &#8220;Display name&#8221; will be the name listed on the &#8220;manage&#8221; window once installed, and also will be the title of your scope if you don&#8217;t use a &#8220;PageHeader.Logo&#8221;. the [Appearance] section describes the colours and logos to use when banding a scope.<br />
<code><code> scopecreator edit branding<br />
[ScopeConfig]<br />
DisplayName=Canal bq<br />
Description=Youtube custommized channel<br />
Author=Canonical Ltd.<br />
Art=images/logo.png<br />
Icon=images/logo.png<br />
SearchHint=Buscar<br />
LocationDataNeeded=true<br />
[Appearance]<br />
PageHeader.Background=color:///#000000<br />
PageHeader.ForegroundColor=#FFFFFF<br />
PreviewButtonColor=#FFFFFF<br />
PageHeader.Logo=./images/logo.png</code></code></li>
</ul>
<ul>
<li>The final part is to define the departments (drop down menu) for the scope. This is also a json file and it is unique the youtube scope template. You can either use &#8220;playlists&#8221; or &#8220;channels&#8221; (or both) as departments. The id PLjQOV_HHlukyNGBFaSVGFVWrbj3vjtMjd corresponds to a play list from youtube, with url= <a rel="nofollow" target="_blank" href="https://www.youtube.com/playlist?list=PLjQOV_HHlukyNGBFaSVGFVWrbj3vjtMjd">https://www.youtube.com/playlist?list=PLjQOV_HHlukyNGBFaSVGFVWrbj3vjtMjd</a><br />
<code><code>scopecreator edit channels</code></code>{<br />
&#8220;maxResults&#8221;: &#8220;20&#8221;,<br />
&#8220;playlists&#8221;: [<br />
{<br />
&#8220;id&#8221;: &#8220;PLjQOV_HHlukyNGBFaSVGFVWrbj3vjtMjd&#8221;,<br />
&#8220;reminder&#8221;:&#8221;Aquaris E4,5 Ubuntu Edition&#8221;<br />
},<br />
{<br />
&#8220;id&#8221;: &#8220;PLjQOV_HHlukzBhuG97XVYsw96F-pd9P2I&#8221;,<br />
&#8220;reminder&#8221;: &#8220;Tecnópolis&#8221;<br />
},<br />
{<br />
&#8220;id&#8221;: &#8220;PLC46C98114CA9991F&#8221;,<br />
&#8220;reminder&#8221;: &#8220;aula bq&#8221;<br />
},<br />
{<br />
&#8220;id&#8221;: &#8220;PLE7ACC7492AD7D844&#8221;,<br />
&#8220;reminder&#8221;: &#8220;primeros pasos&#8221;<br />
},<br />
{<br />
&#8220;id&#8221;: &#8220;PL551D151492F07D63&#8221;,<br />
&#8220;reminder&#8221;: &#8220;accesorios&#8221;<br />
},<br />
{<br />
&#8220;id&#8221;: &#8220;PLjQOV_HHlukyIT8Jr3aI1jtoblUTD4mn0&#8221;,<br />
&#8220;reminder&#8221;: &#8220;3d&#8221;<br />
}<br />
]<br />
}</li>
</ul>
<p>After this, the only thing left to do is replace the placeholder icon, with the bq logo:<br />
<code>~/canalbq/canalbq/images/logo.png</code><br />
And build, check and publish the scope:<br />
<code>scopecreator build</code></p>
<p>This last command generates the click file that you need to upload to the store. If you have a device (for example a Nexus4 or an emulator ), it can also install it so you can test it. If you get any issues getting the scope to run, you might want to check your json files on http://jsonlint.com/. It is a great web tool that will help you make sure your json doc is ship shaped!</p>
<p>It is super simple to create a scope for a youtube channel! so what are you going to create next?</p><br />  <a rel="nofollow" target="_blank" href="http://feeds.wordpress.com/1.0/gocomments/victorpalau.wordpress.com/1612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victorpalau.wordpress.com/1612/"/></a> <img alt="" border="0" src="http://pixel.wp.com/b.gif?host=victorpalau.net&#038;blog=8255180&#038;post=1612&#038;subd=victorpalau&#038;ref=&#038;feed=1" width="1" height="1"/>]]></content:encoded>
         <media:content medium="image" url="http://2.gravatar.com/avatar/58e2c8a57cdd4841f98672a6059b6858?s=96&amp;amp;d=identicon&amp;amp;r=G">
            <media:title type="html">Victor Palau</media:title>
         </media:content>
         <media:content medium="image" url="https://victorpalau.files.wordpress.com/2015/02/bq1.png?w=180">
            <media:title type="html">bq1</media:title>
         </media:content>
         <media:content medium="image" url="https://victorpalau.files.wordpress.com/2015/02/bq2.png?w=180">
            <media:title type="html">bq2</media:title>
         </media:content>
         <media:content medium="image" url="https://victorpalau.files.wordpress.com/2015/02/bq3.png?w=180">
            <media:title type="html">bq3</media:title>
         </media:content>
         <media:content medium="image" url="https://victorpalau.files.wordpress.com/2015/02/bq4.png?w=180">
            <media:title type="html">bq4</media:title>
         </media:content>
      </item>
      <item>
         <title>uBrick – a Lego Scope</title>
         <link>http://victorpalau.net/2015/01/20/ubrick-a-lego-scope/</link>
         <description>Just a quick note to tell you that I have published a new scope called uBrick that brings you the awesomeness of Lego, as a catalogue powered by brickset.com, directly to your Ubuntu phone home screen. I wrote the scope in Go cause I find it easier to work with for a quick scope ( took about [&amp;#8230;]&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=victorpalau.net&amp;#038;blog=8255180&amp;#038;post=1605&amp;#038;subd=victorpalau&amp;#038;ref=&amp;#038;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;</description>
         <guid isPermaLink="false">http://victorpalau.net/?p=1605</guid>
         <pubDate>Tue, 20 Jan 2015 17:49:17 +0000</pubDate>
         <content:encoded><![CDATA[<p>Just a quick note to tell you that I have published a new scope called uBrick that brings you the awesomeness of Lego, as a catalogue powered by<a rel="nofollow" target="_blank" href="http://brickset.com/"> brickset.com</a>, directly to your Ubuntu phone home screen.</p>
<p>I wrote the scope in Go cause I find it easier to work with for a quick scope ( took about 8 hours with interruptions over 2 days to write this scope).  The scope is now available at the store, just search for uBrick.</p>
<p>Here are some pics:</p>
<p><a rel="nofollow" target="_blank" href="https://victorpalau.files.wordpress.com/2015/01/lego4.png"><img class=" size-medium wp-image-1609 alignnone" src="https://victorpalau.files.wordpress.com/2015/01/lego1.png?w=180&#038;h=300" alt="lego1" width="180" height="300"/><img class=" size-medium wp-image-1608 alignnone" src="https://victorpalau.files.wordpress.com/2015/01/lego2.png?w=180&#038;h=300" alt="lego2" width="180" height="300"/><img class=" size-medium wp-image-1607 alignnone" src="https://victorpalau.files.wordpress.com/2015/01/lego3.png?w=180&#038;h=300" alt="lego3" width="180" height="300"/></a> <a rel="nofollow" target="_blank" href="https://victorpalau.files.wordpress.com/2015/01/lego4.png"><img class=" size-medium wp-image-1606 alignnone" src="https://victorpalau.files.wordpress.com/2015/01/lego4.png?w=180&#038;h=300" alt="lego4" width="180" height="300"/></a></p>
<p>Also I have to congratulate the folks at Brickset for a very nice API, even if it is using SOAP <span class='wp-smiley wp-emoji wp-emoji-smile' title=':)'>:)</span></p><br />  <a rel="nofollow" target="_blank" href="http://feeds.wordpress.com/1.0/gocomments/victorpalau.wordpress.com/1605/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victorpalau.wordpress.com/1605/"/></a> <img alt="" border="0" src="http://pixel.wp.com/b.gif?host=victorpalau.net&#038;blog=8255180&#038;post=1605&#038;subd=victorpalau&#038;ref=&#038;feed=1" width="1" height="1"/>]]></content:encoded>
         <media:content medium="image" url="http://2.gravatar.com/avatar/58e2c8a57cdd4841f98672a6059b6858?s=96&amp;amp;d=identicon&amp;amp;r=G">
            <media:title type="html">Victor Palau</media:title>
         </media:content>
         <media:content medium="image" url="https://victorpalau.files.wordpress.com/2015/01/lego1.png?w=180">
            <media:title type="html">lego1</media:title>
         </media:content>
         <media:content medium="image" url="https://victorpalau.files.wordpress.com/2015/01/lego2.png?w=180">
            <media:title type="html">lego2</media:title>
         </media:content>
         <media:content medium="image" url="https://victorpalau.files.wordpress.com/2015/01/lego3.png?w=180">
            <media:title type="html">lego3</media:title>
         </media:content>
         <media:content medium="image" url="https://victorpalau.files.wordpress.com/2015/01/lego4.png?w=180">
            <media:title type="html">lego4</media:title>
         </media:content>
      </item>
      <item>
         <title>Common Workflow Language</title>
         <link>http://kerncomputing.blogspot.com/2015/01/common-workflow-language.html</link>
         <description>Analyzing genomic data requires one to use a sequence of programs (e.g., assemblers, aligners, variant callers) called &lt;i&gt;pipelines&lt;/i&gt;. One needs to understand the details of these programs to get them to work well together. Since these genomic data sets are large, it is desirable to distribute the work across multiple machines.&lt;br /&gt;&lt;br /&gt;A number of well-known platforms exists to provide this infrastructure.&lt;br /&gt;&lt;span id=&quot;docs-internal-guid-520199e9-f3df-805a-77f9-a1c135f2942e&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul style=&quot;margin-bottom:0pt;margin-top:0pt;&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;list-style-type:disc;text-decoration:none;vertical-align:baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;line-height:1.15;margin-bottom:0pt;margin-top:0pt;&quot;&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;Arvados&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;ul style=&quot;margin-bottom:0pt;margin-top:0pt;&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;list-style-type:circle;text-decoration:none;vertical-align:baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;line-height:1.15;margin-bottom:0pt;margin-top:0pt;&quot;&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;website ( &lt;/span&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://arvados.org/&quot; style=&quot;text-decoration:none;&quot;&gt;&lt;span style=&quot;background-color:transparent;color:#1155cc;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;https://arvados.org&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt; ) &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;list-style-type:circle;text-decoration:none;vertical-align:baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;line-height:1.15;margin-bottom:0pt;margin-top:0pt;&quot;&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;source ( &lt;/span&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://github.com/curoverse/arvados&quot; style=&quot;text-decoration:none;&quot;&gt;&lt;span style=&quot;background-color:transparent;color:#1155cc;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;https://github.com/curoverse/arvados&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt; )&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;list-style-type:circle;text-decoration:none;vertical-align:baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;line-height:1.15;margin-bottom:0pt;margin-top:0pt;&quot;&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;License: &amp;nbsp;Apache License 2.0&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;list-style-type:disc;text-decoration:none;vertical-align:baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;line-height:1.15;margin-bottom:0pt;margin-top:0pt;&quot;&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;Galaxy&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;ul style=&quot;margin-bottom:0pt;margin-top:0pt;&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;list-style-type:circle;text-decoration:none;vertical-align:baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;line-height:1.15;margin-bottom:0pt;margin-top:0pt;&quot;&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;website ( &lt;/span&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://galaxyproject.org/&quot; style=&quot;text-decoration:none;&quot;&gt;&lt;span style=&quot;background-color:transparent;color:#1155cc;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;http://galaxyproject.org/&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt; &amp;nbsp;)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;list-style-type:circle;text-decoration:none;vertical-align:baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;line-height:1.15;margin-bottom:0pt;margin-top:0pt;&quot;&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;source: ( &lt;/span&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://bitbucket.org/galaxy/galaxy-central&quot; style=&quot;text-decoration:none;&quot;&gt;&lt;span style=&quot;background-color:transparent;color:#1155cc;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;https://bitbucket.org/galaxy/galaxy-central&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt; )&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;list-style-type:circle;text-decoration:none;vertical-align:baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;line-height:1.15;margin-bottom:0pt;margin-top:0pt;&quot;&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;License: &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://wiki.galaxyproject.org/Admin/License&quot; style=&quot;text-decoration:none;&quot;&gt;&lt;span style=&quot;background-color:transparent;color:#1155cc;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;AFL 3.0&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;list-style-type:disc;text-decoration:none;vertical-align:baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;line-height:1.15;margin-bottom:0pt;margin-top:0pt;&quot;&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;Seven Bridges&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;ul style=&quot;margin-bottom:0pt;margin-top:0pt;&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color:transparent;list-style-type:circle;vertical-align:baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom:0pt;margin-top:0pt;&quot;&gt;&lt;span style=&quot;background-color:transparent;font-size:15px;line-height:17.25px;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;span style=&quot;font-family:Arial;&quot;&gt;website: https://www.sbgenomics.com/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color:transparent;list-style-type:circle;vertical-align:baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom:0pt;margin-top:0pt;&quot;&gt;&lt;span style=&quot;font-family:Arial;&quot;&gt;&lt;span style=&quot;font-size:15px;line-height:1.15;white-space:pre-wrap;&quot;&gt;License: &lt;/span&gt;&lt;span style=&quot;font-size:15px;line-height:17.25px;white-space:pre-wrap;&quot;&gt;Commercial&lt;/span&gt;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span style=&quot;font-family:Arial;&quot;&gt;&lt;span style=&quot;font-size:15px;line-height:17.25px;white-space:pre-wrap;&quot;&gt;BioDatomics&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family:Arial;&quot;&gt;&lt;span style=&quot;font-size:15px;line-height:17.25px;white-space:pre-wrap;&quot;&gt;website: http://www.biodatomics.com/&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:Arial;&quot;&gt;&lt;span style=&quot;font-size:15px;line-height:17.25px;white-space:pre-wrap;&quot;&gt;License: Commerical&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;list-style-type:disc;text-decoration:none;vertical-align:baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;line-height:1.15;margin-bottom:0pt;margin-top:0pt;&quot;&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;Taverna&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;ul style=&quot;margin-bottom:0pt;margin-top:0pt;&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;list-style-type:circle;text-decoration:none;vertical-align:baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;line-height:1.15;margin-bottom:0pt;margin-top:0pt;&quot;&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;website ( &lt;/span&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.taverna.org.uk/&quot; style=&quot;text-decoration:none;&quot;&gt;&lt;span style=&quot;background-color:transparent;color:#1155cc;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;http://www.taverna.org.uk/&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt; ) &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;list-style-type:circle;text-decoration:none;vertical-align:baseline;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;line-height:1.15;margin-bottom:0pt;margin-top:0pt;&quot;&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;source code: ( &lt;/span&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://github.com/taverna/&quot; style=&quot;text-decoration:none;&quot;&gt;&lt;span style=&quot;background-color:transparent;color:#1155cc;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;https://github.com/taverna/&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt; )&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;list-style-type:circle;text-decoration:none;vertical-align:baseline;&quot;&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;License: LGPL&lt;/span&gt;&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;list-style-type:circle;text-decoration:none;vertical-align:baseline;&quot;&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;As of October 2014, this project entered the apache incubator project. See http://taverna.incubator.apache.org/. I assume the license is now apache. &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;ul style=&quot;margin-bottom:0pt;margin-top:0pt;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family:Arial;&quot;&gt;&lt;span style=&quot;font-size:15px;white-space:pre-wrap;&quot;&gt;DNAnexus&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family:Arial;&quot;&gt;&lt;span style=&quot;font-size:15px;white-space:pre-wrap;&quot;&gt;website  ( https://www.dnanexus.com/ ) &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:Arial;&quot;&gt;&lt;span style=&quot;font-size:15px;white-space:pre-wrap;&quot;&gt;License: Commercial &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;The &amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.open-bio.org/wiki/Codefest_2014&quot;&gt;BOSC 2014 codefest&lt;/a&gt;&amp;nbsp;gave birth to the Common Workflow Language(CWL) project ( &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://groups.google.com/forum/#!forum/common-workflow-language&quot;&gt;group&lt;/a&gt;&amp;nbsp;| &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://github.com/common-workflow-language/common-workflow-language&quot;&gt;github&lt;/a&gt;&amp;nbsp;). &amp;nbsp;Its goal is to define a language which would allow pipelines to run on any compliant platform. In forthcoming posts, I plan to talk about our efforts to breath life into CWL and port &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://bcbio-nextgen.readthedocs.org/en/latest/&quot;&gt;bcbio-nextgen&lt;/a&gt; to it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description>
         <author>John Kern</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-10428183.post-5392235568529563061</guid>
         <pubDate>Fri, 16 Jan 2015 10:14:00 +0000</pubDate>
      </item>
      <item>
         <title>bcbio-nextgen: walk through of cancel/normal example</title>
         <link>http://kerncomputing.blogspot.com/2014/08/bcbio-nextgen-walk-through-of.html</link>
         <description>&lt;div dir=&quot;ltr&quot; style=&quot;line-height:1.15;margin-bottom:0pt;margin-top:0pt;&quot;&gt;&lt;span style=&quot;font-family:Georgia, 'Times New Roman', serif;font-size:15px;line-height:17.25px;white-space:pre-wrap;&quot;&gt;On this blog, I've been documenting my experiences with bcbio-nextgen.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family:Georgia, 'Times New Roman', serif;font-size:15px;line-height:17.25px;white-space:pre-wrap;&quot;&gt;With this post, I want to walk through and extend a well known, bcbio-nextgen example. It is &lt;/span&gt;&lt;span style=&quot;font-family:Georgia, 'Times New Roman', serif;line-height:17.25px;white-space:pre-wrap;&quot;&gt;called&amp;nbsp;&lt;/span&gt;&lt;a rel=&quot;nofollow&quot; class=&quot;webkit-html-attribute-value webkit-html-external-link&quot; target=&quot;_blank&quot; href=&quot;https://bcbio-nextgen.readthedocs.org/en/latest/contents/testing.html#cancer-tumor-normal&quot; style=&quot;font-family:Georgia, 'Times New Roman', serif;white-space:pre-wrap;&quot;&gt;Cancer Tumor Normal&lt;/a&gt;&lt;span style=&quot;font-family:Georgia, 'Times New Roman', serif;line-height:17.25px;white-space:pre-wrap;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;font-family:Georgia, 'Times New Roman', serif;font-size:15px;line-height:17.25px;white-space:pre-wrap;&quot;&gt; &quot;&lt;/span&gt;&lt;i style=&quot;font-family:Georgia, 'Times New Roman', serif;font-size:15px;line-height:17.25px;white-space:pre-wrap;&quot;&gt;This example calls variants in a paired cancer sample with tumor/normal sequencing data using raw data from &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.plosone.org/article/info:doi/10.1371/journal.pone.0064271&quot;&gt;Han et al in PLoS One&lt;/a&gt;&lt;/i&gt;&lt;span style=&quot;font-family:Georgia, 'Times New Roman', serif;font-size:15px;line-height:17.25px;white-space:pre-wrap;&quot;&gt;.&quot;  &lt;/span&gt;&lt;span style=&quot;font-family:Georgia, 'Times New Roman', serif;font-size:15px;line-height:17.25px;white-space:pre-wrap;&quot;&gt;The current documentation does a good job telling you how to setup things up. Here I would like to inspect the input. Describe the output and suggest a way to visual it and highlight the use of the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://gemini.readthedocs.org/en/latest/index.html&quot;&gt;Gemini &lt;/a&gt;to export the database.&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;margin-bottom:0pt;margin-top:0pt;&quot;&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;Bcbio uses a yaml files for configuration. Yaml files are nice because they provide a high level abstraction which bcbio translates into specific commands. Storing these configuration files in a configuration manage system provide a great way to track changes. &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;There are two main configuration files. One details the samples. The other provides options for system software. We will focus on the sample file. Let's look at the important bits of the sample config file for this example.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family:Georgia, 'Times New Roman', serif;&quot;&gt;You find the full yaml file&amp;nbsp;&lt;/span&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://github.com/kern3020/bcbio-nextgen/blob/master/config/examples/cancer-paired.yaml&quot; style=&quot;font-family:Georgia, 'Times New Roman', serif;&quot;&gt;here&lt;/a&gt;&lt;span style=&quot;font-family:Georgia, 'Times New Roman', serif;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family:Georgia, 'Times New Roman', serif;&quot;&gt;&amp;nbsp;It defines two samples: &lt;i&gt;normal &lt;/i&gt;and &lt;i&gt;tumor&lt;/i&gt;. Here is the first sample. [aside: I have collapsed the algorithm options for now. ]&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, 'Times New Roman', serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;- algorithm:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; ...&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; analysis: variant2&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; description: ERR256785&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; files:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; - ../input/ERR256785_1.fastq.gz&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; - ../input/ERR256785_2.fastq.gz&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; genome_build: GRCh37&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; metadata:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; batch: batch1&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; phenotype: normal&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;The keywords for sample configurations are defined &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://bcbio-nextgen.readthedocs.org/en/latest/contents/configuration.html&quot;&gt;here&lt;/a&gt;. The algorithm keyword is important. We will address it in the next paragraph.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;Bcbio-nextgen allows us to build pipelines. &amp;nbsp;At the moment, two are used most of the time. Here we use &lt;/span&gt;&lt;b style=&quot;font-family:Georgia, 'Times New Roman', serif;&quot;&gt;variant2 &lt;/b&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;for the variant calling &lt;/span&gt;&lt;b style=&quot;font-family:Georgia, 'Times New Roman', serif;&quot;&gt;analysis&lt;/b&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;. Another common one is&amp;nbsp;&lt;b&gt;RNA-seq.&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;The description keyword is the unique name for this sample&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:Georgia, 'Times New Roman', serif;&quot;&gt;The data for this study is pair end reads. We use the &lt;b&gt;files &lt;/b&gt;keyword to define the input files.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:Georgia, 'Times New Roman', serif;&quot;&gt;The &lt;b&gt;genome_build &lt;/b&gt;keyword defines the reference genome.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;With the &lt;b&gt;metadata&lt;/b&gt;, we define a unique name for this batch and the phenotype.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;The prefixes ERP and ERR are defined by&amp;nbsp;EMBL-EBI and stand for the &lt;b&gt;Study &lt;/b&gt;and a &lt;b&gt;Run&lt;/b&gt;&amp;nbsp;respectively.&amp;nbsp; So,&amp;nbsp;&lt;span style=&quot;background-color:white;line-height:19.99887466430664px;&quot;&gt;ERR256785 is a normal sample&amp;nbsp;f&lt;/span&gt;rom the Hans et al study. &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;Now lets look at the algorithm's section.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;- algorithm:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; aligner: bwa&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; coverage_interval: regional&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; mark_duplicates: false&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; recalibrate: false&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; realign: false&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; platform: illumina&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; quality_format: standard&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; variant_regions: ../input/ERP002442-targeted.bed&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; variantcaller: freebayes&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;The import point here is we have defined &lt;i&gt;bwa &lt;/i&gt;for alignment and &lt;i&gt;freebayes &lt;/i&gt;as our variant caller. variant_regions defines the relevant regions for this analysis.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;The bcbio-nextgen documentations does an excellent job talking about how to setup the directory structure with the input files and how to start the job running. &amp;nbsp;However, it doesn't talk about the output. Go to the final directory. A file called&amp;nbsp;&lt;i&gt;batch1-freebayes.vcf.gz&lt;/i&gt; can be loaded into a genome view. I used Integrative Genome View (&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.broadinstitute.org/igv/&quot;&gt;IGV&lt;/a&gt;&lt;u&gt;)&amp;nbsp;&lt;/u&gt;from the Board&amp;nbsp;Institute. At first it is completed zoomed out. If we navigate to genes referenced in the paper, you see some results.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;The astute user will also notice a file called &amp;nbsp;&lt;i&gt;batch1-freebayes.db&lt;/i&gt;. This is an sqlite3 database created by &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://gemini.readthedocs.org/en/latest/&quot;&gt;Gemini&lt;/a&gt;. &amp;nbsp;Bcbio uses Gemini to import the VCF file and query other databases to retrieve relevant annotations. The Gemini documentations does a nice job describing this process. &lt;i&gt;&quot;Using the GEMINI framework begins by loading a VCF file into a database. Each variant is automatically annotated by comparing it to several genome annotations from source such as ENCODE tracks, UCSC tracks, OMIM, dbSNP, KEGG, and HPRD. All of this information is stored in portable SQLite database that allows one to explore and interpret both coding and non-coding variation using “off-the-shelf” tools or an enhanced SQL engine.&quot;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;margin-bottom:0pt;margin-top:0pt;&quot;&gt;&lt;ul style=&quot;margin-bottom:0pt;margin-top:0pt;&quot;&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size:15px;white-space:pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family:Georgia, Times New Roman, serif;&quot;&gt;&lt;span style=&quot;font-size:15px;white-space:pre-wrap;&quot;&gt;-jk&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family:Arial;&quot;&gt;&lt;span style=&quot;font-size:15px;white-space:pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Arial;&quot;&gt;&lt;span style=&quot;font-size:15px;white-space:pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</description>
         <author>John Kern</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-10428183.post-1656351007010774671</guid>
         <pubDate>Tue, 19 Aug 2014 14:40:00 +0000</pubDate>
      </item>
      <item>
         <title>coverage - a case study in extending a bcbio-nextgen pipeline</title>
         <link>http://kerncomputing.blogspot.com/2014/07/coverage-case-study-in-extending-bcbio.html</link>
         <description>bcbio-nextgen is &lt;i&gt;a python toolkit providing best-practice pipelines for fully automated high throughput sequencing analysis&lt;/i&gt;. It has pipelines for variant calling and RNA-seq analysis. This post talks about how to extend an bcbio-nextgen pipeline. We will delve into the internals parts of the source which are relevant to integrating chanjo,&lt;i&gt; a better way to handle sequence coverage data in clinical sequencin&lt;/i&gt;g.&lt;br /&gt;&lt;br /&gt;What is coverage? The input to this process is next-generation sequencing (NGS) data. Due to limitations with respect to physics and chemistry, the data is a large number of tiny DNA fragments (also called reads) and associated &amp;nbsp;quality scores. Once these are realigned to the reference genome, the astute researcher would like to see how they are distributed. Since there is inherit uncertainty, we want to ensure that there are many reads associated with the location of interest. &lt;br /&gt;&lt;br /&gt;Let's use &lt;i&gt;chanjo &lt;/i&gt;on&amp;nbsp;a concrete example using the output from my last post, in which, I ran a yeast sample through the pipeline. The resulting bam file, ERR302903-ready.bam, contains the aligned reads. The researcher is almost certainly interested in a specific location. Here we'll using this bed file.&lt;br /&gt;&lt;br /&gt;chrVII&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;193708&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;196403&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;RAD54&lt;br /&gt;chrXII&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;212516&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;213930&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;RAD52&lt;br /&gt;chrVII&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;1007672&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;1010766&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;RAD2&lt;br /&gt;&lt;br /&gt;This specifies the locations of the genes RAD54, RAD52 and RAD2 on yeasts chromosome 7. A call to chanjo's annotate command...&lt;br /&gt;&lt;br /&gt;$ chanjo annotate ERR302903-ready.bam yeast-repair.bed&lt;br /&gt;&lt;br /&gt;... yields this output....&lt;br /&gt;&lt;br /&gt;chrVII &amp;nbsp;&lt;span style=&quot;white-space:pre;&quot;&gt;&amp;nbsp;&lt;/span&gt;193708 &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;196403 &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;RAD54&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;   &lt;/span&gt;30.5808605341 &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;1&lt;br /&gt;chrXII&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;   &lt;/span&gt;212516&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;    &lt;/span&gt;213930&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;    &lt;/span&gt;RAD52 &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;27.8416961131 &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;1&lt;br /&gt;chrVII&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;   &lt;/span&gt;1007672&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;1010766&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;RAD2 &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;27.3085621971 &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;1&lt;br /&gt;&lt;br /&gt;[aside: bed files are tab separated. This output has been formatted for readability.]&lt;br /&gt;&lt;br /&gt;This fifth column is the average coverage depth for the gene in question. So, RAD54 has an average number of reads in this region of about 30x. Nice tool! However, we do not want to have to do this manual each time. Let's integrate it with the bcbio-nextgen pipeline.&lt;br /&gt;&lt;br /&gt;Pipelines are defined in bcbio/pipline/main.py. &amp;nbsp;Running a standard pipeline takes a long time. For this integration work, the results of a running a standard pipeline run simply creates input for chanjo. Since bcbio-nextgen is a toolkit for creating pipelines, let's create one that only runs chanjo. Consider this code snippet.&lt;br /&gt;&lt;br /&gt;class ChanjoPipeline(AbstractPipeline):&lt;br /&gt;&amp;nbsp; &amp;nbsp; &quot;&quot;&quot; Test only: This pipeline only calls the coverage tool. It was designed solely&lt;br /&gt;&amp;nbsp; &amp;nbsp; to support integration with chanjo. Assumes the bam and bed files exist.&lt;br /&gt;&amp;nbsp; &amp;nbsp; &quot;&quot;&quot;&lt;br /&gt;&amp;nbsp; &amp;nbsp; name = &quot;chanjo&quot;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; @classmethod&lt;br /&gt;&amp;nbsp; &amp;nbsp; def run(self, config, config_file, parallel, dirs, samples):&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; with prun.start(_wres(parallel, [&quot;chanjo&quot;]),&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; samples, config, dirs, &quot;multicore&quot;) as run_parallel:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; with profile.report(&quot;coverage&quot;, dirs):&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;samples[0][0]['work_bam'] = 'ready.bam' &amp;nbsp;# Todo: update with valid input&lt;/b&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; samples = coverage.summary(samples, run_parallel)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; logger.info(&quot;Timing: finished&quot;)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return samples&lt;br /&gt;&lt;br /&gt;In this post, I'm just going to focus on the important bits for this integration. All pipelines inherit AbstractPipeline. It mainly requires the subclass to define a run method. For chanjo, we need two files. The bam file is normally generated by the pipeline. Here we will simply hardcore a path to an existing bam file. The corresponding bed file is defined in the sample config file.&lt;br /&gt;&lt;br /&gt;upload:&lt;br /&gt;&amp;nbsp; dir: ../final&lt;br /&gt;fc_date: '140611'&lt;br /&gt;fc_name: yeast&lt;br /&gt;details:&lt;br /&gt;&amp;nbsp; - algorithm:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; aligner: bwa&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; recalibrate: false&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; variantcaller: gatk&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; quality_format: Standard&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;coverage: ../input/yeast-repair.bed&lt;/b&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; analysis: chanjo&lt;br /&gt;&amp;nbsp; &amp;nbsp; description: ERR302903&lt;br /&gt;&amp;nbsp; &amp;nbsp; files:&lt;br /&gt;&amp;nbsp; &amp;nbsp; - ../input/ERR302903_1.fastq.gz&lt;br /&gt;&amp;nbsp; &amp;nbsp; - ../input/ERR302903_2.fastq.gz&lt;br /&gt;&amp;nbsp; &amp;nbsp; genome_build: sacCer3&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;The main change to the config file is to add a coverage attribute which is associated with the bed file provided by the researcher.&lt;br /&gt;&lt;br /&gt;After this setup is done, the summary() function is simple. It cobbles together a command line for the chanjo and runs it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description>
         <author>John Kern</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-10428183.post-482826700908253786</guid>
         <pubDate>Fri, 11 Jul 2014 09:00:00 +0000</pubDate>
      </item>
      <item>
         <title>Using bcbio to analyzing a Saccharomyces cerevisiae sample</title>
         <link>http://kerncomputing.blogspot.com/2014/06/using-bcbio-to-analyzing-saccharomyces.html</link>
         <description>&lt;span style=&quot;font-family:Times, Times New Roman, serif;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://bcbio-nextgen.readthedocs.org/en/latest/&quot;&gt;bcbio-nextgen&lt;/a&gt;&amp;nbsp;is a python toolkit providing best-practice pipelines for fully automated high throughput sequencing analysis. While it focuses on the human genome&amp;nbsp;or human-like diploid organisms, it strives to support a wide variety of genomes.&amp;nbsp;This post documents how to use a much small genome:&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family:Times, 'Times New Roman', serif;&quot;&gt;Saccharomyces cerevisiae ( or&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family:Times, 'Times New Roman', serif;&quot;&gt;baker's yeast).&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Times, Times New Roman, serif;&quot;&gt;&lt;br /&gt;With the human genome, bcbio-nextgen starts by aligning the sample with a well known reference genome: GRCh37. This is called &lt;b&gt;re-sequencing&lt;/b&gt;. &amp;nbsp;This assumes you have have a reference genome. Programs which take the raw sample and generate a DNA sequence are called &lt;b&gt;assemblers&lt;/b&gt;.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Times, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Times, Times New Roman, serif;&quot;&gt;In this post, we will re-sequence a sample using the reference genome for&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family:Times, 'Times New Roman', serif;&quot;&gt;Saccharomyces cerevisiae. &amp;nbsp;In a future post, I plan to use an assembler.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;h3&gt;&lt;b&gt;Downloading a Reference Genome&lt;/b&gt;&lt;/h3&gt;&lt;span style=&quot;font-family:Times, Times New Roman, serif;&quot;&gt;bcbio-nextgen knows how to download some reference genomes. If you look at the help on the upgrade command you'll see the '&lt;i&gt;--genomes&lt;/i&gt;' option which enumerates them.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Times, Times New Roman, serif;&quot;&gt;&lt;br /&gt;$ &lt;i&gt;bcbio_nextgen.py upgrade --help&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Times, Times New Roman, serif;&quot;&gt;usage: .....&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Times, Times New Roman, serif;&quot;&gt;&amp;nbsp; --genomes {GRCh37, hg19, mm10, mm9, rn5, canFam3, dm3, Zv9, phix, sacCer3}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Times, Times New Roman, serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Genomes to download&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Times, Times New Roman, serif;&quot;&gt;.....&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Times, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Times, Times New Roman, serif;&quot;&gt;The token '&lt;i&gt;sacCer3&lt;/i&gt;' represents the latest yeast reference genome. We can download it with...&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;line-height:17.25px;white-space:pre-wrap;&quot;&gt;&lt;span style=&quot;font-family:Times, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:15px;line-height:17.25px;white-space:pre-wrap;&quot;&gt;&lt;span style=&quot;font-family:Times, Times New Roman, serif;&quot;&gt;$ &lt;i&gt;bcbio_nextgen.py upgrade --data --genomes sacCer3&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;h3&gt;&lt;b&gt;Getting the data&lt;/b&gt;&lt;/h3&gt;After searching around the National Center for Biotechnology Information&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.ncbi.nlm.nih.gov/&quot;&gt;(NCBI)&lt;/a&gt;, I selected&amp;nbsp;&lt;u&gt;&lt;i&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.ncbi.nlm.nih.gov/sra/ERX276244&quot;&gt;ERX276244&lt;/a&gt;: Whole Genome Sequencing of fungal endophyte sp. D3-2B19-1&lt;/i&gt;&lt;/u&gt;.&amp;nbsp; On the NCBI website, &amp;nbsp;Next Generation Sequencing (NGS) data is found on the Sequence Read Archive (SRA) section.&lt;br /&gt;&lt;br /&gt;The selected experiment is a paired reads run on an Illumina HiSeq 2000. Paired reads signify that the fragment is read in both directions. This implies we will need two files, one in each direction.&lt;br /&gt;&lt;br /&gt;The Sequence Read Archive basically includes intensity, read and alignment data. All this data requires a lot of space. We only want to extract the two fastq files representing the reads. NCBI provides a collection of command line tools called the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.ncbi.nlm.nih.gov/Traces/sra/?view=software&quot;&gt;SRA toolkit&lt;/a&gt; to extract fastq files. We will use the fastq-dump command to retrieve the data we require. Consider:&lt;br /&gt;&lt;br /&gt;fastq-dump --split-files ERR302903&lt;br /&gt;&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://trace.ncbi.nlm.nih.gov/Traces/sra/?run=ERR302903&quot;&gt;ERR302903&lt;/a&gt;&amp;nbsp;is the accession identifier for the run in which we are interested. If you do not use the '--split-files' option, all the data is glommed into a single file. By applying this option, fastq-dump splits the fastq files into two, one for each direction yielding:&amp;nbsp;&lt;i&gt;ERR302903_1.fastq&lt;/i&gt; and&amp;nbsp;&lt;i&gt;ERR302903_2.fastq&lt;/i&gt;&lt;br /&gt;&lt;h3&gt;&lt;b&gt;Running the Pipeline&lt;/b&gt;&lt;/h3&gt;&lt;span style=&quot;font-family:Times, Times New Roman, serif;&quot;&gt;Now that we have a reference genome for our species of interest and a sample, let's use bcbio-nextgen to analyze our sample.&amp;nbsp;&lt;/span&gt;Let's start by &amp;nbsp;creating a working directory structure like this one:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Times, Times New Roman, serif;&quot;&gt;yeast&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Times, Times New Roman, serif;&quot;&gt;&amp;nbsp;|- config&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Times, Times New Roman, serif;&quot;&gt;&amp;nbsp;|- work&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Times, Times New Roman, serif;&quot;&gt;&amp;nbsp;|- input&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Times, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Times, Times New Roman, serif;&quot;&gt;Copy the fastq files we downloaded from NCBI into the input directory.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:Times, Times New Roman, serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family:Times, 'Times New Roman', serif;&quot;&gt;The main configuration file for a bcbio&lt;/span&gt;&lt;span style=&quot;font-family:Times, 'Times New Roman', serif;&quot;&gt;-nextgen&lt;/span&gt;&lt;span style=&quot;font-family:Times, 'Times New Roman', serif;&quot;&gt;&amp;nbsp;pipeline run is called a sample file. Like all bcbio&lt;/span&gt;&lt;span style=&quot;font-family:Times, 'Times New Roman', serif;&quot;&gt;-nextgen&lt;/span&gt;&lt;span style=&quot;font-family:Times, 'Times New Roman', serif;&quot;&gt;&amp;nbsp;configuration files it is in yaml format. It defines all the parameters we will need to analyze our sample.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;upload:&lt;br /&gt;&amp;nbsp; dir: ../final&lt;br /&gt;fc_date: '140611'&lt;br /&gt;fc_name: yeast&lt;br /&gt;details:&lt;br /&gt;&amp;nbsp; - algorithm:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; aligner: bwa&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; recalibrate: false&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; variantcaller: gatk&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; quality_format: Standard&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; coverage_interval: genome&lt;br /&gt;&amp;nbsp; &amp;nbsp; analysis: variant2&lt;br /&gt;&amp;nbsp; &amp;nbsp; description: ERR302903&lt;br /&gt;&amp;nbsp; &amp;nbsp; files:&lt;br /&gt;&amp;nbsp; &amp;nbsp; - ../input/ERR302903_1.fastq.gz&lt;br /&gt;&amp;nbsp; &amp;nbsp; - ../input/ERR302903_2.fastq.gz&lt;br /&gt;&amp;nbsp; &amp;nbsp; genome_build: sacCer3&lt;br /&gt;&lt;br /&gt;This yaml file should be copied to the config directory.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Finally, we change to the work directory and execute this command:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;bcbio_nextgen.py ../config/ERR302903-yeast.yaml -n 4&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;I ran this on an AWS m3.medium instance: 3.75Gb of Ram and 1 cpu. This run took about three hours and requires about 2Gb of disk space.&lt;br /&gt;&lt;br /&gt;Future posts will talk about using the results of this pipeline.&lt;br /&gt;&lt;br /&gt;-jk&lt;br /&gt;&lt;br /&gt;</description>
         <author>John Kern</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-10428183.post-5750919902103493340</guid>
         <pubDate>Fri, 20 Jun 2014 11:39:00 +0000</pubDate>
      </item>
      <item>
         <title>Quick Tutorial: Implementing Your Own Delegates in Objective-C</title>
         <link>http://mymobilecorner.blogspot.com/2014/05/quick-tutorial-implementing-your-own.html</link>
         <description>&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;&lt;div style=&quot;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;font-size:13.333333969116211px;margin-bottom:0.833em;&quot;&gt;The delegate pattern is another simple, yet powerful design pattern. Many UI elements in iOS (i.e. UIScrollView, UITextField, UITableView,etc) use delegates to control their behavior. A&amp;nbsp;delegate is an object that acts on behalf of, or in coordination with, another object when that object encounters an event in a program. The&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;color:#3366cc;&quot;&gt;&lt;/a&gt;delegating object is often a responder object—that is, an object inheriting from&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://www.blogger.com/null&quot; style=&quot;color:#3366cc;&quot;&gt;&lt;/a&gt;&lt;code style=&quot;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.333333969116211px;&quot;&gt;NSResponder&lt;/code&gt;&amp;nbsp;in AppKit or&amp;nbsp;&lt;code style=&quot;color:#666666;font-family:Courier, Consolas, monospace;font-size:13.333333969116211px;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIResponder_Class/Reference/Reference.html#//apple_ref/occ/cl/UIResponder&quot; style=&quot;color:#3366cc;text-decoration:none;&quot;&gt;UIResponder&lt;/a&gt;&lt;/code&gt;&amp;nbsp;in UIKit—that is responding to a user event. The delegate is an object that is delegated control of the user interface for that event, or is at least asked to interpret the event in an application-specific manner. For a more thorough description on delegates, refer to the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://developer.apple.com/library/ios/documentation/general/conceptual/CocoaEncyclopedia/DelegatesandDataSources/DelegatesandDataSources.html&quot;&gt;Apple documentation&lt;/a&gt;.&lt;/div&gt;&lt;div style=&quot;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;font-size:13.333333969116211px;margin-bottom:0.833em;&quot;&gt;In order to implement your own custom delegate protocol, you will need to&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;font-family:'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif;font-size:13.333333969116211px;margin-bottom:0.833em;&quot;&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;span style=&quot;font-size:13.333333969116211px;&quot;&gt;Modify the header (.h) file for MyClass (i.e. MyClass.h)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size:13.333333969116211px;&quot;&gt;Add the @protocol delaration&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size:13.333333969116211px;&quot;&gt;Add a delegate @property&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size:13.333333969116211px;&quot;&gt;Declare the methods that delegates can implement.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://4.bp.blogspot.com/-AEXrCl3eZsk/U2rI-xDc64I/AAAAAAAABQA/SDR2SjbEWwg/s1600/MyClass_Protocol_Decl.png&quot; style=&quot;clear:left;float:left;margin-bottom:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-AEXrCl3eZsk/U2rI-xDc64I/AAAAAAAABQA/SDR2SjbEWwg/s1600/MyClass_Protocol_Decl.png&quot; height=&quot;182&quot; width=&quot;320&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;font-family:tahoma, arial;font-size:11px;height:26px;padding-top:2px;&quot;&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;Next, make sure to check if the delegate is set and that it responds to the selector anytime you want to call the delegate within your implementation.&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://3.bp.blogspot.com/-9uDhxfsRQgE/U2rLsnsJdgI/AAAAAAAABQQ/MBlQ9ahq4KY/s1600/MyClass_implementation.png&quot; style=&quot;clear:left;float:left;margin-bottom:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-9uDhxfsRQgE/U2rLsnsJdgI/AAAAAAAABQQ/MBlQ9ahq4KY/s1600/MyClass_implementation.png&quot; height=&quot;101&quot; width=&quot;320&quot;/&gt;&lt;/a&gt;&lt;/div&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;Next, for the classes that you want to conform to your new protocol, include MyClass.h header file and delegate protocol in the @interface&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://3.bp.blogspot.com/-mUuVueaKWc0/U2rM-TzSysI/AAAAAAAABQc/izrUD5gTqdQ/s1600/MyAppViewController+-+making+it+a+delegate+of+%2522YourProtocolName%2522.png&quot; style=&quot;clear:left;float:left;margin-bottom:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-mUuVueaKWc0/U2rM-TzSysI/AAAAAAAABQc/izrUD5gTqdQ/s1600/MyAppViewController+-+making+it+a+delegate+of+%2522YourProtocolName%2522.png&quot; height=&quot;46&quot; width=&quot;320&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Finally, set its delegate to self somewhere and implement the delegate method&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://3.bp.blogspot.com/-XPVnACvk1pI/U2rOMO-FqQI/AAAAAAAABQk/kzU2UtST1Qk/s1600/MyAppViewController+-+delegate+implementation.png&quot; style=&quot;clear:left;float:left;margin-bottom:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-XPVnACvk1pI/U2rOMO-FqQI/AAAAAAAABQk/kzU2UtST1Qk/s1600/MyAppViewController+-+delegate+implementation.png&quot; height=&quot;226&quot; width=&quot;320&quot;/&gt;&lt;/a&gt;&lt;/div&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;View more &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.slideshare.net/&quot;&gt;documents&lt;/a&gt; from &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.slideshare.net/tasneemsayeed&quot;&gt;tasneemsayeed&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;</description>
         <author>Tasneem Sayeed</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-248726242367252546.post-8914425428149999822</guid>
         <pubDate>Wed, 07 May 2014 17:44:00 +0000</pubDate>
         <media:thumbnail height="72" url="http://4.bp.blogspot.com/-AEXrCl3eZsk/U2rI-xDc64I/AAAAAAAABQA/SDR2SjbEWwg/s72-c/MyClass_Protocol_Decl.png" width="72" xmlns:media="http://search.yahoo.com/mrss/"/>
      </item>
      <item>
         <title>How to Send Email Within Your iPhone Application</title>
         <link>http://mymobilecorner.blogspot.com/2014/05/how-to-send-email-within-your-iphone.html</link>
         <description>&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;This article provides a tutorial to help you send an email from inside your iPhone application using the iPhone SDK built-in APIs.&lt;br /&gt;The iPhone SDK provides the built-in MessageUI framework, which greatly simplifies the implementation of email functionality within an iOS application.&lt;br /&gt;&lt;h3&gt;Creating a Simple Email UI&lt;/h3&gt;Create a simple app with a UI View Controller and call it the name, &quot;SimpleEmailAppViewController&quot;. Then, add a button to the UIView by dragging it from the interface builder, and rename the button title to &quot;Contact Us&quot;.&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://3.bp.blogspot.com/-A2wWTlBxUO0/U2mTCd6h_gI/AAAAAAAABNg/CN7N0dOsbx0/s1600/SimpleEmailAppUI.png&quot; style=&quot;margin-left:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-A2wWTlBxUO0/U2mTCd6h_gI/AAAAAAAABNg/CN7N0dOsbx0/s1600/SimpleEmailAppUI.png&quot; height=&quot;238&quot; width=&quot;320&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;When the user taps the &quot;Contact Us&quot; button, the app will display the email user interface.&lt;br /&gt;&lt;h3&gt;Making Connections to the User Interface&lt;/h3&gt;In order to make the connections from the &quot;Contact Us&quot; button to an action, you need to select the SimpleEmailAppViewController.xib file from the Project Navigator then go to the Interface Builder. Switch to the &lt;i&gt;Assistant Editor&lt;/i&gt; while hiding the Utility area. Once this is done, the interface and its corresponding code are displayed side by side. Next, press and hold the  key and click the &quot;Contact Us&quot; button and&lt;br /&gt;drag it towards the &quot;SimpleEmailAppViewController.h. As you place the pointer just below @interface and before the @end, and as you release the mouse button, you will notice a prompt that allows you to insert an outlet and action.&lt;br /&gt;Select &quot;Action&quot; for &quot;Connection&quot; and enter &quot;sendEmail&quot; for &quot;name&quot; as shown below.&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://4.bp.blogspot.com/-RLy2rlgDnO4/U2mXy1eUAPI/AAAAAAAABNs/l2cIJId1bDI/s1600/ContactUsEmailConnection.png&quot; style=&quot;margin-left:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-RLy2rlgDnO4/U2mXy1eUAPI/AAAAAAAABNs/l2cIJId1bDI/s1600/ContactUsEmailConnection.png&quot; height=&quot;119&quot; width=&quot;320&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;The event can be kept as &quot;Touch Up Inside&quot;. When the user clicks the &quot;Contact Us&quot; button and lifts up the finger inside the button, it will result in invoking the &quot;sendEmail&quot; method. &amp;nbsp;Once, you click &lt;i&gt;Connect &lt;/i&gt;to confirm the changes, Xcode automatically adds the method declaration into &quot;SimpleEmailAppViewController.h&quot; file.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://1.bp.blogspot.com/-cNWNMcuBbSc/U2maunStgnI/AAAAAAAABN8/_U6QRuGq4CQ/s1600/sendEmailAdded.png&quot; style=&quot;margin-left:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-cNWNMcuBbSc/U2maunStgnI/AAAAAAAABN8/_U6QRuGq4CQ/s1600/sendEmailAdded.png&quot; height=&quot;82&quot; width=&quot;320&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;Implementing the Email Interface&lt;/h3&gt;In &quot;SimpleEmailAppViewController.h&quot;, implement the &quot;MFMailComposeViewControllerDelegate&quot; as shown below.&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://1.bp.blogspot.com/-kXQTEWU32nU/U2mffPTjB5I/AAAAAAAABOM/_i8eGP9rF_s/s1600/MFMailComposeViewControllerDelegate.png&quot; style=&quot;margin-left:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-kXQTEWU32nU/U2mffPTjB5I/AAAAAAAABOM/_i8eGP9rF_s/s1600/MFMailComposeViewControllerDelegate.png&quot; height=&quot;101&quot; width=&quot;320&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In &quot;SimpleEmailAppViewController.m&quot;, implement the &quot;sendEmail&quot; method. Also, add the implementation for the delegate method, &quot;MFMailComposeViewControllerDelegate&quot;. &amp;nbsp;Note that we will also be utilizing the built-in API from the iOS SDK called &quot;MFMailComposeViewController&quot;.&lt;br /&gt;The &quot;MFMailComposeViewController&quot; class provides a standard interface to allow the editing, and composing of an email message. You can use this view controller to display a standard email view within your iOS application. We populate the fields of this view with initial values including the recipient email, subject and body of the message.&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://2.bp.blogspot.com/-gqltf0ym-5Q/U2mk7aSTL-I/AAAAAAAABOc/Ns2XMFsoE4Q/s1600/sendEmail+-+listener+interface.png&quot; style=&quot;margin-left:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-gqltf0ym-5Q/U2mk7aSTL-I/AAAAAAAABOc/Ns2XMFsoE4Q/s1600/sendEmail+-+listener+interface.png&quot; height=&quot;96&quot; width=&quot;320&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;This view controller class also includes the following delegate method:&lt;br /&gt;&lt;span style=&quot;color:#002200;font-family:Monaco, 'Lucida Console', monospace;font-size:13px;line-height:18px;white-space:nowrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#a61390;font-family:Monaco, 'Lucida Console', monospace;font-size:13px;line-height:18px;white-space:nowrap;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color:#002200;font-family:Monaco, 'Lucida Console', monospace;font-size:13px;line-height:18px;white-space:nowrap;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;background-color:#f1f1f1;font-family:Monaco, 'Lucida Console', monospace;font-size:13px;line-height:18px;white-space:nowrap;&quot;&gt;&amp;nbsp;mailComposeController&lt;/span&gt;&lt;span style=&quot;color:#002200;font-family:Monaco, 'Lucida Console', monospace;font-size:13px;line-height:18px;white-space:nowrap;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#002200;font-family:Monaco, 'Lucida Console', monospace;font-size:13px;line-height:18px;white-space:nowrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color:#f1f1f1;font-family:Monaco, 'Lucida Console', monospace;font-size:13px;line-height:18px;white-space:nowrap;&quot;&gt;MFMailComposeViewController&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#002200;font-family:Monaco, 'Lucida Console', monospace;font-size:13px;line-height:18px;white-space:nowrap;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color:#002200;font-family:Monaco, 'Lucida Console', monospace;font-size:13px;line-height:18px;white-space:nowrap;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;background-color:#f1f1f1;font-family:Monaco, 'Lucida Console', monospace;font-size:13px;line-height:18px;white-space:nowrap;&quot;&gt;controller&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color:#f1f1f1;font-family:Monaco, 'Lucida Console', monospace;font-size:13px;line-height:18px;white-space:nowrap;&quot;&gt;&amp;nbsp; didFinishWithResult&lt;/span&gt;&lt;span style=&quot;color:#002200;font-family:Monaco, 'Lucida Console', monospace;font-size:13px;line-height:18px;white-space:nowrap;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#002200;font-family:Monaco, 'Lucida Console', monospace;font-size:13px;line-height:18px;white-space:nowrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color:#f1f1f1;font-family:Monaco, 'Lucida Console', monospace;font-size:13px;line-height:18px;white-space:nowrap;&quot;&gt;MFMailComposeResult&lt;/span&gt;&lt;span style=&quot;color:#002200;font-family:Monaco, 'Lucida Console', monospace;font-size:13px;line-height:18px;white-space:nowrap;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;background-color:#f1f1f1;font-family:Monaco, 'Lucida Console', monospace;font-size:13px;line-height:18px;white-space:nowrap;&quot;&gt;result error&lt;/span&gt;&lt;span style=&quot;color:#002200;font-family:Monaco, 'Lucida Console', monospace;font-size:13px;line-height:18px;white-space:nowrap;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#002200;font-family:Monaco, 'Lucida Console', monospace;font-size:13px;line-height:18px;white-space:nowrap;&quot;&gt;(&lt;/span&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSError_Class/&quot; style=&quot;color:#ed702b;font-family:Monaco, 'Lucida Console', monospace;font-size:13px;line-height:18px;text-decoration:none;white-space:nowrap;&quot;&gt;&lt;span style=&quot;color:#400080;line-height:1.4em;&quot;&gt;NSError&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color:#f1f1f1;font-family:Monaco, 'Lucida Console', monospace;font-size:13px;line-height:18px;white-space:nowrap;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:#002200;font-family:Monaco, 'Lucida Console', monospace;font-size:13px;line-height:18px;white-space:nowrap;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color:#002200;font-family:Monaco, 'Lucida Console', monospace;font-size:13px;line-height:18px;white-space:nowrap;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;background-color:#f1f1f1;font-family:Monaco, 'Lucida Console', monospace;font-size:13px;line-height:18px;white-space:nowrap;&quot;&gt;error&lt;/span&gt;&lt;br /&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;This method is invoked when the user cancels the operation and the mail composition interface is dismissed. The result parameter tells you the result code when the mail composition interface is dismissed. In a real-world application, the app should display any errors that may occur if the app fails to send the email message.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://2.bp.blogspot.com/-NSL--NWBZwE/U2mud4ofDfI/AAAAAAAABO0/PdYgCegcxDU/s1600/didFinishWithResult.png&quot; style=&quot;clear:left;float:left;margin-bottom:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-NSL--NWBZwE/U2mud4ofDfI/AAAAAAAABO0/PdYgCegcxDU/s1600/didFinishWithResult.png&quot; height=&quot;135&quot; width=&quot;320&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;/div&gt;&lt;h3&gt;Linking with the Message UI Framework&lt;/h3&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;If you try to build the application, you will notice that you will get build errors. The &quot;MFMailComposeViewController&quot; class is built-in within the &lt;i&gt;MessageUI&lt;/i&gt; framework.&amp;nbsp;&lt;/div&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;To fix the compilation problem(s), you will need to add the &lt;i&gt;MessageUI&lt;/i&gt; framework so that it is linked properly with your application. &amp;nbsp;In the Project Navigator, select the &quot;SimpleEmailApp&quot; project and then select &quot;SimpleEmailApp&quot; target under &lt;i&gt;Targets&lt;/i&gt;. &amp;nbsp;Then, click &quot;Build Phases&quot; at the top of the project editor panel. Then, click on &quot;Link Binary With Libraries&quot; section.&amp;nbsp;&lt;/div&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://2.bp.blogspot.com/-BL-MwO6OfO8/U2mvGwdITQI/AAAAAAAABO8/SnFA_GTNqyg/s1600/AddMessageUIFramework.png&quot; style=&quot;clear:left;float:left;margin-bottom:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-BL-MwO6OfO8/U2mvGwdITQI/AAAAAAAABO8/SnFA_GTNqyg/s1600/AddMessageUIFramework.png&quot; height=&quot;187&quot; width=&quot;320&quot;/&gt;&lt;/a&gt;&lt;br /&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;Next, click the &quot;+&quot; button and select the &quot;MessageUI framework&quot;. After you click the &quot;Add&quot; button, Xcode will include the &lt;i&gt;MessageUI framework&lt;/i&gt;. This should fix your error(s), and you can now run your application. &amp;nbsp;When you tap on the &quot;Contact Us&quot; button, it will display the email composition window with the pre-populated email content.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://3.bp.blogspot.com/-QSOsrGcSLe0/U2my0sulZfI/AAAAAAAABPI/jssjKFbwt7c/s1600/ContactUs_Simulator.png&quot; style=&quot;clear:left;float:left;margin-bottom:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-QSOsrGcSLe0/U2my0sulZfI/AAAAAAAABPI/jssjKFbwt7c/s1600/ContactUs_Simulator.png&quot; height=&quot;320&quot; width=&quot;170&quot;/&gt;&lt;/a&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://2.bp.blogspot.com/-0wRjnzfqV-Q/U2my92Qdh6I/AAAAAAAABPQ/ascIkblpLBw/s1600/NewMessage.png&quot; style=&quot;margin-left:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-0wRjnzfqV-Q/U2my92Qdh6I/AAAAAAAABPQ/ascIkblpLBw/s1600/NewMessage.png&quot; height=&quot;320&quot; width=&quot;170&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;&lt;br /&gt;If you find this tutorial helpful, and would like to see more of these types of tutorials, then share a comment! &amp;nbsp;Or if you have any other suggestions, do let me know as well. &amp;nbsp;And follow me on twitter (@tasneemsayeed).&lt;br /&gt;&lt;div style=&quot;font-family:tahoma, arial;font-size:11px;height:26px;padding-top:2px;&quot;&gt;View more &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.slideshare.net/&quot; style=&quot;text-decoration:underline;&quot;&gt;documents&lt;/a&gt; from &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.slideshare.net/tasneemsayeed&quot; style=&quot;text-decoration:underline;&quot;&gt;tasneemsayeed&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;</description>
         <author>Tasneem Sayeed</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-248726242367252546.post-3723339276905748944</guid>
         <pubDate>Tue, 06 May 2014 21:25:00 +0000</pubDate>
         <media:thumbnail height="72" url="http://3.bp.blogspot.com/-A2wWTlBxUO0/U2mTCd6h_gI/AAAAAAAABNg/CN7N0dOsbx0/s72-c/SimpleEmailAppUI.png" width="72" xmlns:media="http://search.yahoo.com/mrss/"/>
      </item>
      <item>
         <title>Viewing raw microarray data as an image</title>
         <link>http://kerncomputing.blogspot.com/2014/04/viewing-raw-microarray-data-as-image.html</link>
         <description>I am taking course on data analysis of genomic data using R. There are already good places to learn about R and &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://bioconductor.org/&quot;&gt;Bioconductor&lt;/a&gt;. Here I just wanted to record a code snippet I found useful. Often when working with microarray data, we are analyzing it statically and examine the resulting graphs. Sometimes you might want to view the raw data as an image. This code shows that image.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;library(affy)&lt;br /&gt;dat &amp;lt;- ReadAffy()&lt;br /&gt;image(dat[,1])&lt;br /&gt;&lt;/pre&gt;</description>
         <author>John Kern</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-10428183.post-4425302033246305363</guid>
         <pubDate>Tue, 29 Apr 2014 08:22:00 +0000</pubDate>
      </item>
      <item>
         <title>Tech tip: linux commands for manipulating large files</title>
         <link>http://kerncomputing.blogspot.com/2014/04/tech-tip-linux-commands-for.html</link>
         <description>Bioinformatic files can be very large and take a long time to process. A file containing a complete human genome is about 3Gb. The raw data from the sequencer is much bigger. Runtimes are best measured in hours or days.&lt;br /&gt;&lt;br /&gt;Often we want to manipulate large, compressed bioinformatic files. Their is a set of commands which are prefixed with 'z'. They parallel standard Linux commands such as cat, grep, egrep, less, more, diff and cmp.&lt;br /&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;How can you search a large, compressed file? Normally, one uses grep to search files but you can't do that directly with a compressed. Uncompressing the file to the file system is an option but that requires a lot of disk and you need to clean up afterwards.&lt;/li&gt;&lt;ol&gt;&lt;li&gt;The zcat command &amp;nbsp;(or alternatively&amp;nbsp;command '-c' option on gunzip&amp;nbsp;) uncompressing the file to standard out. So, we can '&lt;b style=&quot;font-style:italic;&quot;&gt;zcat foo.gz | grep pattern'&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;Alternatively you can simply use zgrep directly.&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;How does one view a large, compress file?&amp;nbsp;&lt;/li&gt;&lt;ol&gt;&lt;li&gt;zcat, zless, zmore&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;How does one compare a large, compress file?&lt;/li&gt;&lt;ol&gt;&lt;li&gt;zdiff, zcmp&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;&lt;div&gt;Long running processes are common. Simply running a process on a remote machine is brittle. If the session is interrupted, it is not possible to recover the information. &quot;&lt;b style=&quot;font-style:italic;&quot;&gt;Both GNU Screen and tmux are terminal multiplexers designed for Unix-like platforms&quot;&lt;/b&gt;.&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.wikivs.com/wiki/screen_vs_tmux&quot;&gt;Here&lt;/a&gt; is a comparison. This allow us to disconnect from a session, log off the system and return at a latter time.&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;-John&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description>
         <author>John Kern</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-10428183.post-797793028805352495</guid>
         <pubDate>Fri, 25 Apr 2014 14:56:00 +0000</pubDate>
      </item>
      <item>
         <title>Initial installation of bcbio -  a python toolkit providing best-practice pipelines for fully automated high throughput sequencing analysis</title>
         <link>http://kerncomputing.blogspot.com/2014/04/initial-installation-of-bcbio-python.html</link>
         <description>Around the turn of the century, the human genome was sequenced for the first time. Since the achievement of this milestone, a ton of genomic data has been generated. A lot of it is publicly available. The latest sequencing machines, called Next Generation Sequencing(NGS), are creating sequencing at an astounding rate. This generates a lot of data. The raw output to sequence a single human genome is about 22Gb.&lt;br /&gt;&lt;br /&gt;Once the data is sequenced analysis can begin. This is a complicated process. This blog post talks about my initial experience installing bcbio&lt;span style=&quot;font-family:Times, 'Times New Roman', serif;&quot;&gt;-nextgen&lt;/span&gt;&amp;nbsp;on AWS. &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://bcbio-nextgen.readthedocs.org/en/latest/&quot;&gt;bcbio-nextgen&lt;/a&gt;&amp;nbsp;is a python toolkit providing best-practice pipelines for fully automated high throughput sequencing analysis. While they framework is written in python, it leverages open source software written in a variety of languages including C/C++, Java and R.&lt;br /&gt;&lt;br /&gt;At first blush, you might consider using a t1.micro instance. This generally works well for configuring an instance even for compiling and it is inexpensive. Unfortunately, bcbio&lt;span style=&quot;font-family:Times, 'Times New Roman', serif;&quot;&gt;-nextgen&lt;/span&gt;&amp;nbsp;will fail to compile certain libraries as it will run out of memory. A t1.micro instance has 0.615 Gb of RAM. So, I switch to a m1.medium instance which has about 3Gb of RAM.&lt;br /&gt;&lt;br /&gt;The next run went much further but I ran under disk space. By default, the instance only has about 32 Gb of disk space. To get going with bcbio&lt;span style=&quot;font-family:Times, 'Times New Roman', serif;&quot;&gt;-nextgen&lt;/span&gt;, we need:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&amp;nbsp;about 20Gb for the OS and tools.&lt;/li&gt;&lt;li&gt;GRCh37 ( a human reference genome ) requires about 20Gb&lt;/li&gt;&lt;li&gt;finally we need about 30Gb to support indices generated by the tools.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;So, we need at least 70Gb.&amp;nbsp;&lt;/div&gt;&lt;br /&gt;Two obvious choices are instance storage and EBS volumes. The m1.medium instance has 410Gb of instance storage. Unfortunately, this is not suitable for our purposes. If you terminate or stop the instance, your data is lost. I created and attached a 100Gb&lt;br /&gt;&lt;br /&gt;In this case, I configured a single node.&amp;nbsp;&amp;nbsp;Today, this is good enough for me.&amp;nbsp;&amp;nbsp;This analysis is computationally intensive. Some tasks can leverages multiple cores, other tasks can be dished out to multiple systems and some must be computed sequentially. &amp;nbsp;In the future, no doubt I'll want to configure more sophisticated set of nodes but I'll save that for another day.&lt;br /&gt;&lt;br /&gt;-jk</description>
         <author>John Kern</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-10428183.post-5746732300158538534</guid>
         <pubDate>Fri, 18 Apr 2014 07:16:00 +0000</pubDate>
      </item>
      <item>
         <title>[Ubuntu Touch] Update to Logviewer</title>
         <link>http://victorpalau.net/2014/01/21/ubuntu-touch-update-to-logviewer/</link>
         <description>I am pleased to announced that Logviewer is now published in the Ubuntu Touch store.  The app no longer runs unconfined but uses &amp;#8220;read_path&amp;#8221; pointing to &amp;#8220;/var/log/&amp;#8221; and &amp;#8220;/home/phablet/.cache/&amp;#8221;. If you think there is another interested log path let me know and I will try to include it. Also, one feature that landed by popular request [&amp;#8230;]&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=victorpalau.net&amp;#038;blog=8255180&amp;#038;post=1600&amp;#038;subd=victorpalau&amp;#038;ref=&amp;#038;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;</description>
         <guid isPermaLink="false">http://victorpalau.net/?p=1600</guid>
         <pubDate>Tue, 21 Jan 2014 19:49:16 +0000</pubDate>
         <content:encoded><![CDATA[<p>I am pleased to announced that <a rel="nofollow" target="_blank" href="http://victorpalau.net/2014/01/08/ubuntu-touch-logviewer/">Logviewer</a> is now published in the Ubuntu Touch store.  The app no longer runs unconfined but uses &#8220;read_path&#8221; pointing to &#8220;/var/log/&#8221; and &#8220;/home/phablet/.cache/&#8221;. If you think there is another interested log path let me know and I will try to include it.</p>
<p>Also, one feature that landed by popular request is submitting a selected section of a log to <a rel="nofollow" target="_blank" href="http://paste.ubuntu.com/">pastebin</a> , thanks to Popey for the image:</p>
<p><a rel="nofollow" target="_blank" href="http://victorpalau.files.wordpress.com/2014/01/pastebin.png"><img class="aligncenter size-medium wp-image-1601" alt="pastebin" src="http://victorpalau.files.wordpress.com/2014/01/pastebin.png?w=180&#038;h=300" width="180" height="300"/></a></p><br />  <a rel="nofollow" target="_blank" href="http://feeds.wordpress.com/1.0/gocomments/victorpalau.wordpress.com/1600/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victorpalau.wordpress.com/1600/"/></a> <img alt="" border="0" src="http://pixel.wp.com/b.gif?host=victorpalau.net&#038;blog=8255180&#038;post=1600&#038;subd=victorpalau&#038;ref=&#038;feed=1" width="1" height="1"/>]]></content:encoded>
         <media:content medium="image" url="http://2.gravatar.com/avatar/58e2c8a57cdd4841f98672a6059b6858?s=96&amp;amp;d=identicon&amp;amp;r=G">
            <media:title type="html">Victor Palau</media:title>
         </media:content>
         <media:content medium="image" url="http://victorpalau.files.wordpress.com/2014/01/pastebin.png?w=180">
            <media:title type="html">pastebin</media:title>
         </media:content>
      </item>
      <item>
         <title>[Ubuntu Touch] Logviewer</title>
         <link>http://victorpalau.net/2014/01/08/ubuntu-touch-logviewer/</link>
         <description>I have been recently doing some android development for Techfunder, one thing that I have found really useful when testing my app is using CatLog. CatLog allows you to check the app and system logs on the go. This is extremely useful when you have a crash while you are not close to your laptop. [&amp;#8230;]&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=victorpalau.net&amp;#038;blog=8255180&amp;#038;post=1594&amp;#038;subd=victorpalau&amp;#038;ref=&amp;#038;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;</description>
         <guid isPermaLink="false">http://victorpalau.net/?p=1594</guid>
         <pubDate>Wed, 08 Jan 2014 15:55:13 +0000</pubDate>
         <content:encoded><![CDATA[<p>I have been recently doing some android development for <a rel="nofollow" target="_blank" href="https://play.google.com/store/apps/details?id=com.vtuson.techfunder">Techfunder</a>, one thing that I have found really useful when testing my app is using <a rel="nofollow" target="_blank" href="https://play.google.com/store/apps/details?id=com.nolanlawson.logcat">CatLog</a>. CatLog allows you to check the app and system logs on the go. This is extremely useful when you have a crash while you are not close to your laptop.</p>
<p>This motivated me to look into writing a similar app for Ubuntu Touch. So here it is: LogViewer!</p>
<p><img class="size-medium wp-image-1597 alignnone" style="border:1px solid black;" alt="logs" src="http://victorpalau.files.wordpress.com/2014/01/logs.png?w=180&#038;h=300" width="180" height="300"/><img class="size-medium wp-image-1595 alignleft" style="border:1px solid black;" alt="logsettings" src="http://victorpalau.files.wordpress.com/2014/01/logsettings.png?w=180&#038;h=300" width="180" height="300"/><img class="size-medium wp-image-1596 alignleft" style="border:1px solid black;" alt="unitylog" src="http://victorpalau.files.wordpress.com/2014/01/unitylog.png?w=180&#038;h=300" width="180" height="300"/></p>
<p>This app, like CatLog, is for developers and requires unconstrained running. You will need to install it manually:</p>
<ul>
<li>Download click package from <a rel="nofollow" target="_blank" href="http://bazaar.launchpad.net/~vtuson/logviewer/trunk/download/head:/com.ubuntu.developer-20140108151203-l78bjn3hgamz5ld7-1/com.ubuntu.developer.vtuson.logviewer_0.2_armhf.click">launchpad</a></li>
<li>transfer to your device and install:</li>
</ul>
<ol>
<li>adb push com.ubuntu.developer.vtuson.logviewer_0.1_armhf.click /home/phablet/</li>
<li>
<p style="display:inline;"><span style="line-height:1.5em;">adb shell</span></p>
</li>
<li>su phablet</li>
<li>cd ~</li>
<li>
<p style="display:inline;">pkcon -p install-local com.ubuntu.developer.vtuson.logviewer_0.2_armhf.click</p>
</li>
</ol>
<p>When you launch the app, you will get a list of .log files in /home/phablet/.cache/upstart/ , if you click on an specific log, it will be displayed in a similar manner to tail -f. You can pause the autoreading, clear the screen and copy to clipboard parts of the logs from the bottom menu.</p>
<p>You can also access other files, change font size of the logs and the size of the text buffered from the settings page.</p>
<p>You can see the code and contribute <span class='wp-smiley wp-emoji wp-emoji-smile' title=':)'>:)</span> in launchpad:</p>
<p><a rel="nofollow" target="_blank" href="https://launchpad.net/logviewer">https://launchpad.net/logviewer</a></p><br />  <a rel="nofollow" target="_blank" href="http://feeds.wordpress.com/1.0/gocomments/victorpalau.wordpress.com/1594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victorpalau.wordpress.com/1594/"/></a> <img alt="" border="0" src="http://pixel.wp.com/b.gif?host=victorpalau.net&#038;blog=8255180&#038;post=1594&#038;subd=victorpalau&#038;ref=&#038;feed=1" width="1" height="1"/>]]></content:encoded>
         <media:content medium="image" url="http://2.gravatar.com/avatar/58e2c8a57cdd4841f98672a6059b6858?s=96&amp;amp;d=identicon&amp;amp;r=G">
            <media:title type="html">Victor Palau</media:title>
         </media:content>
         <media:content medium="image" url="http://victorpalau.files.wordpress.com/2014/01/logs.png?w=180">
            <media:title type="html">logs</media:title>
         </media:content>
         <media:content medium="image" url="http://victorpalau.files.wordpress.com/2014/01/logsettings.png?w=180">
            <media:title type="html">logsettings</media:title>
         </media:content>
         <media:content medium="image" url="http://victorpalau.files.wordpress.com/2014/01/unitylog.png?w=180">
            <media:title type="html">unitylog</media:title>
         </media:content>
      </item>
      <item>
         <title>Developing for Android and Ubuntu – with the same phone</title>
         <link>http://victorpalau.net/2013/12/23/developing-for-android-and-ubuntu-with-the-same-phone/</link>
         <description>We announced today a new solution to dual boot Android and Ubuntu on the same device. Over the last few weeks I have recently blogged about a Contacts import app for Ubuntu and  Techfunder, an Android app for crowd funding projects. What I didn&amp;#8217;t mention before is that I have been developing and testing both in [&amp;#8230;]&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=victorpalau.net&amp;#038;blog=8255180&amp;#038;post=1590&amp;#038;subd=victorpalau&amp;#038;ref=&amp;#038;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;</description>
         <guid isPermaLink="false">http://victorpalau.net/?p=1590</guid>
         <pubDate>Mon, 23 Dec 2013 20:35:34 +0000</pubDate>
         <content:encoded><![CDATA[<p>We announced today a new solution to <a rel="nofollow" target="_blank" href="http://developer.ubuntu.com/2013/12/announcing-ubuntu-and-android-dual-boot-developer-preview/">dual boot</a> Android and Ubuntu on the same device. Over the last few weeks I have recently blogged about a <a rel="nofollow" target="_blank" href="http://victorpalau.net/2013/12/17/ubuntu-qml-importing-google-contacts/">Contacts import app</a> for Ubuntu and  <a rel="nofollow" target="_blank" href="http://victorpalau.net/2013/12/05/introducing-techfunder-for-kickstarter-and-indiegogo-3/">Techfunder</a>, an Android app for crowd funding projects. What I didn&#8217;t mention before is that I have been developing and testing both in the same device!</p>
<p>I have been dog-fooding and developing a small part of our dual boot solution for a couple weeks now.  During that time, I&#8217;ve not only been able to boot between Android and Ubuntu as a user, but also as an application developer.</p>
<p>Dual boot brings no compromise to the SDK experience of either operating system.  I run Ubuntu SDK with QTCreator and Android&#8217;s ADT (eclipse-based) on my 12.04 LTS laptop.  And while the SDK for Android is more mature and fully featured, I still find Ubuntu (an particularly QML) much faster to prototype apps.</p>
<p>Dual boot is also about making the application developers life easier and cheaper.  Having to buy extra devices for testing new apps can be a put you off. You can now develop for Ubuntu by jusr re-using your Android device.. without having to disrupt your android projects!  For example,  yesterday I was working on applications on both sides, and I was easily booting back and forward and collecting logs in each side.</p>
<p>I hope to see more integration in between both development environments, I think it will be particularly neat to have something like  Android Monitor tool (aka <a rel="nofollow" target="_blank" href="http://developer.android.com/tools/debugging/ddms.html">DDMS</a>) working for both OSs.</p>
<p>Btw, I have just released version 2.0 of Techfunder! Including home screen widgets, search and more categories. Don&#8217;t forget to check it out:<br />
<a rel="nofollow" target="_blank" href="https://play.google.com/store/apps/details?id=com.vtuson.techfunder"><br />
<img alt="Get it on Google Play" src="https://developer.android.com/images/brand/en_generic_rgb_wo_60.png"/><br />
</a></p><br />  <a rel="nofollow" target="_blank" href="http://feeds.wordpress.com/1.0/gocomments/victorpalau.wordpress.com/1590/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victorpalau.wordpress.com/1590/"/></a> <img alt="" border="0" src="http://pixel.wp.com/b.gif?host=victorpalau.net&#038;blog=8255180&#038;post=1590&#038;subd=victorpalau&#038;ref=&#038;feed=1" width="1" height="1"/>]]></content:encoded>
         <media:content medium="image" url="http://2.gravatar.com/avatar/58e2c8a57cdd4841f98672a6059b6858?s=96&amp;amp;d=identicon&amp;amp;r=G">
            <media:title type="html">Victor Palau</media:title>
         </media:content>
         <media:content medium="image" url="https://developer.android.com/images/brand/en_generic_rgb_wo_60.png">
            <media:title type="html">Get it on Google Play</media:title>
         </media:content>
      </item>
      <item>
         <title>[Ubuntu QML] Importing Google Contacts</title>
         <link>http://victorpalau.net/2013/12/17/ubuntu-qml-importing-google-contacts/</link>
         <description>I have a lot of contacts in my phone&amp;#8230; I am sure you will have more, but syncing over 500 contacts to Ubuntu phone using the command line for Syncevolution gets tedious. So I wrote a little QML app to do the trick for you. Unfortunately, to run a system command the application has to [&amp;#8230;]&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=victorpalau.net&amp;#038;blog=8255180&amp;#038;post=1587&amp;#038;subd=victorpalau&amp;#038;ref=&amp;#038;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;</description>
         <guid isPermaLink="false">http://victorpalau.net/?p=1587</guid>
         <pubDate>Tue, 17 Dec 2013 19:27:43 +0000</pubDate>
         <content:encoded><![CDATA[<p>I have a lot of contacts in my phone&#8230; I am sure you will have more, but syncing over 500 contacts to Ubuntu phone using the command line for Syncevolution gets tedious.</p>
<p>So I wrote a little QML app to do the trick for you. Unfortunately, to run a system command the application has to run unconfined, so I have not yet submitted it to the store.</p>
<p>But if you want to install it yourself it is pretty simple:</p>
<ol>
<li>Download this <a rel="nofollow" target="_blank" href="http://bazaar.launchpad.net/~vtuson/+junk/contactsimporter/download/head:/com.ubuntu.developer-20131217174438-mhwd4jdksoryuzgn-3/com.ubuntu.developer.vtuson.contactsimporter_0.9_armhf.click">file</a></li>
<li>push the downloaded file to your phone, like so: adb push com.ubuntu.developer.vtuson.contactsimporter_0.9_armhf.click /home/phablet</li>
<li>then run this to install it: <span style="line-height:1.5em;">adb shell &#8220;sudo -u phablet pkcon -p install-local  /home/phablet/com.ubuntu.developer.vtuson.contactsimporter_0.9_armhf.click&#8221;</span></li>
</ol>
<p>You should be good to use it now, the app looks like this: (and if you want to check out the code is <a rel="nofollow" target="_blank" href="https://code.launchpad.net/~vtuson/+junk/contactsimporter">here</a>)</p>
<p><a rel="nofollow" target="_blank" href="http://victorpalau.files.wordpress.com/2013/12/contactsimp.png"><img class="aligncenter size-medium wp-image-1588" alt="contactsimp" src="http://victorpalau.files.wordpress.com/2013/12/contactsimp.png?w=180&#038;h=300" width="180" height="300"/></a></p><br />  <a rel="nofollow" target="_blank" href="http://feeds.wordpress.com/1.0/gocomments/victorpalau.wordpress.com/1587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victorpalau.wordpress.com/1587/"/></a> <img alt="" border="0" src="http://pixel.wp.com/b.gif?host=victorpalau.net&#038;blog=8255180&#038;post=1587&#038;subd=victorpalau&#038;ref=&#038;feed=1" width="1" height="1"/>]]></content:encoded>
         <media:content medium="image" url="http://2.gravatar.com/avatar/58e2c8a57cdd4841f98672a6059b6858?s=96&amp;amp;d=identicon&amp;amp;r=G">
            <media:title type="html">Victor Palau</media:title>
         </media:content>
         <media:content medium="image" url="http://victorpalau.files.wordpress.com/2013/12/contactsimp.png?w=180">
            <media:title type="html">contactsimp</media:title>
         </media:content>
      </item>
      <item>
         <title>Ubuntu Touch: Building and testing a QML extension</title>
         <link>http://victorpalau.net/2013/12/16/ubuntu-touch-building-and-testing-a-qml-extension/</link>
         <description>Hi, I found myself trying to build a QML Ubuntu Touch app project that includes a qml c++ extension and I found that I some how stumble a bit along the way. So, here are some of my notes on how I got it done. Hope that helps. Creating the project. Using QtCreator, create a [&amp;#8230;]&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=victorpalau.net&amp;#038;blog=8255180&amp;#038;post=1578&amp;#038;subd=victorpalau&amp;#038;ref=&amp;#038;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;</description>
         <guid isPermaLink="false">http://victorpalau.net/?p=1578</guid>
         <pubDate>Mon, 16 Dec 2013 16:18:01 +0000</pubDate>
         <content:encoded><![CDATA[<p>Hi,</p>
<p>I found myself trying to build a QML Ubuntu Touch app project that includes a qml c++ extension and I found that I some how stumble a bit along the way. So, here are some of my notes on how I got it done. Hope that helps.</p>
<p><strong>Creating the project.</strong></p>
<p><strong></strong>Using QtCreator, create a new project and select &#8211; QML Extension Library + Tabbed Touch.  I found that it was easier to change the QML side of things than start with an extension and then add the whole project structure.</p>
<p><strong>Build and Run your project locally</strong></p>
<p>In QtCreator click on projects.  In Build, I set up the build path as my project root path. In run,  the executable is &#8220;/usr/bin/qmlscene&#8221; (make sure there is no spaces trailing) and then Arguments is set to &#8220;-I  ../backend/modules $@ yourapp.qml&#8221;, with a working directory of &#8220;projectroot/app&#8221;</p>
<p>Now if you try to run your project it should build it locally and run your app. After that you are on a roll.</p>
<p><strong>Build on target device</strong></p>
<p>Click Ctrl+f11 should install the platform developer tools in your device. However, I how found that this <a rel="nofollow" target="_blank" href="https://bugs.launchpad.net/ubuntu/+source/qtcreator-plugin-ubuntu/+bug/1261429">lately does not work</a>.</p>
<p>Instead from the terminal:</p>
<p><em>first we will need to make the image in your device writeable:</em><br />
<code>adb shell touch /userdata/.writable_image  --&gt; and reboot the phone.<br />
then:<br />
cd /usr/share/qtcreator/ubuntu/scripts<br />
adb devices<br />
./device_developertools_install &lt;device_id&gt;</code></p>
<p>Now you are ready to build, so back to QtCreator:</p>
<p>Build&gt;Ubuntu&gt;Build Application on Device</p>
<p>This should build the application with only some test problems, but the main binaries would be created. To package your app you will need to get</p>
<p>/home/phablet/dev_tmp/&lt;yourapp&gt;/backend/modules/lib&lt;yourlib&gt;.so</p>
<p><strong>Creating a click package</strong></p>
<p>create a manifest standard manifest file. Manifest.json<br />
<code><br />
{<br />
"description": "your text",<br />
"framework": "ubuntu-sdk-13.10",<br />
"hooks": {<br />
"yourappname": {<br />
"apparmor": "yourappname.json",<br />
"desktop": "yourappname.desktop"<br />
}<br />
},<br />
"maintainer": "your name&lt;yourname@yourmail.com&gt;",<br />
"name": "com.ubuntu.developer.yourname.yourappname",<br />
"title": "yourappname",<br />
"version": "0.1",<br />
"architecture": "armhf"<br />
}<br />
</code></p>
<p>You will also need a yourapp.desktop file:</p>
<p><code>[Desktop Entry]<br />
Name=yourappname<br />
Comment=description<br />
Exec=qmlscene -I plugin $@ yourapp.qml<br />
Icon=icon.png<br />
Terminal=false<br />
Type=Application<br />
X-Ubuntu-Touch=true</code></p>
<p>Note that Exec= has a -I plugin part to it. This is very important, will see later.</p>
<p>Now yourapp.json file that contains your confinement profile:</p>
<p><code>{<br />
"policy_groups": [<br />
"networking"<br />
],<br />
"policy_version": 1<br />
}</code></p>
<p>Now time to setup a folder with all this stuff, not that the plugin folder is going to contain your lib which your are importing with -I option on the desktop file:<br />
<code>myproject&gt;<br />
-./click/<br />
--icon.png<br />
--manifest.json<br />
--yourapp.json<br />
--yourapp.desktop<br />
--./plugin/<br />
---./yourlib/<br />
----lib(yourlibname).so<br />
----qmldir</code></p>
<p>Now you are ready to build from your project root folder:<br />
<code>click build ./click<br />
</code><br />
This should create a .click file in your project folder.</p>
<p><strong>Installing in your device</strong></p>
<p><code>adb pull your.click /home/phablet/<br />
adb shell<br />
su phablet<br />
cd ~<br />
pkcon -p install-local your.click</code></p>
<p>This should be enough, but sometimes I find that you need to restart unity:<br />
<code>pkill unity8</code> (you might need sudo)</p><br />  <a rel="nofollow" target="_blank" href="http://feeds.wordpress.com/1.0/gocomments/victorpalau.wordpress.com/1578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victorpalau.wordpress.com/1578/"/></a> <img alt="" border="0" src="http://pixel.wp.com/b.gif?host=victorpalau.net&#038;blog=8255180&#038;post=1578&#038;subd=victorpalau&#038;ref=&#038;feed=1" width="1" height="1"/>]]></content:encoded>
         <media:content medium="image" url="http://2.gravatar.com/avatar/58e2c8a57cdd4841f98672a6059b6858?s=96&amp;amp;d=identicon&amp;amp;r=G">
            <media:title type="html">Victor Palau</media:title>
         </media:content>
      </item>
      <item>
         <title>Introducing Techfunder for Kickstarter and Indiegogo</title>
         <link>http://victorpalau.net/2013/12/05/introducing-techfunder-for-kickstarter-and-indiegogo-3/</link>
         <description>Since I lead the Ubuntu Edge campaign, I have been trying to keep up with other crowd funding projects.  I am mainly interested on technology and gadgets, and I have found it hard to navigate Kickstarter, but also to have to keep hoping between Kickstarter and Indiegogo to see what is going on.  Specially since [&amp;#8230;]&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=victorpalau.net&amp;#038;blog=8255180&amp;#038;post=1575&amp;#038;subd=victorpalau&amp;#038;ref=&amp;#038;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;</description>
         <guid isPermaLink="false">http://victorpalau.net/?p=1575</guid>
         <pubDate>Thu, 05 Dec 2013 12:13:01 +0000</pubDate>
         <content:encoded><![CDATA[<p>Since I lead the Ubuntu Edge campaign, I have been trying to keep up with other crowd funding projects.  I am mainly interested on technology and gadgets, and I have found it hard to navigate Kickstarter, but also to have to keep hoping between Kickstarter and Indiegogo to see what is going on.  Specially since now, seems like interesting projects are evently split between them.  You might share my friction on this&#8230; so I give you Techfunder:<br />
<a rel="nofollow" target="_blank" href="https://play.google.com/store/apps/details?id=com.vtuson.techfunder"><br />
<img alt="Get it on Google Play" src="https://developer.android.com/images/brand/en_generic_rgb_wo_60.png"/><br />
</a><br />
<span style="line-height:1.5em;">Techfunder is an Android app that provides an easy way to browse crowd funding projects launched across the main industry websites. </span>Techfunder gathers Technology and Design projects from Kickstarter and Indiegogo.</p>
<p>Using Techfunder side navigation you can easily switch between:</p>
<ul>
<li> Popular</li>
<li> New this week</li>
<li> Staff Picks</li>
<li> Design &#8211; Popular</li>
</ul>
<p>Then you can browse as many projects on a compact scrollable list. Just click on the project you are interested to expand into a full screen view.<span style="line-height:1.5em;">From there you can tell the world about it using the share button. </span></p>
<p><span style="line-height:1.5em;">If you want to contribute or found out more about it, click on the &#8220;browse&#8221; button and Techfunder will launch the project page in your web browser. When you are finished, just press the Android back button to return to Techfunder.</span></p>
<p>I am currently planning to add a favourites/watchlist functionality and looking into a way to select additional crowd sourcing platform. I hope you enjoy it!</p>
<p><img class="alignnone" alt="" src="https://lh5.ggpht.com/kXEvNnTEMtkz81QWJjD4q_uGUewEyaArn0SbV926gCSxytE49khIjz4gpsa1aHEX03E=h900-rw" width="243" height="432"/><img class="alignnone" alt="" src="https://lh4.ggpht.com/GTO7v35xQXHZgWhw0y5_W19UWrIToaZnZ5SeUqAqcaWpTXcJsWpHFwPWc3EZyYw_hUk=h900-rw" width="243" height="432"/><img class="alignnone" alt="" src="https://lh5.ggpht.com/knBb3aM9w_a82LFVt50GIEZxKHfugGDsFwEXni-mgDTsCdReT3Q6FSFf9fQ7SeTs3fk=h900-rw" width="243" height="432"/></p><br />  <a rel="nofollow" target="_blank" href="http://feeds.wordpress.com/1.0/gocomments/victorpalau.wordpress.com/1575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victorpalau.wordpress.com/1575/"/></a> <img alt="" border="0" src="http://pixel.wp.com/b.gif?host=victorpalau.net&#038;blog=8255180&#038;post=1575&#038;subd=victorpalau&#038;ref=&#038;feed=1" width="1" height="1"/>]]></content:encoded>
         <media:content medium="image" url="http://2.gravatar.com/avatar/58e2c8a57cdd4841f98672a6059b6858?s=96&amp;amp;d=identicon&amp;amp;r=G">
            <media:title type="html">Victor Palau</media:title>
         </media:content>
         <media:content medium="image" url="https://developer.android.com/images/brand/en_generic_rgb_wo_60.png">
            <media:title type="html">Get it on Google Play</media:title>
         </media:content>
         <media:content medium="image" url="https://lh5.ggpht.com/kXEvNnTEMtkz81QWJjD4q_uGUewEyaArn0SbV926gCSxytE49khIjz4gpsa1aHEX03E=h900-rw"/>
         <media:content medium="image" url="https://lh4.ggpht.com/GTO7v35xQXHZgWhw0y5_W19UWrIToaZnZ5SeUqAqcaWpTXcJsWpHFwPWc3EZyYw_hUk=h900-rw"/>
         <media:content medium="image" url="https://lh5.ggpht.com/knBb3aM9w_a82LFVt50GIEZxKHfugGDsFwEXni-mgDTsCdReT3Q6FSFf9fQ7SeTs3fk=h900-rw"/>
      </item>
      <item>
         <title>Introducing Techfunder for Kickstarter and Indiegogo</title>
         <link>http://victorpalau.net/2013/12/03/introducing-techfunder-for-kickstarter-and-indiegogo/</link>
         <description>Since I lead the Ubuntu Edge campaign, I have been trying to keep up with other crowd funding projects.  I am mainly interested on technology and gadgets, and I have found it hard to navigate Kickstarter, but also to have to keep hoping between Kickstarter and Indiegogo to see what is going on.  Specially since [&amp;#8230;]&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=victorpalau.net&amp;#038;blog=8255180&amp;#038;post=1569&amp;#038;subd=victorpalau&amp;#038;ref=&amp;#038;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;</description>
         <guid isPermaLink="false">http://victorpalau.net/?p=1569</guid>
         <pubDate>Tue, 03 Dec 2013 10:19:24 +0000</pubDate>
         <content:encoded><![CDATA[<p><span id="more-1569"></span></p>
<p>Since I lead the Ubuntu Edge campaign, I have been trying to keep up with other crowd funding projects.  I am mainly interested on technology and gadgets, and I have found it hard to navigate Kickstarter, but also to have to keep hoping between Kickstarter and Indiegogo to see what is going on.  Specially since now, seems like interesting projects are evently split between them.  You might share my friction on this&#8230; so I give you Techfunder:<br />
<a rel="nofollow" target="_blank" href="https://play.google.com/store/apps/details?id=com.vtuson.techfunder"><br />
<img alt="Get it on Google Play" src="https://developer.android.com/images/brand/en_generic_rgb_wo_60.png"/><br />
</a><br />
<span style="line-height:1.5em;">Techfunder is an Android app that provides an easy way to browse crowd funding projects launched across the main industry websites. </span>Techfunder gathers Technology and Design projects from Kickstarter and Indiegogo.</p>
<p>Using Techfunder side navigation you can easily switch between:</p>
<ul>
<li> Popular</li>
<li> New this week</li>
<li> Staff Picks</li>
<li> Design &#8211; Popular</li>
</ul>
<p>Then you can browse as many projects on a compact scrollable list. Just click on the project you are interested to expand into a full screen view.<span style="line-height:1.5em;">From there you can tell the world about it using the share button. </span></p>
<p><span style="line-height:1.5em;">If you want to contribute or found out more about it, click on the &#8220;browse&#8221; button and Techfunder will launch the project page in your web browser. When you are finished, just press the Android back button to return to Techfunder.</span></p>
<p>I am currently planning to add a favourites/watchlist functionality and looking into a way to select additional crowd sourcing platform. I hope you enjoy it!</p>
<p><img class="alignnone" alt="" src="https://lh5.ggpht.com/kXEvNnTEMtkz81QWJjD4q_uGUewEyaArn0SbV926gCSxytE49khIjz4gpsa1aHEX03E=h900-rw" width="243" height="432"/><img class="alignnone" alt="" src="https://lh4.ggpht.com/GTO7v35xQXHZgWhw0y5_W19UWrIToaZnZ5SeUqAqcaWpTXcJsWpHFwPWc3EZyYw_hUk=h900-rw" width="243" height="432"/><img class="alignnone" alt="" src="https://lh5.ggpht.com/knBb3aM9w_a82LFVt50GIEZxKHfugGDsFwEXni-mgDTsCdReT3Q6FSFf9fQ7SeTs3fk=h900-rw" width="243" height="432"/></p><br />  <a rel="nofollow" target="_blank" href="http://feeds.wordpress.com/1.0/gocomments/victorpalau.wordpress.com/1569/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/victorpalau.wordpress.com/1569/"/></a> <img alt="" border="0" src="http://pixel.wp.com/b.gif?host=victorpalau.net&#038;blog=8255180&#038;post=1569&#038;subd=victorpalau&#038;ref=&#038;feed=1" width="1" height="1"/>]]></content:encoded>
         <media:content medium="image" url="http://2.gravatar.com/avatar/58e2c8a57cdd4841f98672a6059b6858?s=96&amp;amp;d=identicon&amp;amp;r=G">
            <media:title type="html">Victor Palau</media:title>
         </media:content>
         <media:content medium="image" url="https://developer.android.com/images/brand/en_generic_rgb_wo_60.png">
            <media:title type="html">Get it on Google Play</media:title>
         </media:content>
         <media:content medium="image" url="https://lh5.ggpht.com/kXEvNnTEMtkz81QWJjD4q_uGUewEyaArn0SbV926gCSxytE49khIjz4gpsa1aHEX03E=h900-rw"/>
         <media:content medium="image" url="https://lh4.ggpht.com/GTO7v35xQXHZgWhw0y5_W19UWrIToaZnZ5SeUqAqcaWpTXcJsWpHFwPWc3EZyYw_hUk=h900-rw"/>
         <media:content medium="image" url="https://lh5.ggpht.com/knBb3aM9w_a82LFVt50GIEZxKHfugGDsFwEXni-mgDTsCdReT3Q6FSFf9fQ7SeTs3fk=h900-rw"/>
      </item>
      <item>
         <title>Source editor worth $70</title>
         <link>http://eclipseblog.ostroukhovs.com/2013/11/14/source-editor-worth-70/</link>
         <description>I&amp;#8217;ve been a devoted Eclipse user for more then a decade (with most of that time spent developing applications based on Eclipse) but I&amp;#8217;ve noticed that I am becoming less and less inclined to spend my time trying to convince Eclipse to actually edit my files. I ended up using  Eclipse only for Java &amp;#8211; Xcode [&amp;#8230;]</description>
         <guid isPermaLink="false">http://eclipseblog.ostroukhovs.com/?p=276</guid>
         <pubDate>Fri, 15 Nov 2013 05:11:48 +0000</pubDate>
         <content:encoded><![CDATA[<p>I&#8217;ve been a devoted Eclipse user for more then a decade (with most of that time spent developing applications based on Eclipse) but I&#8217;ve noticed that I am becoming less and less inclined to spend my time trying to convince Eclipse to actually edit my files. I ended up using  Eclipse only for Java &#8211; Xcode is great C++/C (libclang-powered editor with C++11 support) with VIM was standard for all other files. For the last couple months I&#8217;ve been slowly migrating to Sublime &#8211; now I reached the point when I even consider using it for Java files.</p>

<p>This is just a &#8220;disgruntled veteran Eclipse user&#8221; view on why it is worth it to pay for your coding editor these days.</p>

<h1>It can open files! And folders&#8230;</h1>

<p>Cmd+S, Cmd+N and Cmd+O are the first shortcuts everybody learns. Eclipse is unique in that it breaks this convention. &#8220;Open File&#8221; is an afterthought (doesn&#8217;t even have a key shortcut), with many plugins unable to work with those files &#8211; even if your editor manages not to show an error dialog (or dump an exception in log) &#8211; some features still are not available.</p>

<p>Sublime not just behaves as expected &#8211; it goes one step further. I can &#8220;open&#8221; any folder &#8211; showing that folder in the Sublime &#8220;Project Explorer&#8221;-like pane. What is truly surprising is that Sublime manages to deliver many Eclipse  killer features &#8211; including &#8220;Open Resource&#8230;&#8221; and &#8220;Goto Symbol in Project&#8221; (think JDT/CDT &#8220;Find Type&#8221; and &#8220;Find Function&#8221;). No metadata files is created in those folders, no indexer is ran. Right now my &#8220;workspace&#8221; has a mix of Bootstrap-based HTML application with a Python server-side &#8211; and without any plugins I can immediately focus on a CSS rule or on a Python function. I&#8217;ve also shown to my colleagues that I can open mid-sized C projects and be able to open random function within seconds. No setup, no long-running background jobs.</p>

<p>It opens shell scripts, .ini files without spinning up Xcode or any other heavy &#8220;external editor&#8221;.</p>

<h1>Editor is the same</h1>

<p>Cmd+Shift+R will go to symbol in any file in any language (that I tried) &#8211; in Eclipse, CDT and JDT installed in the same workbench have confusing separate realms with Cmd+Shift+T been bound to different dialogs depending on active editor. Cmd+Shift+R and Cmd+Shift+A are yet other parallel realms, adding to the confusion.</p>

<p>Sublime can expand selection to enclosing scope in Dita XML, Python or in JavaScript. Sublime actually even unifies Eclipse-like &#8220;Goto line&#8221; and &#8220;Quick outline&#8221; popups into &#8220;Goto Everything&#8221; &#8211; I&#8217;ve been wondering for years why Eclipse uses separate pop-ups for that.</p>

<p>One prominent Sublime feature is multiple cursors. Curiously, this feature is really familiar to JDT and CDT users &#8211; you can see multiple cursors when you rename variables. In Sublime multiple cursors can be used to select search results (quite similar to Eclipse rename refactoring) or to apply edits to several separate locations at once.</p>

<h1>No mouse</h1>

<p>I spend most my time in Eclipse having source editor maximized (I also used to hide toolbar &#8211; until I started using Eclipse Kepler where Cmd+3 makes toolbar visible no matter what).</p>

<p>In Sublime I can split the window (<a rel="nofollow" title="not the editor" target="_blank" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=8009">not the editor</a> <img src="http://eclipseblog.ostroukhovs.com/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley"/> ) using just the keyboard. I can move editors between stacks or focus on stacks without reaching the mouse. Switching between editor predictably opens a tab to left/right &#8211; instead of randomly popping from the recent editors stack.</p>

<h1>Niceties</h1>

<p>There is no preferences UI as such in Sublime &#8211; keybindings and settings are stored in JSON files that are editable in the text editor.</p>

<p>Plenty of plugins, easy discovery. &#8220;Cmd+Shift+P&#8221;, &#8220;Install&lt;Return&gt;&#8221;, type filter string. Plugin is found and installed even before &#8220;Marketplace client&#8221; would open.</p>

<p>Files can be opened from the command-line. Reliably. Even on Mac.</p>

<h1>Missing parts?</h1>

<p>Sublime does not integrate SCM support. Well, there are some plugins &#8211; but I haven&#8217;t figured them out yet, mostly because I am command-line Git and Perforce user (as not all my files are in the workspace) &#8211; the only thing I miss is Perforce checkout from the editor.</p>

<p>No debugger UI. Surprisingly, no biggie &#8211; JavaScript users are using browser anyways, C* users get to keep their GDB/LLDB primed.</p>

<p>No way to run shell command from within the editor. As in VIM.</p>

<h1>Next generation</h1>

<p>IntelliJ and Eclipse were revolutionary tools &#8211; they eschewed RAD features and visual designers that were a cornerstone of the IDE experience and focused on the core programming experience instead &#8211; providing ultimate source editor, making refactoring mainstream. Sublime seems to do the same trick &#8211; only this time it is Eclipse that is slow and outdated. Sublime does not force me to manage workspaces (in couple weeks I will have to start working in a different branch (in Perforce it is a different folder) &#8211; ain&#8217;t it fun, with my 20+ projects?), flip perspectives (the first thing I show to QA or new team members &#8211; &#8220;If you don&#8217;t understand what&#8217;s going on on the screen, do &#8220;Window &gt; Reset perspective&#8221;) or wait till my cancel button click is honored. Again, as 10 years ago, I&#8217;m enjoying my editor instead of wrestling with it&#8230;</p>

<p>Indeed, times, they are a-changing&#8230;</p>
<img src="http://feeds.feedburner.com/~r/ThoughtsAboutEclipseUi/~4/7J-SEwcAD9I" height="1" width="1" alt=""/>]]></content:encoded>
         <category>Uncategorized</category>
      </item>
      <item>
         <title>DevFest West 2013: Lightning Talk: Learnings, Prototypes &amp; Use Cases on Google Glass</title>
         <link>http://mymobilecorner.blogspot.com/2013/10/devfest-west-2013-lightning-talk.html</link>
         <description>&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://3.bp.blogspot.com/-pvPM96WlYZE/Umxq_yYH8jI/AAAAAAAABMI/tARhdtEBCb8/s1600/Tasneem_Glass_in_Focus.png&quot; style=&quot;margin-left:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;63&quot; src=&quot;http://3.bp.blogspot.com/-pvPM96WlYZE/Umxq_yYH8jI/AAAAAAAABMI/tARhdtEBCb8/s320/Tasneem_Glass_in_Focus.png&quot; width=&quot;320&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;color:#222222;font-family:Verdana, sans-serif;font-size:15px;line-height:1.5em;&quot;&gt;According to &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.imsresearch.com/press-release/Wearable_Technology_Innovation_to_Drive_Market_Growth&amp;amp;cat_id=110&amp;amp;type=LatestResearch&quot;&gt;IMS Research&lt;/a&gt;, the wearables market is poised to grow from 14 million devices shipped in 2011 to as many as 171 million units shipped by 2016!&amp;nbsp; According to a recent &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.businessinsider.com/wearable-computing-a-new-mobile-market-2013-10&quot;&gt;Business Insider&lt;/a&gt; report, &lt;/span&gt;&lt;span style=&quot;font-family:Verdana, sans-serif;&quot;&gt;&quot;those betting big on wearable computing believe an assorted new crop of  gadgets — mostly worn on the wrist or as eyewear —&amp;nbsp;will become a &quot;fifth  screen,&quot; after TVs, PCs, smartphones, and tablets.&lt;/span&gt;&quot;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;font-family:Verdana, sans-serif;&quot;&gt;I recently was invited to talk at the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.devfestwest.com/2013/#/speakers&quot;&gt;DevFest West 2013&lt;/a&gt; held at the Google campus in Mountain View where I presented a Lightning Talk on &quot;Learnings, Prototypes &amp;amp; Use Cases on Google Glass&quot;.&lt;/div&gt;&lt;div style=&quot;font-family:Verdana, sans-serif;&quot;&gt;The talk provides insights and lessons learned from innovative experiments  for building innovative services for Google Glass for capturing  financial data picture and for mobile payments.&amp;nbsp; It also covers a number of  Glass Use-Cases as well as Glass Prototypes that we implemented across  Intuit.&amp;nbsp; If you find the presentation slides below useful, then add a comment here or follow me @tasneemsayeed for future postings!&lt;/div&gt;&lt;div style=&quot;background-color:white;border:medium none;color:black;overflow:hidden;text-align:left;text-decoration:none;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;font-family:tahoma, arial;font-size:11px;height:26px;padding-top:2px;&quot;&gt;View more &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.slideshare.net/&quot; style=&quot;text-decoration:underline;&quot;&gt;documents&lt;/a&gt; from &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.slideshare.net/tasneemsayeed&quot; style=&quot;text-decoration:underline;&quot;&gt;tasneemsayeed&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;</description>
         <author>Tasneem Sayeed</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-248726242367252546.post-7136723820974063927</guid>
         <pubDate>Sat, 26 Oct 2013 18:53:00 +0000</pubDate>
         <media:thumbnail height="72" url="http://3.bp.blogspot.com/-pvPM96WlYZE/Umxq_yYH8jI/AAAAAAAABMI/tARhdtEBCb8/s72-c/Tasneem_Glass_in_Focus.png" width="72" xmlns:media="http://search.yahoo.com/mrss/"/>
      </item>
      <item>
         <title>Book review: Reality is Broken</title>
         <link>http://kerncomputing.blogspot.com/2013/07/book-review-reality-is-broken.html</link>
         <description>The premise of Jane McGonigal's book, Reality is Broken, is intriguing. What if we could harness game play to attack some of the challenges of our age? Here she is talking about it at a TED conference. &lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt; &lt;embed src=&quot;http://video.ted.com/assets/player/swf/EmbedPlayer.swf&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;446&quot; height=&quot;326&quot;&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Want to know what is happening on the bleeding edge of computer graphics? Games are always pushing the envelop. They are also frequent early adopters of  Artificial Intelligence techniques. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'm glad I read her book because she illuminates her thesis presented in her TED talk. The first part of the book enumerates the contrasts between what game play does well with respect to reality: &lt;br /&gt;&lt;blockquote&gt;more satisfying work, better hope of success, stronger social connectivity and a chance to be a part of something bigger than ourselves.&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Open Questions:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Games tend to have a clear line between right and wrong. Many of the changes of our age are thorny problems. Trade offs will be made based on value judgments. Is there a way to adapt game design to help us coalesce these competing views?&lt;/li&gt;&lt;li&gt;Gaming is very popular. Generally, it is competitive though sometimes collaborative.  The book implies gaming is the universal learning technique. Is it? Mediation. Building things. Composing music or poems. &lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;-jk&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description>
         <author>John Kern</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-10428183.post-6705809106747216314</guid>
         <pubDate>Tue, 23 Jul 2013 09:14:00 +0000</pubDate>
      </item>
      <item>
         <title>Learning on Accessibility for the iOS Platform</title>
         <link>http://mymobilecorner.blogspot.com/2013/07/learning-on-accessibility-for-ios.html</link>
         <description>&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;&lt;div class=&quot;jump&quot;&gt;According to &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/iPhoneAccessibility/Accessibility_on_iPhone/Accessibility_on_iPhone.html&quot;&gt;Apple's Accessibility Guide for iOS&lt;/a&gt;, you should make your iPhone application accessible to VoiceOver users because:&lt;/div&gt;&lt;ul class=&quot;ul&quot;&gt;&lt;li class=&quot;li&quot;&gt;It  increases your user base. You've worked hard to create a great  application; don’t miss the opportunity to make it available to even  more users.&lt;/li&gt;&lt;li class=&quot;li&quot;&gt;It allows people to use your  application without seeing the screen. Users with visual impairments can  use your application with the help of VoiceOver.&lt;/li&gt;&lt;li class=&quot;li&quot;&gt;It  helps you address accessibility guidelines. Various governing bodies  create guidelines for accessibility and making your iPhone application  accessible to VoiceOver users can help you meet them.&lt;/li&gt;&lt;li class=&quot;li&quot;&gt;It's the right thing to do.&lt;/li&gt;&lt;/ul&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.blogger.com/blogger.g?blogID=248726242367252546&quot; title=&quot;iOS Accessibility API and Tools&quot;&gt;&lt;/a&gt;As of iOS  3.0, Apple has included the UI Accessibility programming interface,  which is a lightweight API that helps an application provide all the  information VoiceOver needs to describe the user interface and help  visually impaired people use the application.&lt;br /&gt;&lt;/div&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;&lt;/div&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;I had recently given a presentation on my &lt;b&gt;Learnings on Accessibility for the iOS Platform&lt;/b&gt; at an internal event at Intuit, which I wanted to share with all of you.&amp;nbsp; It provides an overview on what it means to make an app accessible for the  iOS platform. It also provides guidelines for making your iOS app accessible  and includes an overview on the most common accessible attributes,  traits and how to add Accessibility via interface builder as well as in  code. It covers Accessibility Notifications, VoiceOver specific API,  Accessibility Containers, and some of the best practices for  Accessibility.&lt;/div&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;If you find the presentation helpful in making your iOS app accessible, feel free to send me a comment!&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;Enjoy making your iOS app accessible! &lt;/div&gt;&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;&lt;br /&gt; &lt;br /&gt;  &lt;div style=&quot;margin-bottom:5px;&quot;&gt; &lt;strong&gt; &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.slideshare.net/tasneemsayeed/learnings-accessibility-recovered-file-1&quot; title=&quot;Learnings for Accessibility for iOS Platform&quot;&gt;Learnings for Accessibility for iOS Platform&lt;/a&gt; &lt;/strong&gt; from &lt;strong&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.slideshare.net/tasneemsayeed&quot;&gt;Tasneem Sayeed&lt;/a&gt;&lt;/strong&gt; &lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;font-family:tahoma, arial;font-size:11px;height:26px;padding-top:2px;&quot;&gt;View more &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.slideshare.net/&quot; style=&quot;text-decoration:underline;&quot;&gt;documents&lt;/a&gt; from &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.slideshare.net/tasneemsayeed&quot; style=&quot;text-decoration:underline;&quot;&gt;tasneemsayeed&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;</description>
         <author>Tasneem Sayeed</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-248726242367252546.post-911186906970389391</guid>
         <pubDate>Wed, 10 Jul 2013 17:14:00 +0000</pubDate>
      </item>
      <item>
         <title>MOOCs - evolving college town.</title>
         <link>http://kerncomputing.blogspot.com/2013/06/moocs-evolving-college-town.html</link>
         <description>Image a school in a not too distant future where lectures are delivered online. How would this transform college towns? Historically required lower-division courses were taught in a large lecture hall packed cheek to jowl with 150 or 200 students. If the lectures are delivered online, there is no need for a lecture hall. Students could watch lectures at any time and venue which is convenient for them.&lt;br /&gt;&lt;br /&gt;Some initial research based on the data generated from the current crop of MOOCs is becoming available. Lori Breslow et al recently published&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.rpajournal.com/dev/wp-content/uploads/2013/05/SF2.pdf&quot;&gt;Studying Learning in the Worldwide Classroom Research into edX’s First MOOC&lt;/a&gt;. &amp;nbsp;A key finding was...&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;On average, with all other&amp;nbsp;predictors being equal,&amp;nbsp;a student who worked&amp;nbsp;offline with someone else&amp;nbsp;in the class or someone&amp;nbsp;who had expertise in&amp;nbsp;the subject would have a&amp;nbsp;predicted score almost&amp;nbsp;three points higher than&amp;nbsp;someone working by&amp;nbsp;him or herself. This is a&amp;nbsp;noteworthy finding as it&amp;nbsp;reflects what we know&amp;nbsp;about on-campus instruction: that collaborating&amp;nbsp;with another person,&amp;nbsp;whether novice or expert, strengthens learning.&lt;/blockquote&gt;While we would no longer need to gather a hundred or more students together, colleges add value by facilitating group interaction. Instructors working with small groups, study groups, project groups. &lt;br /&gt;&lt;h3&gt;Teachers Matter! New Roles for Teachers.&lt;/h3&gt;&lt;b&gt;Lectures&lt;/b&gt;: Some teachers will specialize on delivering video lectures. These instructors will need to be more collaborative. Publishing a textbook are a good point of departure. Most teachers use a textbook developed by someone else. While the author is the one who distinguishes the book, the creation of a textbook relies on a supporting cast(e.g., editors, publishers, reviews, etc). When making a MOOC, the instructor will work with a cadre of professionals.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;Pedagogy&lt;/b&gt;: Online courses provide us with an opportunity to learn about how people learn. The current crop of MOOCs leverage the latest web technologies and apply machine learning techniques to the large volume of data unobtrusively collected by the system as the student works through the course material. This creates a rich vehicle for social scientists who want to study student learning. Working with the software development team, social science researchers can define an experiment and measure the results.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Classroom&lt;/b&gt;: What will happen to the classroom?&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;It is difficult to make predictions, especially about the future,&amp;nbsp;Yogi Berra&lt;/blockquote&gt;While no one knows for sure, we are seeing some interesting experiments with 'flipping the classroom'. The&lt;br /&gt;basic idea is students watch the lectures outside of class. This frees class time of other activities. One example can be found by the collaboration between MIT, edX and San Jose State University (SJSU). SJSU leverages&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://6002x.mitx.mit.edu/&quot;&gt;MITx 6.002x:Circuits and Electronics&lt;/a&gt;&amp;nbsp;in one of its courses. In class, students are divided into small teams and work on problems.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;embed width=&quot;320&quot; height=&quot;266&quot; src=&quot;https://youtube.googleapis.com/v/mVbYtzJq0jU&amp;source=uds&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;Other teachers might use this time for projects.&lt;br /&gt;&lt;h3&gt;Peers matter: New tools, more flexibility&amp;nbsp;&lt;/h3&gt;At the moment, online systems have discussion forums. It can be difficult for the student to filter through all the conversion and pair up with other students. However, I think this is a promising area for ongoing research and future development. There is a lot of work going on in the Connectivism MOOC movement (see Stephen Downes book &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.downes.ca/files/Connective_Knowledge-19May2012.pdf&quot;&gt;Connectivism and Connective Knowledge&lt;/a&gt; ) and all the work on social media in general. These ideas will find their way into online learning and improve them.&lt;br /&gt;&lt;h3&gt;Community matters: Hackerspaces.&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family:inherit;&quot;&gt;Since lectures would no longer force us to meet at large lecture halls in the middle of the day, other learning opportunities would are possible. &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://en.wikipedia.org/wiki/Hackerspace&quot; style=&quot;color:#009eb8;display:inline;line-height:19px;outline:none;text-align:justify;text-decoration:none;&quot;&gt;Hackerspaces&lt;/a&gt;&amp;nbsp;may provide some insight for Higher Education.&lt;span style=&quot;background-color:white;color:#333333;line-height:19px;text-align:justify;&quot;&gt;&amp;nbsp;These are locations where people who share a common interest can meet, socialize and collaborate. Probably the most famous in my area are the&amp;nbsp;&lt;/span&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.hackerdojo.com/&quot; style=&quot;color:#009eb8;display:inline;line-height:19px;outline:none;text-align:justify;text-decoration:none;&quot;&gt;Hacker Dojo&lt;/a&gt;&lt;span style=&quot;background-color:white;color:#333333;line-height:19px;text-align:justify;&quot;&gt;&amp;nbsp;which brings people together around software development,&amp;nbsp;&lt;/span&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://biocurious.org/&quot; style=&quot;color:#009eb8;display:inline;line-height:19px;outline:none;text-align:justify;text-decoration:none;&quot;&gt;Biocurious&lt;/a&gt;&lt;span style=&quot;background-color:white;color:#333333;line-height:19px;text-align:justify;&quot;&gt;&amp;nbsp;focusing on biotechnology offering lab space for its members to share and the&amp;nbsp;&lt;/span&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.techshop.ws/&quot; style=&quot;color:#009eb8;display:inline;line-height:19px;outline:none;text-align:justify;text-decoration:none;&quot;&gt;TechShop&lt;/a&gt;&lt;span style=&quot;background-color:white;color:#333333;line-height:19px;text-align:justify;&quot;&gt;&amp;nbsp;is a space for those who are building things.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:inherit;&quot;&gt;&lt;span style=&quot;background-color:white;color:#333333;line-height:19px;text-align:justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</description>
         <author>John Kern</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-10428183.post-713694071778446585</guid>
         <pubDate>Thu, 20 Jun 2013 14:02:00 +0000</pubDate>
      </item>
      <item>
         <title>Google I/O 2013: An In-Depth Developer's Perspective</title>
         <link>http://mymobilecorner.blogspot.com/2013/05/google-io-2013-in-depth-developers.html</link>
         <description>&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://1.bp.blogspot.com/-YFi0kSJdLTs/UZgLxu-nUeI/AAAAAAAAA2I/UXxXjEppCLU/s1600/GoogleIO2013.jpg&quot; style=&quot;margin-left:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;http://1.bp.blogspot.com/-YFi0kSJdLTs/UZgLxu-nUeI/AAAAAAAAA2I/UXxXjEppCLU/s320/GoogleIO2013.jpg&quot; width=&quot;320&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In comparison to last year's Google I/O featuring the spectacle augmented reality &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.digitaltrends.com/cool-tech/google-debuts-project-glass-augmented-reality-glasses-exactly-as-you-want-them-to-be/&quot;&gt;Google Glass&lt;/a&gt; &amp;nbsp;announcement via a breathtaking sky-diving presentation, this year's Google I/O may have seemed to lack luster with no new hardware.&lt;br /&gt;&lt;br /&gt;Nonetheless, Google I/O kicked off a record 3.5 hours Keynote with a heavy focus on &lt;i&gt;software&lt;/i&gt; and &lt;i&gt;services&lt;/i&gt;. The Google I/O Keynote discussed services and feature upgrades for both Android and Chrome. If you were expecting a brand new Android phone or tablet announcement, then you may have been disappointed. However, a major takeaway was a unified user experience for Chrome and Android platforms through shared services. &lt;br /&gt;&lt;br /&gt;According to Google, Android was at 100 million activations in 2011. And, it was at 400 million in 2012. &amp;nbsp;And now in 2013, Google released the numbers for the Android activations at an incredible 900 million! &amp;nbsp; Now that's no small feat...&lt;br /&gt;&lt;br /&gt;A huge applause from the audience came when Google mentioned the introduction of &lt;i&gt;Android Studio IDE based on IntelliJ!&lt;/i&gt;&amp;nbsp;&amp;nbsp;The Android Studio IDE tool has more options for Android development making the process faster and more productive. A live layout was shown that renders your app while you are editing it in realtime. It allows you to see a variety of device layouts (i.e. different form factor phone devices and tablets).&lt;i&gt; &lt;/i&gt;Refer to TechCrunch's excellent review on &lt;i&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://techcrunch.com/2013/05/15/google-launches-android-studio-a-development-tool-for-apps/&quot;&gt;Google Launches Android Studio and New Features for Developer Console Including Beta Releases and Staged Layouts&lt;/a&gt;&lt;/i&gt; for further details&lt;i&gt;.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;There were several other significant announcements made at Google I/O including:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Google Maps&lt;/b&gt; gets a complete overhaul and is released as part of Google Play Services. &amp;nbsp;Three new &lt;i&gt;Location APIs&lt;/i&gt; introduced include:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;Fused Location Provider&lt;/i&gt;&amp;nbsp;API utilizes all of the communications sensors in the phone including WiFi, GPS and Cell network while significantly saving battery life. This is a new service that greatly improves any application that uses location services.&lt;/li&gt;&lt;li&gt;&lt;i&gt;Geofencing API&amp;nbsp;&lt;/i&gt;allows apps to inform the user entering or exiting a configured virtual fence&lt;i&gt;. &lt;/i&gt;The API allows each app to define up to &lt;i&gt;100 geofences&amp;nbsp;&lt;/i&gt;simultaneously. Apps utilizing this service will provide better battery life and performance.&lt;/li&gt;&lt;li&gt;&lt;i&gt;Activity Recognition API&amp;nbsp;&lt;/i&gt;utilizes the device capabilities of the hardware and machine learning to determine whether the user is walking, cycling or driving. This allows apps utilizing the service to adjust their behavior depending on the user's mode of transport. It is done in a very battery efficient way as &lt;i&gt;no GPS&lt;/i&gt; is required.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;b&gt;Google+ Single Sign-in&lt;/b&gt; API is a cross-platform Sign-in API. &amp;nbsp;&lt;i&gt;Fancy&lt;/i&gt;&amp;nbsp;was used to demo during the Keynote that if you find a cool website that you like, you can sign-in with Google+ and then you will automatically be asked if you would like to install it. If you indicate yes, the the app will download and log you in &lt;i&gt;automatically&lt;/i&gt; on your current device and other Android devices on your account - now that's very cool!&lt;/li&gt;&lt;li&gt;&lt;b&gt;Google Cloud Messaging (GCM) for Android &lt;/b&gt;gets an overhaul. &lt;i&gt;GCM &lt;/i&gt;is a service&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#222222;font-family:Roboto, sans-serif;font-size:14px;line-height:19px;&quot;&gt;that allows you to send data from your server to your users' Android-powered device, and also to receive messages from devices on the same connection. The new features to GCM include:&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#222222;font-family:Roboto, sans-serif;font-size:14px;line-height:19px;&quot;&gt;&lt;i&gt;Faster&lt;/i&gt;, easier &lt;i&gt;GCM setup&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#222222;font-family:Roboto, sans-serif;font-size:14px;line-height:19px;&quot;&gt;&lt;i&gt;Upstream messaging over XMPP&lt;/i&gt;. GCM's Cloud Connection Service (CCS) lets you communicate with Android devices over a persistent XMPP connection. The primary advantage of CCS are speed and the ability to receive upstream messages (i.e. messages from a device to the Cloud).&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#222222;font-family:Roboto, sans-serif;font-size:14px;line-height:19px;&quot;&gt;New API for &lt;i&gt;Synchronizing Notifications&lt;/i&gt;. Maps a single user to a notification key, which you can then use to send a single message to multiple devices owned by the user.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#222222;font-family:Roboto, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size:14px;line-height:19px;&quot;&gt;&lt;b&gt;Google Play Music All Access &lt;/b&gt;was launched in the US at I/O. It&amp;nbsp;allows you to buy a&lt;b&gt;&amp;nbsp;&lt;/b&gt;music subscription from Google and costs $9.99/month and comes with a 30 day free trial. It allows you to explore millions of music tracks so it seems great for music discovery than its competitors (i.e. Spotify, Pandora). It is a simpler on-demand-meets-radio service with various personalization features, and works on phones, tablets and web browsers. From a design and UX perspective, it makes it easy to switch between the hands-on and hands-off experiences. If you are not sure of what you want to listen, you can just hit &quot;Listen Now&quot; and start listening to something right away. And, when you want to search on Google's huge on-demand catalog, you have that option as well.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#222222;font-family:Roboto, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size:14px;line-height:19px;&quot;&gt;&lt;b&gt;Google Search.&amp;nbsp;&lt;/b&gt;Google I/O 2013 marked the &quot;end of search as we know it&quot;. Google announced that it is looking to change the way users go about finding information by expanding its &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://insidesearch.blogspot.com/2013/05/a-multi-screen-and-conversational.html&quot;&gt;voice search capabilities&lt;/a&gt; and through its various services such as &lt;i&gt;Google's Knowledge Graph&lt;/i&gt; and &lt;i&gt;Google Now&lt;/i&gt; with a credo the company has labeled &quot;answer&quot;, &quot;converse&quot; and &quot;anticipate&quot;. In other words, the company's core product will eventually respond better to naturally phrased questions. &lt;i&gt;Anticipate&lt;/i&gt; means that Google Search will be able to guess what information users need the most and provide it for them easily via its &lt;i&gt;Google Now&lt;/i&gt; service. The &lt;i&gt;Google Now&lt;/i&gt; service pulls information from across Google services to act as a personal assistant of sorts by offering information on users' commutes, appointments and news from their favorite sources in the same place. &lt;i&gt;Conversational Search&lt;/i&gt; was announced to be coming to all desktops and laptops via Chrome.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#222222;font-family:Roboto, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size:14px;line-height:19px;&quot;&gt;&lt;b&gt;Chrome&lt;/b&gt;. Google announced that today there are 750+ Million active users of Chrome and that Chrome is increasingly used on mobile. Chrome design goals are: speed, simplicity and security. Google's Sundar Pichai said, &quot;The same capabilities that you're used to using for Chrome on a desktop are going to be coming to Chrome on Android.&quot; Thanks to WebGL and Web Audio APIs, you will start seeing quite impressive web experiences including games and rich interactive environments that were typically limited to the desktop environment.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#222222;font-family:Roboto, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size:14px;line-height:19px;&quot;&gt;&lt;i&gt;Better Web Imaging&lt;/i&gt;. Google compared &lt;i&gt;JPEG vs WebP&lt;/i&gt; images. The quality of the image was indistinguishable, but it was about two-thirds in size (i.e. &lt;i&gt;31% reduction in file size&lt;/i&gt;). This will significantly improve the load times on websites as well as help users to not exceed their data plan limitations. Furthermore, WebP supports animated images as well.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#222222;font-family:Roboto, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size:14px;line-height:19px;&quot;&gt;&lt;i&gt;Better Video compression&lt;/i&gt;. &amp;nbsp;Google compared &lt;i&gt;H.264 vs VP9&lt;/i&gt;. It was noted that the quality of the VP9 video is the same as H.264. However, the size of VP9 comes in at less than half the size (i.e. &lt;i&gt;63% reduction in file size&lt;/i&gt;).&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#222222;font-family:Roboto, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size:14px;line-height:19px;&quot;&gt;&lt;b&gt;mCommerce&lt;/b&gt;. Google reported that when it comes to shopping on your phone, the percentage of people that come to the purchase screen and then get out from there is incredibly high in the 90%. Google made 3 key announcements around mCommerce:&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#222222;font-family:Roboto, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size:14px;line-height:19px;&quot;&gt;&lt;i&gt;Consumer launch for pay by Gmail&lt;/i&gt; which is rolling out slowly with initial rollout in US&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#222222;font-family:Roboto, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size:14px;line-height:19px;&quot;&gt;Two new APIs announced for developer launch:&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#222222;font-family:Roboto, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size:14px;line-height:19px;&quot;&gt;&lt;i&gt;Google Wallet Object APIs&lt;/i&gt;. The vision is to digitize whole Wallet by allowing insertion of any kind of Objects into Google Wallet&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#222222;font-family:Roboto, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size:14px;line-height:19px;&quot;&gt;&lt;i&gt;Google Wallet Instant Buy&lt;/i&gt; for merchants selling physical goods. The goal is to allow consumers to make purchases within 2 clicks thereby improving the user experience.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#222222;font-family:Roboto, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size:14px;line-height:19px;&quot;&gt;&lt;b&gt;Google+&lt;/b&gt; &amp;nbsp;Google introduced &lt;i&gt;41 new Google+&lt;/i&gt; features at I/O! &amp;nbsp;First of all, Google+ gets an overhaul on its design. It is a multi-column design where its width will scale depending on the device that the user is on. It includes animations, flip and fade. It can do image analysis, recognize the image and hashtag it automatically.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#222222;font-family:Roboto, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size:14px;line-height:19px;&quot;&gt;&lt;b&gt;Google Hangouts&lt;/b&gt; is now a standalone app that will work on the web desktop, Android and iOS all announced starting at I/O. This will provide an on-going conversation within the hangout and doesn't end when you sign off. Also, RealTime Communication, that is, group video is available at no charge.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#222222;font-family:Roboto, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size:14px;line-height:19px;&quot;&gt;&lt;b&gt;Google Photos&lt;/b&gt;: Google announced earlier that in addition to unlimited backup of all of your standard sized photos, it will now give you 15 GB of storage for full-sized images. Google also announced machine learning algorithms that help to create a highlight reel for all your photos. The service will check all your photos in the album for blurriness, smiles and several other criteria (learnt by hundreds of actual human photographers, and produces a highlight reel.) Google also introduced an &quot;auto-enhance&quot; feature that will instantly adjust tonal distribution, red-eye reduction, skin softening, noise reduction and several other criteria to automatically enhance the picture. And, finally, Google introduced a new &quot;Auto Awesome&quot; mode. That is, if you take a burst of photos, it will make an animated gif out of them. If you take a series of screenshots, and if some are dark or if someone is smiling in one, but not the other, it can make a composite image similar to what the Galaxy S4 can do without the user having to activate that setting. And, that sounds cool! &amp;nbsp;It can also handle screenshots in &quot;Motion&quot;, HDR, and panoramic photos.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#222222;font-family:Roboto, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size:14px;line-height:19px;&quot;&gt;And, no developer review would be complete without the mention of the Developer Sandbox, which occupied 2 floors, with dedicated ones for Android, Wallet, Chrome, standalone ChromeBook Pixel display, Google+, Photos and Google Play. And, not to forget Google Glass had an extra large sandbox which was often crowded with spectators! &amp;nbsp;Google started shipping an early version of Google Glass known as Explorer mostly to a couple of thousand developers who had requested them at last year's Google I/O conference - forked over a hefty price of $1500! &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://3.bp.blogspot.com/-iUMYsWME7Uc/UZhGoOArV5I/AAAAAAAAA2g/9RoCxO2SVhQ/s1600/Tasneem_GoogleGlass_small.png&quot; style=&quot;margin-left:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;234&quot; src=&quot;http://3.bp.blogspot.com/-iUMYsWME7Uc/UZhGoOArV5I/AAAAAAAAA2g/9RoCxO2SVhQ/s320/Tasneem_GoogleGlass_small.png&quot; width=&quot;320&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#222222;font-family:Roboto, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size:14px;line-height:19px;&quot;&gt;I was fortunate to explore Google Glass and the experience was truly amazing! Glass is not like wearing a laptop on your face, though it does have a 12 GB of usable storage (16 GB total), synced with Google Cloud. Glass is more like &lt;i&gt;augmented reality&lt;/i&gt; spectacles, but without lenses.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#222222;font-family:Roboto, sans-serif;font-size:14px;line-height:19px;&quot;&gt;Its lightweight frame rests on the ears and nose, suspending a small prism at the upper right corner of the wearer's field of vision. Glass has a tiny touch pad built into one earpiece and a microphone to pick up voice commands. Interestingly, the earpiece uses &quot;bone conduction&quot; to deliver sounds by vibration against the wearer's head. You can speak aloud to get information &amp;nbsp;or tell Glass to &quot;take a picture&quot; or &quot;take a video&quot; (up to 10s &amp;nbsp;snippets). You can ask questions like &quot;Google find me a restaurant&quot; and see the results in &quot;Knowledge cards&quot;.You can also send texts and make phone calls. If you swipe toward the back, you can see &lt;i&gt;Google Now&lt;/i&gt; cards for flight, traffic and other information. &amp;nbsp;In summary, Google I/O 2013 showcased several interesting innovations across Google products.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#222222;font-family:Roboto, sans-serif;font-size:14px;line-height:19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#222222;font-family:Roboto, sans-serif;font-size:14px;line-height:19px;&quot;&gt;If you found this article useful or want to share your developer perspectives on Google I/O 2013, feel free to share your comments below, follow me by clicking on the upper left hand corner and/or follow me on Twitter @tasneemsayeed.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</description>
         <author>Tasneem Sayeed</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-248726242367252546.post-4461048854965501479</guid>
         <pubDate>Sat, 18 May 2013 21:51:00 +0000</pubDate>
         <media:thumbnail height="72" url="http://1.bp.blogspot.com/-YFi0kSJdLTs/UZgLxu-nUeI/AAAAAAAAA2I/UXxXjEppCLU/s72-c/GoogleIO2013.jpg" width="72" xmlns:media="http://search.yahoo.com/mrss/"/>
      </item>
      <item>
         <title>Best Practices for Mobile App Development on Android</title>
         <link>http://mymobilecorner.blogspot.com/2013/04/best-practices-for-mobile-app.html</link>
         <description>&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;Designing and building apps that look great and perform well on as many devices ranging from smart phones to tablets is crucial to ensure an optimal user experience.&lt;br /&gt;At the recent &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://devfestsiliconvalley.eventbrite.com/&quot;&gt;DevFest Silicon Valley&lt;/a&gt; event held at Google on March 15th, I had presented a talk on &lt;i&gt;Best Practices for Mobile App Development on Android&lt;/i&gt;.&amp;nbsp; The talk focuses on the &lt;i&gt;Golden Rules &amp;amp; Best Practices of Performance&lt;/i&gt; including how to keep your apps responsive, how to effectively implement Background Services, tips for improving the performance and scalability of long-running applications, and briefly on &lt;i&gt;Best Practices for User Experience&lt;/i&gt; and concluding with &lt;i&gt;Benefits of Intents and Intent Filters&lt;/i&gt;.&amp;nbsp; For further details, please refer to the slides attached below.&lt;br /&gt;  &lt;div style=&quot;margin-bottom:5px;&quot;&gt; &lt;strong&gt; &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.slideshare.net/tasneemsayeed/best-practices-for-mobile-app-development-android-march-15-2013-ts&quot; title=&quot;Best practices for mobile app development android march 15 2013 ts&quot;&gt;Best practices for mobile app development android march 15 2013 ts&lt;/a&gt; &lt;/strong&gt; from &lt;strong&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.slideshare.net/tasneemsayeed&quot;&gt;Tasneem Sayeed&lt;/a&gt;&lt;/strong&gt; &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;If you enjoyed this article, you may want to &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://twitter.com/tasneemsayeed&quot;&gt;follow me (@tasneemsayeed) on Twitter&lt;/a&gt;. I always announce significant new blog posts and interesting mobile topics via a tweet. You can also subscribe to this blog.&amp;nbsp; Feel free to post any comments that you may have below.&lt;br /&gt;&lt;div style=&quot;font-family:tahoma, arial;font-size:11px;height:26px;padding-top:2px;&quot;&gt;View more &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.slideshare.net/&quot; style=&quot;text-decoration:underline;&quot;&gt;documents&lt;/a&gt; from &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.slideshare.net/tasneemsayeed&quot; style=&quot;text-decoration:underline;&quot;&gt;tasneemsayeed&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;</description>
         <author>Tasneem Sayeed</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-248726242367252546.post-3530614484983739267</guid>
         <pubDate>Tue, 02 Apr 2013 12:13:00 +0000</pubDate>
      </item>
      <item>
         <title>Implementing Singletons for the iOS platform</title>
         <link>http://mymobilecorner.blogspot.com/2013/03/implementing-singletons-for-ios-platform.html</link>
         <description>&lt;div id=&quot;__ss_2283958&quot; style=&quot;text-align:left;width:425px;&quot;&gt;The &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://en.wikipedia.org/wiki/Singleton_pattern&quot;&gt;Singleton design pattern&lt;/a&gt; is one of the most frequently used design pattern when developing for the iOS platform. It is a very powerful way to share data across different parts of an iOS application without having to explicitly pass the data around manually.&lt;br /&gt;&lt;h4&gt;&lt;b&gt;Overview&lt;/b&gt;&lt;/h4&gt;Singleton classes play an important role in iOS as they exhibit an extremely useful design pattern.&amp;nbsp; Within the iOS SDK, the &lt;span style=&quot;&quot;&gt;UIApplication&lt;/span&gt; class has a method called &lt;span style=&quot;&quot;&gt;sharedApplication&lt;/span&gt; which when called from anywhere will return the &lt;span style=&quot;&quot;&gt;UIApplication&lt;/span&gt; instance that is associated with the currently running application.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;How to implement the Singleton Class&lt;/h4&gt;You can implement the Singleton class in Objective-C as follows:&lt;br /&gt;&lt;h4&gt;&lt;code class=&quot;objc&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;cp&quot;&gt;&amp;nbsp;MyManager.h&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/h4&gt;&lt;pre&gt;&lt;code class=&quot;objc&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;k&quot;&gt;&lt;br /&gt;@interface MySingletonManager : NSObject {&lt;br /&gt;    NSString *someProperty;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;@property (nonatomic, retain) NSString *someProperty;&lt;br /&gt;&lt;br /&gt;+ (id)sharedManager;&lt;br /&gt;&lt;br /&gt;@end&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;code class=&quot;objc&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;k&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h4&gt;&lt;code class=&quot;objc&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;k&quot;&gt;MyManager.m&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/h4&gt;&lt;pre&gt;&lt;code class=&quot;objc&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;cp&quot;&gt;#import &quot;MySingletonManager.h&quot;&lt;br /&gt;&lt;br /&gt;@implementation MySingletonManager&lt;br /&gt;&lt;br /&gt;@synthesize someProperty;&lt;br /&gt;&lt;br /&gt;#pragma mark Singleton Methods&lt;br /&gt;&lt;br /&gt;+(id) sharedManager {&lt;br /&gt;    static MySingletonManager *sharedMySingletonManager = nil;&lt;br /&gt;    static dispatch_once_t onceToken;&lt;br /&gt;    dispatch_once(&amp;amp;onceToken, ^{&lt;br /&gt;        sharedMySingletonManager = [[self alloc] init];&lt;br /&gt;&lt;br /&gt;    });&lt;br /&gt;    return sharedMySingletonManager;&lt;br /&gt;}&lt;br /&gt;                  &lt;br /&gt;- (id)init {&lt;br /&gt;    if (self = [super init]) {&lt;br /&gt;        someProperty = @&quot;Default Property&quot;;&lt;br /&gt;    }&lt;br /&gt;    return self;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;- (void)dealloc {&lt;br /&gt;    // should never be called, but included here for clarity&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;@end&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;p&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;k&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;code class=&quot;objc&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;k&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The above code fragment defines a static variable called &lt;span style=&quot;&quot;&gt;sharedMySingletonManager&lt;/span&gt; which is then initialized once and only once in &lt;span style=&quot;&quot;&gt;sharedManager&lt;/span&gt;.&amp;nbsp; The way that we ensure that it is only created once is by using the &lt;span style=&quot;&quot;&gt;dispatch_once&lt;/span&gt; method from the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://developer.apple.com/library/ios/#documentation/Performance/Reference/GCD_libdispatch_Ref/Reference/reference.html&quot;&gt;Grand Central Dispatch (GCD)&lt;/a&gt;.&amp;nbsp; This is thread safe and handled entirely by the OS so you do not need to worry about it at all.&lt;br /&gt;&lt;br /&gt;If you rather not use GCD, then you can the following code fragment for &lt;span style=&quot;&quot;&gt;sharedManager:&lt;/span&gt;&lt;br /&gt;&lt;h4&gt;Non-GCD Based&amp;nbsp;&lt;/h4&gt;&lt;pre style=&quot;&quot;&gt;&lt;code class=&quot;objc&quot;&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;k&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;sharedManager&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;k&quot;&gt;@synchronized&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sharedMySingletonManager&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;            &lt;span class=&quot;n&quot;&gt;sharedMySingletonManager&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;self&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;alloc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;init&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;];&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sharedMySingletonManager&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class=&quot;line&quot;&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre&gt;&lt;code class=&quot;objc&quot;&gt;&lt;span class=&quot;line&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;Then, you can reference the Singleton from anywhere by calling the function below:&lt;br /&gt;&lt;h4&gt;Referencing the Singleton&lt;/h4&gt;&lt;code&gt;MySingletonManager *sharedManager = [MySingletonManager sharedManager];&lt;/code&gt;&lt;br /&gt;Happy Singleton'ing!&amp;nbsp;&amp;nbsp; If you find this post useful, then mention me in the comments.&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;font-family:tahoma, arial;font-size:11px;height:26px;padding-top:2px;&quot;&gt;View more &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.slideshare.net/&quot; style=&quot;text-decoration:underline;&quot;&gt;documents&lt;/a&gt; from &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.slideshare.net/tasneemsayeed&quot; style=&quot;text-decoration:underline;&quot;&gt;tasneemsayeed&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;</description>
         <author>Tasneem Sayeed</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-248726242367252546.post-5637464793716360420</guid>
         <pubDate>Fri, 08 Mar 2013 12:54:00 +0000</pubDate>
      </item>
      <item>
         <title>Dica técnica: Como apontar para um local específico no vídeo?</title>
         <link>http://kerncomputing.blogspot.com/2012/08/dica-tecnica-como-voce-apontar-para-um.html</link>
         <description>Eu estudo português. Os vídeos em português são uma grande experiência de aprendizagem. Em algum momento, você vai querer perguntar a alguém sobre o vídeo. Como apontar para um momento específico no vídeo de modo que as pessoas assistam-no ao mesmo tempo?&amp;nbsp;Youtube permite que você especificque os minutos e segundos.&amp;nbsp;Basta anexar uma série&amp;nbsp;como esta &quot;#t=1m39s&quot; à URL do vídeo do youtube.&amp;nbsp;&amp;nbsp;Considere este código.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;var min=0;&lt;br /&gt;var sec=0;&lt;br /&gt;var videoURL=&quot;http://www.youtube.com/watch?v=6lPdpdWakOw&quot;;&lt;br /&gt;&lt;br /&gt;function createPtr(aVideoId, aMin, aSec) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; return aVideoId + &quot;#t=&quot; + &amp;nbsp;aMin + &quot;m&quot; + aSec + &quot;s&quot;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// videoURL é um video que fala sobre educação a distância.&lt;br /&gt;&lt;br /&gt;// O professor começa a falar em 1 minuto e 39 segundos.&lt;br /&gt;min=1; sec=39;&lt;br /&gt;createPtr(videoURL, min, sec);&lt;br /&gt;// &quot;http://www.youtube.com/watch?v=6lPdpdWakOw#t=1m39s&quot;&lt;br /&gt;&lt;br /&gt;// O repórter em um campo começa a falar em 1 minuto e 6 segundos.&lt;br /&gt;min=1; sec=6&lt;br /&gt;createPtr(videoURL, min, sec);&lt;br /&gt;// &quot;http://www.youtube.com/watch?v=6lPdpdWakOw#t=1m6s&quot;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description>
         <author>John Kern</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-10428183.post-307420719086386596</guid>
         <pubDate>Sat, 18 Aug 2012 11:19:00 +0000</pubDate>
      </item>
      <item>
         <title>Challenges for MOOC</title>
         <link>http://kerncomputing.blogspot.com/2012/08/challenges-for-mooc.html</link>
         <description>&lt;br /&gt;While I do believe we have reached some kind of typing point with online courses, challenges have been identified.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;STEM seems to be easier to present via online courses than the humanities. The main difficulty is how to assess the work submitted by the student. Multiple choice answers are easy. Computer programs can be run against a test suite. How do you grade essays? Coursera uses a peer based method which matches up students to grade one another's work. Can algorithms be written to provide feedback? This is still an open issue.&amp;nbsp;&lt;/li&gt;&lt;li&gt;How do you prevent students from cheating?&amp;nbsp;&lt;/li&gt;&lt;li&gt;How can we devise experiments to determine which online techniques work and which don't?&lt;/li&gt;&lt;li&gt;There is some overlap between these new online courses and textbooks. Will they merge?&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;In this TED talk, Dr. Daphne Koller introduces Coursera, a startup based on the results of work spearheaded at Stanford. About half way through she goes into some detail with respect to the types of assessments which can be automated and discusses having students grade one another's essays.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;embed width=&quot;320&quot; height=&quot;266&quot; src=&quot;http://www.youtube.com/v/U6FvJ6jMGHU&amp;fs=1&amp;source=uds&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description>
         <author>John Kern</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-10428183.post-1374638882041105575</guid>
         <pubDate>Tue, 07 Aug 2012 13:34:00 +0000</pubDate>
      </item>
      <item>
         <title>MOOC and the 3 Ps : Professors, Pupils and Places</title>
         <link>http://kerncomputing.blogspot.com/2012/07/mooc-and-3-ps-professors-pupils-and.html</link>
         <description>This year has been impressive for&lt;span style=&quot;background-color:white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color:white;&quot;&gt;Massive Open Online Course(&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://en.wikipedia.org/wiki/MOOC&quot;&gt;MOOC&lt;/a&gt;). The &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.khanacademy.org/&quot;&gt;Khan Academy&lt;/a&gt;&amp;nbsp;continues to grow.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color:white;&quot;&gt;Experiments at Stanford and MIT showed impressive results which lead to several efforts to productize MOOCs: &lt;/span&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://blog.ted.com/2012/06/26/massive-online-education-daphne-koller-at-tedglobal2012/&quot; style=&quot;background-color:white;&quot;&gt;Coursera&lt;/a&gt;&lt;span style=&quot;background-color:white;&quot;&gt;, &lt;/span&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://udacity.com/&quot; style=&quot;background-color:white;&quot;&gt;Udacity&lt;/a&gt;&lt;span style=&quot;background-color:white;&quot;&gt;&amp;nbsp;and &lt;/span&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.edxonline.org/&quot; style=&quot;background-color:white;&quot;&gt;edX&lt;/a&gt;&lt;span style=&quot;background-color:white;&quot;&gt;. A natural first question for the University is does this cannibalize the university's brand. Many others have covered this aspect of the story (e.g., &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.slate.com/articles/technology/future_tense/2012/07/coursera_udacity_edx_will_free_online_ivy_league_courses_end_the_era_of_expensive_higher_ed_.html?tid=sm_tw_button_chunky&quot;&gt;Slate&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://techcrunch.com/2012/07/17/coursera-aims-to-make-americas-higher-ed-system-interactive-and-public-secures-22-million/&quot;&gt;TechCrunch&lt;/a&gt;, etc). &amp;nbsp;I want to focus on the possibilities to expand education.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color:white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color:white;&quot;&gt;Some articles in the popular press imply professors will go away or their role will be seriously&amp;nbsp;diminished. I don't believe for that a moment but their roles will change. We can already see instructors using a techniques like&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://en.wikipedia.org/wiki/Flip_teaching&quot;&gt;flipping the classroom&lt;/a&gt;. Here pupils watch the lesson via video before coming to class. During the class, the instructor can focus on topics that are tripping up the pupils. She can challenge the advanced students and spend more time with those who need a bit more time. The student/teacher and peer-to-peer relationships matter. Where technology proves it can enhance these relationships, it will be adopted. Creating a positive feedback loop.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color:white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color:white;&quot;&gt;Another theme where the&amp;nbsp;pundits are wrong is their prediction that universities will go away.&amp;nbsp;&amp;nbsp;There remains a huge gulf between participating&amp;nbsp;in a MOOC and the experience at an elite university.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color:white;&quot;&gt;Did you know that&amp;nbsp;&lt;/span&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.bloomberg.com/news/2010-05-18/college-graduates-to-make-global-economy-more-productive-chart-of-the-day.html&quot;&gt;less than 7% of the worlds population has a college degree of any kind&lt;/a&gt;&lt;span style=&quot;background-color:white;&quot;&gt;? &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color:white;&quot;&gt;That means there are a lot of people who want an education.&lt;/span&gt;&lt;span style=&quot;background-color:white;&quot;&gt;&amp;nbsp;This provides an opportunity to enhance the learning experience for students who are geographically distributed with technologies but place still matters. On campus, if professors are spending less time delivering lectures and the students are better prepared, it is bound to&amp;nbsp;accelerate&amp;nbsp;the learning process.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color:white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color:white;&quot;&gt;Now consider the hundreds of thousands of students taking the course online. While the online course is great, they'd like to meet others in the class or who share their interests. We can already see people finding themselves and meeting at locally libraries or cafes. What should these meeting places look like? What services can we offer there? Where should they be located? Geospatical analysis should be done on this topic. Perhaps, we can glean insights from &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://en.wikipedia.org/wiki/Hackerspace&quot;&gt;hackerspaces&lt;/a&gt;. These are locations where people who share a common interest can meet, socialize and collaborate. Probably the most famous in my area is the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.hackerdojo.com/&quot;&gt;Hacker Dojo&lt;/a&gt;&amp;nbsp;which brings people together around software development. &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://biocurious.org/&quot;&gt;Biocurious&lt;/a&gt;&amp;nbsp;focusing on biotechnology. Offering lab space for its members to share. The &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.techshop.ws/&quot;&gt;TechShop&lt;/a&gt;&amp;nbsp;is a space for those who are building things.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color:white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color:white;&quot;&gt;Technology can enhance the learning process and help everyone become smarter, faster. It can allow education to reach an order of magnitude more students. &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color:white;&quot;&gt;Oh the places we'll go.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color:white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;embed width=&quot;320&quot; height=&quot;266&quot; src=&quot;http://www.youtube.com/v/IQRWeZy-S8Q&amp;fs=1&amp;source=uds&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;</description>
         <author>John Kern</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-10428183.post-2412082015290943247</guid>
         <pubDate>Thu, 19 Jul 2012 12:48:00 +0000</pubDate>
      </item>
      <item>
         <title>Cultivating the Imagination for a world of Constant Change</title>
         <link>http://kerncomputing.blogspot.com/2012/07/cultivating-imagination-for-world-of.html</link>
         <description>&lt;div&gt;&lt;span style=&quot;background-color:white;&quot;&gt;I went to a talk by Douglas Thomas and John Seely Brown last fall in San Francisco in support of their new book &lt;/span&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.amazon.com/gp/product/1456458884/ref=as_li_tf_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1456458884&amp;amp;linkCode=as2&amp;amp;tag=johker-20&quot; style=&quot;background-color:white;&quot;&gt;A New Culture of Learning&lt;/a&gt;&lt;span style=&quot;background-color:white;&quot;&gt;. &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color:white;&quot;&gt;It is grounded in a simple question: &quot;&lt;i&gt;What happens to learning when we move from the stable infrastructure of the twentieth century to the fluid infrastructure of the  twenty-first century, where technology is constantly creating and respon&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;background-color:white;&quot;&gt;&lt;i&gt;ding to change?&lt;/i&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color:white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color:white;&quot;&gt;In this book, culture is used in the sense of maintaining an environment suitable for cultivation. Think about a scientist controlling the environment in petri dish to growing an experiment. Heating it. Adding a specific amount of a chemical substance.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color:white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color:white;&quot;&gt;A key aspect of their approach is fostering learning environments with&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color:white;&quot;&gt;well-defined boundaries.&lt;/span&gt;&lt;span style=&quot;background-color:white;&quot;&gt;&amp;nbsp;These environments leverage digital information networks and encourages peer-to-peer interacts. Inquiry is central. The learner needs to form questions. This can be project based.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color:white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color:white;&quot;&gt;&quot;&lt;i&gt;The new culture of learning is based on three principles:&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;i&gt;The old ways of learning are unable to keep up with our rapidly changing world.&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;New media forms are making peer-to-peer learning easier and more natural.&amp;nbsp;&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;Peer-to-peer learning is amplified by emerging technologies that shape the collective nature of participation with those new media.&lt;/i&gt;&quot;&lt;/li&gt;&lt;/ol&gt;The authors explore learning in informal settings. They focus on project based learning where the projects are meaningful to the learner. In this situation,&amp;nbsp;&lt;span style=&quot;background-color:white;&quot;&gt;questions can more important than answers because the drive the student to dig deeper.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color:white;&quot;&gt;They provide a variety of case studies showing people highlighting this approach.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;h2&gt;References&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.amazon.com/gp/product/1456458884/ref=as_li_tf_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1456458884&amp;amp;linkCode=as2&amp;amp;tag=johker-20&quot;&gt;Here&lt;/a&gt;&amp;nbsp;is a pointer to the book on amazon.&amp;nbsp;&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://chronicle.com/article/Understanding-the-New-Culture/127459/&quot;&gt;Here&lt;/a&gt; is a review of this book by the Chronicle of Higher Education. &lt;/li&gt;&lt;li&gt;Kate Rutter drew &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.flickr.com/photos/intelleto/5854913912/sizes/o/&quot;&gt;this amazing graphic&lt;/a&gt; which summarized the notes from the authors presentation in San Francisco.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Peter Rawsthorne &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://criticaltechnology.blogspot.com/2011/03/new-culture-of-learning.html&quot;&gt;reviewed this book&lt;/a&gt; on his blog called Critical Technology &amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.cea-ace.ca/education-canada/article/playing-learn&quot; style=&quot;background-color:white;&quot;&gt;Playing to Learn&lt;/a&gt;,&amp;nbsp; Canadian Education Association&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;-jk&lt;/div&gt;</description>
         <author>John Kern</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-10428183.post-4625595237995419531</guid>
         <pubDate>Thu, 12 Jul 2012 16:02:00 +0000</pubDate>
      </item>
      <item>
         <title>Notes on mongo queries</title>
         <link>http://kerncomputing.blogspot.com/2012/07/notes-on-mongo-queries.html</link>
         <description>&lt;br /&gt;Hello,&lt;br /&gt;&lt;br /&gt;Today's post is just some notes on what I've learned about mongo queries.&lt;br /&gt;&lt;br /&gt;I am working with a collection of postsecondary educational institutes. Everything from beauty schools to elite universities. First let's confirm the number of states.&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&amp;gt; var rc = db.runCommand({&quot;distinct&quot; : &quot;institutions&quot;, &quot;key&quot; : &quot;us_state&quot;} )&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&amp;gt; rc.values.length&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;59&lt;br /&gt;&lt;br /&gt;59! Say,what is this new math? Let's list out the sorted results.&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&amp;gt; rc.values.sort()&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;[&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;AK&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;AL&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;AR&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;AS&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;AZ&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;CA&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;CO&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;CT&quot;,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;......&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;TN&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;TX&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;UT&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;VA&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;VI&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;VT&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;WA&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;WI&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;WV&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;WY&quot;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;]&lt;br /&gt;&lt;br /&gt;Ok, it includes the US territory.&lt;br /&gt;&lt;br /&gt;Now I would like to know how many institutions are in each state. You could iterate through the list we just computed and use the count() method. &amp;nbsp;For example,&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&amp;gt; db.institutions.find({&quot;us_state&quot;: &quot;WI&quot; }).count()&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;151&lt;br /&gt;&lt;br /&gt;However, it would be nice if we could compute all of them at once. Mongo provides a series of&amp;nbsp;aggregation&amp;nbsp;functions. Here I'll use &lt;b&gt;group&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;var rc = db.runCommand( {&quot;group&quot; : {&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;ns&quot; : &quot;institutions&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;key&quot; : {&quot;us_state&quot; :1} ,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;initial&quot; : {&quot;count&quot; : 0},&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;$reduce&quot;: function(curDoc,accumulator) {&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;    &lt;/span&gt;accumulator.count++;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;}})&lt;br /&gt;&lt;br /&gt;Let's look at the options.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;background-color:white;&quot;&gt;The value for the &lt;/span&gt;&lt;b style=&quot;background-color:white;&quot;&gt;ns&lt;/b&gt;&lt;span style=&quot;background-color:white;&quot;&gt; key &amp;nbsp;is the collection.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;background-color:white;&quot;&gt;The &lt;/span&gt;&lt;b style=&quot;background-color:white;&quot;&gt;key&lt;/b&gt;&lt;span style=&quot;background-color:white;&quot;&gt; key defines which property we want to group by.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b style=&quot;background-color:white;&quot;&gt;initial&lt;/b&gt;&lt;span style=&quot;background-color:white;&quot;&gt; initializes a variable on a per unique value of the key in question(i.e., unique on a per state basis in &amp;nbsp;this case). &amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;background-color:white;&quot;&gt;The function associated with&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color:white;&quot;&gt;$reduce &lt;/b&gt;&lt;span style=&quot;background-color:white;&quot;&gt;takes two arguments. &lt;/span&gt;&lt;b style=&quot;background-color:white;&quot;&gt;curDoc&lt;/b&gt;&lt;span style=&quot;background-color:white;&quot;&gt;&amp;nbsp;is a read-only view of the current document. The second argument,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color:white;&quot;&gt;&lt;b&gt;accumulator&lt;/b&gt;,&lt;b&gt;&amp;nbsp;&lt;/b&gt;is where we store results.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;The results is simply an array of objects.&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&amp;gt; rc.retval.sort(function (a,b) {return a.count - b.count})&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;[&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;....&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;us_state&quot; : &quot;MO&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;count&quot; : 262&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;},&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;us_state&quot; : &quot;MA&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;count&quot; : 282&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;},&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;us_state&quot; : &quot;IL&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;count&quot; : 399&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;},&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;us_state&quot; : &quot;OH&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;count&quot; : 427&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;},&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;us_state&quot; : &quot;FL&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;count&quot; : 523&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;},&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;us_state&quot; : &quot;PA&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;count&quot; : 524&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;},&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;us_state&quot; : &quot;TX&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;count&quot; : 566&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;},&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;us_state&quot; : &quot;NY&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;count&quot; : 742&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;},&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;us_state&quot; : &quot;CA&quot;,&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt;  &lt;/span&gt;&quot;count&quot; : 1240&lt;br /&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-jk</description>
         <author>John Kern</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-10428183.post-2488295952813164754</guid>
         <pubDate>Wed, 11 Jul 2012 16:06:00 +0000</pubDate>
      </item>
      <item>
         <title>Tech Tip:  Checking a Criteria in Spring Data MongoDB</title>
         <link>http://kerncomputing.blogspot.com/2012/06/tech-tip-checking-criteria-in-spring.html</link>
         <description>&lt;br /&gt;Hello,&lt;br /&gt;&lt;br /&gt;I like the Spring Data MongoDB APIs. &amp;nbsp;I find the way they model queries and&amp;nbsp;criteria&amp;nbsp;&lt;span style=&quot;background-color:white;&quot;&gt;intuitive but sometimes I'm left wondering if what I wrote correctly maps to MongoDB. Here is handy way to check.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;Criteria c = where(&quot;us_state&quot;).is(&quot;MI&quot;).and(&quot;location&quot;).exists(false);&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;System.out.println(&quot;criteria: &quot; + c.getCriteriaObject().toString());&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;output:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;criteria: { &quot;us_state&quot; : &quot;MI&quot; , &quot;location&quot; : { &quot;$exists&quot; : false}}&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;This can be cut and pasted into the MongoDB shell.&lt;br /&gt;&lt;br /&gt;-jk&lt;br /&gt;</description>
         <author>John Kern</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-10428183.post-5463454829275437217</guid>
         <pubDate>Thu, 21 Jun 2012 13:41:00 +0000</pubDate>
      </item>
      <item>
         <title>Mongo query - documents with none empty array</title>
         <link>http://kerncomputing.blogspot.com/2012/06/mongo-query-documents-with-none-empty.html</link>
         <description>&lt;br /&gt;Hello,&lt;br /&gt;&lt;br /&gt;I'm working with MongoDb. My dataset has an array called &quot;campusSet&quot;.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&amp;gt; db.institutions.find({}, {&quot;campusSet&quot;:1}).limit(3)&lt;/i&gt;&lt;br /&gt;&lt;i&gt;{ &quot;_id&quot; : 1048598, &quot;campusSet&quot; : [ &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;{ &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&quot;_id&quot; : null, &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&quot;address&quot; : &quot;917 Missile Road&quot;, &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&quot;city&quot; : &quot;Sheppard AFB&quot;, &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&quot;us_state&quot; : &quot;TX&quot;, &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&quot;zipCode&quot; : &quot;76311-2263&quot; } ] }&lt;/i&gt;&lt;br /&gt;&lt;i&gt;{ &quot;_id&quot; : 1048613, &quot;campusSet&quot; : [ ] }&lt;/i&gt;&lt;br /&gt;&lt;i&gt;{ &quot;_id&quot; : 1048628, &quot;campusSet&quot; : [ ] }&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;One can ask for documents with an empty campus array.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&amp;gt; db.institutions.find({&quot;campusSet&quot;:[]},{&quot;campusSet&quot;:1}).limit(3)&lt;/i&gt;&lt;br /&gt;&lt;i&gt;{ &quot;_id&quot; : 1048613, &quot;campusSet&quot; : [ ] }&lt;/i&gt;&lt;br /&gt;&lt;i&gt;{ &quot;_id&quot; : 1048628, &quot;campusSet&quot; : [ ] }&lt;/i&gt;&lt;br /&gt;&lt;i&gt;{ &quot;_id&quot; : 1048643, &quot;campusSet&quot; : [ ] }&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;I want to know the inverse, that is, documents with values in the campusSet array. Mongo does have a not operator called naturally enough $not but strangely, you must apply it to another constraint. So, you can't say&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&amp;gt; db.institutions.find({&quot;campusSet&quot;: { &quot;$not&quot; : [] }},{&quot;campusSet&quot;:1})&lt;/i&gt;&lt;br /&gt;&lt;i&gt;error: { &quot;$err&quot; : &quot;invalid use of $not&quot;, &quot;code&quot; : 13041 }&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Further, I tried.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&amp;gt; db.institutions.find({ &quot;$not&quot; : {&quot;campusSet&quot;: [] }},{&quot;campusSet&quot;:1})&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;It simply returns which I do not understand. Is that the empty set? Why?&lt;br /&gt;&lt;br /&gt;Fortunately, mongo does provide a &quot;$size&quot; operator. Combining it with &quot;$not&quot;, gives one the desired effect.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&amp;gt; db.institutions.find({&quot;campusSet&quot;: { &quot;$not&quot; : {&quot;$size&quot; : 0}}},{&quot;campusSet&quot;:1}).limit(3)&lt;/i&gt;&lt;br /&gt;&lt;i&gt;{ &quot;_id&quot; : 1048598, &quot;campusSet&quot; : [ &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;{ &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&quot;_id&quot; : null, &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&quot;address&quot; : &quot;917 Missile Road&quot;, &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&quot;city&quot; : &quot;Sheppard AFB&quot;, &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&quot;us_state&quot; : &quot;TX&quot;, &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&quot;zipCode&quot; : &quot;76311-2263&quot; } ] }&lt;/i&gt;&lt;br /&gt;&lt;i&gt;{ &quot;_id&quot; : 1048728, &quot;campusSet&quot; : [ &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;{ &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&quot;_id&quot; : null, &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&quot;address&quot; : &quot;34091 Highway 280&quot;, &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&quot;city&quot; : &quot;Childersburg&quot;, &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&quot;us_state&quot; : &quot;AL&quot;, &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&quot;zipCode&quot; : &quot;35044&quot; } ] }&lt;/i&gt;&lt;br /&gt;&lt;i&gt;{ &quot;_id&quot; : 1049159, &quot;campusSet&quot; : [ &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;{ &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&quot;_id&quot; : null, &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&quot;address&quot; : &quot;1805 Hillyer Robinson Industrial Parkway. Suite B&quot;, &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&quot;city&quot; : &quot;Anniston&quot;, &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&quot;us_state&quot; : &quot;AL&quot;, &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&quot;zipCode&quot; : &quot;36207&quot; } ] }&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;-jk&lt;br /&gt;</description>
         <author>John Kern</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-10428183.post-2216483799617678300</guid>
         <pubDate>Tue, 19 Jun 2012 14:15:00 +0000</pubDate>
      </item>
      <item>
         <title>Viewing Communities as Funnels</title>
         <link>https://talesfromthecommunity.wordpress.com/2012/06/16/viewing-communities-as-funnels/</link>
         <description>It has been ages since I have had time to write a blog post. Last week, I decided to get my act together and start again. Of course the cold and wet summer in the UK also helps a bit. &amp;#8230; &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://talesfromthecommunity.wordpress.com/2012/06/16/viewing-communities-as-funnels/&quot;&gt;Continue reading &lt;span class=&quot;meta-nav&quot;&gt;&amp;#8594;&lt;/span&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;https://pixel.wp.com/b.gif?host=talesfromthecommunity.wordpress.com&amp;#038;blog=14530685&amp;#038;post=361&amp;#038;subd=talesfromthecommunity&amp;#038;ref=&amp;#038;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;</description>
         <guid isPermaLink="false">http://talesfromthecommunity.wordpress.com/?p=361</guid>
         <pubDate>Sat, 16 Jun 2012 15:22:35 +0000</pubDate>
         <content:encoded><![CDATA[<p>It has been ages since I have had time to write a blog post. Last week, I decided to get my act together and start again. Of course the cold and wet summer in the UK also helps a bit. I have accumulated a lot of material and experience since my last post. Today, I will start with an idea that I first published at <a rel="nofollow" target="_blank" href="http://www.slideshare.net/xen_com_mgr/do-we-need-a-managament-theory-for-community-building">Open World Forum 2011</a>, which marries the idea of a <a rel="nofollow" target="_blank" href="http://www.mindtools.com/pages/article/newLDR_94.htm">Sales Funnel</a> with software adoption in open source communities. It then extends that model to the progression of a potential user of your software, to becoming a user and possibly a developer in your project. I will also show how the funnel can be used as a health dashboard for your community and as a community management tool.</p>
<p>Besides having found its way into the Sales Process, the funnel analogy is commonly used in marketing, for <a rel="nofollow" target="_blank" href="http://www.loopfuse.com/blog/2010/07/22/freemium-and-opensource-funnels/">Freemium Adoption Models</a> as well as <a rel="nofollow" target="_blank" href="http://blog.pyramid.se/wp-content/uploads/2011/08/Social_Funnel.pdf">Social Networking</a> and  also <a rel="nofollow" target="_blank" href="http://ils.unc.edu/ISSS/papers/papers/rose.pdf">Information Seeking</a>.</p>
<h2>Key Constituencies in an Open Source Community</h2>
<p><a rel="nofollow" target="_blank" href="https://talesfromthecommunity.files.wordpress.com/2012/06/constituencies.png"><img class="alignright size-medium wp-image-365" title="Constituencies" src="https://talesfromthecommunity.files.wordpress.com/2012/06/constituencies.png?w=300" alt=""/></a>Before looking at funnels, it is worth looking at constituencies in an open source community. It should be relatively straightforward to define constituencies for  communities in general.</p>
<p><strong>Industry Segment:</strong> It helps to understand what industry segments your project is a part of. For Xen.org it is virtualization and cloud, for MySQL and PostgreSQL it is databases, etc. Why should people in a project care? A common project goal is to grow the project&#8217;s user base. Being known by as many people and vendors in your industry helps achive that goal. You will be in even better shape, when seen in a positive light.</p>
<p><span id="more-361"></span><strong>Interested People </strong>care about the industry segment you are in and follow the news for your project regulalry. In other words, they care enough about your project to follow what is going on. People in this group may not necessarily be users (there may not be an immediate need to use your software). Their main goal is to keep themselves informed.</p>
<p><strong>Users:</strong> These are direct users of your software or project. I tend to also include users of commercial software that builds on top of your project, as long as they know they use your software. This is not necessarily a given: for example AWS is built on top of the Xen hypervisor, but a large number of AWS users will not know that they use Xen. It frequently makes sense to group users by the level of engagement users give to stake-holders within and ourside of your community.</p>
<p><strong>Developers</strong> are individuals (and companies) that develop the software in your project. Typically these are also users.</p>
<h3>Progression</h3>
<p>People progress from the outer circle to the inner. At each step, there will be factors that influence progression. For example:</p>
<ul>
<li>How well is the project known</li>
<li>News and social media activity about the project</li>
<li>How easy it is to get started</li>
<li>How easy it is to overcome difficulties and to get support</li>
<li>How vibrant and active is the developer community</li>
<li>Etc.</li>
</ul>
<p>This is all very well understood by most open source practitioners. But it is sometimes difficult to explain all this in a simple model that can be easily understood by your manager or people whose support you need. In fact, having had difficulties getting funding for activities I wanted to start, led me to search for an effective tool to pitch my ideas. I found that there were no off-the-shelf solutions, but realized that communites can be described as funnels; albeit funnels with a difference to say a sales funnel.</p>
<h2>The Community Funnel</h2>
<p>The way I think about the funnel model is as a permeable and flexible membrane (or sieve) in the shape of a funnel. People travel through the funnel and drop out at various stages. As people travel through the funnel they assume roles which relate to typical activities and behaviours. This gives us one view of the <strong>Community Funnel</strong>.</p>
<p><a rel="nofollow" target="_blank" href="https://talesfromthecommunity.files.wordpress.com/2012/06/basicfunnel1.png"><img class="alignright size-full wp-image-403" title="Basic Funnel with people performing roles and their activities " src="https://talesfromthecommunity.files.wordpress.com/2012/06/basicfunnel1.png?w=640&#038;h=417" alt="" width="640" height="417"/></a></p>
<p>Then there are factors which lead to people dropping out of the funnel and other factors which keep them in. In other words: different areas of the funnel may have different permeability. Usually it is possible to indirectly (or directly) measure the permeability of the funnel boundary. It is also possible to take action to reduce (or increase) permeability for sections of the funnel.</p>
<p>In software adoption and particularly FOSS adption, a crucial stage of recruiting users is the trial of your software. Say, it is hard to find your download page, there are few useful instructions on how to get started or the software doesn&#8217;t work, a prospective user typically will give up and won&#8217;t return. A bad experience means my funnel is more permeable in the trial stage than a good experience. By improving the trial experience more people will progress to the next stage.</p>
<p><a rel="nofollow" target="_blank" href="https://talesfromthecommunity.files.wordpress.com/2012/06/funnelwithfactors.png"><img class="alignright size-full wp-image-410" title="A Funnel showing factors that impact permeability" src="https://talesfromthecommunity.files.wordpress.com/2012/06/funnelwithfactors.png?w=640&#038;h=309" alt="" width="640" height="309"/></a></p>
<p>The diagram above shows some example factors that affect the permeability of the funnel boundary. As an aside, the shape of the funnel (or rate of drop-outs at different stages) is controlled by the permeability of the boundary at different locations and the size of the mouth.</p>
<p>The goal of a community leader or manager is to reduce the permeability of the boundary and thus keep more people progressing down the funnel.</p>
<h2>Constructing a Funnel for my Community</h2>
<p>At this stage it is worth noting that not all communities have the same goal. Typical goals for open source communities are:</p>
<ul>
<li>Increase user base</li>
<li>Build a vibrant and diverse developer base</li>
<li>Secure the long-term future of the project</li>
<li>Upsell services or software to my users</li>
</ul>
<p>The goal of a community influences the roles people assume, what they typically do, what they care about and thus the factors that keep people in the funnel. As a community leader or manager, it should be possible to create a community funnel that reflects the goal of the community, the roles people assume as they travel down the funnel, their typical activities as well as factors that influence the permeability of the boundary. I will leave it up to the reader to test this and share ideas. I have tested this for the community goals listed above and believe that the model is flexible for most communities.</p>
<h2>Metrics and Funnels</h2>
<p>The <strong>Community Funnel Model</strong> is also extremely useful as a visualization tool. Open source community leaders usually measure a number of metrics, such as</p>
<ul>
<li>Media and press coverage</li>
<li>Social media buzz</li>
<li>Website visits</li>
<li>Comments on a blog</li>
<li>Downloads and upgrades</li>
<li>Number of conversations (answered and unanswered) on fora, mailing lists, etc.</li>
<li>Contributions</li>
<li>Etc.</li>
</ul>
<p>Such metrics can be mapped to a section on the funnel boundary. I usually set myself goals for these metrics and apply a simple traffic light scheme: red (bad), yellow (ok), green (good). I then map visualize select metrics on the boundary of the funnel, in effect using the funnel as a visual dashboard.</p>
<p>Going one step further, metrics related to the effectiveness of community activities and programs can also be displayed in the funnel using the traffic light approach.</p>
<p>When I started to work for Xen.org, lack of good documentation and the capability to find documentation was an issue that was frequently raised on mailing lists. To address this, we improved the infrastructure to make it easier to contribute and find documentation (by moving to MediaWiki) and started a monthly Documentation Day. This is a monthly on-line meeting where the majority of developers and many interested users get together and fix documentation.  I can measure the effectiveness of Documentation Day by</p>
<ul>
<li>Attendance on the day itself</li>
<li>The number of changes/additions made to the wiki on the day itself</li>
<li>The number changes/additions made to the wiki overall</li>
<li>The views and users of the wiki</li>
</ul>
<p>Placing community health metrics as well as indicators for community activities onto the Community Funnel, gives me an excellent overview of how well my community is doing.</p>
<h2>The Community Funnel as a Community Management Tool</h2>
<p>Generally, I found that the funnel analogy is extremely useful in many circumstances. It has been particularly powerful in the following circumstances:</p>
<ul>
<li>Assess the health of my community: the funnel serves as a model for my community and a health dashboard in one diagram. Combining these two is very powerful.</li>
<li>To communicate the importance of my community and the need to increased spending on certain activities. The funnel model is intuitively understood by most people. Due to the popularity of sales funnels in sales and marketing, a pitch for funds involving the  community funnel, makes your pitch more easily understood by decision makers.</li>
</ul>
<ul>
<li>The funnel analogy is also extremely useful to help me prioritize what to focus on by providing insights which are otherwise easy to miss: typically issues on the mouth (left) of the funnel lead to more people dropping out early. Fixing issues on the left affects more of your community over time and has thus a larger impact. Because the progression of people along the funnel takes time, issues at the mouth take longer to have a positive impact. For that reason you may want to focus on the left first. Other insights can be clusters of issues in one area of the funnel. Of course these are oversimplifications: but they help put things into perspective and provide a thought framework. A concrete example where this is useful, would be the question of whether a community should first fix issues with software adoption or a developer governance issue. If both solutions take similar effort, it is more advisable to fix adoption issue first. Even though this is clear to most community leaders, the funnel analogy can help explain your thinking better to others.</li>
</ul>
<h2>Conclusion</h2>
<p>My personal experience shows that the Community Funnel is extremely useful for &#8230;</p>
<ul>
<li>visualizing the health of your community</li>
<li>explaining how you manage a community to stake-holders in your community</li>
<li>making pitches to get extra funding</li>
<li>planning changes and evolving a community</li>
</ul>
<p>I would be very interested to hear other views, get feedback and comments. And of course I hope that some of my ideas will help your project and community.</p><br />  <a rel="nofollow" target="_blank" href="http://feeds.wordpress.com/1.0/gocomments/talesfromthecommunity.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/talesfromthecommunity.wordpress.com/361/"/></a> <img alt="" border="0" src="https://pixel.wp.com/b.gif?host=talesfromthecommunity.wordpress.com&#038;blog=14530685&#038;post=361&#038;subd=talesfromthecommunity&#038;ref=&#038;feed=1" width="1" height="1"/>]]></content:encoded>
         <media:content medium="image" url="https://0.gravatar.com/avatar/3e1c28f7ebb43b22538bcea6343672d6?s=96&amp;amp;d=identicon&amp;amp;r=G">
            <media:title type="html">larskurth</media:title>
         </media:content>
         <media:content medium="image" url="https://talesfromthecommunity.files.wordpress.com/2012/06/constituencies.png?w=300">
            <media:title type="html">Constituencies</media:title>
         </media:content>
         <media:content medium="image" url="https://talesfromthecommunity.files.wordpress.com/2012/06/basicfunnel1.png">
            <media:title type="html">Basic Funnel with people performing roles and their activities</media:title>
         </media:content>
         <media:content medium="image" url="https://talesfromthecommunity.files.wordpress.com/2012/06/funnelwithfactors.png">
            <media:title type="html">A Funnel showing factors that impact permeability</media:title>
         </media:content>
      </item>
      <item>
         <title>Lesson Learned: don't use $ in R formulas</title>
         <link>http://kerncomputing.blogspot.com/2012/03/lesson-learned-dont-use-in-r-formulas.html</link>
         <description>&lt;b id=&quot;internal-source-marker_0.16872231662273407&quot; style=&quot;font-family:'Times New Roman';font-size:medium;&quot;&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;Hello, &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;Today I was using Rminer for a class project. I ran into a small problem. &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;SV &amp;lt;- fit(trainingData$area~temp+rain+wind+RH,trainingData, model=&quot;svm&quot;,search=&quot;heuristic&quot;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;Error in if (transform == &quot;scale&quot; &amp;amp;&amp;amp; B != 0) x &amp;lt;- (x - A)/B else if (transform ==  : &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;  missing value where TRUE/FALSE needed&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;In addition: Warning messages:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;1: mean( ) is deprecated.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt; Use colMeans() or sapply(*, mean) instead. &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;2: sd( ) is deprecated.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt; Use sapply(*, sd) instead.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;Suboptimal. What has gone wrong? I stopped in svm.fit() and I confirmed the data frame still had 400 rows. However, the outindex variable becomes &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt; Browse[3]&amp;gt; outindex&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;integer(0)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;and thus the data frame becomes truncated.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;Browse[3]&amp;gt; data[, outindex]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;data frame with 0 columns and 400 rows&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;why is outindex 0?   &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;Browse[3]&amp;gt; output_index&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;svm.fit() uses the output_index() function to determine the index for the labels based on the formula. &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;outindex = output_index(x, names(data))&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;The function assumes the formula will only contain the field name not the fully qualified obj$field name. &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;function (x, namesdata) &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;    return(which(namesdata == (as.character(x)[2])))&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;The formula was trainingData$area~temp+rain+wind+RH.  So trainingData$area&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;Browse[3]&amp;gt; as.character(x)[2]&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;[1] &quot;trainingData$area&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;Doesn’t match &quot;area&quot;. &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;Browse[3]&amp;gt; names(data)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt; [1] &quot;X&quot;    &quot;Y&quot;    &quot;FFMC&quot; &quot;DMC&quot;  &quot;DC&quot;   &quot;ISI&quot;  &quot;temp&quot; &quot;RH&quot;   &quot;wind&quot; &quot;rain&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;[11] &quot;area&quot; &quot;sun&quot;  &quot;mon&quot;  &quot;tue&quot;  &quot;wed&quot;  &quot;thu&quot;  &quot;fri&quot;  &quot;sat&quot;  &quot;jan&quot;  &quot;feb&quot; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;[21] &quot;mar&quot;  &quot;apr&quot;  &quot;may&quot;  &quot;jun&quot;  &quot;jul&quot;  &quot;aug&quot;  &quot;sep&quot;  &quot;oct&quot;  &quot;nov&quot;  &quot;dec&quot; &lt;/span&gt;&lt;br /&gt;&lt;h2 dir=&quot;ltr&quot;&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;Better error checking would be most welcome but lesson learned. Don’t use the $ operator, which means to extract or replace parts of an object, in a formula. &lt;/span&gt;&lt;/h2&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;-jk&lt;/span&gt;&lt;/b&gt;</description>
         <author>John Kern</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-10428183.post-8555602695491095442</guid>
         <pubDate>Thu, 22 Mar 2012 12:42:00 +0000</pubDate>
      </item>
      <item>
         <title>Debugging R functions</title>
         <link>http://kerncomputing.blogspot.com/2012/03/debugging-r-function.html</link>
         <description>&lt;span id=&quot;internal-source-marker_0.5258820825256407&quot; style=&quot;font-family:'Times New Roman';font-size:medium;&quot;&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;Hello, &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;I'm using R for a introductory class in data mining. For the SVM, we are using the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://cran.r-project.org/web/packages/e1071/index.html&quot;&gt;e1071&lt;/a&gt; package.&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;While working on a homework problem, I learned a few things about. Since svm() is the function to create an SVM model, plot.svm()  plots it, right? The example on the help page works great. &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;color:rgb(63, 127, 79);font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;## more than two variables: fix 2 dimensions&lt;/span&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;br class=&quot;kix-line-break&quot;&gt;data(iris)&lt;br class=&quot;kix-line-break&quot;&gt;m2 &lt;/span&gt;&lt;span style=&quot;font-weight:bold;font-size:15px;font-family:Arial;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt; svm(Species&lt;/span&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;color:rgb(159, 63, 127);font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;~&lt;/span&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;., data = iris)&lt;br class=&quot;kix-line-break&quot;&gt;plot(m2, iris, Petal.Width &lt;/span&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;color:rgb(159, 63, 127);font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;~&lt;/span&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt; Petal.Length,&lt;br class=&quot;kix-line-break&quot;&gt;     slice = list(Sepal.Width = &lt;/span&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;color:rgb(0, 0, 127);font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;, Sepal.Length = &lt;/span&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;color:rgb(0, 0, 127);font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;))&lt;br class=&quot;kix-line-break&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;# Now let’s try the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://archive.ics.uci.edu/ml/datasets/Wine&quot;&gt;wine data&lt;/a&gt;. &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;# Next treat the last column as a numeric.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;modelRegression &amp;lt;- svm(wineData$quality~., data = wineData) &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;# and call plot. &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;plot(modelRegression, wineData, quality ~ alcohol,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;slice = list(&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;fixed.acidity = 8.32,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;volatile.acidity = 0.5278,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;citric.acid = 0.271,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;residual.sugar = 2.539,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;chlorides = 0.08747,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;free.sulfur.dioxide = 15.87,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;total.sulfur.dioxide = 46.47,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;density = mean(wineData$density ),&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;pH  = mean(wineData$pH), &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;sulphates = 0.6581&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;))&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;No plot is drawn. No error or warning generated. The function simple returns. Suboptimal. &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;Turns out R has some debug functions. Let’s use them to confirm plot.svm() is called.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&amp;gt; debug(plot)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&amp;gt; plot(modelRegression, wineData, quality ~ alcohol,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;+ &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;slice = list(&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;+ &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;fixed.acidity = 8.32,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;+ &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;volatile.acidity = 0.5278,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;+ &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;citric.acid = 0.271,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;+ &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;residual.sugar = 2.539,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;+ &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;chlorides = 0.08747,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;+ &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;free.sulfur.dioxide = 15.87,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;+ &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;total.sulfur.dioxide = 46.47,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;+ &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;density = mean(wineData$density ),&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;+ &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;pH  = mean(wineData$pH), &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;+ &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;sulphates = 0.6581&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;+ &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre;&quot;&gt; &lt;/span&gt;))&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;debugging in: plot(modelRegression, wineData, quality ~ alcohol, slice = list(fixed.acidity = 8.32, &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;    volatile.acidity = 0.5278, citric.acid = 0.271, residual.sugar = 2.539, &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;    chlorides = 0.08747, free.sulfur.dioxide = 15.87, total.sulfur.dioxide = 46.47, &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;    density = mean(wineData$density), pH = mean(wineData$pH), &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;    sulphates = 0.6581))&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;debug: UseMethod(&quot;plot&quot;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;Browse[2]&amp;gt; n&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;debugging in: plot.svm(modelRegression, wineData, quality ~ alcohol, slice = list(fixed.acidity = 8.32, &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;    volatile.acidity = 0.5278, citric.acid = 0.271, residual.sugar = 2.539, &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;    chlorides = 0.08747, free.sulfur.dioxide = 15.87, total.sulfur.dioxide = 46.47, &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;    density = mean(wineData$density), pH = mean(wineData$pH), &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;    sulphates = 0.6581))&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;debug: {&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;    if (x$type &amp;lt; 3) {&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;It is called. It has a guard condition. If the type if the model is &amp;gt;= 3, plot.svm() will simply return. &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;A closer reading of the documentation for plot.svm() reveals, “Generates a scatter plot of the input data of a svm fit for &lt;/span&gt;&lt;span style=&quot;font-weight:bold;font-size:15px;font-family:Arial;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;classification models &lt;/span&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;by highlighting the classes and support vectors”. The types are defined by svm(). &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;div dir=&quot;ltr&quot; style=&quot;font-weight:bold;&quot;&gt;&lt;table style=&quot;border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;border-color:initial;border-collapse:collapse;&quot;&gt;&lt;colgroup&gt;&lt;col width=&quot;49&quot;&gt;&lt;col width=&quot;568&quot;&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr style=&quot;height:0px;&quot;&gt;&lt;td style=&quot;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:dotted;border-right-style:dotted;border-bottom-style:dotted;border-left-style:dotted;border-top-color:rgb(170, 170, 170);border-right-color:rgb(170, 170, 170);border-bottom-color:rgb(170, 170, 170);border-left-color:rgb(170, 170, 170);vertical-align:top;padding-top:7px;padding-right:7px;padding-bottom:7px;padding-left:7px;&quot;&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;type&lt;/span&gt;&lt;/td&gt;&lt;td style=&quot;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:dotted;border-right-style:dotted;border-bottom-style:dotted;border-left-style:dotted;border-top-color:rgb(170, 170, 170);border-right-color:rgb(170, 170, 170);border-bottom-color:rgb(170, 170, 170);border-left-color:rgb(170, 170, 170);vertical-align:top;padding-top:7px;padding-right:7px;padding-bottom:7px;padding-left:7px;&quot;&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;svm can be used as a classification machine, as a regression machine, or for novelty detection. Depending of whether y is a factor or not, the default setting for type is C-classification or eps-regression, respectively, but may be overwritten by setting an explicit value.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;Valid options are:&lt;/span&gt;&lt;ul&gt;&lt;li style=&quot;list-style-type:disc;font-size:15px;font-family:Arial;vertical-align:baseline;&quot;&gt;&lt;span style=&quot;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;C-classification&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;list-style-type:disc;font-size:15px;font-family:Arial;vertical-align:baseline;&quot;&gt;&lt;span style=&quot;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;nu-classification&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;list-style-type:disc;font-size:15px;font-family:Arial;vertical-align:baseline;&quot;&gt;&lt;span style=&quot;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;one-classification (for novelty detection)&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;list-style-type:disc;font-size:15px;font-family:Arial;vertical-align:baseline;&quot;&gt;&lt;span style=&quot;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;eps-regression&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;list-style-type:disc;font-size:15px;font-family:Arial;vertical-align:baseline;&quot;&gt;&lt;span style=&quot;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;nu-regression&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;They start counting at zero. This function should really be called plot.svm.classifiction().  &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;-hth&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;John&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size:15px;font-family:Arial;font-weight:normal;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;“It ain’t what you don’t know that gets you into trouble. It’s what you know for sure that just ain’t so.” Mark Twain.&lt;/span&gt;&lt;/span&gt;</description>
         <author>John Kern</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-10428183.post-3867046399001148559</guid>
         <pubDate>Sun, 11 Mar 2012 14:52:00 +0000</pubDate>
      </item>
      <item>
         <title>Gotcha: Converting factors to numerics in R</title>
         <link>http://kerncomputing.blogspot.com/2012/03/gotcha-converting-factors-to-numerics.html</link>
         <description>&lt;div&gt;&lt;span&gt;Hello, &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;Over the past month or so, I have be using the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.r-project.org/&quot;&gt;R language&lt;/a&gt; for an introductory course on  data mining and machine learning. Today I wanted to talk about a language design decision with respect to R which I found surprising.  R uses factors to represent a discrete classification. A good example is eye color: &quot;brown&quot;, &quot;blue&quot; and &quot;green&quot;. &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;Yesterday, I was working with a &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://en.wikipedia.org/wiki/KNN&quot;&gt;k-nearest neighbor&lt;/a&gt;  library which returned its prediction as a factor of values: &quot;3&quot;,&quot;4,&quot;5,&quot;6&quot;,&quot;7&quot; and &quot;8&quot;.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;# kNN &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;predictKnn &amp;lt;- knn(trainingAttrs,testingAttrs,trainingLabels, k=bestK)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;# let's consider the first 10 elements. &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;zz &amp;lt;- predictKnn[1:10]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;gt; zz&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt; [1] 5 5 5 5 6 6 5 6 5 6&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;Levels: 3 4 5 6 7 8&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;gt; typeof(zz)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;[1] &quot;integer&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;gt; class(zz)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;[1] &quot;factor&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;To compare this with previous results, I needed to covert it to numeric. Let's apply the as.numeric() function.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;gt; as.numeric(zz)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt; [1] 3 3 3 3 4 4 3 4 3 4&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;Strange, did R just substract two? To get a better understanding let's consider a different set of factors. The variable ff represents eye color. &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;gt; ff&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;[1] blue  brown brown green blue  brown&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;Levels: blue brown green&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;gt; class(ff)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;[1] &quot;factor&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;There is no natural way to convert these strings into integer. What does R return? &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;gt; as.numeric(ff)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;[1] 1 2 2 3 1 2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;Upon closer inspect you'll notice these numbers correspond to the strings position in the vector returned by the levels() function. &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;gt; levels(ff)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;[1] &quot;blue&quot;  &quot;brown&quot; &quot;green&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;So what's happening to the original zz vector is R is returning the levels() index for each element in the vector.  Here is how the help page for factors recommends doing this convertion. &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;gt; as.numeric(levels(zz)[zz])&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt; [1] 5 5 5 5 6 6 5 6 5 6&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;-jk&lt;/span&gt;&lt;/div&gt;</description>
         <author>John Kern</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-10428183.post-4119266737493759402</guid>
         <pubDate>Wed, 07 Mar 2012 10:25:00 +0000</pubDate>
      </item>
      <item>
         <title>Driving Mobile Application Downloads</title>
         <link>http://mymobilecorner.blogspot.com/2011/11/driving-mobile-application-downloads.html</link>
         <description>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:21px;&quot;&gt;With iTunes now carrying&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:21px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:21px;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.distimo.com/appstores/app-store/18-Apple_App_Store_for_iPhone&quot; style=&quot;color:#cc0000;cursor:pointer;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;outline-color:initial;outline-style:none;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px;text-decoration:none;&quot;&gt;225,000&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:21px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:21px;&quot;&gt;apps in its &quot;curated&quot; collection and Android up to 100,000, it is no wonder that app discovery is a major issue for application developers. &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Undoubtedly, one of the key decisions in launching a successful mobile application is determining how to drive application downloads. &lt;br /&gt;&lt;br /&gt;Based on experience launching applications working in several mobile startups, I believe that there are at least six key mobile strategies to consider for driving adoption:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Why is mobile media support needed?&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Mobile media support is needed since we need to reach consumers who may already have a mindset or may already be used to certain types of applications (i.e. facebook, twitter, etc). There may also be a need to educate users on issues such as privacy, security, &amp;nbsp;and so on.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;What should be the average marketing spend?&lt;/li&gt;&lt;ul&gt;&lt;li&gt;As a result of analyzing download trends and media spend across various advertisers, several marketing experts have determined that the minimum mobile media spend is $200,000 over two days to truly make an impact and accelerate measurable downloads.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;When should you begin mobile media support?&amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;The day of week apparently matters. &amp;nbsp;To leverage typical download activity, it is suggested to launch your application and begin supporting it toward the end of the week - on a Thursday or Friday. This is allow you to build on the momentum of the weekend downloads.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;How robust should the mobile application be?&lt;/li&gt;&lt;ul&gt;&lt;li&gt;It is critical to make your application robust because &quot;first impression&quot; matters. If an application frequently crashes or if critical functionality does not work properly, then it is likely that your application may not be subsequently used. &amp;nbsp;While multiple features such as video, pictures, gaming and maps make for a bigger experience, if consumers cannot download the application and subsequent updates in certain WiFi zones, then it will most likely inhibit downloads.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Which form of advertising is more important: creative or contextual?&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Based on mobile campaigns with those of digital display, marketing experts have concluded that in mobile media efforts, the banner creative has more of an impact on performance. &amp;nbsp;However, in online campaigns, contextual is typically more important.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Which mobile devices need to be supported?&lt;/li&gt;&lt;ul&gt;&lt;li style=&quot;text-align:justify;&quot;&gt;If you want to maximize coverage, then it is recommended that your application must be cross platform (i.e. must support iOS devices such as iPhone 3, 3GS, 4 and Android devices such as Droid X and/or HTC Evo). &amp;nbsp;However, &amp;nbsp;keep in mind that the uber-smartphone market represents less than 20 percent of smartphone penetration. &amp;nbsp;Therefore, by including all phones that can access the Web, you will not only build scale, but you may also experience higher conversion rates from some of the less sophisticated devices.&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt;&lt;div style=&quot;text-align:justify;&quot;&gt;Driving application downloads is not the only factor for launching a successful mobile application, but it is certainly an important one.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;If you found this article useful, please retweet and/or leave me a comment.</description>
         <author>Tasneem Sayeed</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-248726242367252546.post-5219664412337791726</guid>
         <pubDate>Mon, 07 Nov 2011 18:19:00 +0000</pubDate>
      </item>
      <item>
         <title>Sequence Squeeze Contest</title>
         <link>http://kerncomputing.blogspot.com/2011/10/sequence-squeeze-contest.html</link>
         <description>Hello, &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.pistoiaalliance.org/&quot;&gt;Pistoia Alliance&lt;/a&gt;, a trade group composed of big pharma and a bunch of informatics companies, is sponsoring a contest.  The &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.sequencesqueeze.org/&quot;&gt;SequenceSqueeze&lt;/a&gt; challenges developers to develop an open source compression algorithm for Next Generation Sequencing(NGS) data. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;-jk&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description>
         <author>John Kern</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-10428183.post-8504574266693704235</guid>
         <pubDate>Wed, 26 Oct 2011 07:29:00 +0000</pubDate>
      </item>
      <item>
         <title>ACM hosts Data Mining Camp</title>
         <link>http://kerncomputing.blogspot.com/2011/10/acm-hosts-data-mining-camp.html</link>
         <description>&lt;div&gt;Hello, &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;These days massive amounts of data from a wide diversity of sources. I very interested in investigating how we can leverage data in general.  The &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sfbayacm.org&quot;&gt;local chapter of the ACM&lt;/a&gt; has organized a &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sfbayacm.org/event/data-mining-camp-october-2011&quot;&gt;data mining camp&lt;/a&gt; this Saturday. I'm planning to attend. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The morning &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.sfbayacm.org/introduction-mining-big-data-map-reduce&quot;&gt;session&lt;/a&gt; is an introduction to MapReduce. It looks pretty rigorous. Looking forward to it. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;-jk&lt;/div&gt;</description>
         <author>John Kern</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-10428183.post-4454276435491439954</guid>
         <pubDate>Wed, 12 Oct 2011 18:03:00 +0000</pubDate>
      </item>
      <item>
         <title>Learning from Extremes</title>
         <link>http://kerncomputing.blogspot.com/2011/07/learning-from-extremes.html</link>
         <description>&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Charles Leadbeater gave a provocative TED talk called &quot;Education innovation in the slums&quot;. &lt;/div&gt;&lt;br /&gt; &lt;embed src=&quot;http://video.ted.com/assets/player/swf/EmbedPlayer.swf&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;446&quot; height=&quot;326&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;He offers many references to interesting people and projects. It can be tough catching them in the video.  However, it is easy to find them in the companion white paper called &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.getideas.org/learning-extremes&quot;&gt;Learning from Extremes&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I particularly like the simply graph comparing setting (i.e., formal vs informal) and innovation type(i.e., sustaining vs disruptive).  &lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&quot;Improve schools through better facilities, teachers, and leadership.&quot; (sustaining/formal)&lt;/li&gt;&lt;li&gt;&quot;Supplement schools by working with families and communities.&quot; (sustaining/informal)&lt;/li&gt;&lt;li&gt;&quot;Reinvent schools to create an education better fit for the times.&quot; (disruptive/formal)&lt;/li&gt;&lt;li&gt;&quot;Transform learning by making it available in radically new ways.&quot; (disruptive/informal)&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Many of the ideas he presents come for other countries like &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.hole-in-the-wall.com/&quot;&gt;Sugara Mitra Hole in the Wall&lt;/a&gt; project in India or Rodrigo Baggio's &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://en.wikipedia.org/wiki/Center_for_Digital_Inclusion&quot;&gt;Centre for Digitial Inclusion&lt;/a&gt;. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;-jk&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</description>
         <author>John Kern</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-10428183.post-6877605389833310046</guid>
         <pubDate>Mon, 11 Jul 2011 07:40:00 +0000</pubDate>
      </item>
      <item>
         <title>Learning environments - adapting to change</title>
         <link>http://kerncomputing.blogspot.com/2011/07/im-taking-sabbatical.html</link>
         <description>&lt;div style=&quot;background-color:transparent;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;&quot;&gt;&lt;span id=&quot;internal-source-marker_0.024006027495488524&quot; style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:10pt;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;I'm taking a sabbatical.  Initially, I was trying to apply computers to environmental issues. While there is a lot happening with alternative energy, the smart gird and optimizing supply chains, I found I was specifically interested in biodiversity and conservation. Sadly, there isn't much happening here. &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space:pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:10pt;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:10pt;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;After struggling with this, I hit a small epiphany. I was watching a &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.ted.com/talks/nic_marks_the_happy_planet_index.html&quot;&gt;TED talk by Nic Marks&lt;/a&gt; on the happiness index.  &lt;embed src=&quot;http://video.ted.com/assets/player/swf/EmbedPlayer.swf&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;446&quot; height=&quot;326&quot;&gt;&lt;/iframe&gt; While I strongly agreed with it morally, I'm not convinced we can measure happiness. Anyway, he presented a chart. On the X axis is natural resource consumption and the Y axis is &quot;happiness&quot;. As you would expect, Western nations were in the upper right. They consume a lot of natural resources and are pretty happy. Nations in the lower left were mostly failed states where life is short and brutish. He highlighted a country that is light on natural resources and is pretty happy: Costa Rica. He went on to talk about the billions of people that will be coming on the planet and wanting a Western lifestyle. Most of whom will start life in slums of large cities. Normally when I think about this line of reasoning, providing people with material goods (e.g., cars, refrigerators, toasters etc.) comes to mind. However I have recently been reading some work by John Seely Brown former head of PARC. He just wrote a book called A &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family:Arial;font-size:13px;white-space:pre-wrap;&quot;&gt;New &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family:Arial;font-size:13px;white-space:pre-wrap;&quot;&gt;Culture of Learning. He observes change is accelerating. Over the course of the book he considers how computers systems can help people develop advanced learning environments. In addition to materialistic things, this new population will want an education. Standard methodologies of building schools and staffing them with teachers and faculty will not scale. Can we create learning environments where people could learn outside of the establishment? Many people consider the population explosion in environmental disaster. Can we turn that on its head by providing learning environments which allow them to collaborate and adapt to change quickly?&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color:transparent;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;&quot;&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:10pt;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color:transparent;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;&quot;&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:10pt;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;-jk&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color:transparent;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;&quot;&gt;&lt;span style=&quot;background-color:transparent;color:black;font-family:Arial;font-size:10pt;font-style:normal;font-variant:normal;font-weight:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</description>
         <author>John Kern</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-10428183.post-7456650223673852452</guid>
         <pubDate>Sun, 10 Jul 2011 08:15:00 +0000</pubDate>
      </item>
      <item>
         <title>Update on Carbide, EDC, Symbian, Nokia</title>
         <link>http://nokiacarbideoneclipse.blogspot.com/2011/05/update-on-carbide-edc-symbian-nokia.html</link>
         <description>Time for an update on the state of Carbide, the Eclipse Debugger for C/C++ (EDC), Symbian, and Nokia. As usual all comments and analysis are my own.&lt;br /&gt;&lt;br /&gt;We finally shipped &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.forum.nokia.com/info/sw.nokia.com/id/dbb8841d-832c-43a6-be13-f78119a2b4cb.html&quot;&gt;Carbide 3.2&lt;/a&gt; to the public! This is the first publicly available 3.x version of Carbide and the first new version seen outside of Nokia in over a year. It includes support for a new build system, a brand new on-device debugger built on top of EDC, and lots of usability improvements. The delay was a result of one of the many iterations of Nokia's strategy over the past few years: for much of 2010 and until February 11th of 2011 we were telling developers that our mobile platform was the Qt app framework, not Symbian. The Qt folks were busy building their own IDE (Qt Creator) and so it was thought that developers would be confused if they had Carbide available as well. So Carbide was designated a &quot;platform tool&quot; only for use by Nokia's thousands of internal developers.&lt;br /&gt;&lt;br /&gt;Then on February 11th our new CEO announced that Nokia would be using Microsoft's Windows Phone 7 software in the future and Symbian would be phased out over the next couple years. So our team has ended up in a &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://en.wikipedia.org/wiki/Wallace_Hartley&quot;&gt;strange position&lt;/a&gt;: we need to keep Carbide up to a high standard to support Nokia's continuing Symbian efforts but we know the plug will be pulled at some point, probably within the next year. Nokia has built in some flexibility for it's Symbian roadmap and arranged a soft landing by working out a deal to &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://press.nokia.com/2011/04/27/nokia-announces-plans-to-transfer-symbian-software-activities-to-accenture-accenture-to-provide-future-smartphone-ecosystem-services-to-nokia/&quot;&gt;transfer 3000 people to Accenture&lt;/a&gt; at the end of this year. Accenture will then contract us back to Nokia to do the remaining Symbian work.&lt;br /&gt;&lt;br /&gt;Our team's chief contribution to the Eclipse community over the past 24 months has been the Eclipse Debugger for C/C++ (EDC), part of the CDT project. Faced with the need for a new C/C++ debugger for Carbide and unhappy with any of the available options we designed and built one from the ground up. But the ground was already pretty rich: we leveraged all the work done in CDT's Debug Services Framework (DSF), used the CDT language parser for expression support, and relied on the Target Communications Framework (TCF) for low level debug services.&lt;br /&gt;&lt;br /&gt;The first version of EDC shipped with Helios but it was pretty raw as we hadn't yet shipped a Carbide product using it. Indigo EDC is a big improvement in stability, performance, and feature set and we got to fix a number of things we didn't get right on the first attempt. The two reference debuggers provided with EDC (Windows &amp;amp; Linux) still aren't near production quality but are great for introduction and testing and provide a good example of how to build a debugger around EDC.&lt;br /&gt;&lt;br /&gt;As we developed EDC we found other tools people interested in the idea and it reflects valuable contributions from the CDT community. As Carbide winds down I hope it continues to offer some value to anyone moving beyond their legacy debugger. I'd like to continue improving it and the rest of CDT but that awaits a volatile future.</description>
         <author>Ken Ryall</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-7742435659113733626.post-5123260458671633698</guid>
         <pubDate>Mon, 16 May 2011 13:01:00 +0000</pubDate>
      </item>
      <item>
         <title>Just Released: FREE Sudokroid (Sudoku Game Puzzle) in Android Market</title>
         <link>http://mymobilecorner.blogspot.com/2011/05/just-released-sudokroid-sudoku-game.html</link>
         <description>&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse:collapse;color:#666666;font-family:'Droid Sans', Arial, sans-serif;font-size:13px;line-height:19px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse:separate;color:#191919;font-family:Verdana, Helvetica, Arial, sans-serif;font-size:12px;line-height:16px;&quot;&gt;More than 10 billion apps have been downloaded since the launch of the Apple (&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#191919;font-family:Verdana, Helvetica, Arial, sans-serif;font-size:12px;line-height:16px;&quot;&gt;&lt;a rel=&quot;nofollow&quot; class=&quot;ticker&quot; target=&quot;_blank&quot; href=&quot;http://finance.paidcontent.org/paidcontent?Page=QUOTE&amp;amp;Ticker=AAPL&quot; style=&quot;color:#233d78;font-weight:bold;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;outline-color:initial;outline-style:none;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px;text-decoration:none;&quot; title=&quot;AAPL&quot;&gt;NSDQ: AAPL&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#191919;font-family:Verdana, Helvetica, Arial, sans-serif;font-size:12px;line-height:16px;&quot;&gt;) App Store—the majority of them via iPhones.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#191919;font-family:Verdana, Helvetica, Arial, sans-serif;font-size:12px;line-height:16px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#444444;font-family:Arial, Helvetica;font-size:12px;line-height:17px;&quot;&gt;As of March 2011, 37 percent of mobile consumers who owned a smartphone had a device with an Android OS. Apple’s iOS, claimed by 27 percent of consumers, is now outpacing Blackberry, which has 22 percent of the market.&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#444444;font-family:Arial, Helvetica;font-size:12px;line-height:17px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#191919;font-family:Verdana, Helvetica, Arial, sans-serif;font-size:small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse:collapse;font-size:12px;line-height:16px;&quot;&gt;It only seemed appropriate that one of the first mobile apps I decided to release was an Android app, Sudokroid, to the Android Market.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse:collapse;color:#666666;font-family:'Droid Sans', Arial, sans-serif;font-size:13px;line-height:19px;&quot;&gt;Sudokroid is a logic-based number placement puzzle, which initially starts with a partially completed 9x9 grid. The game provides the player with the options to start a &quot;New Game&quot;, &quot;Continue&quot; an existing game, an &quot;About Game&quot; option to get further details for playing the game, and finally &quot;Exit Game&quot; to exit from the game. &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse:collapse;color:#666666;font-family:'Droid Sans', Arial, sans-serif;font-size:13px;line-height:19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://3.bp.blogspot.com/-Oq1_8CjsDbc/TcOrFpnw53I/AAAAAAAAAg4/I2DYb5HCvKQ/s1600/sudokroid_main.png&quot; style=&quot;margin-left:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://3.bp.blogspot.com/-Oq1_8CjsDbc/TcOrFpnw53I/AAAAAAAAAg4/I2DYb5HCvKQ/s320/sudokroid_main.png&quot; width=&quot;192&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#666666;font-family:'Droid Sans', Arial, sans-serif;font-size:small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse:collapse;font-size:13px;line-height:19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse:collapse;color:#666666;font-family:'Droid Sans', Arial, sans-serif;font-size:13px;line-height:19px;&quot;&gt;When the player selects a &quot;New Game&quot; , it will let the player select the difficulty level from a choice of 3 levels: &quot;easy&quot;, &quot;medium&quot; and &quot;hard&quot;. A new game grid is displayed, partially filled, while splendid soothing music is playing in the background! &amp;nbsp;If &quot;Continue&quot; is selected, then the game continues from the previous game state.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://1.bp.blogspot.com/-LSFeds8HhAg/TcOnfwWvJ6I/AAAAAAAAAg0/ZXkI_vO4ARE/s1600/sudokroid-game.png&quot; style=&quot;margin-left:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://1.bp.blogspot.com/-LSFeds8HhAg/TcOnfwWvJ6I/AAAAAAAAAg0/ZXkI_vO4ARE/s320/sudokroid-game.png&quot; width=&quot;213&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:#666666;font-family:'Droid Sans', Arial, sans-serif;font-size:small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse:collapse;font-size:13px;line-height:19px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color:black;font-family:Times;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse:separate;font-size:small;line-height:normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;border-bottom-width:0px;border-collapse:collapse;border-color:initial;border-left-width:0px;border-right-width:0px;border-top-width:0px;color:#666666;font-family:'Droid Sans', Arial, sans-serif;font-size:13px;line-height:19px;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:1em;padding-left:0px;padding-right:0px;padding-top:0px;&quot;&gt;The goal of Sudokroid is to fill the grid so that each row, each column and each of the 3x3 boxes contains the digits 1 to 9 exactly once. &amp;nbsp;Hints are provided to help in the selection, and if a selection results in &quot;no move&quot;, then the player can go back to the previous tiles and revisit some of the prior moves. &lt;br /&gt;&lt;br /&gt;You can download the game for FREE from the Android Market from&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://market.android.com/details?id=com.tjs.game.sudoku&amp;amp;feature=search_result&quot;&gt;http://bit.ly/mO8qfE&lt;/a&gt;. &amp;nbsp;Be sure to rate it and tweet or leave me a comment ! &amp;nbsp;Stay tuned for more apps in the pipeline!&lt;/div&gt;</description>
         <author>Tasneem Sayeed</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-248726242367252546.post-4751681934072981409</guid>
         <pubDate>Fri, 06 May 2011 01:23:00 +0000</pubDate>
         <media:thumbnail height="72" url="http://3.bp.blogspot.com/-Oq1_8CjsDbc/TcOrFpnw53I/AAAAAAAAAg4/I2DYb5HCvKQ/s72-c/sudokroid_main.png" width="72" xmlns:media="http://search.yahoo.com/mrss/"/>
      </item>
      <item>
         <title>GSoC: first few lessons learned</title>
         <link>https://talesfromthecommunity.wordpress.com/2011/04/26/gsoc-first-few-lessons-learned/</link>
         <description>For the first time this year I have been admin for a Google Summer of code mentoring organization. Now as Google has announced the students, and while my impressions are still fresh, it&amp;#8217;s time to share some lessons. Don&amp;#8217;t allow &amp;#8230; &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://talesfromthecommunity.wordpress.com/2011/04/26/gsoc-first-few-lessons-learned/&quot;&gt;Continue reading &lt;span class=&quot;meta-nav&quot;&gt;&amp;#8594;&lt;/span&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;https://pixel.wp.com/b.gif?host=talesfromthecommunity.wordpress.com&amp;#038;blog=14530685&amp;#038;post=323&amp;#038;subd=talesfromthecommunity&amp;#038;ref=&amp;#038;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;</description>
         <guid isPermaLink="false">http://talesfromthecommunity.wordpress.com/?p=323</guid>
         <pubDate>Tue, 26 Apr 2011 05:28:33 +0000</pubDate>
         <content:encoded><![CDATA[<p>For the first time this year I have been admin for a Google Summer of code mentoring organization. Now as Google has announced the students, and while my impressions are still fresh, it&#8217;s time to share some lessons.</p>
<h3>Don&#8217;t allow old project ideas</h3>
<p><a rel="nofollow" target="_blank" href="https://talesfromthecommunity.files.wordpress.com/2011/04/codesummer.png"><img class="alignright size-full wp-image-324" src="https://talesfromthecommunity.files.wordpress.com/2011/04/codesummer.png?w=640" alt=""/></a>I allowed a few project ideas from 2010 into the 2011 list. None of them were very popular with students. I think there are two reasons:</p>
<ul>
<li>It&#8217;s too easy for mentors to just pick up an old idea. In the end there is a risk that the mentor doesn&#8217;t take GSoC and engaging with the students as seriously as he should and don&#8217;t get into the right mindset.</li>
<li>Applying for a GSoC project is a bit of a gamble for students too: good students will look at ideas lists from several years and will notice that an idea is old and just not apply.</li>
</ul>
<p><span id="more-323"></span>So, if an old idea is used (because it is still relevant), it is probably best to totally re-evaluate and write it from scratch.</p>
<h3>Pro-active mentors = Lots of good student applications</h3>
<p>We had 13 mentors, who fell roughly into two camps. Mentors who communicated with the students, but could have done better. Mentors who replied to students questions within a couple of days and ensured that there was communication about the proposal, the background, how to solve the actual problem, etc. Much of this discussion happened on a dedicated IRC channel. The projects by the mentors which were pro-active, had more student applications and the applications were of higher quality. As a result, the students working with pro-active mentors were more likely to win. Not entirely surprising. The lesson is, that as an org admin, it is important to work with the mentors early on and filter out proposals early if it becomes clear that the mentors behind these are may not be fully committed.  </p>
<h3>Unsolicited proposals need discussion with a mentor to succeed</h3>
<p>We had a number of unsolicited GSoC proposals. They fell into two categories: </p>
<ul>
<li>The proposal just appeared with little or no discussion with the mentor; in some case no mentor could be found. Needless to say, the proposal could not succeed.</li>
<li>The proposal idea was raised by the student in the community, which helped find a mentor early on. We had two such proposals, one of which succeeded.</li>
</ul>
<p>As an org admin, the challenge is to provide ways of enabling this in a structured way. </p>
<h3>A dedicated IRC channel and IRC meetings work</h3>
<p>We created a dedicated IRC channel where I and a few of our mentors were present at certain times of the week for students to ask questions. The channel also was used as a channel for mentors and students to have an IRC discussion at an agreed time. We also had a timed open IRC meeting which worked very well. Maybe one meeting is not enough: probably running one at the beginning and one towards the end of the application period is better.</p>
<h3>Build gates and motivators into your program</h3>
<p>Having a few goals to work towards, both for mentors and students helps focus minds. The GSoC timetable does this, but this is not enough. For example, some of our mentors participated in a mentor meeting early on, to discuss and formulate project ideas. The result were well formulated ideas. The meeting also helped build relationships amongst mentors: agreeing on which students should be chosen can be divisive and knowing each other helps. IRC meetings were good to stimulate engagement between students and mentors and led to draft proposals being made available by students early. And we had mentor meetings to rank student proposals (I disabled the ranking mechanism and forced mentors to attend the meetings). </p>
<h3>Encourage good students to hedge their bets</h3>
<p>We had a few projects, which had 5 students competing with each other. You could end up in a situation where the top 5 students apply for one project and only one can win. If there was an engaged discussion between mentor and student, the mentor will get a feeling for such situations and should encourage students to apply for another project, or even two. However, this only really works if mentors work together and co-ordinate.</p>
<h3>A well run program will lead to repeat applications</h3>
<p>Despite having to turn away good students (we just had too many good proposals), we had a few students thanking us for giving them support and leading them through the process. Hopefully these students will apply again in the following year and succeed.</p><br />  <a rel="nofollow" target="_blank" href="http://feeds.wordpress.com/1.0/gocomments/talesfromthecommunity.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/talesfromthecommunity.wordpress.com/323/"/></a> <img alt="" border="0" src="https://pixel.wp.com/b.gif?host=talesfromthecommunity.wordpress.com&#038;blog=14530685&#038;post=323&#038;subd=talesfromthecommunity&#038;ref=&#038;feed=1" width="1" height="1"/>]]></content:encoded>
         <media:content medium="image" url="https://0.gravatar.com/avatar/3e1c28f7ebb43b22538bcea6343672d6?s=96&amp;amp;d=identicon&amp;amp;r=G">
            <media:title type="html">larskurth</media:title>
         </media:content>
         <media:content medium="image" url="https://talesfromthecommunity.files.wordpress.com/2011/04/codesummer.png"/>
      </item>
      <item>
         <title>Getting on top of Social Networks</title>
         <link>https://talesfromthecommunity.wordpress.com/2011/03/29/getting-on-top-of-social-networks/</link>
         <description>As community manager I should know better and regularly publish on the blog. Well, it&amp;#8217;s been a very busy beginning of the year and taking over an existing community creates its own set of challenges. Besides community managers, I&amp;#8217;d expect &amp;#8230; &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://talesfromthecommunity.wordpress.com/2011/03/29/getting-on-top-of-social-networks/&quot;&gt;Continue reading &lt;span class=&quot;meta-nav&quot;&gt;&amp;#8594;&lt;/span&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;https://pixel.wp.com/b.gif?host=talesfromthecommunity.wordpress.com&amp;#038;blog=14530685&amp;#038;post=277&amp;#038;subd=talesfromthecommunity&amp;#038;ref=&amp;#038;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;</description>
         <guid isPermaLink="false">http://talesfromthecommunity.wordpress.com/?p=277</guid>
         <pubDate>Tue, 29 Mar 2011 15:07:36 +0000</pubDate>
         <content:encoded><![CDATA[<p><a rel="nofollow" target="_blank" href="https://talesfromthecommunity.files.wordpress.com/2011/01/socialnetwork.png"><img class="alignright size-full wp-image-278" title="SocialNetwork" src="https://talesfromthecommunity.files.wordpress.com/2011/01/socialnetwork.png?w=640" alt=""/></a>As community manager I should know better and regularly publish on the blog. Well, it&#8217;s been a very busy beginning of the year and taking over an existing community creates its own set of challenges. Besides community managers, I&#8217;d expect that many open source project leads which take over an existing project will face similar issues. The issue at hand this time: taking control of existing social networks.</p>
<p><strong>Becoming manager of existing social networks, groups, etc.</strong></p>
<p>The community I work has a presence in 40+ different social networks and other on-line services. Some support the concept of a group admin/manager. Others don&#8217;t and admin rights tend to be tied to a specific user ID. When you try and take over management of some social networks you can end up in a number of situations.</p>
<ul>
<li>The easy one is where there is the concept of an admin or manager: all you need to do is to ask another admin/manager to promote you to manager. Now this works easily if you your existing manager cares and knows their log-in details. Which for me was luckily mostly true.</li>
<li>The more probematic case is where managing a group is tied to a specific account and manager ownership cannot be transferred: there are quite a few sites where this is the case. What you essentially need to do is: get the password and change the profile. If the profile was personal, e.g. Joe Bloggs, make it generic (i.e. changed it from Joe Bloggs to Xen Community Manager) otherwise the next person will face the same problems. I also changed the profile such that it mentioned that Joe Blogs was community manager during a specific time period. This was necessary because some of the history in comments refers to Joe Bloggs, which may confuse users.</li>
<li>The worst case scenario is where the management role is tied to a specific universal ID and cannot be changed (such as a Google, Twitter or Facebook ID). I was surprised to find out that there are a quite few such services. In this case, you are stuck if your predecessor has used a personal ID which he/she will want to continue to use.</li>
</ul>
<p><span id="more-277"></span>It was a little bit surprised that a seemingly simple task like taking over the management of a few social networks was actually hard, tedious and rather inconvenient. Much harder than it should have beeen.</p>
<p>You can also run into other interesting problems:</p>
<ul>
<li>A previous manager may have forgotton a password</li>
<li>Or their account was tied to an e-mail address which does not exist any more (because he left a few months back)</li>
<li>In the meantime the account may have been disabled because an e-mail to said account bounces</li>
</ul>
<p>From my experience dealing with the support teams from some of the free social networks and services was slow and painful; in some cases non-existent. Where there was really good support, these services obviously needed to ensure that you didn&#8217;t try and abuse the service and take over somebodies identity. A disabled e-mail address does not help there.</p>
<p><strong>Thus, plan for the future<br />
</strong></p>
<p>The only way how to avoid such problems is to plan for the future. Basically you need to assume that you are run over by a bus tomorrow and ask yourself the question how   easy would it be for successor to get started.</p>
<p>Here are some tips how to do this:</p>
<ul>
<li>Where there are admins, make sure there are always several admins besides you. Make sure you always keep the list of admins up-to-date (i.e. replace an inactive admin with a new one).</li>
<li>Make sure the list of admins is written down somewhere. Some services don&#8217;t allow you to see who their admins are: so if you don&#8217;t know you can&#8217;t contact them. Googler Analytics is an example of one of those services.</li>
<li>Avoid using user IDs that are tied to your person. It&#8217;s OK to use your e-mail address if it is not used to identify your account and can be changed later.</li>
<li>Be careful not to use your personal twitter, google or other ID to create a new group. In particular when you know it cannot be changed later: or when you do not know. In this case, you probably want to create an identity which is tied to the job rather than yourself.</li>
<li>Make sure passwords are stored somewhere and shared with at least another person in your organisation.</li>
</ul>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong>Getting on top of the social media landscape<br />
</strong></p>
<p>When you start in a new community, one of the other challenges is to find out what goes on on the web. The easiest way to do this, is to use commercial tools such as <a rel="nofollow" target="_blank" href="http://www.lithium.com/">Lithium</a> or <a rel="nofollow" target="_blank" href="http://www.radian6.com/">Radian6</a> (note that by far these are not the only ones; google for &#8220;Social Media Monitoring&#8221; to find such services). Unfortunately almost all of these services are incredibly expensive and practically out-of-reach for open source users.</p>
<p><strong>There are free alternatives<br />
</strong></p>
<p>There are a number of free alternatives: you can use <a rel="nofollow" target="_blank" href="http://socialmention.com">socialmention.com</a>, which works really well if your project or community has a unique name. <a rel="nofollow" target="_blank" href="http://www.google.com/alerts">Google alerts</a> also works well in this case. You start getting into trouble when your project has a common name. Well, <strong>Xen</strong> is such a common name and you will need to use complex search expressions to exclude keywords as you come across false positives. In the case of Xen, I need to exclude an ever growing list of terms such as guru, travel, incense, art, yoga, &#8230; you name it. In this case, brush up your skills on creating complex search expressions (I thought I saved a link for you, but didn&#8217;t &#8230; sorry).</p>
<p>However I found that even with complex search expressions, you still will get a lot of noise. So the only way how to eventually get on top of these is to use <a rel="nofollow" target="_blank" href="http://www.google.com/reader/">Google Reader</a>, <a rel="nofollow" target="_blank" href="http://pipes.yahoo.com/pipes/">Yahoo Pipes</a> or <a rel="nofollow" target="_blank" href="http://tarpipe.com/">tarpipe</a> to create yourself an aggregated stream of trustworthy sources as you come across them using search, socialmention, etc.</p>
<p>You should also be able to use <a rel="nofollow" target="_blank" href="http://www.google.co.uk/cse/">Google Custom Search</a>, but I have not tried this.</p>
<p><strong>How do others cope?<br />
</strong></p>
<p>This is it for today: my bit of recent wisdom. I would really be interested to hear how others in open source or other community managers grapple with these problems.</p>
<p>And, I promise that I will at least write one article per month from now on.</p><br />  <a rel="nofollow" target="_blank" href="http://feeds.wordpress.com/1.0/gocomments/talesfromthecommunity.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/talesfromthecommunity.wordpress.com/277/"/></a> <img alt="" border="0" src="https://pixel.wp.com/b.gif?host=talesfromthecommunity.wordpress.com&#038;blog=14530685&#038;post=277&#038;subd=talesfromthecommunity&#038;ref=&#038;feed=1" width="1" height="1"/>]]></content:encoded>
         <media:content medium="image" url="https://0.gravatar.com/avatar/3e1c28f7ebb43b22538bcea6343672d6?s=96&amp;amp;d=identicon&amp;amp;r=G">
            <media:title type="html">larskurth</media:title>
         </media:content>
         <media:content medium="image" url="https://talesfromthecommunity.files.wordpress.com/2011/01/socialnetwork.png">
            <media:title type="html">SocialNetwork</media:title>
         </media:content>
      </item>
      <item>
         <title>Copying Memory</title>
         <link>http://nokiacarbideoneclipse.blogspot.com/2011/03/copying-memory.html</link>
         <description>I've been starting to clear some usability issues out of our backlog  and ran into one that seemed simple enough but eventually required a  little more thought and attention.&lt;br /&gt;&lt;br /&gt;When debugging  native code it's common to want to inspect memory so the Eclipse debug  platform offers a standard Memory view. The view can host a number of  memory renderings, each offering a different way of viewing a chunk of  memory.&lt;br /&gt;&lt;br /&gt;The &quot;traditional&quot; memory rendering is popular  with C/C++ developers because it works much like the memory views in  other debuggers and shows a range of memory in both binary and text  formats.&lt;br /&gt;&lt;br /&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left:auto;margin-right:auto;text-align:center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://lh5.googleusercontent.com/-TPpGSg6CRwU/TYJ8iii4CCI/AAAAAAAAAho/risA5hcU3jg/s1600/eclipse_trad.png&quot; style=&quot;margin-left:auto;margin-right:auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;105&quot; src=&quot;https://lh5.googleusercontent.com/-TPpGSg6CRwU/TYJ8iii4CCI/AAAAAAAAAho/risA5hcU3jg/s400/eclipse_trad.png&quot; width=&quot;400&quot;/&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align:center;&quot;&gt;&lt;span style=&quot;font-size:x-small;&quot;&gt;&quot;Traditional&quot; memory rendering from CDT&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left:auto;margin-right:auto;text-align:center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://lh5.googleusercontent.com/-Zz80nwQGlXI/TYO4fPVJLkI/AAAAAAAAAh4/vpCmL5zwOLc/s1600/Screen+shot+2011-03-18+at+2.53.53+PM.png&quot; style=&quot;margin-left:auto;margin-right:auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;115&quot; src=&quot;https://lh5.googleusercontent.com/-Zz80nwQGlXI/TYO4fPVJLkI/AAAAAAAAAh4/vpCmL5zwOLc/s400/Screen+shot+2011-03-18+at+2.53.53+PM.png&quot; width=&quot;400&quot;/&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align:center;&quot;&gt;Memory View in Xcode 4&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left:auto;margin-right:auto;text-align:center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://lh3.googleusercontent.com/--uUMqcy-5vg/TYJ8j6GdOsI/AAAAAAAAAhs/bnLbIoeVFWM/s1600/vs2008_mem.png&quot; style=&quot;margin-left:auto;margin-right:auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;127&quot; src=&quot;https://lh3.googleusercontent.com/--uUMqcy-5vg/TYJ8j6GdOsI/AAAAAAAAAhs/bnLbIoeVFWM/s400/vs2008_mem.png&quot; width=&quot;400&quot;/&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align:center;&quot;&gt;&lt;span style=&quot;font-size:x-small;&quot;&gt;Memory  view from Visual Studio 2008&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left:auto;margin-right:auto;text-align:center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://lh5.googleusercontent.com/-RCOfCE7NC8s/TYJ8h9SvZ5I/AAAAAAAAAhk/4pKjB3MqEXE/s1600/cw_mem.png&quot; style=&quot;margin-left:auto;margin-right:auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;144&quot; src=&quot;https://lh5.googleusercontent.com/-RCOfCE7NC8s/TYJ8h9SvZ5I/AAAAAAAAAhk/4pKjB3MqEXE/s400/cw_mem.png&quot; width=&quot;400&quot;/&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align:center;&quot;&gt;&lt;span style=&quot;font-size:x-small;&quot;&gt;Memory window from CodeWarrior in  2001&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&amp;nbsp;Our developer (I'll call him Tom because that's his real name) wanted to do something that seemed pretty simple: select a hex value, copy it to the clipboard, and then paste it into a variable in the Variables view. But  the global &quot;Copy&quot; command wasn't hooked up to the memory rendering so  it did nothing. Tom then discovered &quot;Copy to Clipboard&quot; in the context  menu.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://lh5.googleusercontent.com/-zT2FGNw3F14/TYJ_4lxw4RI/AAAAAAAAAh0/UdBqX3AWD6Q/s1600/menu01.png&quot; style=&quot;margin-left:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://lh5.googleusercontent.com/-zT2FGNw3F14/TYJ_4lxw4RI/AAAAAAAAAh0/UdBqX3AWD6Q/s1600/menu01.png&quot;/&gt;&lt;/a&gt;&lt;/div&gt;But the &quot;Copy to Clipboard&quot; command copied all of the selected  data from the rendering: addresses, binary, and text to the clipboard so it looked like this:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;&quot;&gt;0x7FFF5FBFED20&amp;nbsp; 74736574 00676E69 996E019D 3CBE8497 5FBFED40&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; testing...n...¾&amp;lt;@í¿_&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Tom had to paste this into a text editor, then select just the  binary/hex part, and finally had something to paste to set the value of  his variable. This sort of thing delights some people because they find a  work-around and then have another story to inflict on their colleagues,  but Tom had real work to do, expected better, and logged a bug. Our  team worked on other stuff that seemed more important until last week  when I went back to take another look.&lt;br /&gt;&lt;br /&gt;First I looked  to see if the rendering's support for &quot;Copy&quot; could just do the right  thing by grabbing the address, the binary data, or the text based on  which part had been clicked in last. While that would work in the narrow  case it wouldn't leave any indication of what it might do if you have  forgotten which area you clicked in last, and the ability to copy all  three (addresses, binary, text) would have been lost.&lt;br /&gt;&lt;br /&gt;There  needed to be a more explicit way to say which portion of the data you  wanted to copy. So I changed the context menu to provide all four  options.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://lh3.googleusercontent.com/-Eg9Z-F3_3fI/TYJ_06BNidI/AAAAAAAAAhw/8qyuFpr6Gdg/s1600/menu02.png&quot; style=&quot;margin-left:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;134&quot; src=&quot;https://lh3.googleusercontent.com/-Eg9Z-F3_3fI/TYJ_06BNidI/AAAAAAAAAhw/8qyuFpr6Gdg/s320/menu02.png&quot; width=&quot;320&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;This would make life better for Tom but still  wouldn't fix the &quot;select the hex data and hit control/command - c&quot;  scenario. So it also keeps track of one choice as the default option  that is used when fired by the global &quot;Copy&quot; command, which is now  hooked up to the rendering. Tom will have to select &quot;Binary&quot; once and  then Copy will work the way he expected.</description>
         <author>Ken Ryall</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-7742435659113733626.post-8199311871809575743</guid>
         <pubDate>Thu, 17 Mar 2011 16:04:00 +0000</pubDate>
         <media:thumbnail height="72" url="https://lh5.googleusercontent.com/-TPpGSg6CRwU/TYJ8iii4CCI/AAAAAAAAAho/risA5hcU3jg/s72-c/eclipse_trad.png" width="72" xmlns:media="http://search.yahoo.com/mrss/"/>
      </item>
   </channel>
</rss>
<!-- fe9.yql.bf1.yahoo.com compressed/chunked Thu Oct  1 21:13:24 UTC 2015 -->
