SlideShare a Scribd company logo
1 of 38
Download to read offline
Tips and Tricks for Swift
Dot Swift 2016
Adam Gask
March 2016
Overview
• Dependancy Management - left-pad (Gate?)
• Closures & Error Handling - Live Coding Demo
• Swift 2.2 - All the deprecation warnings
• Swift 3 & Roadmap - All the breaking changes
• Swift Stack
• Pizza! -🍕+ 🍻
• Dot Swift Recap
Dependancy Management
• left-pad (Gate?)
Dependancy Management
Dependancy Management
• TLDR:
• Azer Koçulu
• Naming issue with Azer's ‘Kik’ npm package
• Legal issues were raised
• ‘Kik’ module was transfered to Kik
• left-pad was removed (along with 272 others)
And that's how JavaScript app development works in 2016. ®
Dependancy Management
Dependancy Management
• Cocoapods
• Carthage
Dependancy Management
Dependancy Management
• Cocoapods
• Carthage
• Checking all dependancies into source control
• Just write all your own code… right? 😉
Closures & Error Handling
“Closures are self-contained blocks of functionality
that can be passed around and used in your code.
Closures in Swift are similar to blocks in C and
Objective-C and to lambdas in other programming
languages.”
The Swift Programming Language (Swift 2.1)
Closures & Error Handling
- Live Coding Demo
Closures & Error Handling
Really useful links:
• How Do I Declare a Closure in Swift? (NSFW URL, but
content is fine)
• Swift closures cheatsheet
• Swift Closures — Everyday Gems
• Part 1
• Part 2
Swift 2.2
• Raft of non-breaking changes
• A gentle preparation for 3.0
• Linter warnings to help you on your way
• 2.2 is the time to fix your code, not 3.0
• Still bugs to fix - JIRA (Look for the label
“StarterBug”)
Swift 2.2
Referencing the Objective-C selector of a method
• Accepted Proposal - SE-0022
class vc: UIViewController {
let button = UIButton(type: .System)
func addTarget() {
button.addTarget(self, action:
#selector(vc.buttonTapped(_:)),
forControlEvents: .TouchUpInside)

}}
Swift 2.2
Naming Functions with Argument Labels
• Accepted Proposal - SE-0021
extension MyModel {
func insertData(data: NSData, at index: Int) {}
func insertData(data: NSData, aboveData
siblingData: NSData) {}
func insertData(data: NSData, belowData
siblingData: NSData) {}
}
Swift 2.2
Modernizing Swift's Debugging Identifiers
• Accepted Proposal - SE-0028
__FILE__ => #file
__LINE__ => #line
__COLUMN__ => #column
__FUNCTION__ => #function (Added during review)
__DSO_HANDLE__ => #dsohandle
Swift 2.2
Allow (most) keywords as argument labels
• Accepted Proposal - SE-0001
Allow the use of all keywords except inout, var, and let as argument
labels.
for i in 1.stride(through: 9, by: 2) {
print(i)
}
func find(data: NSData, in array: [NSData]) {
}
Swift 2.2
Tuple comparison operators
• Accepted Proposal - SE-0015
let singer = ("Taylor", "Swift")
let alien = ("Justin", “Bieber”)
if singer == alien {
print("Matching tuples!")
} else {
print("Non-matching tuples!")
}
Swift 2.2
Arrays and other slice types now have removeFirst()
This complements the existing removeLast()
var array = Array(1...10)
array.removeFirst()
for number in array {
print("(number) green bottles")
}
Swift 2.2
• Remove the ++ and -- operators - SE-0004
• Removing var from Function Parameters -
SE-0003
• Remove C-style for-loops with conditions and
incrementers
Say goodbye to…

