Tag: code

  • You need to enjoy puzzles

    I’m writing the Habits list based app from #100Days and had a working MVP, then for some reason, decided to refactor by changing the subview I’d written as a function, into a struct. Some time later, I discovered that my list items were not updating correctly, so detective time. I talked a little bit about…

  • Drawing Feedback

    Here’s the summary of my learning from comparing my efforts with Paul’s solutions to the Project Nine challenges from Day 46 of his 100 Days of SwiftUI course. Create an Arrow shape – having it point straight up is fine. This could be a rectangle/triangle-style arrow, or perhaps three lines, or maybe something else depending…

  • Project 9 – Drawing

    These few days of #100DaysOfSwiftUI we made some pretty shapes by playing around with some of the SwiftUI systems for drawing on the screen, including paths, shapes, transformations, ImagePaint, drawingGroup() to use Metal rendering, blurs, blend modes and using animatableData for animating – which I think is the solution to an animation problem in my…

  • Moonshot Feedback

    I’ve watched Paul’s solution to the Moonshot challenges (the solutions are one of the perks of being a Hacking With Swift subscriber). When I’m solo learning like this its one of the few ways I can get any feedback on my coding, so I highly value it, and usually write one of these posts as…

  • Moonshot Challenges

    Another few coding challenges at the end of a tutorial app in the 100 Days of SwiftUI course. The app is a sort of information app – composed of navigation views going down into more detail about the Apollo space missions. The most exciting revelation for me was how straightforward it is to pull JSON…

  • Using Swift’s map

    In Day 39′s Moonshot tutorial app, Paul uses .map on an array without much comment about what’s going on. I assume this might be a common concept in modern languages, but it was new to me. First, here’s Paul’s code Mission here contains an array of crew which is a struct with two strings, one…

  • iExpense Feedback

    I finally got around to looking at Paul’s solutions for the iExpense challenges. Use the user’s preferred currency, rather than always using US dollars. Same approach as me, .currency(code: Locale.current.currency?.identifier ?? “USD”) except that he does the work in a local variable which is a bit neater. Since it appears in two places – the…

  • CodeTrimmer – First MacOS App

    I was listening to the StackTrace app this morning (episode 169 – “Choosing What Bugs to Ship”) and one of the ideas discussed was taking the time to automate some of your development processes, partially to save time, but also because if you make a process simple and quick, you’ll be more likely to do…

  • Design Challenge

    So, I’ve been working on translating the UI design created by the external designer into SwiftUI, and have done all of the easy bits: The rounded rectangles for things like the question display/number input are just ZStacks of roundedrects filled, then stroked: Something I have learned in the process is the .offset modifer. This is…

  • iExpense Challenges

    Day 38 is three challenges on the iExpense app – a simple expense tracking app that uses UseDefaults for storing it’s data. Locale Use the user’s preferred currency, rather than always using US dollars. One of the joys of modern programming (as opposed to mid-1990’s programming) is the ability of the internet to give you…