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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
vixentael
PRO
April 28, 2016
Programming
0
230
My talk on i4cup meetup
My talk on small local i4cup meetup. Telling about my Swift fuckup :)
vixentael
PRO
April 28, 2016
Tweet
Share
More Decks by vixentael
See All by vixentael
Building security into autonomous & robotic systems
vixentael
PRO
0
50
Using YubiKey and FIDO U2F for secure authentication
vixentael
PRO
0
2.6k
Data is a new security boundary
vixentael
PRO
0
7.6k
Cryptographic protection of ML models
vixentael
PRO
0
3.7k
e2ee != security != privacy
vixentael
PRO
0
2.7k
Maintaining cryptographic library for 12 languages
vixentael
PRO
1
4.6k
10 lines of encryption, 1500 lines of key management
vixentael
PRO
2
2.1k
Security, privacy and cryptography at WWDC19
vixentael
PRO
1
890
Data encryption: CyberKids edition
vixentael
PRO
0
770
Other Decks in Programming
See All in Programming
Gemini for developers
meteatamel
0
100
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
220
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
210
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
140
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
180
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
460
2026年 エンジニアリング自己学習法
yumechi
0
140
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
730
CSC307 Lecture 07
javiergs
PRO
1
560
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
ぼくの開発環境2026
yuzneri
0
240
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Joys of Absence: A Defence of Solitary Play
codingconduct
1
290
Raft: Consensus for Rubyists
vanstee
141
7.3k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
320
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.7k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
BBQ
matthewcrist
89
10k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
140
Art, The Web, and Tiny UX
lynnandtonic
304
21k
The Pragmatic Product Professional
lauravandoore
37
7.1k
Mobile First: as difficult as doing things right
swwweet
225
10k
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