Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
My talk on i4cup meetup
vixentael
April 28, 2016
Programming
0
170
My talk on i4cup meetup
My talk on small local i4cup meetup. Telling about my Swift fuckup :)
vixentael
April 28, 2016
Tweet
Share
More Decks by vixentael
See All by vixentael
Data is a new security boundary
vixentael
0
290
Cryptographic protection of ML models
vixentael
0
1.3k
e2ee != security != privacy
vixentael
1
1.5k
Maintaining cryptographic library for 12 languages
vixentael
1
1.3k
10 lines of encryption, 1500 lines of key management
vixentael
2
910
Security, privacy and cryptography at WWDC19
vixentael
1
370
Data encryption: CyberKids edition
vixentael
0
330
"Defense in depth": trench warfare principles for building secure distributed applications
vixentael
3
620
Workshop: Secure Software Development: From Rookie to Hardcore in 90 Minutes
vixentael
1
730
Other Decks in Programming
See All in Programming
Node-RED 3.0 新機能紹介
utaani
0
140
設計ナイト2022 トランザクションスクリプト
shinpeim
11
2k
iOS 16からのロック画面Widget争奪戦に備える
tsuzuki817
0
200
Java アプリとAWS の良い関係 - AWS でJava アプリを実行する一番簡単な方法教えます / AWS for Javarista
kanamasa
2
1.2k
Beyond Micro Frontends: Frontend Moduliths for the Enterprise @enterjs2022
manfredsteyer
PRO
0
140
JSのウェブフレームワークで高速なルーターを実装する方法
usualoma
1
1.7k
1時間半で克服するJavaScriptの非同期処理/async_javascript_kokufuku
marchin1989
2
610
Improving Developer Experience Through Tools and Techniques 2022
krzysztofzablocki
0
490
git on intellij
hiroto_kitamura
0
170
Jetpack Compose best practices 動画紹介 @GoogleI/O LT会
takakitojo
0
300
io22 extended What's new in app performance
veronikapj
0
340
実践エクストリームプログラミング / Extreme Programming in Practice
enk
1
490
Featured
See All Featured
What the flash - Photography Introduction
edds
62
10k
StorybookのUI Testing Handbookを読んだ
zakiyama
5
2.2k
Keith and Marios Guide to Fast Websites
keithpitt
404
21k
4 Signs Your Business is Dying
shpigford
169
20k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
269
11k
GraphQLとの向き合い方2022年版
quramy
16
8.3k
Git: the NoSQL Database
bkeepers
PRO
415
59k
Clear Off the Table
cherdarchuk
79
280k
Writing Fast Ruby
sferik
612
57k
Building Flexible Design Systems
yeseniaperezcruz
310
34k
Practical Orchestrator
shlominoach
178
8.6k
Happy Clients
brianwarren
89
5.6k
Transcript
i4☕
Code that smells aka ‘bydlo-code’
kill me, please
don’t write code that smells
None
there was a dev team…
there was a dev team… …writing on ObjC
and they decided to switch to Swift!
and they decided to switch to Swift! in production!
None
it was nice morning and PM decided to install app
it was nice morning and PM decided to install app
on device!
None
it’s not us! it’s new 7.3 Xcode!
oh no, it’s us :(
"loadData has not been implemented" found in logs
None
– loadData(…) -> … – loadData(…) -> … ChildTableViewController <T>
BaseTableViewController <T>
BaseTableViewController <T> – loadData(…) -> … ChildTableViewController <T> – loadData(…)
-> … generics stub overriden
BaseTableViewController <T> – loadData(…) -> … ChildTableViewController <T> – loadData(…)
-> … generics stub overriden not called at all
A – architecture
Problem solving
What if we disable optimization?
let’s disable optimization..
too many optimizations! swift compiler optimization!
Why debug is ok?
…Testability
Debug Release Optimization Testability WMO yes WMO no
WMO https://developer.apple.com/swift/blog/?id=27 if method has no ‘internal’ access, compiler may
mark it as ‘final’
Testability allows you to use all ‘internal’ methods in tests
like ‘public’
everything is ok overriden methods may be lost Debug Release
Optimization Testability WMO yes WMO no
tweet all the things!
tweet all the things!
sudden help!
sudden help! swift contributor
https://gist.github.com/PaulTaykalo/5c97010874a93626ca3c Minimal crashable code
http://openradar.appspot.com/radar?id=4971716266688512 Filed Radar
SIL devirtualization: Conservatively avoid filtering devirt candidates on generic base
classes Fix by @jckarter https://github.com/apple/swift/pull/1954
SIL devirtualization: Conservatively avoid filtering devirt candidates on generic base
classes Fix by @jckarter https://github.com/apple/swift/pull/1954
Fix by @jckarter fix! https://github.com/apple/swift/pull/1954
Tests https://github.com/apple/swift/pull/1954
Swift 2.2 Patch https://github.com/apple/swift/pull/1954
Lessons learnt
Lesson #1 every decision has consequences
sooner or later they’ll appear Lesson #1 every decision has
consequences
Lesson #2 always try build in release on device
at least once a day Lesson #2 always try build
in release on device
and community Lesson #3 twitter rulez
Lesson #4 PMs are useful
sometimes Lesson #4 PMs are useful
team: Vitaliy, Igor, Paul Thanks community: @akosma, @jckarter PM: Anna
None