Podcast Search

Under the Radar

Under the Radar 54: Parametric Design

Select a time to play from there. The line being spoken is highlighted as the audio plays.

0:00:00welcome to under the radar show but

0:00:02independent iOS app development I'm

0:00:04Marco Arment and I'm David Smith under

0:00:06the radar is never longer than 30

0:00:08minutes so let's get started so today we

0:00:11wanted to talk a little bit about design

0:00:13to pull it back into something a little

0:00:17more pretty I suppose to talk a little

0:00:21bit about though a very low level

0:00:22approach to design that I think we both

0:00:25take in our apps and it's something that

0:00:27I think can be really powerful once you

0:00:29start taking this approach and start

0:00:31using it in all of your apps and it's

0:00:33something that I tend to call for myself

0:00:35parametric design which is a very fancy

0:00:37and nonsensical name to have for

0:00:40something like this but basically it's

0:00:41designing your app in such a way that

0:00:44large amount parts of the appearance of

0:00:48the layout of the sort of the way that

0:00:50it will appear visually on the screen is

0:00:52controlled by parameters and variables

0:00:55within your code to the degree that you

0:00:58can change a few few numbers change a

0:01:01few values and you can radically change

0:01:03the appearance of your application and

0:01:06this is something that I think works

0:01:08best if you do a lot of programmatic UI

0:01:10rather than you know something like a

0:01:12storyboard where a lot of those values

0:01:14are baked into the storyboard or baked

0:01:16into the nib if you were doing any

0:01:19amount of your UI in code it's possible

0:01:22to do a lot of this um if you're doing

0:01:24the in storyboards and so if you can

0:01:25still do it there you're just going to

0:01:26have duplicated effort in a lot of

0:01:28places where you set a value in your

0:01:31storyboard and then you also have

0:01:32somewhere in code that you can override

0:01:34that value but either way however you

0:01:36end up with it if you design your app

0:01:38such that you can change everything

0:01:40dynamically it makes the development

0:01:44process I think much more fluid and is

0:01:46something that I found for myself helps

0:01:48me very quickly iterate on a design

0:01:51because usually what happens and this is

0:01:54something the reason this topic is

0:01:55friend of mine for me is I'm going

0:01:57through the sort of layout and design

0:01:59phase of my next app and I the way I

0:02:02tend to do with this is I'll put a very

0:02:05basic super simple kind of horrendously

0:02:07ugly design in place it has bad colors

0:02:10that has bad fonts or sizes and weights

0:02:14and I'm just trying to get it's sort of

0:02:16basically working and once I have that I

0:02:19then want to go through and actually

0:02:21sort of like adjust it and dial it down

0:02:22and and this is sort of the I guess the

0:02:25bottom-up design approach rather than

0:02:27you know if you're working with a

0:02:28professional designer or somebody who's

0:02:30giving you a here's what it should look

0:02:32like in the end and you're working from

0:02:33there down obviously this isn't

0:02:35something will print approach that would

0:02:36work but if you're working it from the

0:02:37purse like me where you're starting with

0:02:38just basic like it's just the UI button

0:02:41that looks like a UI button it's a UI

0:02:42label that just looks like a UI label if

0:02:44you start there and are working on it if

0:02:46you build your app such that you can you

0:02:50know have all these dials and hooks into

0:02:51it and then you can quickly change

0:02:53things and this is the approach that I

0:02:55tend to take that when I'm actually

0:02:57iterating on my UI I'm just sitting

0:02:58there changing variables and then build

0:03:01and run look at it see how it feels

0:03:02running on my device I've even seen

0:03:06people who do this where you'll actually

0:03:07build a method into the application

0:03:09where if you you know it's like

0:03:10quadruple tap on the screen with three

0:03:12fingers a little UI pops up that you can

0:03:15change the the values to be well they've

0:03:17app is live and running but it's an

0:03:19approach I think that is a way of

0:03:21thinking about your app and a level that

0:03:23gives you that flexibility and

0:03:25ultimately it probably even makes your

0:03:26app better from a like attest ability or

0:03:30really write tests but from an ability

0:03:33to understand what's going on

0:03:34perspective because everything that's in

0:03:37the app everything about the way it

