<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Paul-Hudson on blog.iankulin.com</title><link>https://blog.iankulin.com/tags/paul-hudson/</link><description>Recent content in Paul-Hudson on blog.iankulin.com</description><generator>Hugo</generator><language>en-AU</language><lastBuildDate>Wed, 07 Dec 2022 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.iankulin.com/tags/paul-hudson/index.xml" rel="self" type="application/rss+xml"/><item><title>SwiftUI provides</title><link>https://blog.iankulin.com/swiftui-provides/</link><pubDate>Wed, 07 Dec 2022 00:00:00 +0000</pubDate><guid>https://blog.iankulin.com/swiftui-provides/</guid><description>&lt;img src="https://blog.iankulin.com/images/img_3476.png" width="284" alt=""&gt;
&lt;p&gt;A few hours after I speculated about pausing work on the tickets app because outputting the tickets was too far out of my expertise, a helpful instance of the &lt;a href="https://en.wikipedia.org/wiki/Frequency_illusion"&gt;Baader–Meinhof phenomenon&lt;/a&gt; threw up some help in the form of this tweet from &lt;a href="https://twitter.com/flowritescode"&gt;@FloWritesCode&lt;/a&gt;. It turns out this was an addition in iOS16 announced at WWDC that makes this straightforward.&lt;/p&gt;
&lt;p&gt;As soon as I googled around about it I also found good solutions that wrapped the old code to provide similar functionality. So that&amp;rsquo;s a lesson for me about not assuming something&amp;rsquo;s hard before I&amp;rsquo;ve spent some time investigating it. I took that lesson and applied it to rendering to a PDF, and of course, @twostraws &lt;a href="https://www.hackingwithswift.com/quick-start/swiftui/how-to-render-a-swiftui-view-to-a-pdf"&gt;has a code example&lt;/a&gt; for that from three days ago!&lt;/p&gt;
&lt;p&gt;Obviously I&amp;rsquo;m going to have some fiddling around to lay it out and so on, and I still need to figure out the share behaviour (which I&amp;rsquo;m expecting to be straightforward) but it feels like SwiftUI is just going to help me express my intents in code. I&amp;rsquo;m really enjoying this language, framework and community!&lt;/p&gt;</description></item><item><title>You Can Take Big Steps When You Feel Safe</title><link>https://blog.iankulin.com/you-can-take-big-steps-when-you-feel-safe/</link><pubDate>Wed, 09 Nov 2022 00:00:00 +0000</pubDate><guid>https://blog.iankulin.com/you-can-take-big-steps-when-you-feel-safe/</guid><description>&lt;p&gt;&lt;a href="https://www.deviantart.com/jhonair/art/Forest-of-giantess-604262747"&gt;&lt;img src="https://blog.iankulin.com/images/forest-of-giantess-jhonair.png" alt="" title="Forest-of-giantess By JhonAir"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.hackingwithswift.com/100/swiftui/58"&gt;Day 58&lt;/a&gt; of &lt;a href="https://www.hackingwithswift.com/100/swiftui"&gt;#100Days&lt;/a&gt; feels like complex topics are being dropped in pretty fast. We tackle one:many data relationships and how to set them up in CoreData, using CoreData constraints and setting a merge policy to manage conflicts, and even the underscore to access the actual property inside a wrapped property struct (needed for dynamic filtering in a view).&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve &lt;a href="https://blog.iankulin.com/top-four-reasons-why-twostraws-is-a-good-teacher/"&gt;mentioned before&lt;/a&gt; that I think Paul Hudson is an excellent teacher, and an example of this is that even though this was a day with a lot of challenging material, I&amp;rsquo;m not worried. I followed the discussion and tried the code, and more importantly I&amp;rsquo;m anticipating these new skills will be practiced in the next app, and probably shortly after I&amp;rsquo;ll be writing an app using them.&lt;/p&gt;
&lt;p&gt;When learners feel safe and supported, they are comfortable taking bigger risks. This has the effect of growing their Zone of Proximal Development and allows faster learning.&lt;/p&gt;
&lt;p&gt;Some of the complexity around CoreData relates to it&amp;rsquo;s pre-SwiftUI age - it has a lot of power, and does a lot for the developer but is full of non-intuitive bits. The rest of the complexity is really just related to it&amp;rsquo;s job - any object graph persistence that&amp;rsquo;s going to allow us to think of, and work with, our data as native objects is going to have to expose some of the complexity of what&amp;rsquo;s happening underneath in order to provide the flexibility needed. What&amp;rsquo;s not so evident in this implementation is Swifts progressive disclosure of complexity. It&amp;rsquo;s easy to imagine a modern rewrite of a more Swift-like object persistence framework being less scary.&lt;/p&gt;
&lt;p&gt;Since CoreData is using SQLite underneath, an interesting question is what the same code would look like if you pulled in an SQLite library and handled things manually - to approach the same functionality - ie not refetching when a view is recreated if the data hasn&amp;rsquo;t changed, lazy list building etc. My guess is: a lot more complex.&lt;/p&gt;</description></item><item><title>Top Four Reasons why @TwoStraws is a Good Teacher</title><link>https://blog.iankulin.com/top-four-reasons-why-twostraws-is-a-good-teacher/</link><pubDate>Tue, 01 Nov 2022 00:00:00 +0000</pubDate><guid>https://blog.iankulin.com/top-four-reasons-why-twostraws-is-a-good-teacher/</guid><description>&lt;p&gt;&lt;a href="https://blog.iankulin.com/images/screen-shot-2022-10-29-at-1.28.59-pm.png"&gt;&lt;img src="https://blog.iankulin.com/images/screen-shot-2022-10-29-at-1.28.59-pm.png" width="241" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="good-questions"&gt;Good Questions&lt;/h4&gt;
&lt;p&gt;At various points in the &lt;a href="https://www.hackingwithswift.com/100/swiftui"&gt;100 Days of SwiftUI&lt;/a&gt; course, you get asked sets of questions to check you&amp;rsquo;ve understood the preceding material. They&amp;rsquo;re usually presented as two different statements, one of which is true, and the other false. It&amp;rsquo;s actually a really good technique - the student feels like they&amp;rsquo;ve got a couple of opportunities to figure it out, plus they are forced to read both statements and think about them. Paul does a similar thing in the Unwrapped app - there, the questions are often presented as &amp;ldquo;Is this valid Swift code&amp;rdquo; and the user needs to scan through it all looking for mistakes. It&amp;rsquo;s checking your understanding, and making you a thoughtful debugger!&lt;/p&gt;
&lt;h4 id="zone-of-proximal-development"&gt;Zone of Proximal Development&lt;/h4&gt;
&lt;p&gt;You know how if something is too easy, it&amp;rsquo;s not engaging? It&amp;rsquo;s why you don&amp;rsquo;t choose Snap when you sit down to play cards. It&amp;rsquo;s so far below your skill level your brain is not interested in it. There&amp;rsquo;s a similar problem at the other end - if I ask you do try something that&amp;rsquo;s so hard for you that you&amp;rsquo;ll never be able to achieve it, you want want to do it again. For good learning to take place, it&amp;rsquo;s important to pitch the difficulty of activities just ever so slightly in advance of what the student can comfortably do. This is the zone where the most learning takes place in the shortest amount of time.&lt;/p&gt;
&lt;h4 id="learning-in-context"&gt;Learning in Context&lt;/h4&gt;
&lt;p&gt;Logically, you could teach iOS development with a semester of pure Swift teaching before you got to your first app. Probably there are courses that do that, but if you want to engage your learners do it with as much real life context and hands-on activity as possible. #100Days is all about this.&lt;/p&gt;
&lt;h4 id="beginner-mind"&gt;Beginner Mind&lt;/h4&gt;
&lt;p&gt;In the videos/lessons, Paul often anticipates how the learner might expect something to work, or how they might tackle a problem, before explaining the problem with that thinking or showing a better way of doing things. This is a great trait of a teacher. Often it&amp;rsquo;s difficult for experts (which Paul undoubtedly is) to recall how things looked to them as they were learning. Anticipating the state of mind of the learner, and moving them from that point is both comforting for the learner, and avoids confusion.&lt;/p&gt;
&lt;h4 id="currency"&gt;Currency&lt;/h4&gt;
&lt;p&gt;As soon as you start googling problems and reading blog posts or StackOverflow answers, it becomes apparent that the rapid development of Swift and SwiftUI has a downside - a lot of the helpful information put out there is out of date. Like everyone, I&amp;rsquo;m amazed at the work Paul puts in to producing his massive amount of content, and then keeping it up to date. If there&amp;rsquo;s a Hacking With Swift result in a search you&amp;rsquo;ve made, that&amp;rsquo;s the one to click on.&lt;/p&gt;</description></item><item><title>Sean != Erica</title><link>https://blog.iankulin.com/sean-erica/</link><pubDate>Sun, 04 Sep 2022 00:00:00 +0000</pubDate><guid>https://blog.iankulin.com/sean-erica/</guid><description>&lt;p&gt;When Swift was newer, there was a bunch of podcasts about it - in early episodes of &lt;a href="https://podcasts.apple.com/au/podcast/fireside-swift/id1269435221"&gt;Fireside Swift&lt;/a&gt; the existence of a Swift Podcast Network is often mentioned, but now it&amp;rsquo;s more of an established language there&amp;rsquo;s a bit less current content to listen to, and what there is, is less focused on learning Swift and more about what&amp;rsquo;s happening in the community.&lt;/p&gt;
&lt;p&gt;Being firmly in the camp of needing to learn more about the language, I&amp;rsquo;ve listen to a number of older podcasts, or even current ones (such as Fireside) but their older episodes. It is sort of an odd experience traveling on several slightly out of sync timelines, but quite a joy to see what happens to predictions - like the occasion when &lt;a href="https://twitter.com/twostraws"&gt;Paul Hudson&lt;/a&gt; predicts that an &amp;ldquo;Xcode lite&amp;rdquo; on iPad is unlikely to be able to write apps until a more swift like framework for developing interfaces exists.&lt;/p&gt;
&lt;p&gt;One of the podcasts I&amp;rsquo;m working through by every episode is Paul&amp;rsquo;s &lt;a href="https://podcasts.apple.com/au/podcast/swift-over-coffee/id1435076502"&gt;Swift Over Coffee&lt;/a&gt;. The first season he was paired up with &lt;a href="https://seanallen.co/"&gt;Sean Allen&lt;/a&gt;, but I&amp;rsquo;ve just started the second season with &lt;a href="https://ericasadun.com"&gt;Erica Sadun&lt;/a&gt;. When I first came across Sean it took me a while to warm to his enthusiastic voice, but what I loved about him was he was never reluctant to ask Paul to explain something - usually something I needed explained as well. The dynamic of an expert (and expert teacher) co-hosting with a relative newbie was a great combination for me.&lt;/p&gt;
&lt;p&gt;Erica is a giant in the Swift community, and she has a deep understanding and an wide knowledge of Swift topics, so she&amp;rsquo;s going to be great. In the first episode she and Paul riffed on a heap of interesting topics with great enthusiasm and clear enjoyment, but I did miss Sean asking for explanations!&lt;/p&gt;</description></item><item><title>Uwrap App</title><link>https://blog.iankulin.com/uwrap-app/</link><pubDate>Thu, 25 Aug 2022 00:00:00 +0000</pubDate><guid>https://blog.iankulin.com/uwrap-app/</guid><description>&lt;img src="https://blog.iankulin.com/images/img_2549.png" width="269" alt=""&gt;
&lt;p&gt;Part of the &lt;a href="https://twitter.com/twostraws"&gt;@twostraws&lt;/a&gt; programmatic universe is his Swift learning app, &lt;a href="https://apps.apple.com/us/app/unwrap/id1440611372"&gt;Unwrap&lt;/a&gt; that I&amp;rsquo;ve included in my learning goals. It presents little snippets of learning with a 60 second video, and in a written version, then tests the user to check their understanding. It is slightly gamified - you get points for answers, but it&amp;rsquo;s not clear to me how that works beyond the satisfying haptics when your score runs up at the end of a section.&lt;/p&gt;
&lt;p&gt;The tests so far (I&amp;rsquo;m up to Functions) have been code examples along with a &amp;ldquo;true or false&amp;rdquo; question for the set - often &amp;ldquo;This code is valid Swift&amp;rdquo;, but sometimes things like &amp;ldquo;This code prints four messages&amp;rdquo;. At first, I didn&amp;rsquo;t love the tests as they often didn&amp;rsquo;t test the thing I&amp;rsquo;d just learned. For example in the unit about for loops, the hidden error in some code might have been an undeclared variable being used. But the effect of this has been to make me look at each example carefully to look for errors - in the process I&amp;rsquo;ve learned the Swift syntax well (which I would otherwise have relied on Xcode to help me with), and sharpened my ability to spot errors (that I would otherwise have relied on the compiler to help me with).&lt;/p&gt;
&lt;img src="https://blog.iankulin.com/images/img_2553.png" width="142" alt=""&gt;
&lt;p&gt;The screen shots here are from my SE2 iPhone - so on a sensible sized device the code may be a little easier to read (no it does not to landscape on the phone). I do value having it on the phone though - it&amp;rsquo;s perfect for making good use of tiny bites of time through the day which would be Swift learning free otherwise.&lt;/p&gt;
&lt;p&gt;Even if you&amp;rsquo;re not following one of Paul&amp;rsquo;s Hacking with Swift courses, the Unwrap app is a great way to polish your Swift knowledge.&lt;/p&gt;</description></item><item><title>Playgrounds are good</title><link>https://blog.iankulin.com/playgrounds-are-good/</link><pubDate>Mon, 22 Aug 2022 00:00:00 +0000</pubDate><guid>https://blog.iankulin.com/playgrounds-are-good/</guid><description>&lt;p&gt;&lt;img src="https://blog.iankulin.com/images/img_2778.png" alt=""&gt;&lt;/p&gt;
&lt;p&gt;A couple of times (&lt;a href="https://blog.iankulin.com/protocols/"&gt;Protocols&lt;/a&gt; &amp;amp; &lt;a href="https://blog.iankulin.com/named-loops/"&gt;Named Loops&lt;/a&gt;) in the past few days I&amp;rsquo;ve needed to write and run a couple of tiny C or C++ snippets, and I&amp;rsquo;ve acutely felt the lack of Swift Playgrounds for it. It occurred to me that Playgrounds has been instrumental in my enjoyment of learning Swift - it&amp;rsquo;s just a bit magic to grab the closest device and noodle out an idea or to make sure I&amp;rsquo;ve understood a new concept.&lt;/p&gt;
&lt;img src="https://blog.iankulin.com/images/15152540.jpg" width="89" alt=""&gt;
&lt;p&gt;In a &lt;a href="https://podcasts.apple.com/us/podcast/episode-11-chris-lattner/id1505697997?i=1000478871841"&gt;conversation between Chris Lattner and Paul Hudson&lt;/a&gt; I&amp;rsquo;ve listened to recently, they discuss the value of &lt;a href="https://www.apple.com/swift/playgrounds/"&gt;Playgrounds&lt;/a&gt; and the excellent &lt;a href="https://docs.swift.org/swift-book/"&gt;Swift book&lt;/a&gt; in bringing the community along from Objective C. I could not agree more about the value of these two.&lt;/p&gt;
&lt;p&gt;As an alternative, I downloaded &lt;a href="https://apps.apple.com/in/app/c-programming-language/id499545918"&gt;C Language app&lt;/a&gt; for the iPad. This seems like a reasonable editor that uses an online compiler - it worked for my purpose although it wasn&amp;rsquo;t real snappy.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://blog.iankulin.com/images/img_2779.png" alt=""&gt;&lt;/p&gt;
&lt;p&gt;A couple of alternatives in the app store mentioned the ability to compile offline - which didn&amp;rsquo;t make sense to me until I pressed build on this one and realised it was using a server somewhere to do that work. So this may well not be the best one for AUD5.&lt;/p&gt;
&lt;p&gt;I was amazed to find heaps of online compilers for things which would have done the job just as well. I&amp;rsquo;ve bookmarked &lt;a href="https://itsourcecode.com/compile-code-run-using-online-compiler-ide-for-free/"&gt;this one&lt;/a&gt; which does all sorts of languages including C and Swift.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://itsourcecode.com/compile-code-run-using-online-compiler-ide-for-free/"&gt;&lt;img src="https://blog.iankulin.com/images/screen-shot-2022-08-13-at-12.19.58-pm.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Unwrap</title><link>https://blog.iankulin.com/unwrap/</link><pubDate>Sun, 31 Jul 2022 00:00:00 +0000</pubDate><guid>https://blog.iankulin.com/unwrap/</guid><description>&lt;p&gt;Unwrap is the Paul Hudson app for Swift learning. It’s good for using those three minute gaps in life to digest a concept. I’ve incorporated it into my goals, as some days its the only progress I make.&lt;/p&gt;
&lt;img src="https://blog.iankulin.com/images/fa3cfadd-f6ef-4a05-9131-be5de8f38291.jpeg" width="501" alt=""&gt;</description></item><item><title>Swift Over Coffee</title><link>https://blog.iankulin.com/swift-over-coffee/</link><pubDate>Fri, 22 Jul 2022 00:00:00 +0000</pubDate><guid>https://blog.iankulin.com/swift-over-coffee/</guid><description>&lt;img src="https://blog.iankulin.com/images/screenshot-2022-07-17-at-07-44-36-swift-over-coffee-on-apple-podcasts.png" width="118" alt=""&gt;
&lt;p&gt;One of the iOS development podcasts in my current rotation is &amp;ldquo;Swift Over Coffee&amp;rdquo;, it&amp;rsquo;s blurb is:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Swift over Coffee is a podcast that helps you keep your Swift skills up to date the easy way, hosted by Paul Hudson and Erica Sadun. Each episode has news, our picks of the week, plus an open ballot where you can share your views on important topics.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;And that is about how it goes. In Season One, it&amp;rsquo;s actually Paul and Sean Allen at the mic, they chat about news and topics related to Swift and iOS development, and each week there&amp;rsquo;s a Twitter question that people have chipped in on and the hosts go over these different views in some detail.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s only two seasons - in 2019 and 2020, but still there&amp;rsquo;s lots of good content for a beginning developer like me.&lt;/p&gt;</description></item><item><title>Passing Data</title><link>https://blog.iankulin.com/passing-data/</link><pubDate>Wed, 20 Jul 2022 00:00:00 +0000</pubDate><guid>https://blog.iankulin.com/passing-data/</guid><description>&lt;p&gt;Sean Allen has come to my notice a couple of times, once where he was mentioned as freelance contractor who is a great contributor to the community (I think perhaps that was on &lt;a href="https://podcasts.apple.com/au/podcast/swiftcoders-interviews-with-swift-developers/id1082937962"&gt;Swiftcoders Podcast&lt;/a&gt;), and I&amp;rsquo;ve also bumped into him as co-host (with Paul Hudson) of the early episodes of the &amp;ldquo;&lt;a href="https://podcasts.apple.com/au/podcast/swift-over-coffee/id1435076502"&gt;Swift over Coffee&lt;/a&gt;&amp;rdquo; podcast.&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
 &lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/HXoVSbwWUIk?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
 &lt;/div&gt;

