<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
      <title>Krzysztof Zabłocki </title>
      <generator uri="https://gohugo.io">Hugo</generator>
    <link>https://www.merowing.info/</link>
    <language>en-us</language>
    
    
    <updated>Mon, 04 Apr 2022 00:00:00 UTC</updated>
    
    <item>
      <title>Hot Reloading in Swift</title>
      <link>https://www.merowing.info/2022/04/hot-reloading-in-swift/</link>
      <pubDate>Mon, 04 Apr 2022 00:00:00 UTC</pubDate>
      
      <guid>https://www.merowing.info/2022/04/hot-reloading-in-swift/</guid>
      <description>&lt;figure class=&#34;center&#34;&gt;
    
        &lt;img src=&#34;https://www.merowing.info/2022/hot-reloading.jpg&#34;  /&gt;
    
    
&lt;/figure&gt;



&lt;p&gt;The year is 2040, and our newest MacBook M30X processors can compile large Swift projects perceivably instantaneously, sounds pretty amazing, right?&lt;/p&gt;

&lt;p&gt;Except, compiling the codebase is just part of our iteration cycle. Other ones include:
  - restarting it (or deploying it to the device)
  - navigating to the previous location where you were in the App
  - re-producing the data you need.&lt;/p&gt;

&lt;p&gt;It doesn&amp;rsquo;t sound too bad if you have to do it once. But what if you are like me and, on a typical day, do between &lt;strong&gt;200 - 500&lt;/strong&gt; iterations on the codebase? It adds up.&lt;/p&gt;

&lt;p&gt;There is a better way, embraced by other platforms and achievable in the Swift/iOS ecosystem. &lt;strong&gt;I&amp;rsquo;ve used it for over a decade.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you want to save up to 10h work per week, starting today?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Exhaustive testing in TCA</title>
      <link>https://www.merowing.info/2022/03/exhaustive-testing-in-tca/</link>
      <pubDate>Mon, 21 Mar 2022 00:00:00 UTC</pubDate>
      
      <guid>https://www.merowing.info/2022/03/exhaustive-testing-in-tca/</guid>
      <description>&lt;figure class=&#34;center&#34;&gt;
    
        &lt;img src=&#34;https://www.merowing.info/2022/exhausted.jpg&#34;  /&gt;
    
    
&lt;/figure&gt;



&lt;p&gt;I’ve worked on 5+ apps using &lt;a href=&#34;https://github.com/pointfreeco/swift-composable-architecture&#34;&gt;The Composable Architecture&lt;/a&gt; and I really like it but I’ve observed few issues that we can run into in bigger apps.&lt;/p&gt;

&lt;p&gt;As you probably know I’m also a big proponent of &lt;a href=&#34;https://merowing.info/2017/01/testing-ios-apps/&#34;&gt;TDD / BDD&lt;/a&gt;, so let’s start by talking about what I don’t like about the way TCA does testing.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Code-Review best practices</title>
      <link>https://www.merowing.info/2022/02/code-review-best-practices/</link>
      <pubDate>Mon, 21 Feb 2022 00:00:00 UTC</pubDate>
      
      <guid>https://www.merowing.info/2022/02/code-review-best-practices/</guid>
      <description>&lt;figure class=&#34;center&#34;&gt;
    
        &lt;img src=&#34;https://www.merowing.info/2022/collaboration.jpg&#34;  /&gt;
    
    
&lt;/figure&gt;



&lt;p&gt;No matter how experienced we are, we are bound to make mistakes in our work.&lt;/p&gt;

&lt;p&gt;This simple fact is one of the reasons why Code Reviews have become the cornerstone of software engineering processes around the world.&lt;/p&gt;

&lt;p&gt;Part of my job is building teams and establishing best practices for them to operate efficiently and collaboratively.&lt;/p&gt;

&lt;p&gt;But team practices shouldn&amp;rsquo;t just be coming from an individual, which is why I first interviewed a bunch of our engineers at &lt;a href=&#34;https://thebrowser.company&#34;&gt;The Browser Company&lt;/a&gt; around what is the goal of PR&amp;rsquo;s and Code reviews.&lt;/p&gt;

&lt;p&gt;In the spirit of giving back to the community, we&amp;rsquo;ve decided to share those practices.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Leave your ego at the door</title>
      <link>https://www.merowing.info/2021/11/leave-your-ego-at-the-door/</link>
      <pubDate>Mon, 08 Nov 2021 00:00:00 UTC</pubDate>
      
      <guid>https://www.merowing.info/2021/11/leave-your-ego-at-the-door/</guid>
      <description>&lt;figure class=&#34;center&#34;&gt;
    
        &lt;img src=&#34;https://www.merowing.info/2021/ego.jpg&#34;  /&gt;
    
    
&lt;/figure&gt;



