SwiftPRInsights
Supporting data for my talk at 2017 try!Swift NYC
These are excerpts from HTML files for Pull Requests for the following Swift language repos:
- https://github.com/Alamofire/Alamofire
- https://github.com/IBM-Swift/Kitura
- https://github.com/IBM-Swift/Kitura-net
- https://github.com/PerfectlySoft/Perfect
- https://github.com/SwiftyJSON/SwiftyJSON
- https://github.com/apple/swift
- https://github.com/apple/swift-corelibs-foundation
- https://github.com/danielgindi/Charts
- https://github.com/vapor/engine
- https://github.com/vapor/vapor
Each PR is organized into one of 10 categories (plus an 'unclear' category for things that weren't easily categorizable). Note that the category is determined by the nature of the fix and not the nature of the bug (unless the PR description clearly indicated a category, e.g. mentioned Performance).
Note that each PR was categorized by hand, and contrived to fit in only one category.
The categories I found were:
- CodeOrganization/CodeOrdering: Fix involved moving code around in the same file.
- Counting: Fix involved off-by-one changes,
NSRange
,Array
bounds, etc. - Encapsulation: Fix involved moving code or passing information from the caller into the method called, or vice-versa.
- Logic(App): Fix appeared to involve logic errors that were specific to the domain knowledge of the application space.
- Memory: Fix involved
unowned
orweak
, breaking reference cycles or otherwise attempting to fix memory leaks. - Naming: Fix involved renaming things or calling methods (or accessing types) with a different but similar name.
- Performance: For this category, the bug description usually mentioned speed or performance.
- Threading/GCD: Multi-threading fixes. Fixes tended to include
Dispatch
,Semaphore
,Lock
, etc. - Typing/Casting: Fixes involving casting things from one type to another (e.g.
as? NSString
) or changing Types. - Unwrapping/Optionals: Fixes tended to involve
if let
, trailing?
/!
and ornil
. - Unclear: Catch-all bucket for things that couldn't be easily and quickly categorized (at least by me).