0:03:39looks is you know explicitly written out

0:03:42somewhere because it's a variable that

0:03:44whose value you can change yeah I mean

0:03:47this is the kind of thing I've designed

0:03:49overcast from day one to be this way in

0:03:52many ways and and you know this this can

0:03:54start with very simple things it can

0:03:56start with something like text sizes and

0:03:58whether your app has like a light or

0:04:00dark theme and if you make all this

0:04:03managed by some kind of central class

0:04:05like my and overcast is called OC

0:04:07appearance you know cuz you know it's it

0:04:09goes beyond what you eye appearance

0:04:10offers although the appearance manages

0:04:12the UI appearance but OC appearance is

0:04:16just my centralized class that listens

0:04:18for notifications for things like the

0:04:20dynamic text size preference changing

0:04:23then it posts it basically repost a

0:04:26notification to all my custom controls

0:04:29and classes and controllers and

0:04:31everything they all listen for the UI or

0:04:33the for the OC appearance did change

0:04:35notification and then they set their own

0:04:38layouts accordingly and when you take

0:04:40this kind of approach this makes it way

0:04:43easier to do things like support dynamic

0:04:45type or support a dark mode or alternate

0:04:49color schemes or to support certain

0:04:50accessibility options like bold text or

0:04:53button button shapes so there's lots of

0:04:56different things you can do once you

0:04:58have this kind of centralized design and

0:05:01appearance and theme manager

0:05:03infrastructure and so and one of the

0:05:06things I've done is you know very simply

0:05:08I've created you know if you have like a

0:05:10you know some kind of control or screen

0:05:12or area where you have a background you

0:05:15can assume that background probably be

0:05:17white by default in most things in

0:05:19overcast I make that an OC background

0:05:21view which is a custom UI view subclass

0:05:23that literally just listens to the OC

0:05:26appearance to change notification and

0:05:28sets itself to be the current themes

0:05:29background color and that way it's very

0:05:33very easy for me to not only change the

0:05:35design but to implement dark mode and so

0:05:37I can test out all sorts of colors and

0:05:39things very easily and then every

0:05:41background in my app automatically

0:05:43changes with this custom OC back review

0:05:46similar I have you know OC button aisle

0:05:48OC bordered button for all the little

0:05:50round rect buttons I have an overcast

0:05:51those are all you know a standard class

0:05:52that automatically customizes its own

0:05:54appearance whenever the appearance

0:05:55changes and can respond to all these

0:05:57different values and everything both

0:05:59dynamically or you know or every killing

0:06:00the code like you were saying I also

0:06:02have an OC styled label and this is one

0:06:06of my most used and biggest time-saver

0:06:08UI things I've ever done is the OC

0:06:11styled label and basically it's it's a

0:06:14UI label subclass like the other ones it

0:06:16manages its own appearance and its own

0:06:18parameters and everything based on based

0:06:20on the current overcast theme whether

0:06:23it's dark mode or whatever but the OC

0:06:25styled label takes as its main parameter

0:06:27the UI font text style which is you know

0:06:30just like if you're picking a UI font

0:06:32you can call the preferred font with

0:06:34whatever the full method name is

0:06:36font with style UI font textile and this

0:06:38these are all the iOS 7 and above

0:06:40built-in textiles you have like you know

0:06:41headline body caption one caption to

0:06:43stuff like that and my OC styled label I

0:06:46can just create one of these instances

0:06:47and stick it right into a UI in code or

0:06:50an interface builder and it

0:06:52automatically will style itself not only

0:06:55for that style but it also will pick up

0:06:56things like in my OC appearance class

0:06:58I've defined default colors default font

0:07:01attributes so for instance you know in

0:07:04the San Francisco font numbers by

0:07:06default are not proportional exactly

0:07:08they like like a1 is narrower than a

0:07:11zero for instance you know it's it's

0:07:12they're not fixed fixed proportions

0:07:15rather in many of my contexts I need

0:07:18that so I have one place to set that in

0:07:21the OC appearance manager or have a

0:07:22function that's called something on the

0:07:23lines of default font attributes for

0:07:26text style and I know that in certain

0:07:28text styles in almost all of them I want