for(var a = 0; a <10 ; a++)
Swift 3.0 & Roadmap
What we know is coming:
• Stable ABI - “guarantee a level of binary
compatibility moving forward”
• Complete generics - an array of Equatable
elements is Equatable
• Focus and refine the language
Swift 3.0 & Roadmap
Better Translation of Objective-C APIs Into Swift
• Accepted Proposal - SE-0005
let content =
listItemView.text.stringByTrimming…
CharactersInSet(NSCharacterSet.whitespaceAnd
NewlineCharacterSet())
let content =
listItemView.text.trimming(.whitespace…
AndNewlines)
Swift 3.0 & Roadmap
Apply API Guidelines to the Standard Library
• Accepted Proposal - SE-0006
-public protocol SequenceType { ... } =>
+public protocol Sequence { ... }
sort() => sorted(), sortInPlace() => sort()
reverse() => reversed()
enumerate() => enumerated()
Swift 3.0 & Roadmap
What we know is out of scope:
• Full source compatibility - there will be
breaking changes
• Concurrency
• C++ Interoperability
• Major new library functionality
Did you know?
Possible full stack in Swift?
Swift Stack
Server Options
• Swift Server IO
• Perfect
• Kitura
Maybe…
Core Data
Storage
Swift HTTP
Server
UICollectionView
Web UI
Could be worse…
Dot Swift 2016
Paris - 29th January 2016
Dot Swift 2016
TLDR:
• Annual European Swift conference
• Packed schedule of 12 talks
• Ranging from UI, Live Coding & “The Bigger Picture”
• Two sessions of 4 lightning speakers
• Each talk had a structured Q&A after
The Talks
• Creating an animation with CAReplicatorLayer
• Showing that animations can be short and
succinct
• Talk
• Alessandro Ludovici
The Talks
• The Empathetic Developer
• Probably most thought provoking talk
• Talk
• Michael May
The Talks
• Tiny Networking in Swift
• Easily the best Live
Coding Demo
• Talk
• Chris Eidhof
The Talks
• Other notable talks:
• Swift [and the] Evolution - TJ Usiyan
• CloudKit: The Forgotten Cloud - Paul Ardeleanu
• iOS UIs built as Lego bricks - Victor Wang
• Beyond JSON in Swift - Maxim Zaks
• Going Swift and Beyond - Ayaka Nonaka
Featured Talk
• Localization is hard
• Lots of takeaways popular &
obscure
• Talk
• Roy Marmelstein
And Finally
• Protocol Oriented Programming
• Best use of cartoon characters
• Talk
• Grégoire Lhotellier
Thank you for your time
Adam Gask
@_AJ9

More Related Content

What's hot

Icinga Camp Berlin 2017 - Icinga Director
Icinga Camp Berlin 2017 - Icinga DirectorIcinga Camp Berlin 2017 - Icinga Director
Icinga Camp Berlin 2017 - Icinga DirectorIcinga
 
Icinga2 - Apify them all
Icinga2 - Apify them allIcinga2 - Apify them all
Icinga2 - Apify them allIcinga
 
Icinga Camp Berlin 2018 - Dev and Ops Stories - Integrations++
Icinga Camp Berlin 2018 - Dev and Ops Stories - Integrations++Icinga Camp Berlin 2018 - Dev and Ops Stories - Integrations++
Icinga Camp Berlin 2018 - Dev and Ops Stories - Integrations++Icinga
 
Presentation about Icinga at Kiratech DevOps Day in Verona
Presentation about Icinga at Kiratech DevOps Day in VeronaPresentation about Icinga at Kiratech DevOps Day in Verona
Presentation about Icinga at Kiratech DevOps Day in VeronaIcinga
 
Icinga Camp San Diego 2016 - Icinga Web 2
Icinga Camp San Diego 2016 - Icinga Web 2Icinga Camp San Diego 2016 - Icinga Web 2
Icinga Camp San Diego 2016 - Icinga Web 2Icinga
 
Icinga Camp San Francisco 2017 - Icinga Director - Managing your configuration
Icinga Camp San Francisco 2017 - Icinga Director - Managing your configurationIcinga Camp San Francisco 2017 - Icinga Director - Managing your configuration
Icinga Camp San Francisco 2017 - Icinga Director - Managing your configurationIcinga
 
Icinga Camp Amsterdam - Icinga2 and Ansible
Icinga Camp Amsterdam - Icinga2 and AnsibleIcinga Camp Amsterdam - Icinga2 and Ansible
Icinga Camp Amsterdam - Icinga2 and AnsibleIcinga
 
Icinga 2010 at OSMC
Icinga 2010 at OSMCIcinga 2010 at OSMC
Icinga 2010 at OSMCIcinga
 
