$30 off During Our Annual Pro Sale. View Details »

How learning Python/Dart/Clojure made me a better PHP Developer

How learning Python/Dart/Clojure made me a better PHP Developer

Sebastian

June 05, 2017
Tweet

More Decks by Sebastian

Other Decks in Technology

Transcript

  1. How learning
    Python/Dart/Clojure made me a
    better PHP Developer
    ViennaPHP May 2017
    @Sgoettschkes
    https://stocksnap.io/photo/LTB7BB80VH

    View Slide

  2. CODE

    View Slide

  3. CODE
    (Almost)

    View Slide

  4. View Slide

  5. A developer is born

    View Slide

  6. A developer is born
    1. Write crappy PHP “webapp”
    2. Make every mistake possible, including wiping
    production data without a backup
    3. Learn Java
    4. Write better PHP

    View Slide

  7. A developer is born
    // login.php
    require_once(‘header.php’);
    // ... some php
    ?>

    require_once(footer.php’);
    ?>

    View Slide

  8. A developer is born

    View Slide

  9. A developer is born

    View Slide

  10. A developer is born

    View Slide

  11. Let’s talk languages

    View Slide

  12. PHP from the outside
    ● Javas little brother
    ● Death by boilerplate

    View Slide

  13. JS from the outside
    ● Callback hell
    ● Many solutions to one problem
    ● So many small
    libraries

    View Slide

  14. Python from the outside
    ● Getting things done
    ● BIG libraries/frameworks

    View Slide

  15. Dart from the outside
    ● Modern (built from scratch)
    ● Async by default
    ● Small ecosystem

    View Slide

  16. Clojure from the outside
    ● Done is better than perfect
    ● First “useable” functional language for me
    ● Libraries, not frameworks

    View Slide

  17. Learn from each other

    View Slide

  18. Learn from Python
    Readability:
    if variable is not null:
    doSomething()
    else:
    doSomethingElse()

    View Slide

  19. Learn from Python
    Readability:
    with open(file.txt', 'w') as file:
    file.write(Hello ViennaPHP!')

    View Slide

  20. Make common tasks easy:
    // Constructor
    ClassName(this.var1, this.var2);
    Learn from Dart

    View Slide

  21. Make common tasks easy:
    // Implicit getters/setters
    print(obj.var1); //this is not a public
    property
    Learn from Dart

    View Slide

  22. Learn from Clojure
    Immutability:
    var1 = 15;
    var1++;

    View Slide

  23. Learn from Clojure
    Composability:
    (defn function1
    [var1 var2]
    (str var1 ″ - ″ var2))

    View Slide

  24. Learn from Clojure
    Composability:
    (defn function2
    [var1]
    (println (function1 ″DEBUG″ var1)))

    View Slide

  25. Learn from Clojure
    Syntax doesn’t matter:
    (defn function2
    [var1]
    (println
    (function [] {:var1 (function2)})))

    View Slide

  26. Not only languages
    ● Infrastructure (vagrant / docker)
    ● Architecture (Microservices)
    ● Methodology (Agile/Scrum/Kanban)
    ● ...

    View Slide

  27. Let’s GO
    Start a pet project

    View Slide

  28. Let’s GO
    Contribute to Open Source

    View Slide

  29. Let’s GO
    Use something new for a
    small project

    View Slide

  30. Let’s GO
    Small steps get you closer to
    your goal

    View Slide

  31. View Slide

  32. https://www.dropbox.com/s/6z5aiwa8l09g2pa/86H.jpg

    View Slide