0:07:30my fixed width numerals so I have that

0:07:33one place to set it and my OC styled

0:07:35label class can it can it add it can

0:07:37manage all that for me so all over the

0:07:38UI I'm only having to change this stuff

0:07:40in one place I change one value in my in

0:07:43100cc a parent's line and then all the

0:07:47labels across my entire app will

0:07:49automatically update dynamic text is

0:07:51super easy because all the all those

0:07:54styled labels they include either a

0:07:57forced fixed size for things that are

0:07:59really tight like the labels that are in

0:08:00the title bar on the Now Playing screen

0:08:01or a dynamic size adjustment based on

0:08:05dynamic type so I can say just create

0:08:08this label and have it be the regular

0:08:10preferred dynamic type size whatever the

0:08:12current size is or I can have it say

0:08:14that size plus 2 points if so in some

0:08:17needs to be little bit bigger early you

0:08:18know - two points little bit smaller and

0:08:19that makes it so easy to support these

0:08:22accessibility features and to you know

0:08:24use an emic type and make all that

0:08:26happen for people who want or need that

0:08:27and and still have this incredible ease

0:08:31on the code side where I don't have to

0:08:33code that into every view controller I

0:08:34don't have to have that part of every

0:08:36every custom control like it just

0:08:38automatically inherits from these few

0:08:39base classes I've made that manage their

0:08:41own appearance and then the OC

0:08:43appearance class that handles at all

0:08:44parametrically as yes you would say like

0:08:46I have one place where I can change this

0:08:48if I want to change the font way

0:08:50across the entire app I changed that in

0:08:52one place and one line of code in that

0:08:55class it's doing it this way it makes

0:08:57things so much easier and as as

0:09:00conditions change as Styles change as

0:09:03fashion changes in in app design or as

0:09:06Apple adds things like you know there's

0:09:08there's a rumor that they might soon add

0:09:10a system-wide dark mode then you this

0:09:12again if you have designed this way this

0:09:14gives you one place where you have to

0:09:16implement that and then all the rest of

0:09:18your app automatically picks it up from

0:09:20your appearance manager it's you really

0:09:22should design a suede you can yeah and I

0:09:24think there's this sort of there's two

0:09:26levels of where this comes into play

0:09:27there's the the approach they decide if

0:09:30it's that you're talking about where I

0:09:31think it's very much the following the

0:09:34principle of like not repeating yourself

0:09:36of avoiding duplication that you don't

0:09:38have every single view controller has a

0:09:40viewdidload method that's just 50 lines

0:09:43of settings style stuff and obviously a

0:09:46lot of this got better when they

0:09:48introduced the appearance manager stuff

0:09:50to UIKit which is certainly something

0:09:51that I think we both use but even beyond

0:09:54that there's so much of this that you

0:09:56know you're still needing to have more

0:09:58things than beyond that and then even

0:10:01just other stuff that beyond appearance

0:10:04like the actual UI kid appearance stuff

0:10:06that you actually need to do and so

0:10:07there's not repeating yourself and

0:10:08trying to consolidate all of this code

0:10:11into a place that you can easily update

0:10:14and that you know you would I what I

0:10:16like about that approach is you

0:10:18inevitably they'll you'll have one offs

0:10:20and you'll have things that are slightly

0:10:21different but you can you know even

0:10:25inside of that you have you know two

0:10:26different methods that are you know

0:10:30physically close to each other in your

0:10:31in your application that are doing the

0:10:34you know the there's the default version

0:10:36and then there's the you know the bold

0:10:37version or whatever it is by putting

0:10:40those logically similar close to each

0:10:42other I find it so much easier when I'm

0:10:44debugging when I'm like you know I

0:10:45changed I change one and I expect the

0:10:47other one to change and it doesn't it's

0:10:48like there's something even helpful

0:10:49about like well it's all I have to do is

0:10:52look down a few lines and I'll probably

0:10:53see where I'm doing it wrong but also I

0:10:56think it's it can be really helpful even

0:10:58just at the really really few were all

0:10:59the way down from like to the lowest

0:11:01level like I run into this law

0:11:03I'm weird for doing my late layout this

0:11:05way but I do a lot of my like view

