Theory Usage in Empirical Operations Management Research ...
An Empirical Study on the Usage of the Swift Programming...
Transcript of An Empirical Study on the Usage of the Swift Programming...
![Page 1: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/1.jpg)
An Empirical Study on the Usageof the Swift Programming Language
Marcel Oliveira, Gustavo Pinto, Felipe Ebert, Weslley Torres, Alexander Serebrenik, Fernando Castor
![Page 2: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/2.jpg)
http://cdn.macrumors.com/article-new/2015/01/linechart.png
![Page 3: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/3.jpg)
if (myDelegate != nil) {if ([myDelegate respondsToSelector:@selector(scrollViewDidScroll:)]) {[myDelegate scrollViewDidScroll: myScrollView]
}}
myDelegate?.scrollViewDidScroll?(myScrollView)
Objective-C
Swift
![Page 4: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/4.jpg)
"Language that is easy and fun to use."
Source: TIOBE Programming Community Index. http://www.tiobe.com/tiobe_index
![Page 5: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/5.jpg)
RQ1. What are the most common problems faced by Swift developers?
RQ2. Are developers having problems with the usage of Optionals?
RQ3. Are developers having problems with error handling in Swift?
![Page 6: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/6.jpg)
RQ1. What are the most common problems faced by Swift developers?
RQ2. Are developers having problems with the usage of Optionals?
RQ3. Are developers having problems with error handling in Swift?
![Page 7: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/7.jpg)
~59,000 Swift questions at the time of our query
Questions tagged "swift"
83,219 yesterday at night (1,408 this week).
![Page 8: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/8.jpg)
Topic Modeling and Latent Dirichlet Allocation
D. Blei. Probabilistic topic models. Communications of the ACM, 55(4):77–84, 2012.
![Page 9: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/9.jpg)
12 Interviews
2 students, 3 instructors, 7 developers
11 also knew Objective-C
Average of 4 years of development experience
![Page 10: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/10.jpg)
What are the most common problems faced by Swift
developers?
![Page 11: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/11.jpg)
Cocoa Framework: 22.9%
“There isn’t much sense in learning
Swift without learning and using the frameworks”
Problems: properly setting up layout constraints and correct customization/behavior of UI elements
![Page 12: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/12.jpg)
"Swift is friendly to new programmers”
“Swift is easy and fun”
Problems: custom initializers, weak and strong references, generic types, closures
Standard Library and Basic Language Concepts: 17.5%
Only two interviewees said they had problems with the syntax
![Page 13: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/13.jpg)
Testing and Errors: 10.2%
“the worst compiler I could ever imagine and that multiplied by a hundred”
Problems: error messages are not clear, the compiler is not stable
![Page 14: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/14.jpg)
“the version changes made some of the
outdated code to stop working"
Xcode: 3.6%
Problems: old code not compiling, Swift 2.0 converter is not reliable
![Page 15: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/15.jpg)
![Page 16: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/16.jpg)
Objective-C: 3.8%
Problem: the developers need to also know Objective-C
"I learned Swift without knowing Objective-C. But
soon I had to use an API that reads barcodes, and it only
had an Objective-C version."
![Page 17: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/17.jpg)
Are developers having problems with the usage of Optionals?
![Page 18: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/18.jpg)
Usage of Optionals
1.451 Optional-related questions (8,5%)
353 were manually analyzed
![Page 19: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/19.jpg)
Optional Types
![Page 20: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/20.jpg)
Errors
Basic Usage
Features
Concepts
0 55 110 165 220
Usage of Optionals
Problems: understanding the purpose of Optionals, doubts with the syntax, “?” vs. “!”
![Page 21: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/21.jpg)
![Page 22: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/22.jpg)
![Page 23: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/23.jpg)
![Page 24: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/24.jpg)
![Page 25: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/25.jpg)
![Page 26: An Empirical Study on the Usage of the Swift Programming ...gustavopinto.org/lost+found/saner2016b-talk.pdf · An Empirical Study on the Usage of the Swift Programming Language Marcel](https://reader034.fdocuments.in/reader034/viewer/2022052002/6014bf7c57300f63041e1fe7/html5/thumbnails/26.jpg)
Seems to be easy to understand and adopt(most questions are about frameworks, not the language)
Still dependent on Objective-C.
The purpose and usage of optionals is still mysterious to some
It may be too early to use for production development.
An Empirical Study on the Usage of the Swift Programming LanguageMarcel Oliveira, Gustavo Pinto, Felipe Ebert, Weslley Torres, Alexander Serebrenik, Fernando Castor. Contact: [email protected]