Icinga Camp San Diego 2016 - Icinga Director
Icinga Camp San Diego 2016 - Icinga DirectorIcinga Camp San Diego 2016 - Icinga Director
Icinga Camp San Diego 2016 - Icinga DirectorIcinga
 
Saluki - do it like a user
Saluki - do it like a userSaluki - do it like a user
Saluki - do it like a userIcinga
 
Icinga Camp San Diego: Apify them all
Icinga Camp San Diego: Apify them allIcinga Camp San Diego: Apify them all
Icinga Camp San Diego: Apify them allIcinga
 
Icinga Camp Antwerp - Icinga2 Configuration
Icinga Camp Antwerp - Icinga2 ConfigurationIcinga Camp Antwerp - Icinga2 Configuration
Icinga Camp Antwerp - Icinga2 ConfigurationIcinga
 
Introduction into Icinga Web 2
Introduction into Icinga Web 2Introduction into Icinga Web 2
Introduction into Icinga Web 2Icinga
 
Icinga Camp Belgrade - Icinga Web 2
Icinga Camp Belgrade - Icinga Web 2Icinga Camp Belgrade - Icinga Web 2
Icinga Camp Belgrade - Icinga Web 2Icinga
 
Icinga 2 and Puppet - Automate Monitoring
Icinga 2 and Puppet - Automate MonitoringIcinga 2 and Puppet - Automate Monitoring
Icinga 2 and Puppet - Automate MonitoringOlinData
 
Icinga Camp San Francisco 2017 - Current State of Icinga
Icinga Camp San Francisco 2017 - Current State of IcingaIcinga Camp San Francisco 2017 - Current State of Icinga
Icinga Camp San Francisco 2017 - Current State of IcingaIcinga
 
Icinga Camp Amsterdam - Icinga Director
Icinga Camp Amsterdam - Icinga DirectorIcinga Camp Amsterdam - Icinga Director
Icinga Camp Amsterdam - Icinga DirectorIcinga
 
Introduction into Icinga Web 2
Introduction into Icinga Web 2Introduction into Icinga Web 2
Introduction into Icinga Web 2Icinga
 
Icinga 2 and puppet: automate monitoring
Icinga 2 and puppet: automate monitoringIcinga 2 and puppet: automate monitoring
Icinga 2 and puppet: automate monitoringOlinData
 
Icinga Camp Bangalore - Icinga2 and Ansible
Icinga Camp Bangalore - Icinga2 and AnsibleIcinga Camp Bangalore - Icinga2 and Ansible
Icinga Camp Bangalore - Icinga2 and AnsibleIcinga
 

What's hot (20)

Icinga Camp Berlin 2017 - Icinga Director
Icinga Camp Berlin 2017 - Icinga DirectorIcinga Camp Berlin 2017 - Icinga Director
Icinga Camp Berlin 2017 - Icinga Director
 
Icinga2 - Apify them all
Icinga2 - Apify them allIcinga2 - Apify them all
Icinga2 - Apify them all
 
Icinga Camp Berlin 2018 - Dev and Ops Stories - Integrations++
Icinga Camp Berlin 2018 - Dev and Ops Stories - Integrations++Icinga Camp Berlin 2018 - Dev and Ops Stories - Integrations++
Icinga Camp Berlin 2018 - Dev and Ops Stories - Integrations++
 
Presentation about Icinga at Kiratech DevOps Day in Verona
Presentation about Icinga at Kiratech DevOps Day in VeronaPresentation about Icinga at Kiratech DevOps Day in Verona
Presentation about Icinga at Kiratech DevOps Day in Verona
 
Icinga Camp San Diego 2016 - Icinga Web 2
Icinga Camp San Diego 2016 - Icinga Web 2Icinga Camp San Diego 2016 - Icinga Web 2
Icinga Camp San Diego 2016 - Icinga Web 2
 
Icinga Camp San Francisco 2017 - Icinga Director - Managing your configuration
Icinga Camp San Francisco 2017 - Icinga Director - Managing your configurationIcinga Camp San Francisco 2017 - Icinga Director - Managing your configuration
Icinga Camp San Francisco 2017 - Icinga Director - Managing your configuration
 
Icinga Camp Amsterdam - Icinga2 and Ansible
Icinga Camp Amsterdam - Icinga2 and AnsibleIcinga Camp Amsterdam - Icinga2 and Ansible
Icinga Camp Amsterdam - Icinga2 and Ansible
 
