<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[Bonto.ch]]></title>
  <link href="http://www.bonto.ch/atom.xml" rel="self"/>
  <link href="http://www.bonto.ch/"/>
  <updated>2012-02-16T21:38:00+01:00</updated>
  <id>http://www.bonto.ch/</id>
  <author>
    <name><![CDATA[Junior B.]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[XCode 4.3 - Nice move Apple]]></title>
    <link href="http://www.bonto.ch/blog/2012/02/16/xcode-4-dot-3/"/>
    <updated>2012-02-16T21:19:00+01:00</updated>
    <id>http://www.bonto.ch/blog/2012/02/16/xcode-4-dot-3</id>
    <content type="html"><![CDATA[<p>So it&#8217;s been a long since my last post, I&#8217;ll return to write more I promise!
Happy day today, the announcement of Mac OS X 10.8 Mountain Lion (I think cats&#8217; names just ended) made me really excited about Notification Center in Mac OS X, maybe because we&#8217;ve a big product coming soon with a strong usage of notifications for iOS. The porting will be, at this point, mandatory&#8230;</p>

<!--more-->


<p>But, stop saying useless and not interesting things, it&#8217;s the day of XCode 4.3 and I&#8217;ll quickly post about the fact that has finally become a single bundled app.<br/>
I think this is due to the fact that Apple is pushing forward the sandboxing for all apps, of course they have to be an example, so they made Xcode a single app.</p>

<p>I was wondering about the fact that I have XCode 4.2 installed and I was thinking to uninstall it before procede to uninstall XCode 4.3&#8230; but, then I decide to go on without doing it, trusting in Apple engenieers and&#8230; I was right. On first launch, XCode 4.3 asks to agree to the EULA, then to install additional components. The important thing is that if you want to uninstall old Xcode installations (4.2 in my case), the system asks to do it right after the additional components installation. Just say yes if you want to do and start using XCode 4.3 without problems!</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Megavideo Panic]]></title>
    <link href="http://www.bonto.ch/blog/2012/01/24/megavideo-panic/"/>
    <updated>2012-01-24T16:29:00+01:00</updated>
    <id>http://www.bonto.ch/blog/2012/01/24/megavideo-panic</id>
    <content type="html"><![CDATA[<p>I have to say, the end of megaupload and megavideo made me laught a lot about people desperate because the main source of illegal movies and TV series has been shut down.</p>

<p>So, using ragebuilder I did this funny pic:</p>

<p><img src="http://i.chzbgr.com/completestore/2012/1/24/d5949311-028a-4d0c-999e-92d60783d2df.png" alt="Megavideo Rage!" /></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[MCMenuViewController on GitHub]]></title>
    <link href="http://www.bonto.ch/blog/2011/12/24/mcmenuviewcontroller-on-github/"/>
    <updated>2011-12-24T13:51:00+01:00</updated>
    <id>http://www.bonto.ch/blog/2011/12/24/mcmenuviewcontroller-on-github</id>
    <content type="html"><![CDATA[<p>I just released this code on GitHub. It&#8217;s still an early stage code, so please download it only if you&#8217;re an experienced developer.</p>

<p>Basically MCMenuViewController is a reproduction of the Menu in Facebook app (Path has both sides, this version only has left side).</p>

<!--more-->


<p>I reprodouced this component to use it inside an app, so I made it open source under MIT license. I created this component to be used as Root controller or as child in an UINavigationController.<br/><br/>
<a href="https://github.com/bontoJR/MCMenuViewController"><strong>GitHub</strong></a></p>

<p><img class="center" src="http://bonto.ch/images/content/mcmenuviewcontroller.png" width="320" height="480" title="MCMenuViewController" alt="MCMenuViewController"></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Disable Time Machine's local snapshots]]></title>
    <link href="http://www.bonto.ch/blog/2011/12/15/disable-time-machine-local-snapshots/"/>
    <updated>2011-12-15T20:20:00+01:00</updated>
    <id>http://www.bonto.ch/blog/2011/12/15/disable-time-machine-local-snapshots</id>
    <content type="html"><![CDATA[<p>Today I had this strange problem: deleting files without gaining free space and having it decreasing with no sense.
I started investigating what the hell was going on on my Macbook Air and, after half an hour of investigation,
I figured it out: Time Local Snapshots!</p>

<!--more-->


<p>I have my Macbook Air with Time Machine connected to an Ubuntu 10.04 server &#8216;faking&#8217; a Time Capsule, thank to <a href="http://netatalk.sourceforge.net/">Netatalk</a>, and I discovered that Mac OS X starting from Lion, has the local snapshot enabled as default on notebook.</p>

<p>This means that a local copy of files are keeped in the local drive, using space.
So, if you want to check how much space are the snapshots using, you just have to open the terminal and run:</p>

<p><code>sudo du -sh /.MobileBackups</code></p>

<p>This was on my machine:
<img class="center" src="http://bonto.ch/images/content/time_machine.png" width="298" height="163" title="MobileBackups size" alt="MobileBackups size"></p>

<p>From my point of view this is a waste of space so I decided to turn off this feature.
<a href="http://onethingwell.org/post/8515182393/disable-local-time-machine-backups">The command to do this is quite simple</a> (always using the Terminal):</p>

<p><code>sudo tmutil disablelocal</code></p>

<p>Immediately after this command, Time Machine should start a backup indexing all files from scratch and deleting the <strong>/.MobileBackups</strong> folder.</p>

<p><strong>P.S. Please be careful in doing this, I&#8217;m not responsible to any data loss or damages</strong></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Montessori Memory On App Store]]></title>
    <link href="http://www.bonto.ch/blog/2011/12/09/montessori-memory-on-app-store/"/>
    <updated>2011-12-09T00:01:00+01:00</updated>
    <id>http://www.bonto.ch/blog/2011/12/09/montessori-memory-on-app-store</id>
    <content type="html"><![CDATA[<p>I started this indie project called <a href="http://www.mochacode.ch">Mocha Code</a> a few weeks ago and I decided to make some Educational and Medical apps.</p>

<p>I decided to start with a really simple game that I found around the web: Montessori Memory.<br/>
The development wasn&#8217;t long as expected, I spent less that 2 week to complete the game and now I&#8217;m happy to announce that <a href="http://itunes.apple.com/us/app/montessori-memory/id483437061?ls=1&amp;mt=8">Montessori Memory is available on the App Store for iPhone and iPad (as universal app)</a>. <br/>
The app is for kids of 4-8 years old and has been localized in: English, French, Italian and German.</p>

<!--more-->


<p>Here some screenshots from the iPhone version:</p>

<p><img class="center" src="http://bonto.ch/images/content/Screenshot_24.png" width="480" height="320" title="Montessori Memory" alt="Montessori Memory"></p>

<p><img class="center" src="http://bonto.ch/images/content/Screenshot_28.png" width="480" height="320" title="Montessori Memory" alt="Montessori Memory"></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[JSON Libraries for iOS Comparison [Updated]]]></title>
    <link href="http://www.bonto.ch/blog/2011/12/08/json-libraries-for-ios-comparison-updated/"/>
    <updated>2011-12-08T22:59:00+01:00</updated>
    <id>http://www.bonto.ch/blog/2011/12/08/json-libraries-for-ios-comparison-updated</id>
    <content type="html"><![CDATA[<p>Yesterday I spent some time creating a simple test for JSON libraries and I wrote <a href="http://bonto.ch/blog/2011/12/06/json-libraries-for-ios-comparison/">a quick article about it</a>.</p>

<p>After few hours since the article has been published, I had a lot of visits on my blog, so I decide to improve the quality of the code and invest some time in getting more accurate results.</p>

<!--more-->


<p>I received a couple of good comments and the first one that made me think a lot was this:</p>

<blockquote><p>Some of these number don&#8217;t look right. Did you compile on release with no assertions?</p></blockquote>

<p>I have to be honest: I completely missed that point, I forgot to disable assertion or use a &#8216;Release&#8217; build configuration.
I decide to do all the tests again and, thank to some suggestions from <a href="https://github.com/steipete">steipete</a> in Github, I added the possibility to decide how many times the library will parse the file, this is for more accurate results and some useful stats like average, minimum and maximum. Adding some stats is good, but it&#8217;s better if you have some kind of graphic to represent these results, so I decided to add a graphic chart if the phone is turned in landscape after the parsing (<a href="http://www.highcharts.com/">thanks to HighCharts</a>).</p>

<p>Just fixing the assertion problem, results are now looking more accurate and they seem to be what I was expecting when I started this project.
Let&#8217;s see what are the new results starting from the twitter_timeline.json, using an iPhone 4S with iOS 5.0.1 (parsed 50 times):</p>

<p><img class="center" src="http://bonto.ch/images/content/twitter_timeline_2.png" width="320" height="480" title="Result for Twitter Timeline" alt="Twitter Timeline"></p>

<p>Now JSONKit is the top class library, the fastest one! NSJSONSerialization is the second one, following with a small gap and NextiveJSON is now the third, really close to the 2 top libraries. Now SBJSON is the 4th library and TouchJSON is the slowest, like in the previous test with the build configuration mistake.</p>

<p>Let&#8217;s see the result in a chart:
<img class="center" src="http://bonto.ch/images/content/twitter_timeline_2_chart.png" width="720" height="480" title="Chart for Twitter Timeline" alt="Twitter Timeline Chart"></p>

<p>Now it&#8217;s the time of repeat.json, the json file with a repeated structure. I did this test parsing the same file 100 times, this is a quite fast parse, so it&#8217;s not a big deal for an iPhone 4S.</p>

<p><img class="center" src="http://bonto.ch/images/content/repeat_2.png" width="320" height="480" title="Result for Repeat" alt="Repeat"></p>

<p>The results are the same of the previous test: JSONKit is the fastest library, followed again by NSJSONSerialization and NextiveJSON. SBJSON and Touch JSON are, again, the 2 slowest libraries.</p>

<p>Again, let&#8217;s see the chart:
<img class="center" src="http://bonto.ch/images/content/repeat_2_chart.png" width="720" height="480" title="Result for Repeat" alt="Repeat Chart"></p>

<p>Now it&#8217;s the time of the hardest json file, the one with 1000 objects with a random structure. I parsed this file only 5 times, because the process is longer than the other 2 and I think that 5 times is the minimum number for having a good stat.</p>

<p><img class="center" src="http://bonto.ch/images/content/random_2.png" width="320" height="480" title="Result for Random" alt="Random"></p>

<p>Even here, JSONKit is the best, doing better than NSJSONSerialization and NextiveJSON, both are following with a small gap. Always behind SBJSON and TouchJSON.</p>

<p>And&#8230; guess what? Chart time!
<img class="center" src="http://bonto.ch/images/content/random_2_chart.png" width="720" height="480" title="Result for Random" alt="Random Chart"></p>

<h2>Conclusion</h2>

<p>After using a release build configuration, things changed a lot, now the results are more accurate and using a chart to describe the results, it&#8217;s more clear the gap between the fastest library and the worst library.</p>

<p>At this point and without doubts, JSONKit is the best library, followed by NSJSONSerialization and NextiveJSON. SBJSON and TouchJSON are a little bit slower than the 3 bests libraries.</p>

<p>Next time I&#8217;ll do the serialization test, updating this project that has been update in <a href="https://github.com/bontoJR/iOS-JSON-Performance">Github</a>. Like the previous post, feel free to comment what you think and suggest improvements.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[JSON Libraries for iOS comparison]]></title>
    <link href="http://www.bonto.ch/blog/2011/12/06/json-libraries-for-ios-comparison/"/>
    <updated>2011-12-06T23:40:00+01:00</updated>
    <id>http://www.bonto.ch/blog/2011/12/06/json-libraries-for-ios-comparison</id>
    <content type="html"><![CDATA[<p>I think is one of the most common questions for an iOS developer:<br/>
<em>Which one is the best JSON library?</em></p>

<p>I think the best test that we can do is a quick benchmark, even if I think that
it&#8217;s not only the speed that makes a library better than others.</p>

<p>So, today I decided to do a quick performance project to check which of the following
libraries is the best one in terms of speed:</p>

<ul>
<li><a href="http://stig.github.com/json-framework">SBJson</a> - <em>Previously known as json-framework</em></li>
<li><a href="https://github.com/johnezang/JSONKit">JSONKit</a></li>
<li><a href="https://github.com/nextive/NextiveJson">NextiveJSON</a></li>
<li><a href="https://github.com/TouchCode/TouchJSON">TouchJSON</a></li>
<li><a href="http://developer.apple.com/library/ios/#documentation/Foundation/Reference/NSJSONSerialization_Class/Reference/Reference.html">NSJSONSerialization</a> - <em>Public API since iOS5</em></li>
</ul>


<p>To do this quick test (at the moment I&#8217;m only deserializing the JSON file) I create a project with all the libraries.<br/>
I also created 3 different kind of JSON file:</p>

<ol>
<li>A JSON file from public Twitter timeline</li>
<li>A random JSON file generated with 1000 records with variable objects *</li>
<li>A classic JSON file with 100 records with 2 objects *</li>
</ol>


<p>To generate the files marked with * I used this nice online tool: <a href="http://json-generator.appspot.com/">json-generator.appspot.com</a></p>

<h6><em>For the test I used an iPhone 4S with iOS 5.0.1.</em><br/><em>I&#8217;ll redo the test as soon as possible with an iPhone 4, iPhone 3GS and iPad 2.</em></h6>

<p><strong><a href="http://www.bonto.ch/blog/2011/12/08/json-libraries-for-ios-comparison-updated/">This post has been updated with more accurate results!</a></strong></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[SQL for Swiss Towns and Cantons]]></title>
    <link href="http://www.bonto.ch/blog/2011/11/28/sql-for-swiss-town-and-cantons/"/>
    <updated>2011-11-28T17:19:00+01:00</updated>
    <id>http://www.bonto.ch/blog/2011/11/28/sql-for-swiss-town-and-cantons</id>
    <content type="html"><![CDATA[<p>I&#8217;m developing this fantastic app that needs Towns and Cantons in Switzerland and
I found out that an SQL script to import these information was missing.
So I decide to create a repo in GitHub and add these 2 scripts. Now you can use them
when and where you want for any kind of project.</p>

<p>You can find the repo in <a href="https://github.com/bontoJR/Swiss-Cantons-and-Towns-SQL">Github</a> :)</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[New Start]]></title>
    <link href="http://www.bonto.ch/blog/2011/11/12/new-start/"/>
    <updated>2011-11-12T16:58:00+01:00</updated>
    <id>http://www.bonto.ch/blog/2011/11/12/new-start</id>
    <content type="html"><![CDATA[<p>I lost my old blog because my previous hosting service deleted my server 3 days before the announced day and unfortunately I lost the backups.
So I decided to restart with Octopress and recovering only my last post.<br/>
I hope you&#8217;ll enjoy this blog.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[MCFlashMessageView is out]]></title>
    <link href="http://www.bonto.ch/blog/2011/10/18/mcflashview-is-out/"/>
    <updated>2011-10-18T16:59:00+02:00</updated>
    <id>http://www.bonto.ch/blog/2011/10/18/mcflashview-is-out</id>
    <content type="html"><![CDATA[<p>My first open source code is out.<br/>
You can find it in <a href="https://github.com/bontoJR/MCFlashMessageView">GitHub</a>.<br/>
Basically is a class that gives you the opportunity to create a simple flash message, like the one used in the famous app Reeder.<br/>
Feel free to fork this project or to give me a feedback/feature request/criticism.<br/></p>
]]></content>
  </entry>
  
</feed>