0:11:07layouts programmatically so I do a lot

0:11:10of work in like view will layout sub

0:11:12views and those types of methods that's

0:11:14just you know that's just how I think

0:11:16that's fine it's definitely not for

0:11:18everybody no you don't have to apologize

0:11:20for that as so basically a week after we

0:11:22did the episode about how I've been

0:11:24embracing interface builder and/or

0:11:25layout I converted to what you're doing

0:11:28because I just like everything with

0:11:31interface builder and auto layout it's

0:11:33great until you hit a wall and then you

0:11:36realize that you're spending an

0:11:37incredible amount of time and effort to

0:11:39do things that you could really do very

0:11:42easily with like a 10 line

0:11:44you know the layout sub useful but in

0:11:48those layouts sub view function I think

0:11:50it's another place that I have found

0:11:51this kind of parametric approach to be

0:11:52really really powerful like even so in

0:11:54Westham ways even more when you're early

0:11:57on especially like if you define you

0:12:01know I end up with a lot of these very

0:12:03like my buted layout subviews methods

0:12:05are often it's like it's half like

0:12:08defining variables there's a lot of I

0:12:10guess now that I'm in Swift is all these

0:12:11let you know let's something equal

0:12:13something let's something equals

0:12:14something that's like the first half and

0:12:16the second half is all the actual like

0:12:17the framework where I'm actually saying

0:12:19like you know build the frame and do the

0:12:21math and wait out but you can do all

0:12:22these fun things where you're stuck okay

0:12:24this is the padding this is the inside

0:12:25padding this is the outside padding and

0:12:28you can put all those values as just

0:12:31values that you know that you can change

0:12:33dynamically and it's so powerful when

0:12:35you're looking at a UI because I feel

0:12:37like there's like I can get the bait the

0:12:41initial UI vaguely right you know fairly

0:12:44quickly by eye but then there's a

0:12:47certain point that you're just kind of

0:12:48looking at and you're like you know that

0:12:51label just looks I think that a lot of

0:12:54think there's a term for this where it's

0:12:55like visual centering is a lot of times

0:12:59that you have something to do an icon

0:13:00design where something is technically

0:13:02centered but it doesn't look centered

0:13:04because yeah the like it's not if you

0:13:07know a perfect a perfect circle is easy

0:13:08to Center but if say you have something

0:13:10that's really thin at the top and heavy

0:13:12on the bottom it can actually look like

0:13:13it's off-center if it's actually

0:13:15centered and I think you have a lot of

0:13:16these things in

0:13:17in user interface design where things

0:13:20can be technically correct like say you

0:13:22say oh I always have eight pixel or

0:13:25eight points of padding on the left side

0:13:26of all my views but there's possible

0:13:29that's somewhere in somewhere you know

0:13:31and we put in your layout nine points

0:13:33would actually look better and so be

0:13:35pulling all these things into these font

0:13:37DS function you know out of you know so

0:13:40that there's no magic numbers in your

0:13:42frame stuff all your frame logic in this

0:13:44case it's just equations you know their

0:13:46third and they're all nice and labeled

0:13:48equations that are saying like you know

0:13:50it's padding plus label with plus

0:13:53padding or however you want to lay it

0:13:55out like you're being very clear and

0:13:57explicit can make this really a powerful

0:13:59approach I think it works both ways like

0:14:01either way it's like the last thing you

0:14:03want in your app is to have a design

0:14:05that is expressed somewhere that you

0:14:08can't change easily you know it's I

0:14:11think even I remember to the extent of I

0:14:13remember I think was Vesper that I first

0:14:15saw someone do this where they even were

0:14:17just in Vesper I think they would say

0:14:19they defined a bunch of these things

0:14:20even in a plist file which is how they

0:14:24which is an interesting approach they

0:14:25took because it allowed non design non

0:14:29developer people to make changes to the

0:14:33applications appearance because they

0:14:35would just go into a P list and change

0:14:36stuff and so it's even more powerful in

0:14:39that sense of that you can actually even

0:14:40extract all this developer logic and put

0:14:43it into something that is a bit less

0:14:44scary like you may not necessarily want

0:14:46your designer going into your code and