Icinga 2010 at OSMC
Icinga 2010 at OSMCIcinga 2010 at OSMC
Icinga 2010 at OSMC
 
Icinga Camp San Diego 2016 - Icinga Director
Icinga Camp San Diego 2016 - Icinga DirectorIcinga Camp San Diego 2016 - Icinga Director
Icinga Camp San Diego 2016 - Icinga Director
 
Saluki - do it like a user
Saluki - do it like a userSaluki - do it like a user
Saluki - do it like a user
 
Icinga Camp San Diego: Apify them all
Icinga Camp San Diego: Apify them allIcinga Camp San Diego: Apify them all
Icinga Camp San Diego: Apify them all
 
Icinga Camp Antwerp - Icinga2 Configuration
Icinga Camp Antwerp - Icinga2 ConfigurationIcinga Camp Antwerp - Icinga2 Configuration
Icinga Camp Antwerp - Icinga2 Configuration
 
Introduction into Icinga Web 2
Introduction into Icinga Web 2Introduction into Icinga Web 2
Introduction into Icinga Web 2
 
Icinga Camp Belgrade - Icinga Web 2
Icinga Camp Belgrade - Icinga Web 2Icinga Camp Belgrade - Icinga Web 2
Icinga Camp Belgrade - Icinga Web 2
 
Icinga 2 and Puppet - Automate Monitoring
Icinga 2 and Puppet - Automate MonitoringIcinga 2 and Puppet - Automate Monitoring
Icinga 2 and Puppet - Automate Monitoring
 
Icinga Camp San Francisco 2017 - Current State of Icinga
Icinga Camp San Francisco 2017 - Current State of IcingaIcinga Camp San Francisco 2017 - Current State of Icinga
Icinga Camp San Francisco 2017 - Current State of Icinga
 
Icinga Camp Amsterdam - Icinga Director
Icinga Camp Amsterdam - Icinga DirectorIcinga Camp Amsterdam - Icinga Director
Icinga Camp Amsterdam - Icinga Director
 
Introduction into Icinga Web 2
Introduction into Icinga Web 2Introduction into Icinga Web 2
Introduction into Icinga Web 2
 
Icinga 2 and puppet: automate monitoring
Icinga 2 and puppet: automate monitoringIcinga 2 and puppet: automate monitoring
Icinga 2 and puppet: automate monitoring
 
Icinga Camp Bangalore - Icinga2 and Ansible
Icinga Camp Bangalore - Icinga2 and AnsibleIcinga Camp Bangalore - Icinga2 and Ansible
Icinga Camp Bangalore - Icinga2 and Ansible
 

Viewers also liked

[SwiftStudy 2016] 3장. 함수
[SwiftStudy 2016] 3장. 함수[SwiftStudy 2016] 3장. 함수
[SwiftStudy 2016] 3장. 함수Keunhyun Oh
 
Oneresearch research services
Oneresearch research services Oneresearch research services
Oneresearch research services Dr Benjamin Lee
 
2016 December Tools for Change CGI Newsletter
2016 December Tools for Change CGI Newsletter2016 December Tools for Change CGI Newsletter
2016 December Tools for Change CGI NewsletterDr. Chris Stout
 
2014 02-10 - percezione del rischio
2014 02-10 - percezione del rischio2014 02-10 - percezione del rischio
2014 02-10 - percezione del rischioHR&O Consulting
 
Метасообщество
МетасообществоМетасообщество
МетасообществоIvan Dementiev
 
Mapas conceptuales arte_renacentista
Mapas conceptuales arte_renacentistaMapas conceptuales arte_renacentista
Mapas conceptuales arte_renacentistamartarodes
 
9.5 El modelado del Litoral
9.5 El modelado del Litoral9.5 El modelado del Litoral
9.5 El modelado del LitoralRaquel Zalba
 
Blogging For Beginners
Blogging For BeginnersBlogging For Beginners
Blogging For BeginnersEvent Media
 
Practical SEO for Developers - An Introduction
Practical SEO for Developers - An IntroductionPractical SEO for Developers - An Introduction
Practical SEO for Developers - An IntroductionNoel Flowers
 
80 років голодомору
80 років голодомору80 років голодомору
80 років голодоморуkopanki2015
 

