Chris Krycho - rewrite dev journalhttp://v4.chriskrycho.com/Sat, 26 Oct 2019 18:30:00 -0400rewrite Dev Journal: How Progress Doesn’t Feelhttp://v4.chriskrycho.com/2019/rewrite-dev-journal-how-progress-doesnt-feel.html<p><i><b><a href="https://v4.chriskrycho.com/2018/assumed-audiences.html">Assumed Audience</a>:</b> practitioners or interested lookers-on for software development—especially indies.</i></p>
<p>Today, I had about 3½ hours dedicated to working on <b><i>re</i>write</b> and I <em>did</em> make progress… but it sure didn’t feel like it.</p>
<p>For the past month or so, I’ve been sidelined from working on the project by way of getting <em>very</em> sick and then being swamped with travel for a conference followed by a friend’s wedding. I resolved, however, to get some things done today. I enjoyed that sense of momentum I had in those first couple weeks I was working, and I want it back.</p>
<p>Today’s work, however… <em>felt</em> exceedingly unproductive. It wasn’t. I was <em>learning</em>. Specifically, I was learning how Swift Packages and the <a href="https://github.com/apple/swift-package-manager">Swift Package Manager (<abbr>SPM</abbr>)</a> work, how they work with Xcode, and what they can and cannot do. In general, learning like this is necessary and valuable, and this specific knowledge domain is particularly necessary and valuable for me. For one thing, the details of how I’m building the app will make this very applicable very quickly. (More on that in a future update.) For another, because I work best when I have a good understanding of how the whole system works together.</p>
<p>The net of it, though, was that I came out with a good idea of how to use Swift Packages… and zero new lines of code written for the app itself. I may yet make a little progress this evening after my little girls are in bed, but the big takeaway for me today was the need to remind myself that <em>learning is a form of progress</em>. You might think that I, academically-minded and hyper-nerdy fellow that I am, would find that easy to remember. It turns out, though, that it <em>isn’t</em> easy to remember in the context of the desire to actually ship something!</p>
<p>I hope this dev journal entry serves as an encouragement to others doing development work. There’s value in these days. They’re not failures. They’re an integral part of the way you <em>get</em> to the day when you actually ship.</p>
<p>I know this because I’ve been here before. There was a time when I had no idea how I was going to ship that PHP app and I spent whole afternoons figuring out something about <a href="https://subversion.apache.org">SVN</a>—afternoons that did not feel like part of shipping, but which ultimately led me to recover from accidentally deleting my entire codebase. There was a time when I had no idea how a JavaScript <a href="https://en.wikipedia.org/wiki/Single-page_application">“single page application” (<abbr>SPA</abbr>)</a> could actually work, and spent <em>multiple</em> afternoons reading about <abbr title='application programming interface'>API</abbr>-driven applications—afternoons which did not feel productive, but ultimately led to the point where I’m in a technical leadership role on one of the biggest <abbr>SPA</abbr>s in the world. So I can say fairly confidently that however unproductive this afternoon’s work loading up an accurate understanding of <abbr>SPM</abbr> <em>will</em> yield dividends. And sooner than it feels like today!</p>
Chris KrychoSat, 26 Oct 2019 18:30:00 -0400tag:v4.chriskrycho.com,2019-10-26:/2019/rewrite-dev-journal-how-progress-doesnt-feel.htmlrewriterewrite dev journalsoftware developmentproductivityrewrite Dev Journal: How I Startedhttp://v4.chriskrycho.com/2019/rewrite-dev-journal-how-i-started.html<p><i><b><a href="https://v4.chriskrycho.com/2018/assumed-audiences.html">Assumed Audience</a>:</b> practitioners or interested lookers-on for software development—especially indies.</i></p>
<p>This week, I started the <i>actually writing software</i> phase of working on <a href="https://rewrite.software"><b><i>re</i>write</b></a>. As of yesterday evening, I actually have a bit of code that, although useless in every way, and not especially attractive, does in fact displays a single reference on an iPhone screen. I have an incredibly, impossibly long way to go.</p>
<p>It doesn’t matter: I <em>started</em>.</p>
<p>I had the day off on Monday courtesy of Labor Day, and I chose to spend the chunk of it that <em>wasn’t</em> focused on chores and housework and family time on actually getting this thing moving. I’ve been dreaming for over four years now. That time wasn’t wasted, by a long shot, but as I noted in <a href="https://v4.chriskrycho.com/2019/announcing-rewrite.html">my announcement post</a>, you can plan forever… or you can just start building at some point.</p>
<p>The problem I had—as I noted <a href="https://v4.chriskrycho.com/2019/starting.html">back in July</a>—is that I didn’t actually feel like I knew <em>how</em> to start. This a mammoth project, for one thing. For another, doing this kind of indie work requires dramatically improving my design and product chops. And of course, developing for native apps means learning whole new technology stacks as well!</p>
<p>I’ve known all along that the only way to get anywhere was to break the problem down. You know: the same as always in software development. Find something small to start on. I had already identified which <em>part</em> of the app to dig into first: reference management. This is a place where I could have something that is useful to <em>me</em> in reasonably short order (I want to be able to update my own reference library on my iPad!). Even that was daunting, though—still far too large.</p>
<p>So, Monday, I asked: <i>What is the smallest possible reference-related functionality I could build?</i> The answer, I concluded, was: <i>just display an existing library of references.</i> Then I went further, because “display an existing library of references” is surprisingly complicated. It involves, at a minimum:</p>
<ul>
<li>defining how to display a reference
<ul>
<li>…and therefore also designing the data structures representing references</li>
</ul></li>
<li>actually building that display</li>
<li>defining how to display a list of references to the user—which things to include, which not to, etc.</li>
<li>actually building that list</li>
<li>making it so that tapping on an item in a list displays the detailed view defined previously</li>
<li>making it so you can get back <em>out</em> of the detail view to the list view again</li>
<li>loading a list of references from somewhere, e.g. a BibTeX file from iCloud Drive</li>
<li>parsing that list of references into the internal data structures designed to represent them</li>
</ul>
<p>Now, for an experienced iOS or macOS developer, some of those things might feel trivial enough that they don’t even warrant their own bullet point. But I’m <em>not</em> an experienced iOS or macOS developer; I have no idea how to do any of this! What’s more breaking it down that way means that I have small, discrete tasks that I can go after in small blocks of time. Remember: this is a side project, which I am fitting in around my day job, my church commitments, and time with friends and family. I have to be able to make progress in small blocks of time! I have to <em>feel</em> that progress, at least a little, so that I can keep going.</p>
<p>Every bullet point on the list I came up with represents a discrete item of work. It not only <em>may</em> but <em>must</em> be small, so that I can do it in an evening or three. It needs to be done in such a way that later steps can build on it—but it doesn’t actually need to be anything like what those later steps will transform it into. It just needs to be enough to keep momentum moving, and done in such a way that later changes are not too difficult to make.<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a></p>
<p>Monday evening, I took the items I had identified and turned them into GitHub Issues in a GitHub project, called <b>Display a BibTeX Library</b>. (I’ll talk about how I’m using GitHub projects a little at some point in the future; it’s a nice flow so far.) Every single one of those items, no matter how apparently small, got its own card. One of them, about Swift-Rust interop, got a note saying, roughly, “I’m pretty sure this will need to be its own whole sub-project.” And looking at that list… I felt a lot less daunted! Every one of the tasks involves something I don’t know how to do yet—but only <em>one</em> thing I don’t know how to do yet, not <em>many</em>.</p>
<p>Last night, I took the first item on the list: display a single reference item. Not <em>parsing</em> them, not even from a string hard-coded into the app, and certainly not loading a file or anything like that. Just hard-coding in a data structure and displaying it on the screen. And, over the course of a few hours, including <em>lots</em> of searching<a href="#fn2" class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a> for answers about specific SwiftUI error messages,<a href="#fn3" class="footnote-ref" id="fnref3" role="doc-noteref"><sup>3</sup></a> I managed to implement that one thing.</p>
<p>As I said above: it’s <em>useless</em> in the strict sense. It’s not especially pretty, either. But it’s progress. I started. And now I have that little sense of momentum, and I can keep going!</p>
<section class="footnotes" role="doc-endnotes">
<hr />
<ol>
<li id="fn1" role="doc-endnote"><p>If you think this sounds like the ideas current in the best parts of agile software development—working to make future changes easy; iterating rapidly; delivering the smallest possible chunks of value, and doing so continuously—you’re not wrong!<a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn2" role="doc-endnote"><p>“Searching,” not “Googling,” because I only very rarely Google anything. I search, with <a href="https://duckduckgo.com">Duck Duck Go</a> as my starting point and its <a href="https://duckduckgo.com/bang">! search commands</a> as power tools for searches in specific places.<a href="#fnref2" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
<li id="fn3" role="doc-endnote"><p><em>Wow</em> could SwiftUI’s compiler diagnostics use some improvement! I sincerely hope that the Swift team in general and the SwiftUI folks in particular take a close look at Rust and Elm for inspiration here.<a href="#fnref3" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
Chris KrychoWed, 04 Sep 2019 21:30:00 -0400tag:v4.chriskrycho.com,2019-09-04:/2019/rewrite-dev-journal-how-i-started.htmlrewriterewrite dev journalsoftware developmentproductivity