&lt;p&gt;This video I watched last night is a compilation of the first few videos of &lt;a href="https://seanallen.teachable.com/p/swiftui-fundamentals"&gt;Sean&amp;rsquo;s SwiftUI course&lt;/a&gt;, and it&amp;rsquo;s pretty great. In particular he does a great job of explaining how to start to refactor child views out and call them, and how all the stacks go together to make a pretty interface. What he does not do is vist/explain any of the Swift language fundamentals. If you don&amp;rsquo;t already know what a struc is, and the Swift flavour of them, it may be a challenging place to start.&lt;/p&gt;
&lt;p&gt;In the last couple of tutorials he starts on the way the views are called, and how we can pass values into them. This is great marketing for me - it&amp;rsquo;s exactly where I&amp;rsquo;m up to in my journey - I&amp;rsquo;m perplexed about the structure of a SwiftUI app (where&amp;rsquo;s main?!) and the engine that&amp;rsquo;s watching when the UI needs updated and building the views. For example, I want to write a little hello world that just prints the time on the screen. I got this far:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-gdscript3" data-lang="gdscript3"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;struct ContentView&lt;span style="color:#eceff4"&gt;:&lt;/span&gt; View &lt;span style="color:#eceff4"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; let today &lt;span style="color:#81a1c1"&gt;=&lt;/span&gt; Date&lt;span style="color:#81a1c1"&gt;.&lt;/span&gt;now
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#81a1c1;font-weight:bold"&gt;var&lt;/span&gt; body&lt;span style="color:#eceff4"&gt;:&lt;/span&gt; some View &lt;span style="color:#eceff4"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; Text&lt;span style="color:#eceff4"&gt;(&lt;/span&gt;today&lt;span style="color:#eceff4"&gt;,&lt;/span&gt; style&lt;span style="color:#eceff4"&gt;:&lt;/span&gt;&lt;span style="color:#81a1c1"&gt;.&lt;/span&gt;time&lt;span style="color:#eceff4"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#eceff4"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#eceff4"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;But then a minute later when it needs changed what happens? In traditional programming there would be a loop in main where I could check the minutes have changed, and force the redraw of the label.&lt;/p&gt;
&lt;p&gt;I feel this is the thing that&amp;rsquo;s going to be explained clearly in the next few videos of Sean&amp;rsquo;s course, which is cunningly behind the paywall. I&amp;rsquo;m very tempted, although my learning is already spread over two proper courses plus a shotgun blast of other reading, podcasts and self created programming tasks.&lt;/p&gt;
&lt;p&gt;I did have one moment of confusion when Sean passes down an @State variable to a child view and said the variable in the child view needed to be made @Binding. One of the top comments points this out as being unneeded and Sean agrees.&lt;/p&gt;</description></item></channel></rss>