&lt;p&gt;We define ego as a person’s sense of self-importance. It’s an attribute that contributes to building up your identity and figuring out what you want in life.&lt;/p&gt;

&lt;p&gt;But left unchecked, ego can lead to arrogance and ignorance.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Improving Composable Architecture Debugging</title>
      <link>https://www.merowing.info/2021/08/improving-composable-architecture-debugging/</link>
      <pubDate>Wed, 18 Aug 2021 06:43:04 &#43;0100</pubDate>
      
      <guid>https://www.merowing.info/2021/08/improving-composable-architecture-debugging/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been a fan of &lt;a href=&#34;http://pointfree.co/&#34;&gt;Point Free&lt;/a&gt; &lt;a href=&#34;https://github.com/pointfreeco/swift-composable-architecture&#34;&gt;Composable architecture&lt;/a&gt; for a while now.&lt;/p&gt;

&lt;p&gt;I&amp;rsquo;ve worked on TCA projects for more than a year on projects of all sizes: from smaller projects like my indie &lt;a href=&#34;https://www.merowing.info/sourcery-pro&#34;&gt;Sourcery Pro&lt;/a&gt;, through the &lt;a href=&#34;nytimes.com&#34;&gt;New York Times&lt;/a&gt; project, to a truly large codebase, a completely new browser for &lt;a href=&#34;thebrowser.company&#34;&gt;The Browser Company&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;TCA has been working great in all of them, but one thing that I was missing was an easy way to debug state changes, as the official &lt;code&gt;debug&lt;/code&gt; higher-order reducer doesn&amp;rsquo;t play well with large app states.&lt;/p&gt;

&lt;p&gt;So I thought: let&amp;rsquo;s create an interface that will not only deal with larger states, but also offer us a way to filter actions with ease:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-swift&#34;&gt;.debugDiffing(allowedActions: .allExcept(.hoverActions, .windowVisibility))
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Apple Treats interview</title>
      <link>https://www.merowing.info/2021/05/apple-treats-interview/</link>
      <pubDate>Wed, 05 May 2021 06:43:04 &#43;0100</pubDate>
      
      <guid>https://www.merowing.info/2021/05/apple-treats-interview/</guid>
      <description>&lt;p&gt;Yesterday I was interviewed by &lt;a href=&#34;https://twitter.com/AppleTreatsNews&#34;&gt;Apple Treats&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can watch the recording here:&lt;/p&gt;

&lt;div 
class=&#34;magnific-video mpf-iframe embed video-player &#34;&gt;
	&lt;iframe src=&#34;https://www.youtube.com/embed/nxzHcUTm20E&#34; type=&#34;text/html&#34;
		allowfullscreen
		frameborder=&#34;0&#34;
		width=&#34;100%&#34;
		height=&#34;385&#34;
	&gt;&lt;/iframe&gt;
&lt;/div&gt;



&lt;p&gt;Or &lt;a href=&#34;https://podcasts.apple.com/us/podcast/may-4-2021-sourcery-for-developers/id1553249730?i=1000520241454&#34;&gt;listen in Apple Podcasts&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Dear Xcode....</title>
      <link>https://www.merowing.info/2021/04/dear-xcode..../</link>
      <pubDate>Tue, 20 Apr 2021 06:43:04 &#43;0100</pubDate>
      
      <guid>https://www.merowing.info/2021/04/dear-xcode..../</guid>
      <description>&lt;p&gt;Two weeks ago I&amp;rsquo;ve released &lt;a href=&#34;https://www.merowing.info/sourcery-pro&#34;&gt;Sourcery Pro&lt;/a&gt;, the most powerful Xcode extension that exists.&lt;/p&gt;

&lt;p&gt;If you still didn&amp;rsquo;t check it out, you really should as it can save you 100+ hours by letting you automate a lot of repetitive code in your projects, from writing mocks through SwiftUI and Snapshots.&lt;/p&gt;

&lt;p&gt;Now let me tell you a bit about what Xcode extension offer and a couple of ideas for what Xcode team could add in future releases, to make tools like &lt;a href=&#34;https://www.merowing.info/sourcery-pro&#34;&gt;Sourcery Pro&lt;/a&gt; more powerful.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introducing Sourcery Pro</title>
      <link>https://www.merowing.info/2021/04/introducing-sourcery-pro/</link>
      <pubDate>Thu, 08 Apr 2021 10:43:04 &#43;0100</pubDate>
      
      <guid>https://www.merowing.info/2021/04/introducing-sourcery-pro/</guid>
      <description>&lt;p&gt;Today I&amp;rsquo;m happy to announce a new mac app that extends Xcode features.&lt;/p&gt;

&lt;p&gt;This is an effort of over 1000 hours, so if there was ever time to show your support for all the open source work I&amp;rsquo;ve done, it&amp;rsquo;s now.&lt;/p&gt;

