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

Global Day of Coderetreat 2015

Global Day of Coderetreat 2015

Global Day of Coderetreat 2015 presentation from the event in Skopje.

Dalibor Nasevic

November 14, 2015
Tweet

More Decks by Dalibor Nasevic

Other Decks in Programming

Transcript

  1. Hidden Slide Slower
    Hidden Slide Slower
    November 14, 2015, Skopje
    Global Day of Coderetreat
    @dnasevic

    View Slide

  2. Hidden Slide Slower
    Hacklab Kika 2011

    View Slide

  3. Hidden Slide Slower
    Hacklab Kika 2012

    View Slide

  4. Hidden Slide Slower
    MediaLab 2013

    View Slide

  5. Hidden Slide Slower
    Ever-Near 2014

    View Slide

  6. Sponsor + 2015 Host
    Hidden Slide Slower

    View Slide

  7. What is Coderetreat?
    Hidden Slide Slower
    Codereatreat is a day-long, intensive practice event,
    focusing on the fundamentals of software
    development and design.

    Experiment in Safe environment

    Deliberate Practice

    Get Out of the Comport Zone

    View Slide

  8. Format
    Hidden Slide Slower

    Problem: Conway's Game of Life

    Pair Programming

    Length of Session: 45 minutes

    Prefer using Test-Driven Development (TDD)

    After each session, pairs should be swapped

    After each session, code must be deleted

    View Slide

  9. Goals for the day
    Hidden Slide Slower

    Language agnostic

    Try not to finish the problem

    Try learn new things

    Focus on practice and experiment

    Have Fun

    View Slide

  10. Hidden Slide Slower

    Devised by the British mathematician
    John Horton Conway in 1970

    Zero-player game

    Initial state

    Evolves based on 4 rules
    Conway's Game of Life

    View Slide

  11. Hidden Slide Slower
    Examples

    View Slide

  12. Hidden Slide Slower
    Seal

    View Slide

  13. Hidden Slide Slower
    Any live cell with fewer than two live neighbours
    dies, as if caused by under-population.
    Rule 1

    View Slide

  14. Hidden Slide Slower
    ■ ■

    ■ ■

    Any live cell with two or three live neighbours
    lives on to the next generation.
    Rule 2

    View Slide

  15. Hidden Slide Slower
    ■ ■
    ■ ■

    ■ ■


    Any live cell with more than three live neighbours
    dies, as if by overcrowding.
    Rule 3

    View Slide

  16. Hidden Slide Slower
    ■ ■



    Any dead cell with exactly three live neighbours
    becomes a live cell, as if by reproduction.
    Rule 4

    View Slide

  17. Hidden Slide Slower



    ■ ■ ■
    Blinker Example

    View Slide

  18. Good code
    Hidden Slide Slower
    What are the characteristics of good code?

    View Slide

  19. Static qualities
    Hidden Slide Slower

    Easy to read and understand what it does

    Easy to find the code to change

    Easy to change

    View Slide

  20. Dynamic qualities
    (on runtime)
    Hidden Slide Slower

    Performance

    Scalability

    Security

    Robustness
    etc

    View Slide

  21. 4 Rules of Simple Design
    Hidden Slide Slower
    (tests)
    (good names)
    (DRY)
    (small)

    View Slide

  22. 1. Getting familiar with the problem
    2. TDD
    3. Ping-Pong Pairing
    4. Methods with max 4 lines and no primitives across
    method boundaries
    5. No in-method branching statements
    6. No return values
    Constraints
    Hidden Slide Slower

    View Slide


  23. What, if anything, did you learn today?

    What, if anything, surprised you today?

    What, if anything, will you do differently moving forward?
    Retrospective
    Hidden Slide Slower

    View Slide