0:14:50changing things I mean the let me

0:14:51against designers they're lovely but

0:14:52that's a problematic thing in a couple

0:14:55of ways versus you know here's this P

0:14:57list file that you can change and it's

0:15:00much less likely to cause problems or

0:15:02conflicts or issues down the road it's

0:15:04also it lets them work faster you know

0:15:06like you know if you know it it's part

0:15:08of when you were you working on a team

0:15:10with multiple people like that like if

0:15:11you have a separate designer they can do

0:15:13their job faster if you can give them

0:15:15that kind of infrastructure and that

0:15:17kind of setup and I think to like

0:15:19between our two are to like you know

0:15:21main points in like having these

0:15:23variables defined and you know at the

0:15:25top of your layout function versus me

0:15:27having them try to be defined like in a

0:15:29central place like an appearance manager

0:15:30class

0:15:31you can actually combine these things

0:15:32like one of the principles of design

0:15:35generally it's not to have too many

0:15:37different things in one layout so like

0:15:40and if you're gonna have like you know

0:15:42certain fonts don't have like ten

0:15:44different fonts in your app have maybe

0:15:46two you know or what you know different

0:15:48don't have like regular semi bold bold

0:15:51heavy and book like you know have two

0:15:54font weights and you know use have like

0:15:56one boldest font weight and one regular

0:15:58font weight things like that like you

0:16:00try to minimize the amount of different

0:16:02combos you have because it just looks it

0:16:05tends to look better if you standardize

0:16:07on one or two values in each one of

0:16:09these areas so one of the things you can

0:16:10do is you can define your default

0:16:14spacing between elements on the screen

0:16:16like default left margin 8 you know and

0:16:19you can have that in your appearance

0:16:20manager class and so you can have your

0:16:23custom layout functions use that as a

0:16:25starting point and then for the ones

0:16:27that need additional padding don't just

0:16:30put a match number in the says nine you

0:16:32know have have it be default padding

0:16:34plus one or even better you know the

0:16:37floor of default padding plus ten

0:16:39percent you know if it's if it's

0:16:42proportional it's even better because

0:16:43then you can scale to different sizes

0:16:44and everything and so that kind of

0:16:47approach it still allows you to

0:16:48standardize things and - and it's even

0:16:50better for what you're describing as

0:16:52parametric design because then you can

0:16:54go to your appearance manager class and

0:16:55even have spacing be one of those things

0:16:58like that you can change in one place

0:16:59and have the whole app change as a

0:17:01result yeah and it's it's so powerful

0:17:05when you get when you get into this and

0:17:06I guess it's sort of like why I wanted

0:17:07to do an episode on it is it's it's

0:17:09something that I remember I have every

0:17:11now and then I'll go back though I mean

0:17:12I have a lot of old projects and some of

0:17:14them are still in the store and I'll go

0:17:15back and look at the code and of course

0:17:17like the like any programmers worst

0:17:18nightmare is when you open if you open

0:17:20something and there's just all these

0:17:23magic numbers all of these just you know

0:17:26and like I call it say a magic number is

0:17:27any number that doesn't happen they have

0:17:29a label as to what it means is a magic

0:17:32number so you know sometimes it's you

0:17:35can get away with it if it's an obvious

0:17:37thing like the number of times I divided

0:17:39by 60 you know and when I'm doing date

0:17:41or time things like maybe you that's

0:17:44okay it's not constant seconds per

0:17:46minute hey yeah sure that's even better

0:17:49but like what you really don't is when

0:17:51you go into a you know something that

0:17:53and you have like this font is it's like

0:17:55it's 18 here it's 17 there you don't

0:17:57know why some some place you have

0:17:59padding here or you just have these just

0:18:01numbers that are it's like the you know

0:18:04I remember back in the day when I used

0:18:05to always assume that a an iPhone's

0:18:07width was 320 and you know when the

0:18:12iPhone six came out all of a sudden I

0:18:14had to go through my app and I see I

0:18:16this is what I actually I actually did I

0:18:18opened up Xcode and did you know fine

0:18:20you know like search all for 324 644 480

0:18:25like all of the these values and I found

0:18:27dozens of them everywhere and that's

