100DaysOfSwiftUI

  • Day 20 of #100DaysOfSwiftUI: staying alert

    When SwiftUI focuses on the design layout it really does a good job. Adding in alerts feels clunky and unnatural in comparison. The tension between layout- and action-oriented code?

  • Day 19 of #100DaysOfSwiftUI: always learning

    Who knew the Rankine Scale was a thing? Duly added to my temperature unit converter for this challenge. I left the Delisle, Newton, Réaumur, and Rømer scales for version 2.

  • Day 18 of #100DaysOfSwiftUI: learning new syntax

    It’s not immediately obvious why the syntax differs between the following two modifiers:

    .keyboardType(.decimalPad)

    .pickerStyle(SegmentedPickerStyle())

    Yeah, enum vs struct, I am sure it will become clear, but…

  • Day 17 of #100DaysOfSwiftUI: rapid application development

    Xcode 11 and SwiftUI. So much going for them - but autocomplete and the canvas have me looking at my 2014 MBP for the first time and thinking it’s time for an upgrade.

  • Day 16 of #100DaysOfSwiftUI: so much for building habits

    A trip to Ireland was enough to break the flow. Eleven weeks and five seasons of Breaking Bad later and it’s time to get introduced to SwiftUI. Today the basics, including program and binding state.

  • Day 15 of #100DaysOfSwiftUI: lunchtime doubly so

    Swift introduction and review complete, and still really enjoying the language. Nothing new for me in this, but I figure if I don’t build the habits I wont complete the 100 days. Looking forward to playing with SwiftUI ’tomorrow'.

  • Day 14 of #100DaysOfSwiftUI: (not) recording progress

    My next step should really be to set up a GitHub repository in advance of the coding projects - practice what I preach. It’s always positive to record and reflect on your progress through a course.

  • Day 13 of #100DaysOfSwiftUI: in review

    Paul Hudson (@twostraws) has produced a fantastic amount of Swift programming resources, including many that would be suitable for high school #CompSci students. Take a look at Hacking with Swift.

  • Day 12 of #100DaysOfSwiftUI: optionals?

    Optionals at first seemed like over-engineering to solve a problem that was already “solved”, but the more I use them the more I appreciate them. Things like the nil coalescing operator just enhance that appreciation.

  • Day 11 of #100DaysOfSwiftUI: Nigel Tufnel’s happy hour

    Having worked or hobbied with many languages over the years, I think protocols are the magic sauce that turns object-oriented programming gourmet. Turns OOP up to 11, if you will.

  • Day 10 of #100DaysOfSwiftUI: that’s class?

    To change struct property a ‘mutating’ function prefix is needed. This doesn’t work on constant structs, only variables - reasonable. But why need a mutating keyword at all? Oddities like this are why students think programming is hard.

  • Day 9 of #100DaysOfSwiftUI: lazy is as lazy does

    Lazy execution is a powerful concept. It’s like a sophisticated type of procrastination, but with authority.

  • Day 8 of #100DaysOfSwiftUI: for the record

    The humble struct of K&R days has given way to a much more powerful and capable descendant.

  • Day 7 of #100DaysOfSwiftUI: closure closure

    Closures are all very fine and good. Having not programmed in anger, or much more than mild irritation, for so long now, I still need to get my eye in. How do other languages handle closures?

  • Day 6 of #100DaysOfSwiftUI: the λ-calculus calculus

    Almost makes me want to dig out my old Haskell knowledge, dust it off, and… well, almost. One thing at a time.

  • Day 5 of #100DaysOfSwiftUI: get a func on

    The game really gets raised on day 5. On top of the usual functions and parameters, we have variadic functions and error throwing! And TIL: you can use otherwise key words (e.g. for, while) as external parameter labels in Swift.

  • Day 4 of #100DaysOfSwiftUI: goto 10

    Breaking out of loops to a label always feels a bit ‘goto’-like and reminds me of my youth spent hacking “space invaders” in Sinclair BASIC.

    Loops. ✅ Loops. ✅ Loops. ✅ Loops. ✅ Loops. ✅ Loops. ✅ Loops. ✅ Loops. ✅ Loops. ✅ Loops. ✅ …

  • Day 3 of #100DaysOfSwiftUI: the secret life of modulo

    No idea why the operator is not named today, Some words are magical. For me ‘modulo’ is one of such word, as are ‘plethora’ and ‘dowp’. Operations and conditions are fine.

  • Day 2 of #100DaysOfSwiftUI: it’s not Kernighan & Ritchie

    If an enum case is defined with an associated value, then usage of that case must include an associated value? It would be useful to have that be ‘optional’. Use an optional?

  • Day 1 of #100DaysOfSwiftUI: probably not aimed at me

    I still get a warm and fuzzy feeling when I look at simple Swift code.