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
230
0
Share
My talk on i4cup meetup
My talk on small local i4cup meetup. Telling about my Swift fuckup :)
vixentael
PRO
April 28, 2016
More Decks by vixentael
See All by vixentael
Building security into autonomous & robotic systems
vixentael
PRO
0
99
Using YubiKey and FIDO U2F for secure authentication
vixentael
PRO
0
2.8k
Data is a new security boundary
vixentael
PRO
0
8k
Cryptographic protection of ML models
vixentael
PRO
0
3.8k
e2ee != security != privacy
vixentael
PRO
0
2.9k
Maintaining cryptographic library for 12 languages
vixentael
PRO
1
4.7k
10 lines of encryption, 1500 lines of key management
vixentael
PRO
2
2.1k
Security, privacy and cryptography at WWDC19
vixentael
PRO
1
930
Data encryption: CyberKids edition
vixentael
PRO
0
790
Other Decks in Programming
See All in Programming
GoogleCloudとterraform完全に理解した
terisuke
1
180
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
360
【26新卒研修資料】TDD実装演習
dip_tech
PRO
0
160
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
470
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
5
1.5k
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
230
なぜあなたのコードには「コシ」がないのか?〜AI時代に問う、最後まで美味しい設計と戦略〜 #phpconkagawa / phpconkagawa2026
shogogg
0
120
Making the RBS Parser Faster
soutaro
0
660
決定論 vs 確率論:Gemini 3 FlashとTF-IDFを組み合わせた「法規判定エンジン」の構築
shukob
0
150
Claude Codeをカスタムして自分だけのClaude Codeを作ろう
terisuke
0
160
Spec Driven Development | AI Summit Vilnius
danielsogl
PRO
1
130
🦞OpenClaw works with AWS
licux
1
330
Featured
See All Featured
Six Lessons from altMBA
skipperchong
29
4.2k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
100
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
490
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
140
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.4k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Faster Mobile Websites
deanohume
310
31k
Become a Pro
speakerdeck
PRO
31
5.9k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
230
Building Adaptive Systems
keathley
44
3k
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