0:18:30really problematic it's like that's

0:18:32really shouldn't be there that should be

0:18:33in that case it's proportional to the

0:18:35screen so somewhere I should have a you

0:18:38know device and get the device bounds

0:18:40get the width and then should just

0:18:42dynamically update and by making it

0:18:45parent you know making it not tied to

0:18:46something that's hard-coded in that way

0:18:48it's like your example with padding and

0:18:50using the floor rather than just adding

0:18:52one if you get out of those habits like

0:18:55anytime in a weird way you're doing

0:18:57something that's so numerical but it

0:18:59should have almost no numbers in it that

0:19:01it's like only the numbers only exist at

0:19:03the top and then everything else is

0:19:04proportional and kind of expanding from

0:19:06that it works really well like I've been

0:19:09doing this a lot with on my Apple watch

0:19:11work where you know there's these two

0:19:14different sizes and so you have to have

0:19:17a but another thing with the watch is

0:19:19you don't typically change the UI

0:19:22between the 48 and the 38 to 42 and the

0:19:2538 millimeter Apple watch is like it's

0:19:27not like you have a totally new it's not

0:19:29like an iPad 2 an iPhone it's like

0:19:31they're so close but slightly different

0:19:32and so everything you have to do has to

0:19:34be proportional everything needs to be

0:19:35adaptable and flexible and unless you

0:19:38wrap your mind around it and kind of

0:19:39commit to that approach it's like all

0:19:41these things just kind of like all these

0:19:42other problems that you would have

0:19:43otherwise just kind of fall out

0:19:45we're sponsored this week by Linode go

0:19:48to lynda.com slash radar and use code

0:19:52radar 20 a check out for $20 in credit

0:19:55Linode is a combination of high

0:19:57performer

0:19:57SSD Linux servers spread across eight

0:19:59data centers around the world they're a

0:20:01fantastic solution if your server

0:20:03infrastructure needs you can get a

0:20:04server up and running at Linode in just

0:20:06under a minute with plans starting at

0:20:08just $10 a month that now gets you two

0:20:10gigs of RAM for just 10 bucks a month

0:20:12this is like amazing pricing for what

0:20:15you get at Linode David and I are both

0:20:17customers of Lynda we both been there

0:20:18since long before they were sponsors of

0:20:20our show a little it's great I

0:20:22definitely recommend them Linode is they

0:20:25have an amazing control panel they have

0:20:27amazing options have amazing pricing

0:20:28this is great for things like if you

0:20:30have to run a server for your app or

0:20:32even if you want to run a private git

0:20:33server if you want to host databases

0:20:36we're on a mail server although you

0:20:37shouldn't run your own mail server but

0:20:38you can at Linode you can operate

0:20:40powerful applications I have I think I

0:20:42think overcast runs on something like 16

0:20:44Linode VPS it's incredible you can do so

0:20:47much there from from one little thing

0:20:50for 20 bucks a month all the way up or

0:20:52for 10 bucks a month even all the way up

0:20:54to you know me running overcast there

0:20:56for something like $1,000 a month with

0:20:58all these different servers all these

0:20:59high specs you can do crazy stuff at

0:21:01Linode it's amazing I love it you should

0:21:03love it too check it out go to lynda.com

0:21:05slash radar he'll be supporting us by

0:21:08doing that and you get 20 hours towards

0:21:10any Linode plan using code radar 20 at

0:21:13checkout and they have a 7 day

0:21:14money-back guarantee so there's nothing

0:21:16to lose thanks a lot to Linode for

0:21:18supporting the show so to finish out

0:21:20this show I seem to also kind of a fun

0:21:22little thing for us too now that you've

0:21:23hopefully you at this point we've

0:21:25convinced you that parametric design

0:21:26it's a good thing that you should build

0:21:28your apps once you've done that there's

0:21:31some really fun things that you can use

0:21:33as a result to make your apps better and

0:21:36as an example something that I do a lot

0:21:38when I have when I'm trying to kind of

0:21:40narrow in on a good design is I will set

0:21:44have my app randomly change some of

0:21:47these parameters inside of it and it

0:21:50lets me experiment or even maybe not

0:21:52randomly even but it's like I want it to