&lt;p&gt;&lt;a href=&#34;https://www.merowing.info/sourcery-pro/&#34; title=&#34;Read More&#34;&gt;Read more&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Sourcery Pro</title>
      <link>https://www.merowing.info/sourcery-pro/</link>
      <pubDate>Wed, 07 Apr 2021 15:29:09 &#43;0200</pubDate>
      
      <guid>https://www.merowing.info/sourcery-pro/</guid>
      <description>Sourcery Pro is a Mac App that extends Xcode with the ability to create your own live templates that understand your code structure.
Do you hate writing same repetitive Swift patterns over and over again?
Now you don&amp;rsquo;t need to, it&amp;rsquo;s just a shortcut away.
 Buy Directly!   Popular use-cases:
 Create mock implementation from a selected protocol Add Codable support to enums with associated values Kickstart your Composable Architecture boilerplate Generate property level tests Generate test specs from your classes Generate SwiftUI view from a struct Create Prisms and Lenses for your data   It comes bundled with 14 starting templates and features a powerful Template editor with code completion, inline documentation, and a built-in error checker/linter that makes writing your custom automation a breeze.</description>
    </item>
    
    <item>
      <title>The Decade in Review</title>
      <link>https://www.merowing.info/2021/03/the-decade-in-review/</link>
      <pubDate>Mon, 15 Mar 2021 10:43:04 &#43;0100</pubDate>
      
      <guid>https://www.merowing.info/2021/03/the-decade-in-review/</guid>
      <description>&lt;p&gt;Lately, I&amp;rsquo;ve spent a significant amount of time thinking about my career: what I&amp;rsquo;ve done so far and what might lie ahead for me.&lt;/p&gt;

&lt;p&gt;To gain some perspective, I&amp;rsquo;ve decided to journal some of the things I&amp;rsquo;ve done over the last decade, and to share that with you.&lt;/p&gt;

&lt;p&gt;So below you will find some of my projects for the Cocoa community, as well as the highlights of commercial work I enjoyed and can talk about (NDA&amp;rsquo;s).&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Improve build times by extracting 3rd party tooling to processing script.</title>
      <link>https://www.merowing.info/2021/01/improve-build-times-by-extracting-3rd-party-tooling-to-processing-script./</link>
      <pubDate>Mon, 18 Jan 2021 00:00:00 UTC</pubDate>
      
      <guid>https://www.merowing.info/2021/01/improve-build-times-by-extracting-3rd-party-tooling-to-processing-script./</guid>
      <description>&lt;p&gt;A lot has been written about improving Swift compile times, but the compiler and linker are just part of the equation that slows down our development cycle.&lt;/p&gt;

&lt;p&gt;Most projects leverage great 3rd party tools like &lt;a href=&#34;https://github.com/realm/SwiftLint&#34;&gt;SwiftLint&lt;/a&gt;, &lt;a href=&#34;https://github.com/krzysztofzablocki/Sourcery&#34;&gt;Sourcery&lt;/a&gt;, &lt;a href=&#34;https://github.com/SwiftGen/SwiftGen&#34;&gt;SwiftGen&lt;/a&gt;, &lt;a href=&#34;https://github.com/nicklockwood/SwiftFormat&#34;&gt;SwiftFormat&lt;/a&gt; and many more. Leveraging those tools is the right thing to do but we have to be aware that all of those tools come with some time delay for our &lt;code&gt;build -&amp;gt; run&lt;/code&gt; development cycle.&lt;/p&gt;

&lt;p&gt;We often set those tools to run as build-phases which means they run each time you attempt a build but &lt;strong&gt;none of those tools need to be run each time we build&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Even tools that generate code we need for our projects like &lt;a href=&#34;https://github.com/krzysztofzablocki/Sourcery&#34;&gt;Sourcery&lt;/a&gt; or &lt;a href=&#34;https://github.com/SwiftGen/SwiftGen&#34;&gt;SwiftGen&lt;/a&gt; don&amp;rsquo;t need to be re-run unless we made changes in very specific parts of the application.&lt;/p&gt;

&lt;p&gt;As an example &lt;a href=&#34;http://nytimes.com&#34;&gt;New York Times&lt;/a&gt; main application leverages a lot of 3rd party and internal tooling, the total time all the tools take is 6s on my (powerful) machine.&lt;/p&gt;

&lt;p&gt;Only 6 seconds or as much as 6 seconds?
Let&amp;rsquo;s put this into context:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I build a project between 200-400 times on an average workday.&lt;/li&gt;
&lt;li&gt;Let&amp;rsquo;s assume 90% of the time we don&amp;rsquo;t need to run those tools with each build.&lt;/li&gt;
&lt;li&gt;We have 30 iOS developers working on the main app&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Lower limit: 200 * 6s * 30 * 90* =&amp;gt; &lt;strong&gt;9 hours wasted per day&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;We are wasting 45 hours per week&lt;/strong&gt;, if we can improve that it&amp;rsquo;s almost like hiring a new full-time developer, except it&amp;rsquo;s free.&lt;/p&gt;

