Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
My talk on i4cup meetup
Search
vixentael
April 28, 2016
Programming
0
200
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
Using YubiKey and FIDO U2F for secure authentication
vixentael
0
1.1k
Data is a new security boundary
vixentael
0
4.1k
Cryptographic protection of ML models
vixentael
0
2.5k
e2ee != security != privacy
vixentael
0
2.1k
Maintaining cryptographic library for 12 languages
vixentael
1
3.5k
10 lines of encryption, 1500 lines of key management
vixentael
2
1.5k
Security, privacy and cryptography at WWDC19
vixentael
1
620
Data encryption: CyberKids edition
vixentael
0
550
"Defense in depth": trench warfare principles for building secure distributed applications
vixentael
3
840
Other Decks in Programming
See All in Programming
Blue/Greenデプロイの導入による 運用フローの改善
kudoas
1
370
try!Swift Tokyo 2024 参加報告 LT
akidon0000
1
220
2 週間で Twitter Bot を作ってみた
contour_gara
0
250
Build Apps for iOS, Android & Desktop in 100% Kotlin With Compose Multiplatform (mDevCamp 2024)
zsmb
0
280
見た目から始める生産性向上
ikumatadokoro
7
820
HUIT新歓2024「競技プログラミング、やってみませんか?」
slephy2784
1
270
GitHub Actionsで泣かないためにやっておきたい設定 / Recommended GHA settings to avoid crying
pinkumohikan
3
530
使ってみよう Azure AI Document Intelligence
kosmosebi
2
290
Compose-View Interop in Practice (mDevCamp 2024)
stewemetal
0
120
単体テストを書かない技術 #phpcon_odawara
o0h
PRO
26
8.2k
PHPはいつから死んでいるかの調査
chiroruxx
1
390
入門 AWS Amplify Gen2 / Introduction to AWS Amplify Gen2
genkiogasawara
1
330
Featured
See All Featured
Practical Orchestrator
shlominoach
182
9.7k
RailsConf 2023
tenderlove
4
540
Rails Girls Zürich Keynote
gr2m
91
13k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
227
16k
Pencils Down: Stop Designing & Start Developing
hursman
117
11k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
2
1.3k
Large-scale JavaScript Application Architecture
addyosmani
504
110k
The Pragmatic Product Professional
lauravandoore
25
5.8k
A Philosophy of Restraint
colly
197
16k
Statistics for Hackers
jakevdp
789
220k
Robots, Beer and Maslow
schacon
PRO
155
7.9k
A designer walks into a library…
pauljervisheath
200
23k
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