Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Beyond Bootcamp

Stuart Kent
November 10, 2015

Beyond Bootcamp

Detroit Labs partnered with local tech trainers Grand Circus to run an iOS development bootcamp during the Fall of 2015. I gave this 75-minute talk during the final week of classes, with the goal being to inform and prepare the students for their transitions into the world of professional software development.

Venue: Grand Circus iOS Bootcamp

Stuart Kent

November 10, 2015
Tweet

More Decks by Stuart Kent

Other Decks in Programming

Transcript

  1. Me: before Detroit Labs (Jan 2014) ☞ Small, procedural programs

    (~100-200 lines; 1 file). ☞ Limited experience with IDEs (Xcode). ☞ No experience with version control (git). ☞ No idea how to bridge the gap between my projects and "big", "professional" projects. 2
  2. Me: now ☞ Large, event-driven apps (~100k-200k lines; 1000+ files).

    ☞ Shipping Android & iOS apps to 100k+ users. 3
  3. Goals of this talk ➀ Explain why professional app development

    is different. ➁ Explain how professional app development is different. ➂ Explain what those differences will mean to you as an individual developer. ➃ Provide examples and resources to help you bridge the gap. ➄ (Some iOS specifics.) 4
  4. What do these constraints mean for companies? ➀ Customer timelines

    → developers work in teams. ➁ Formal training is (doubly) costly → hire adaptable developers who can learn on the job OR hire experts. 12
  5. What do these constraints mean for you, as a developer?

    Capacity to contribute and grow as a pro developer is based on: ➀ Your communication skills. ➁ Your self-directed learning skills. 13
  6. 14

  7. Communicating with colleagues Resources ☞ [book] Thanks for the Feedback

    ☞ [book] Soft Skills: The software developer's life manual 16
  8. Communicating with clients Goals ☞ "Basic hygiene" (capitalization; spelling; grammar;

    phrasing). ☞ Audience-appropriate (e.g. developer vs decision-maker). Resources ☞ [book] The Elements of Style ☞ [book] Soft Skills: The software developer's life manual (again) 17
  9. Communicating in code ❝A huge amount of what a developer

    is doing is in their head. As we write code we need to keep a mental model of how parts of the application that have already been written and are yet to be written interact with the part that we are writing at that moment. We need to have a solid picture of exactly how the code is working as a whole and maintain that picture. It’s not easy, it requires a lot of concentration and has to remain in place while we think of creative and efficient ways to solve the problem at hand.❞ —Derek Johnson 20
  10. Question What does this line of code communicate? var x

    = -17.7778; ☞ Some other code consumes the value represented by x. ☞ The initial (perhaps default?) value of x is -17.7778. ☞ The value represented by x may vary. ☞ The writer was probably an Objective-C programmer! 21
  11. Question What does this line of code not communicate? var

    x = -17.7778; ☞ The value x represents (a length? a dollar amount?). ☞ The meaning of the assigned value (initial? default?) ☞ Whether the assigned value is rounded or exact. ☞ The intended scope of x. 22
  12. Communicate intentionally public let zeroDegreesFahrenheitInCelcius = -(160.0 / 9.0) ☞

    Scope explicitly indicated. ☞ Constant nature explicitly indicated. ☞ Value represented (and its units) explicitly indicated. ☞ More accurate initial value used. 24
  13. Communicate intentionally Always choose the appropriate: ☞ Scope ☞ Mutability

    ☞ Name ☞ Length (usually, short!) ☞ Location (DRY; SRP) 25
  14. Communicating around code: why? Sometimes we need to provide context:

    ☞ explain why code exists. ☞ explain when methods should be called (if not obvious). Note: code is still responsible for communicating how it works! 27
  15. Communicating around code: how? Three main options: ➀ inline comments

    ➁ tests ➂ formal documentation (separated spatially; hard to maintain) 28
  16. Inline Comments Example of a bad comment, used as a

    crutch: // This method applies a fix that prevents a crash. private func someObscureName() { // Non-communicative and overly-long code } 29
  17. Inline Comments Example of a good comment, used to provide

    context: // This method fixes a crash introduced in v3.1.0. // It should always be called during application startup. // This code will be safe to remove once we update to v4.0.0. private func applyCrashFix() { // Communicative and succinct code, calling into several // shorter subroutines if needed. } 30
  18. Tests: stuff you should know ➀ There are different types

    for different levels of abstraction. ➁ Testing elicits strong opinions! ☞ How much is enough? ☞ When should you write your tests? ➂ Keep test code clean. ➃ Express external requirements through your tests. 33
  19. Communicating in/around code: summary ☞ Write code with future readers

    in mind. ☞ Consider every inclusion/exclusion carefully. ☞ Use comments and tests to provide context. 34
  20. Communicating in/around code: resources ☞ [book] Clean Code ☞ [book]

    The Pragmatic Programmer ☞ [book] Effective Unit Testing (Java) ☞ [blog] Martin Fowler ☞ [website, long form articles] objc.io 35
  21. Overview: self-directed learning ➀ Short term ☞ Balance productivity with

    investment in learning. ➁ Long-term ☞ Address your weaknesses. ☞ Steer your career. 36
  22. Defining self-directed learning ☞ Individuals take initiative and responsibility for

    learning. ☞ Individuals manage and assess their own learning activities. ☞ Mentors provide framework and context. ☞ Peers provide collaboration. 37
  23. Measuring your knowledge Hypothesis: "I understand (a class, language construct,

    etc.) X" Tests: ➀ "I can reliably use X in my own code without looking it up" ➁ "I can explain the details of how X works in general" ➂ "I can place X in context and explain factors in its design" ➃ "If I had to, I could write my own implementation of X" 39
  24. Tracking your progress ☞ Sense of accomplishment. ☞ Great for

    performance reviews/raises! ☞ Helps you gain a better sense of your overall strengths/ weaknesses and plan accordingly. 41
  25. Leveraging your client work ☞ If you can, request the

    tasks that will let you learn things you want to/need to know, even if you're slower at them. ☞ Pair with experienced developers on cards. ☞ Observe experienced developers, asking questions as you go (more available brain power than standard pairing). 44
  26. Leveraging your mentors ☞ Don't expect them to have time

    to teach you. ☞ Do expect them to be able to provide answers and context when you are stuck. 45
  27. Leveraging your mentors How to ask a question when you're

    stuck: ❝Hi! I'm trying to accomplish [goal]. So far, I've tried [thing1] and [thing2] but neither of them worked. My current hypothesis is that [your current best guess], but that doesn't seem to make total sense because [some annoying obstruction]. What am I missing?❞ 46
  28. Leveraging your mentors How to follow-up when a mentor answers

    a question: ❝That makes a lot of sense now, thanks! What were the clues that led you to this solution?❞ 47
  29. Self-directed learning: summary ☞ Measure and track your progress. ☞

    Try to assess your strengths and weaknesses scientifically. ☞ Utilize mentors' experience and high-level view of the world. 48
  30. The well-rounded iOS developer ➀ Become comfortable with both Objective-C

    and Swift. ➁ Know how to write unit tests. ➂ Learn some shell scripting (for building apps outside of Xcode). ➃ Understand app distribution (non-trivial!). 50
  31. Objective-C & Swift ☞ Swift is structurally influenced by Objective-C.

    ☞ iOS frameworks are still written in Objective-C. Resources ☞ [book] Objective-C Programming (Big Nerd Ranch) ☞ [website, long form articles] objc.io (again) ☞ Apple docs (switch between Objective-C and Swift modes) 51
  32. Unit tests ☞ XCTest (default) is a great place to

    start. Resources ☞ Apple docs on testing basics ☞ [long form article] objc.io #15 (yet again) 52
  33. Shell scripting ☞ Used when building iOS apps outside Xcode.

    ☞ Also insanely useful for a bunch of random tasks. ☞ So powerful it should come with a health warning → 53
  34. App distribution ☞ Apple security requirements make this a pain.

    ☞ First step is to understand digital signing: [book] Understanding Cryptography ☞ Then understand the "flow of signatures": [blog post] Ray Wenderlich: iOS Code Signing: Under The Hood 54