&lt;p&gt;Let&amp;rsquo;s look at how we can improve this with a process change a dash of &lt;code&gt;bash&lt;/code&gt; shell programming.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Adding support for versioning and migration to your Codable models.</title>
      <link>https://www.merowing.info/2020/06/adding-support-for-versioning-and-migration-to-your-codable-models./</link>
      <pubDate>Wed, 10 Jun 2020 00:00:00 UTC</pubDate>
      
      <guid>https://www.merowing.info/2020/06/adding-support-for-versioning-and-migration-to-your-codable-models./</guid>
      <description>&lt;p&gt;&lt;code&gt;Codable&lt;/code&gt; is a great protocol for automating simple model persistence, but it lacks support for any kind of versioning or migrating the data from older versions.&lt;/p&gt;

&lt;p&gt;You can, of course, implement custom &lt;code&gt;Codable&lt;/code&gt; adherence and throw in a bunch of if statements and manual decoding to achieve this goal, but isn&amp;rsquo;t that kind of killing the main selling point of &lt;code&gt;Codable&lt;/code&gt;?&lt;/p&gt;

&lt;p&gt;Let&amp;rsquo;s look at an idea that adds Versoning yet still leverages derived &lt;code&gt;Codable&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Straighforward Data Snapshots</title>
      <link>https://www.merowing.info/2019/07/straighforward-data-snapshots/</link>
      <pubDate>Mon, 15 Jul 2019 00:00:00 UTC</pubDate>
      
      <guid>https://www.merowing.info/2019/07/straighforward-data-snapshots/</guid>
      <description>&lt;p&gt;If your app has a lot of content, chances are that by the time you get a chance to work on a bug report, the data that the bug appeared on will be long gone.&lt;/p&gt;

&lt;p&gt;Here are some tidbits on how I created a simple solution for that problem at &lt;a href=&#34;http://nytimes.com&#34;&gt;The New York Times&lt;/a&gt;, it&amp;rsquo;s based on a simple idea.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Finding exact difference between 2 instances</title>
      <link>https://www.merowing.info/2017/10/finding-exact-difference-between-2-instances/</link>
      <pubDate>Wed, 18 Oct 2017 12:30:51 &#43;0200</pubDate>
      
      <guid>https://www.merowing.info/2017/10/finding-exact-difference-between-2-instances/</guid>
      <description>&lt;p&gt;Have you ever written tests? Usually, they use equality asserts, e.g. XCTAssertEqual, what happens if the object isn&amp;rsquo;t equal? Xcode throws a wall of text at you:&lt;/p&gt;


&lt;figure class=&#34;center&#34;&gt;
    
        &lt;img src=&#34;https://raw.githubusercontent.com/krzysztofzablocki/Difference/master/Resources/before.png&#34;  /&gt;
    
    
&lt;/figure&gt;



&lt;p&gt;This forces you to manually scan the text and try to figure out exactly whats wrong, what if instead you could just learn which property is different?&lt;/p&gt;


&lt;figure class=&#34;center&#34;&gt;
    
        &lt;img src=&#34;https://raw.githubusercontent.com/krzysztofzablocki/Difference/master/Resources/after.png&#34;  /&gt;
    
    
&lt;/figure&gt;



&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>How to find retain cycles and memory leaks sooner</title>
      <link>https://www.merowing.info/2017/10/how-to-find-retain-cycles-and-memory-leaks-sooner/</link>
      <pubDate>Sun, 01 Oct 2017 12:30:51 &#43;0200</pubDate>
      
      <guid>https://www.merowing.info/2017/10/how-to-find-retain-cycles-and-memory-leaks-sooner/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/krzysztofzablocki/LifetimeTracker&#34;&gt;
&lt;figure class=&#34;center&#34;&gt;
    
        &lt;img src=&#34;https://raw.githubusercontent.com/krzysztofzablocki/LifetimeTracker/master/Resources/demo-circular.gif&#34;  /&gt;
    
    
&lt;/figure&gt;

&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;LifetimeTracker can surface retain cycle / memory issues right as you develop your application, and it will surface them to you immediately, so you can find them with more ease.&lt;/p&gt;

&lt;p&gt;Instruments and Memory Graph Debugger are great, but too many times developers forget to check for issues as they close the feature implementation.&lt;/p&gt;

&lt;p&gt;If you use those tools sporadicaly many of the issues they surface will require you to investigate the cause, and cost you a lot of time in the process.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
