Re: Swift UI for iOS Apps - What I'm learning...
Last week - I saw someone on twitter mention using Swift Enum to encapsulate Views... so I thought I'd TDD there technique... here's were I got
By
David Koontz
·
#35962
·
|
Re: Swift UI for iOS Apps - What I'm learning...
One thing I did this last week - thought I could share with you all...
https://www.eventbrite.com/e/ios-dev-happy-hour-sponsored-by-realm-tickets-140623465571?keep_tld=1# (
By
David Koontz
·
#35961
·
|
Re: Swift UI for iOS Apps - What I'm learning...
I think Lance's technique was fairly easy to follow - I admit to going back and watching the video a few times and playing with the code as I did. ?I even ventured off on my own and wrote a partial
By
David Koontz
·
#35960
·
|
Re: TDD in type-checked FP languages
Except for IO monads are values like anything else, at least in Haskell so ¡°testing monads¡± usually amounts to testing functions.
For fine grained tests I try to avoid IO and use either the
By
Arnaud Bailly
·
#35959
·
|
Re: Swift UI for iOS Apps - What I'm learning...
Odd name, but neat technique. It seems like it's "test-first reprogramming"
where you're constrained that you can't change the design. Systematic
path-level coverage. Nice.
Java lets you write
By
J. B. Rainsberger
·
#35958
·
|
Re: Swift UI for iOS Apps - What I'm learning...
If they had less cash, then they'd feel more pressure to make their systems
more valuable. That could mean less in sales or less in investment that
compensates for lower sales.
By
J. B. Rainsberger
·
#35957
·
|
Re: TDD in type-checked FP languages
I don't write monads yet, at least not intentionally. I presume that if I
write them, then I use the equivalent of stubs, except that they aren't
really stubs, but rather just functions as parameters.
By
J. B. Rainsberger
·
#35956
·
|
Re: Swift UI for iOS Apps - What I'm learning...
I've Learned how to TDD the LEGACY out of my code - with help from Lancer Kind & TDD.Academy. ?You can watch Lance walk me thru this process on Twitch.TV.Tdd.Academy https://www.twitch.tv/tddacademy
By
David Koontz
·
#35955
·
Edited
|
Re: TDD in type-checked FP languages
How do you test your edges ? your monads ?
By
Gregory Salvan
·
#35954
·
|
Re: Swift UI for iOS Apps - What I'm learning...
Less cash or less users?
I've assumed that when you have >10 million people using your products
every hour, you can rollout to 1% and get faster results than running tests
locally.
By
Avi Kessner
·
#35953
·
|
Re: Swift UI for iOS Apps - What I'm learning...
Significantly less cash slack. But then in that case, they wouldn't be the
majors.
--
J. B. (Joe) Rainsberger :: tdd.training :: jbrains.ca
<https://www.jbrains.ca> ::
blog.thecodewhisperer.com
By
J. B. Rainsberger
·
#35952
·
|
Re: Swift UI for iOS Apps - What I'm learning...
So cool to see this. I do TDD on Andriod for a while now, and I am curious to see it on iOS. I haven't touched swift/ios development so far, so I guess it will be a nice learning opportunity. Let's
By
Jovche Mitrejchevski
·
#35951
·
|
Re: Swift UI for iOS Apps - What I'm learning...
Thanks for the words of wisdom on view layer testing. While I understand - I cannot imagine how to extract from the McSwifty code a view model. An example might help.
David Koontz
Email:
By
David Koontz
·
#35950
·
|
Re: Swift UI for iOS Apps - What I'm learning...
Good advice, JB. I'd like to add a couple tidbits from my experience (not with Swift UI). These are inline, below.
By
George Dinwiddie
·
#35949
·
|
Re: Swift UI for iOS Apps - What I'm learning...
An interesting exchange. Thanks.
I'm still wondering what it would take the majors, with all the money in the world, to invest in making their systems testable...
S
By
Steve Freeman
·
#35948
·
|
Re: Swift UI for iOS Apps - What I'm learning...
David,
Welcome to iOS TDD! For iOS with Swift and ordinary UIKit, there's my site and book.
But ahh, SwiftUI. (For those outside of Apple-land: this is a complete redo of the UI layer. UIKit is
By
Jon Reid
·
#35947
·
|
Re: Swift UI for iOS Apps - What I'm learning...
JB> I'm assuming, by the way, that writing automated view implementation tests in Swift sucks. It usually does.
Oh - what would give you that impression? ?But of course you are right!
We did find
By
David Koontz
·
#35946
·
|
Re: Swift UI for iOS Apps - What I'm learning...
Welcome!
A card flipping App doesn't have much business logic nor Obj model - but
My primary advice to anyone in this position would be to separate Learning
Tests from test-driving behavior in your
By
J. B. Rainsberger
·
#35945
·
|
Re: TDD in type-checked FP languages
I notice that I want to test-drive the pieces, but not the glue. I trust
the workflows, because they are mostly chains of compositions of functions.
I also notice that as I become more comfortable
By
J. B. Rainsberger
·
#35944
·
|
Re: TDD in type-checked FP languages
On Tue, Feb 9, 2021 at 3:48 PM Brian Marick <marick@...> wrote:
Not what you asked, but when I was writing two (relatively simple) front
> ends in Elm, I deliberately didn¡¯t write tests,
By
J. B. Rainsberger
·
#35943
·
|