https://robinrendle.com/notes/trot/
Robin Rendle
About Notes Stories Newsletter
trot
I've been tinkering with an iOS app for the last month or so. It's
exciting stuff! Working in Swift and moving away from the web has
made my work feel all new and fresh, with so many things to learn.
The project codename is Trot (for now!) and here's some notes about
what I've learned so far.
---------------------------------------------------------------------
Leaving VSCode and the browser behind by moving into XCode has made
me immediately miss DevTools. It's so much harder to prototype when
you can't zoom into the UI and crack it open like you can in the
browser.
XCode does have an equivalent of that but it's not front and center
or half as easily accessible as DevTools. This realization of losing
my pal DevTools honestly made me sad as I tinkered with this app for
the first time, knowing that no one will be able to explore this app
in the same way they might with my website. DevTools is the great
equalizer.
---------------------------------------------------------------------
Swift and XCode are incredibly well built and fit so nicely together.
Owning the language and the tools means that this ecosystem can do
some amazing things that web frameworks and text editors could only
dream of. SwiftUI sort of forces you to build everything in small
chunks instead of whole screens and I've found that I can lean into
that and let it guide how I structure the code.
This ecosystem of tools and how they overlap...well...the web really has
nothing like this. For good and bad!
---------------------------------------------------------------------
Next steps are difficult to find though. You can't move without
watching a million videos or reading the docs: UIKit, MapKit,
SwiftUI, Motion, animations. This is true if I create a .html file in
VSCode but there's also fifteen years of tinkering I can rely on. I
know what HTML and CSS is capable of so I don't need to ask questions
every thirty seconds about how to style something or move its
position.
This is a good reminder that the tools look simple to us web
developers but they are very much not easy for newcomers to the
field.
Anyway, there's nothing in XCode that opens a door into these worlds
or shows you what's next. Nothing hints at what's possible. You have
to leave the editor to go explore and it totally kills the flow of
exploration to ask a bot or a search engine how to add padding or
color every three seconds. It's like someone is slamming a door in
your face over and over again.
I wanna be like: here's some tabs on the screen! Okay, now show me
all the ways I can customize those! Or show me how to animate them!
Loop through the items and filter them or list out all the appearance
options and frameworks I can tinker with! Show me the doors!
Autocomplete today is insufficient and I think the main reason why
folks rely on Copilot or asking a bot is because these tools are
really extraordinarily bad at showing you what's possible and then
how to do it.
---------------------------------------------------------------------
I LOVE not having to import things in Swift. Sure, you still import
frameworks at the top of a view but it's not like a typical React
codebase where every file begins with 50 lines of junk importing
stuff.
This means I can reorganize files and folders and it doesn't matter
because nothing will break. I have never liked React/Typescript --
every part of that ecosystem feels clunky and obtuse -- but this
feature of Swift and XCode alone makes web frameworks feel like an
ancient system designed by complete sadists.
Building in Swift and Xcode almost (almost!) has the same feeling of
opening up a text editor and writing pure HTML. It feels light and
springy in a way that no web framework ever has.
---------------------------------------------------------------------
Hot take: I don't like the merge of semantic meaning and styles
within Swift though. It's like designing a whole UI with jQuery where
you're like "Thing.color(red).padding(10)" and it means it's harder
to parse the logic from the presentation. I get why it's like that,
that Swift breaks everything down into a hierarchy, a great big tree
under the hood, but it means your code is all jumbled together.
I assume Apple-folk would say there is no difference between style
and presentation and logic but man...the web has taught me a different
way of seeing the world and this editor, these tools, conflict with
every fiber of my being. But perhaps that's a good thing.
---------------------------------------------------------------------
I realize how lazy at programming I am. I can't take one type of data
and convert it to another. I hate dealing with types and keeping
things in my head across files. It all feels so fragile and
precarious. I hate dealing with state because all of a sudden you
introduce punctuation that makes my head spin. I don't think
logically, I hop skip and jump around and my body refuses to think
like a computer or a program.
Thankfully each stumbling block can now be queried and the hive mind
will respond with an accurate enough solution.
But at the lowest levels I have a very vague idea of what's going on
under the hood. For a prototype that's ok, but if this thing gets
more serious I'd want an engineer to start over. Scrap it all and go
again - and that makes me feel better as I tinker. None of this
matters! Wahoo!
---------------------------------------------------------------------
Another thing I miss? HTML defaults. When you use an or a