JC Pastant (@pjechris) 's Twitter Profile
JC Pastant

@pjechris

🧑‍💻 iOS staff engineer @Sorare, 🏠 Domain Driven coder, ⚔️ Clean archi/VIPER slayer

ID: 987619131875840000

linkhttps://swiftunwrap.com calendar_today21-04-2018 09:08:44

342 Tweet

143 Followers

71 Following

JC Pastant (@pjechris) 's Twitter Profile Photo

Tip#47: Stop doing “I don’t know about it but I know” If you look closely you'll see some code where you don’t mention a dependency (AWS, GrphQL) yet implementation clearly relies on it. Stop fooling yourself! If you don’t know the dep. you're not supposed to know how it works!

JC Pastant (@pjechris) 's Twitter Profile Photo

Tip#7: Don’t allow optionals to rule the world Optionals have their usage but NOT EVERYTHING is optional 👉 Enum with associated values can be very handy 👉 Enum reduces impossible behaviours (A & B can’t be nil at the same time) 👉 Don’t use optionals by default (hello GraphQL)

JC Pastant (@pjechris) 's Twitter Profile Photo

Tip #33: Use reactive programming wisely React prog. is cool but like usual: find a good balance. With great power comes great responsability. 👉 Your Rx code MUST be readable 👉 Don’t use Rx in plain models 👉 Prefer async/await 👉 Your value is NOT async? Then don’t make it so!

JC Pastant (@pjechris) 's Twitter Profile Photo

Tip #44: It’s OK to fail You can’t succeed everything nor in in the first try. Most important is to LEARN. 👉 Ask yourself WHAT failed 👉 Ask yourself WHY it failed 👉 Ask yourself WHAT you learned 👉 Ask yourself WHAT you’d do to make it succeed next time

JC Pastant (@pjechris) 's Twitter Profile Photo

Tip #12: Don’t give the wrong naming to the wrong class. People tend confuse naming with role. It’s not because you're naming something “potato” that it magically make it one! 👉 THINK about what your objet DO before naming it

JC Pastant (@pjechris) 's Twitter Profile Photo

Tip #29: Look to other platforms Sometimes we think we know more than others or that our community is the best. Maybe it’s true 😆. But you still have nice things to learn from others 😉 👉 Look to other languages 👉 Look to other frameworks

JC Pastant (@pjechris) 's Twitter Profile Photo

Ever tried to run `swift package run` from Xcode build phase? Here's how to do it👇 swiftunwrap.com/article/runnin…

JC Pastant (@pjechris) 's Twitter Profile Photo

Tip#16: Keep your processes simple Don’t complexify your validation processes. The more you add the less efficient you are. It’s bureaucracy. 👉 Use Trunk Based Development 👉 Communication over documentation

JC Pastant (@pjechris) 's Twitter Profile Photo

Interesting article swiftwithvincent.com/blog/bad-pract… But one thing as I already said: don't put side effect inside your init! That's by far the BEST way of avoiding issues.

JC Pastant (@pjechris) 's Twitter Profile Photo

Even though you probably want your object to be initialized only once, this is yet another case/reason why having side effect in init is not a good idea forums.swift.org/t/observable-i…

JC Pastant (@pjechris) 's Twitter Profile Photo

(Backend) developers still find ways to surprise me. Latest idea: sending ids that can't be used as such. Because they are in the form of "Object:ID". So frontend need to parse them to get the ACTUAL id and send it to backend (whenever needed). 🙃

JC Pastant (@pjechris) 's Twitter Profile Photo

Seriously there are some things that are broken like hell in SwiftUI. Just stumbled on this bug: stackoverflow.com/questions/7073… Worst thing: if set a custom TextField style, it gets called 3 times. 🤦‍♂️

JC Pastant (@pjechris) 's Twitter Profile Photo

Over the years SwiftUI has improved. But I'm also seeing countless bugs in each version. Some very important like this one (I face it too). forums.developer.apple.com/forums/thread/… But after many months... still not fixed :(

JC Pastant (@pjechris) 's Twitter Profile Photo

I'm more and more frustrated of using #SwiftUI. It has countless bugs, even on simple things. Is it worth filling a bug ticket? Feels like Apple won't never fix them :(

I'm more and more frustrated of using #SwiftUI. It has countless bugs, even on simple things. Is it worth filling a bug ticket? Feels like <a href="/Apple/">Apple</a> won't never fix them :(
JC Pastant (@pjechris) 's Twitter Profile Photo

Just stumbled on this exact "bug". forums.swift.org/t/nsstring-con… I'm started to wondering if I should laugh or cry 😅😂

JC Pastant (@pjechris) 's Twitter Profile Photo

Just discovered that using containerRelativeFrame inside a HStack inside a ScrollView retriggers everytime you scroll. Moving to LazyHStack would fix the issue but I can't for various reasons. So in short: don't use ScrollView + HStack + containerRelativeFrame 😅

JC Pastant (@pjechris) 's Twitter Profile Photo

Finally had time to check what was going on with my project when compiling with Xcode 16.2/16.3 Assets.car gets way bigger (57-> 161mb). Some assets go from 2mb to 20mb. Opened a ticket to apple. Hopefully it will get fixed.

JC Pastant (@pjechris) 's Twitter Profile Photo

I always thought that setting iOS environment was "complex": installing Xcode, Xcode dev tools, simulator, probably ruby + fastlane, etc... And then... I tried to make some backend development for my company. iOS environment setup is so easy 😂