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
220
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.8k
Data is a new security boundary
vixentael
0
6.2k
Cryptographic protection of ML models
vixentael
0
2.9k
e2ee != security != privacy
vixentael
0
2.2k
Maintaining cryptographic library for 12 languages
vixentael
1
4k
10 lines of encryption, 1500 lines of key management
vixentael
2
1.7k
Security, privacy and cryptography at WWDC19
vixentael
1
730
Data encryption: CyberKids edition
vixentael
0
650
"Defense in depth": trench warfare principles for building secure distributed applications
vixentael
3
920
Other Decks in Programming
See All in Programming
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
Better Code Design in PHP
afilina
PRO
0
120
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.7k
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
Outline View in SwiftUI
1024jp
1
330
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
110
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
2
1.1k
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
610
Remix on Hono on Cloudflare Workers
yusukebe
1
280
色々なIaCツールを実際に触って比較してみる
iriikeita
0
330
CSC509 Lecture 09
javiergs
PRO
0
140
EventSourcingの理想と現実
wenas
6
2.3k
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Navigating Team Friction
lara
183
14k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
The Language of Interfaces
destraynor
154
24k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
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