Viewers also liked (12)

[SwiftStudy 2016] 3장. 함수
[SwiftStudy 2016] 3장. 함수[SwiftStudy 2016] 3장. 함수
[SwiftStudy 2016] 3장. 함수
 
Oneresearch research services
Oneresearch research services Oneresearch research services
Oneresearch research services
 
2016 December Tools for Change CGI Newsletter
2016 December Tools for Change CGI Newsletter2016 December Tools for Change CGI Newsletter
2016 December Tools for Change CGI Newsletter
 
2014 02-10 - percezione del rischio
2014 02-10 - percezione del rischio2014 02-10 - percezione del rischio
2014 02-10 - percezione del rischio
 
Метасообщество
МетасообществоМетасообщество
Метасообщество
 
Mapas conceptuales arte_renacentista
Mapas conceptuales arte_renacentistaMapas conceptuales arte_renacentista
Mapas conceptuales arte_renacentista
 
9.5 El modelado del Litoral
9.5 El modelado del Litoral9.5 El modelado del Litoral
9.5 El modelado del Litoral
 
Blogging For Beginners
Blogging For BeginnersBlogging For Beginners
Blogging For Beginners
 
54077367 somajul-proiect
54077367 somajul-proiect54077367 somajul-proiect
54077367 somajul-proiect
 
X.1 chapter 2
X.1 chapter 2X.1 chapter 2
X.1 chapter 2
 
Practical SEO for Developers - An Introduction
Practical SEO for Developers - An IntroductionPractical SEO for Developers - An Introduction
Practical SEO for Developers - An Introduction
 
80 років голодомору
80 років голодомору80 років голодомору
80 років голодомору
 

Similar to Tips and tricks for mastering Swift

SPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flowSPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flowVincent Biret
 
Vincent biret azure functions and flow (ottawa)
Vincent biret azure functions and flow (ottawa)Vincent biret azure functions and flow (ottawa)
Vincent biret azure functions and flow (ottawa)Vincent Biret
 
Vincent biret azure functions and flow (toronto)
Vincent biret azure functions and flow (toronto)Vincent biret azure functions and flow (toronto)
Vincent biret azure functions and flow (toronto)Vincent Biret
 
Suite Script 2.0 API Basics
Suite Script 2.0 API BasicsSuite Script 2.0 API Basics
Suite Script 2.0 API BasicsJimmy Butare
 
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileIVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileAmazon Web Services Japan
 
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB
 
Evolution of a cloud start up: From C# to Node.js
Evolution of a cloud start up: From C# to Node.jsEvolution of a cloud start up: From C# to Node.js
Evolution of a cloud start up: From C# to Node.jsSteve Jamieson
 
C++ Windows Forms L01 - Intro
C++ Windows Forms L01 - IntroC++ Windows Forms L01 - Intro
C++ Windows Forms L01 - IntroMohammad Shaker
 
Office add ins community call-January 2019
Office add ins community call-January 2019Office add ins community call-January 2019
Office add ins community call-January 2019Microsoft 365 Developer
 
Qt Automotive Suite - under the hood // Qt World Summit 2017
Qt Automotive Suite - under the hood // Qt World Summit 2017Qt Automotive Suite - under the hood // Qt World Summit 2017
Qt Automotive Suite - under the hood // Qt World Summit 2017Johan Thelin
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Henry S
 
Building an Angular 2 App
Building an Angular 2 AppBuilding an Angular 2 App
Building an Angular 2 AppFelix Gessert
 
Serverless without Code (Lambda)
Serverless without Code (Lambda)Serverless without Code (Lambda)
Serverless without Code (Lambda)CloudHesive
 
BePUG - PowerShell and REST - Expanding your Horizon
BePUG - PowerShell and REST - Expanding your HorizonBePUG - PowerShell and REST - Expanding your Horizon
BePUG - PowerShell and REST - Expanding your HorizonEurocontrol
 
Good bye Massive View Controller!
Good bye Massive View Controller!Good bye Massive View Controller!
Good bye Massive View Controller!Supercharge
 

Similar to Tips and tricks for mastering Swift (20)

SPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flowSPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flow
 