0:21:54I'm trying to work out what the right

0:21:56padding is and so I set it to you know

0:21:58it starts at one and then five seconds

0:22:01later it goes 2 to 5 seconds later it

0:22:02goes to 3 that's awesome

0:22:04have your app grow and shrink and adjust

0:22:07as you go because it's all printed so

0:22:10it's all just numb

0:22:11and so it's and if you build this

0:22:14approach you can do stuff like that

0:22:15where you can kind of ice trout like I

0:22:17sometimes struggle to visualize in my

0:22:19head what different values are gonna be

0:22:22and I mean that's part of why I'm not a

0:22:23designer I'm a developer like I can't

0:22:25imagine it I can just write it but if

0:22:27you build your app this way you can sit

0:22:29there and be like I don't really know

0:22:31which one I should do another example is

0:22:34you can do the same take the same

0:22:35approach but with fonts and you say a

0:22:37random font well you you only have so

0:22:40many system fonts right and it isn't so

0:22:42much that you wanted like randomly pick

0:22:44us pick a font but it's EQ can it helps

0:22:48start my mind thinking about how my app

0:22:51could be different if I try different

0:22:54things that I wouldn't necessarily think

0:22:55to otherwise that if I had to manually

0:22:57go through and you know type in all the

0:23:00different font names I would never do it

0:23:02but it's like you try through and you're

0:23:03like huh actually this one kind of looks

0:23:06good why does this one look good

0:23:08and it may not be that I'm gonna end up

0:23:10using that random font but it's like huh

0:23:11that maybe the reason I liked that one

0:23:14for example is that it was more

0:23:15condensed rather than more wide or it

0:23:18had you know obviously like big obvious

0:23:20things like seraphs Arnon sans serifs or

0:23:22different font weights like I feel like

0:23:24there's something to be said for just

0:23:26taking the approach of just like having

0:23:28your app be very flexible this way and

0:23:30then taking advantage of the flexibility

0:23:31to be like let's change all the things

0:23:33and most of the time it's not gonna look

0:23:37good but every now and then you can kind

0:23:38of look in maybe like that one that's

0:23:41the one that I like and you dial into it

0:23:44and I think you did a similar thing when

0:23:46you were doing your dark mode there for

0:23:48a different reason right because you

0:23:49kept switching between the delight and

0:23:52dark mode to accomplish to make sure

0:23:54that you were doing it right yeah it's

0:23:56it's actually it's kind of a way to make

0:23:57sure that you've accommodated for all

0:23:58four the four dynamic changes and all of

0:24:00your screens

0:24:01I just set a timer in the app delegate

0:24:03to change color scheme every five

0:24:06seconds and I went through the entire a

0:24:08even if for some reason you find a way

0:24:11to change the color scheme without being

0:24:13logged in even the login screens change

0:24:16the password reset screens change every

0:24:18screen and overcast change dynamically

0:24:20for docked for dark mode and any any

0:24:22other kind of theme changes dynamic text

0:24:23everything and

0:24:24every screen changes because I literally

0:24:26went through and had this running every

0:24:28five seconds were toggle it and I went

0:24:30through every single screen in the app

0:24:31and and converted it and and I actually

0:24:33and it's the you know similar you know I

0:24:35just been fun you it's not gonna go for

0:24:36random fonts but when I was picking over

0:24:38castes font back when I was developing

0:24:401.0 I did basically that same thing I I

0:24:43just I had like a folder full of ten

0:24:46different custom fonts plus a couple

0:24:48plus a list of some of the built-in ones

0:24:49and I had all this dynamic appearance

0:24:52stuff already in place namely for this

0:24:54purpose and so I just tried it out

0:24:57because it you know you can't really do

0:24:59is in the simulator you really have to

0:25:00see on device you have to see how the

0:25:02stuff looks how whether it whether it

0:25:04seems right whether it fits in and so

0:25:07that's what I did I I had the font be

0:25:10managed by this appearance manager class

0:25:11since 1.0 and I just tried all these

0:25:13different fonts and different you know

0:25:15adjustments to the sizing and this line

0:25:17spacing and everything else and

0:25:19eventually found the one that I thought

0:25:21worked best and then that I like the

