<?xml version="1.0" encoding="UTF-8"?>
<rss version='2.0' xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Peter Jenkins</title>
    <description>Manhattan mobile software engineer.</description>
    <link>https://funroll.silvrback.com/feed</link>
    <atom:link href="https://funroll.silvrback.com/feed" rel="self" type="application/rss+xml"/>
    <category domain="funroll.silvrback.com">Content Management/Blog</category>
    <language>en-us</language>
      <pubDate>Wed, 16 Jul 2014 13:22:03 -0500</pubDate>
    <managingEditor>peter@funroll.co (Peter Jenkins)</managingEditor>
      <item>
        <guid>http://blog.funroll.co/xcode-refactoring-that-works#5976</guid>
          <pubDate>Wed, 16 Jul 2014 13:22:03 -0500</pubDate>
        <link>http://blog.funroll.co/xcode-refactoring-that-works</link>
        <title>Xcode refactoring that works</title>
        <description>A head-slappingly-simple tweak</description>
        <content:encoded><![CDATA[<p>So.... Xcode refactoring commands. I always liked that they were there.</p>

<p>I tried using them a few times. Then I stopped. They seemed slow and didn&#39;t work well. They always prompted me about this snapshot thing. Which seemed redundant with git but what the hell I can be cautious when it comes to my editor. The prompt looked something like this:</p>

<p><img alt="Silvrback blog image" src="https://silvrback.s3.amazonaws.com/uploads/1de3f31a-8796-4524-9080-12a3e0969a2a/Snapshots_large.png" /></p>

<p>So I said yes. Slooooow! Painful. Today I went back to use refactoring despite my previous experience. And just for the hell of it, I said no.</p>

<p>Totally different experience! All of a sudden, I don&#39;t get any more prompts when I go to refactor operations. Rename, extract method, etc. They&#39;re just fast and work well. And if you don&#39;t like the result, you can just do a normal undo.</p>

<p>How much time could I have saved by using these operations if I just knew to disable the stupid snapshotting functionality? A lot.</p>

<p>Now you know--just turn snapshotting off and rely on your normal editor&#39;s undo functionality combined with git. Which you trust more anyway.</p>

<p>Go forth and refactor with joy!</p>
]]></content:encoded>
      </item>
      <item>
        <guid>http://blog.funroll.co/coffeescript-write-once-run-anywhere#3106</guid>
          <pubDate>Sun, 20 Apr 2014 02:20:17 -0500</pubDate>
        <link>http://blog.funroll.co/coffeescript-write-once-run-anywhere</link>
        <title>CoffeeScript: Write once, run anywhere?</title>
        <description>Why I write `var`</description>
        <content:encoded><![CDATA[<p>I like CoffeeScript. It&#39;s a great little language. I like it so much that I never want to write regular JavaScript. But I do write regular JavaScript. </p>

<p><img alt="Silvrback blog image" src="https://silvrback.s3.amazonaws.com/uploads/34227ed2-1c38-4580-801c-65aa4394f36d/Wat8_large.jpg" /></p>

<p>Why?</p>

<p>Because sometimes I don&#39;t have CoffeeScript available to me. I could. <code>npm install coffee-script</code> is quick and easy. But sometimes I have a JavaScript execution environment and I don&#39;t have CoffeeScript.</p>

<p>I want a way to have it everywhere I have JavaScript, without having to think about it. I don&#39;t want to have to know if I should grab it from a cdn or install it via npm or fetch it via browserify. Or however I should do it with heroku. If I have a textarea where I can type JavaScript, I want to be able to just paste CoffeeScript instead and have it run.</p>

<p><img alt="Silvrback blog image" src="https://silvrback.s3.amazonaws.com/uploads/b7b3d159-0afe-4810-be71-3852bdfeb9ab/logo_large.png" /></p>

<p>So that&#39;s my goal. I figure the weakest and most portable and least coupled JavaScript execution environment you could have is an <code>eval</code>.</p>

<p>Here&#39;s where I&#39;m starting:</p>
<div class="highlight"><pre><span></span>var result = eval(&#39;\
    var a=0.5;\
    var b=0.5;\
    var c=a * b;\
    return c;
);
</pre></div>
<p>And here&#39;s where I want to be:</p>
<div class="highlight"><pre><span></span>var coffeescript = &#39;\
    a = 0.5
    b = 0.5
    c = a * b&#39;;
var begin-magic = // ...
var end-magic = // ...
var result = eval(begin-magic + coffee-script + end-magic);
</pre></div>
<p>And then I want to end up with the same result.</p>

<p>If I can do this, then I can write CoffeeScript and never have to go back to writing <code>var</code> because I&#39;m in some environment where I don&#39;t have it.</p>

<p>I haven&#39;t figured out how to do this yet. So I filed a <a href="http://stackoverflow.com/questions/23179054/compile-coffeescript-in-eval/">StackOverflow question</a> about it.</p>
]]></content:encoded>
      </item>
      <item>
        <guid>http://blog.funroll.co/pause-xcode-5-1-on-objective-c-exceptions#3082</guid>
          <pubDate>Fri, 18 Apr 2014 13:28:00 -0500</pubDate>
        <link>http://blog.funroll.co/pause-xcode-5-1-on-objective-c-exceptions</link>
        <title>Pause Xcode 5.1 on Objective-C exceptions</title>
        <description>A quick tutorial with screenshots</description>
        <content:encoded><![CDATA[<p>By default Xcode won&#39;t stop the debugger when an exception occurs. Instead it will just allow your app to crash. It can be helpful to inspect the state of the app at the point where the exception is thrown rather than reading through the logs after the fact.</p>

<p>By default, when you create a breakpoint, it&#39;s only for the current project. These steps show you how to make one that will stick around for all your projects.</p>

<p>Steps</p>

<ol>
<li>Open your Xcode project or workspace and pull up the Breakpoint Navigator. <code>View --&gt; Navigators --&gt; Show Breakpoint Navigator</code> or <code>Command + 7</code></li>
<li>Click the plus in the lower left hand corner and select <code>Add Exception Breakpoint</code></li>
</ol>

<p><img alt="Silvrback blog image" src="https://silvrback.s3.amazonaws.com/uploads/dc76291f-c0fa-4c00-a55d-3bb5eb5959b4/1_large.png" /></p>

<ol>
<li>Right click on the <code>All Exceptions</code> breakpoint that was created, and select <code>Move BreakPoint To --&gt; User</code>.</li>
</ol>

<p><img alt="Silvrback blog image" src="https://silvrback.s3.amazonaws.com/uploads/7c6dce52-e1cf-414e-9b3b-5955603d1d4e/2_large.png" /></p>

<p>Optional steps: Filter exception type</p>

<p>Some projects may not have this problem, but mine has non-Objective-c exceptions thrown regularly and I haven&#39;t figured out how to get rid of them. So I set my breakpoint to only stop on Objective-C exceptions.</p>

<ol>
<li>Right click on the breakpoint and choose <code>Edit</code></li>
</ol>

<p><img alt="Silvrback blog image" src="https://silvrback.s3.amazonaws.com/uploads/190cc845-651c-45cb-ab0f-75ac75081b1b/3_large.png" /></p>

<ol>
<li>Change the Exception drop down from <code>All</code> to <code>Objective-C</code></li>
</ol>

<p><img alt="Silvrback blog image" src="https://silvrback.s3.amazonaws.com/uploads/bca029ae-de7c-448a-85d1-29328faae1db/4_large.png" /></p>

<p>Finally, I recommend you ask everyone on your team to do the same. You&#39;ll find issues earlier. You may have exceptions being thrown in your project under non-exceptional circumstances currently. These make your breakpoint pretty useless. It can be some work to get rid those non-exceptional exceptions, but I think you&#39;ll find that work to be a worthwhile investment of your time.</p>

<p>If you have any questions / suggestions / feedback, please leave a comment.</p>
]]></content:encoded>
      </item>
  </channel>
</rss>