Vincent biret azure functions and flow (ottawa)
Vincent biret azure functions and flow (ottawa)Vincent biret azure functions and flow (ottawa)
Vincent biret azure functions and flow (ottawa)
 
Vincent biret azure functions and flow (toronto)
Vincent biret azure functions and flow (toronto)Vincent biret azure functions and flow (toronto)
Vincent biret azure functions and flow (toronto)
 
React inter3
React inter3React inter3
React inter3
 
Suite Script 2.0 API Basics
Suite Script 2.0 API BasicsSuite Script 2.0 API Basics
Suite Script 2.0 API Basics
 
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileIVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
 
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
 
Evolution of a cloud start up: From C# to Node.js
Evolution of a cloud start up: From C# to Node.jsEvolution of a cloud start up: From C# to Node.js
Evolution of a cloud start up: From C# to Node.js
 
C++ Windows Forms L01 - Intro
C++ Windows Forms L01 - IntroC++ Windows Forms L01 - Intro
C++ Windows Forms L01 - Intro
 
Office add ins community call-January 2019
Office add ins community call-January 2019Office add ins community call-January 2019
Office add ins community call-January 2019
 
Angular2 inter3
Angular2 inter3Angular2 inter3
Angular2 inter3
 
Qt Automotive Suite - under the hood // Qt World Summit 2017
Qt Automotive Suite - under the hood // Qt World Summit 2017Qt Automotive Suite - under the hood // Qt World Summit 2017
Qt Automotive Suite - under the hood // Qt World Summit 2017
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
 
Building an Angular 2 App
Building an Angular 2 AppBuilding an Angular 2 App
Building an Angular 2 App
 
Code Refactoring
Code RefactoringCode Refactoring
Code Refactoring
 
Serverless without Code (Lambda)
Serverless without Code (Lambda)Serverless without Code (Lambda)
Serverless without Code (Lambda)
 
Spring insight what just happened
Spring insight   what just happenedSpring insight   what just happened
Spring insight what just happened
 
Introduction to OpenFaas
Introduction to OpenFaasIntroduction to OpenFaas
Introduction to OpenFaas
 
BePUG - PowerShell and REST - Expanding your Horizon
BePUG - PowerShell and REST - Expanding your HorizonBePUG - PowerShell and REST - Expanding your Horizon
BePUG - PowerShell and REST - Expanding your Horizon
 
Good bye Massive View Controller!
Good bye Massive View Controller!Good bye Massive View Controller!
Good bye Massive View Controller!
 

Recently uploaded

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 