0:25:23look of best but I think if there's kind

0:25:25of like an overriding theme of what

0:25:27we're getting at here you know we as

0:25:29programmers we often are not the best

0:25:32designers III think I think it's safe to

0:25:36say and and and yeah and back all the

0:25:40way back in episode number 10 of this

0:25:42show we called design by a programmer we

0:25:44kind of talked about some of the ways we

0:25:45make images this way and I would be

0:25:47horribly new outfit I didn't mention

0:25:50paint code as as being an incredible

0:25:53resource paint code not only allows you

0:25:55to draw stuff and it's a vector drawing

0:25:58program that outputs either images or

0:26:00source code and you can you render

0:26:02things dynamically which is awesome for

0:26:04parametric design but even within paint

0:26:06code you can have variables in your

0:26:09paint code documents for things like

0:26:11colors stroke wits font you know things

0:26:14like that and you can you can you can

0:26:16dynamically just like hit a button like

0:26:18an up-or-down stepper control on some of

0:26:20these things to like increase the stroke

0:26:22width on everything in your document

0:26:23that uses it and or you can have colors

0:26:25that are derived from other colors you

0:26:27can say this color should be base color

0:26:29minus twenty percent saturation or

0:26:31whatever you want it you can have cool

0:26:33stuff like that in paint code I highly

0:26:35recommend this app it's amazing

0:26:38you know this is all a way for

0:26:40programmers like us who are not really

0:26:43designers by training or by skill really

0:26:46to fumble our way through and and we

0:26:50discussed a lot back in episode 10 why

0:26:52you might want to do this yourself and

0:26:53not hire a full-time designer and for

0:26:55many people that choice is made for them

0:26:57by economics you know so so a lot of

0:26:59times you are your own designer just

0:27:01because that's what you can afford to do

0:27:03and it's nice when you have this kind of

0:27:06parametric approach because we don't

0:27:10inherently we can't just as you said

0:27:12earlier we can't just kind of come up

0:27:13with the right thing on our first try in

0:27:14our head we have to just kind of build

0:27:16it that way try it see it in the app and

0:27:20then kind of figure out play with the

0:27:22values a little bit to see like what

0:27:23really looks best what really works best

0:27:25here and when you have this kind of

0:27:28parametric approach this kind of

0:27:30procedural value based parametric

0:27:32centralized approach it makes that so

0:27:34much more possible and so much easier to

0:27:37be able to experiment with your design

0:27:38so that you can eventually come up with

0:27:40what's right and I think in many ways

0:27:42that is at the end of that I kept at the

0:27:44core of this idea is anything we can do

0:27:46as developers to make experimentation

0:27:49and exploration of our app easier and

0:27:52safer you know that I'm having complete

0:27:55confidence that if I may change one of

0:27:57these values I'm not gonna horribly

0:27:59break everything and if I do like it's I

0:28:01just undo it it's it's not that kind of

0:28:03change where it feels heavy and anything

0:28:06we can do I think to make

0:28:08experimentation to make exploration

0:28:10light and fun in some ways honestly I

0:28:13think will allow us to make our apps

0:28:16better and to do it in a way that fits a

0:28:19developer mindset and so anything you

0:28:22can think of like this is an example

0:28:24where you know do you take an approach

0:28:25to deteriorate fun and easy to

0:28:27experiment maybe you can think of other

0:28:30places to do that in your application or

0:28:31in the way that you build it but like

0:28:33that kind of a freedom I think is what

0:28:35ultimately makes us so powerful and

0:28:37ultimate I think allows you know

0:28:39individual developers or developers

0:28:42without big design budgets you know like

0:28:44I can't come up with it right the first

0:28:46time but I can if I take this approach I

0:28:49can try a hundred different designs

0:28:52in the time that a regular designer you

0:28:54know could only come up with one or two

0:28:56just because I'm just iterating so

0:28:57quickly through it and I think that is

0:28:59at its core what makes it so powerful

0:29:01exactly all right best of luck everybody

0:29:04amending your designing by programmer

0:29:06style here designed by math that's all

0:29:09the time we have for this week thank you

0:29:11for listening everybody and we will talk

0:29:12to you next week bye