Which File?
Weekly Update Trivia
What's the output?
Do You Know Your Manager?
Random
100

@objc func handleTappedOnSignInButton() {...}

LoginPresenter

100

I present a view onto the storage of an array.

ArraySlice

100

var array = [1, 2, 3]

for num in array {

    array.removeFirst()

    print(num)

}

1

2

3

100

How old is Adam?

23 Months

100

This mammal can't jump.

Elephant

200

public func double(for key: FlexStorage.Key, defaultValue: Double = 0.0) -> Double {...}

FlexStorage

200

I can be used to group and run two or more animations simultaneously.

CAAnimationGroup

200

protocol Greeter {

    func greet()

}

extension Greeter {

    func greet() { print("Hello from protocol") }

}


struct Person: Greeter {

    func greet() { print("Hello from struct") }

}

let greeter: Greeter = Person()

greeter.greet()

Hello from protocol

200

What bone have I broken?

Leg

200

This is the only U.S. state with a one-syllable name.

Maine

300

func boost(from boostPlacement: BoostPlacement, shouldShowNowOrLater: Bool) {...}

LikesYouPresenter

300
A security technique for preventing MITM attacks on a mobile application.

Public Key or Certificate Pinning

300

struct Point {

    var x: Int

}

func move(_ point: inout Point) {

    point.x += 10

}

var p = Point(x: 5)

move(&p)

print(p.x)

15

300
What's the lie?


I've gone skydiving

I've gone bungee jumping

I've never been to Disney World.

I've gone bungee jumping

300

You see me once in June, twice in November, but never in May. What am I?

The letter e
400

func rotateUsers(direction: RotationDirection, onCompletion: (() -> Void)? = nil) {...}

DiscoveryProfilePresenter

400

I am responsible for keeping the main thread alive.

Run loop.

400

var handlers: [() -> Void] = []

func addHandler() {

    var message = "Hello"

    handlers.append {

        print(message)

    }

    message = "Goodbye"

}

addHandler()

handlers.first?()

Goodbye

400

How long is my commute door to door?

~2.5 hours

400

This company created the first graphical web browser in the early 1990s.

Netscape

500

 func createConnection(from userJson: Json.Dictionary) -> Connection? {...}

ConnectionFactory

500

I make use of the Objective-C runtime to allow you to attach an object to another at runtime, effectively simulating stored properties on instances you don't own.

associated objects (e.g., objc_setAssociatedObject)

500

var x = 0

let compute: () -> Int = {

    x += 1

    return x

}

let lazyValue: Int = {

    let result = compute()

    return result

}()

print(x)

1

500

What would I do if I won the lottery?

Go back to school and/or buy land and a farm.

500

This U.S. state was an independent country before joining the Union in 1845.

Texas

M
e
n
u