Recently uploaded (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 

Tips and tricks for mastering Swift

  • 1. Tips and Tricks for Swift Dot Swift 2016 Adam Gask March 2016
  • 2. Overview • Dependancy Management - left-pad (Gate?) • Closures & Error Handling - Live Coding Demo • Swift 2.2 - All the deprecation warnings • Swift 3 & Roadmap - All the breaking changes • Swift Stack • Pizza! -🍕+ 🍻 • Dot Swift Recap
  • 5. Dependancy Management • TLDR: • Azer Koçulu • Naming issue with Azer's ‘Kik’ npm package • Legal issues were raised • ‘Kik’ module was transfered to Kik • left-pad was removed (along with 272 others) And that's how JavaScript app development works in 2016. ®
  • 9. Dependancy Management • Cocoapods • Carthage • Checking all dependancies into source control • Just write all your own code… right? 😉
  • 10. Closures & Error Handling “Closures are self-contained blocks of functionality that can be passed around and used in your code. Closures in Swift are similar to blocks in C and Objective-C and to lambdas in other programming languages.” The Swift Programming Language (Swift 2.1)
  • 11. Closures & Error Handling - Live Coding Demo
  • 12. Closures & Error Handling Really useful links: • How Do I Declare a Closure in Swift? (NSFW URL, but content is fine) • Swift closures cheatsheet • Swift Closures — Everyday Gems • Part 1 • Part 2
  • 13. Swift 2.2 • Raft of non-breaking changes • A gentle preparation for 3.0 • Linter warnings to help you on your way • 2.2 is the time to fix your code, not 3.0 • Still bugs to fix - JIRA (Look for the label “StarterBug”)
  • 14. Swift 2.2 Referencing the Objective-C selector of a method • Accepted Proposal - SE-0022 class vc: UIViewController { let button = UIButton(type: .System) func addTarget() { button.addTarget(self, action: #selector(vc.buttonTapped(_:)), forControlEvents: .TouchUpInside)
 }}
  • 15. Swift 2.2 Naming Functions with Argument Labels • Accepted Proposal - SE-0021 extension MyModel { func insertData(data: NSData, at index: Int) {} func insertData(data: NSData, aboveData siblingData: NSData) {} func insertData(data: NSData, belowData siblingData: NSData) {} }
  • 16. Swift 2.2 Modernizing Swift's Debugging Identifiers • Accepted Proposal - SE-0028 __FILE__ => #file __LINE__ => #line __COLUMN__ => #column __FUNCTION__ => #function (Added during review) __DSO_HANDLE__ => #dsohandle
  • 17. Swift 2.2 Allow (most) keywords as argument labels • Accepted Proposal - SE-0001 Allow the use of all keywords except inout, var, and let as argument labels. for i in 1.stride(through: 9, by: 2) { print(i) } func find(data: NSData, in array: [NSData]) { }
  • 18. Swift 2.2 Tuple comparison operators • Accepted Proposal - SE-0015 let singer = ("Taylor", "Swift") let alien = ("Justin", “Bieber”) if singer == alien { print("Matching tuples!") } else { print("Non-matching tuples!") }
  • 19. Swift 2.2 Arrays and other slice types now have removeFirst() This complements the existing removeLast() var array = Array(1...10) array.removeFirst() for number in array { print("(number) green bottles") }
  • 20. Swift 2.2 • Remove the ++ and -- operators - SE-0004 • Removing var from Function Parameters - SE-0003 • Remove C-style for-loops with conditions and incrementers Say goodbye to…
 for(var a = 0; a <10 ; a++)
  • 21. Swift 3.0 & Roadmap What we know is coming: • Stable ABI - “guarantee a level of binary compatibility moving forward” • Complete generics - an array of Equatable elements is Equatable • Focus and refine the language
  • 22. Swift 3.0 & Roadmap Better Translation of Objective-C APIs Into Swift • Accepted Proposal - SE-0005 let content = listItemView.text.stringByTrimming… CharactersInSet(NSCharacterSet.whitespaceAnd NewlineCharacterSet()) let content = listItemView.text.trimming(.whitespace… AndNewlines)
  • 23. Swift 3.0 & Roadmap Apply API Guidelines to the Standard Library • Accepted Proposal - SE-0006 -public protocol SequenceType { ... } => +public protocol Sequence { ... } sort() => sorted(), sortInPlace() => sort() reverse() => reversed() enumerate() => enumerated()
  • 24. Swift 3.0 & Roadmap What we know is out of scope: • Full source compatibility - there will be breaking changes • Concurrency • C++ Interoperability • Major new library functionality
  • 25. Did you know? Possible full stack in Swift?
  • 26. Swift Stack Server Options • Swift Server IO • Perfect • Kitura
  • 28.
  • 30. Dot Swift 2016 Paris - 29th January 2016
  • 31. Dot Swift 2016 TLDR: • Annual European Swift conference • Packed schedule of 12 talks • Ranging from UI, Live Coding & “The Bigger Picture” • Two sessions of 4 lightning speakers • Each talk had a structured Q&A after
  • 32. The Talks • Creating an animation with CAReplicatorLayer • Showing that animations can be short and succinct • Talk • Alessandro Ludovici
  • 33. The Talks • The Empathetic Developer • Probably most thought provoking talk • Talk • Michael May
  • 34. The Talks • Tiny Networking in Swift • Easily the best Live Coding Demo • Talk • Chris Eidhof
  • 35. The Talks • Other notable talks: • Swift [and the] Evolution - TJ Usiyan • CloudKit: The Forgotten Cloud - Paul Ardeleanu • iOS UIs built as Lego bricks - Victor Wang • Beyond JSON in Swift - Maxim Zaks • Going Swift and Beyond - Ayaka Nonaka
  • 36. Featured Talk • Localization is hard • Lots of takeaways popular & obscure • Talk • Roy Marmelstein
  • 37. And Finally • Protocol Oriented Programming • Best use of cartoon characters • Talk • Grégoire Lhotellier
  • 38. Thank you for your time Adam Gask @_AJ9