Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

2018 05-11 the way we teach tech - phpday

368 views

Published on

Starting your journey as a programmer can be daunting and overwhelming. There is so much to learn, so many contradicting sources of information, and so many different opinions about everything. Most of the time we don't get the answers we need or want, but we get vague options that don't really help us all that much. In this talk I discuss the problems we face when teaching others, the problems we face as an industry in a disparity between juniors and seniors and how we can vastly improve the way in which we teach our peers and educate our juniors.

Published in: Software
  • Be the first to comment

  • Be the first to like this

2018 05-11 the way we teach tech - phpday

  1. 1. PHPDay 11-05-2018 The way we teach tech Jeroen van der Gulik
  2. 2. About me ❖ Software Architect/ Consultant ❖ Co-Founder Isset (https://isset.nl) ❖ Señor Developer ❖ Organizer DDDNL ❖ Builder of Artificial Stupidity ❖ @n0x13
  3. 3. shōnen 少年漫画
  4. 4. boy 少年漫画
  5. 5. cartoon or comic 少年漫画
  6. 6. boys' comic 少年漫画
  7. 7. <html> <head> <title>My first project</title> </head> <body> <?php echo '<p>Hello World<p>'; ?> </body> </html>
  8. 8. Parse error: syntax error, unexpected 'echo' (T_ECHO), expecting ',' or ‘;' in hello_world.php on line 6
  9. 9. Medior
  10. 10. Senior
  11. 11. Stages of Problem Solving ❖ I just want to solve my problem ❖ I want to understand my problem ❖ I want to be pointed into the right direction and given options
  12. 12. Context depends on ❖ Knowledge ❖ Experience ❖ Time ❖ Pressure ❖ Interest
  13. 13. No Knowledge Some Knowledge Knowledgable Just solve my problem √ Understand my problem √ I want options √
  14. 14. final class Example { public function doSomething() { $this->doAThingThatSometimesFails(); } }
  15. 15. – John Doe (Jr. Developer) “I want to log errors”
  16. 16. – Sansa Stark (Sr. Developer) “Great ! Have you thought about ELK, Syslog, Splunk or Kafka ?”
  17. 17. final class Example { public function doSomething() { try { $this->doAThingThatSometimesFails(); } catch (Throwable $throwable) { file_put_contents( realpath('var/log/my.log'), $throwable->getMessage() . PHP_EOL, FILE_APPEND ); } } }
  18. 18. final class Example { public function doSomething() { try { $this->doAThingThatSometimesFails(); } catch (Throwable $throwable) { file_put_contents( realpath('var/log/my.log'), $throwable->getMessage() . PHP_EOL, FILE_APPEND ); } } }
  19. 19. final class Example { public function doSomething() { try { $this->doAThingThatSometimesFails(); } catch (Throwable $throwable) { file_put_contents( realpath('var/log/my.log'), $throwable->getMessage() . PHP_EOL, FILE_APPEND ); } } }
  20. 20. final class Example { public function doSomething() { try { $this->doAThingThatSometimesFails(); } catch (Throwable $throwable) { file_put_contents( realpath('var/log/my.log'), $throwable->getMessage() . PHP_EOL, FILE_APPEND ); } } }
  21. 21. – Alice Wonderland (Code Reviewer) “What if we want to change the location?”
  22. 22. Code Review
  23. 23. – Alice Wonderland (Code Reviewer) “Ok much better ! But global variables are tricky…”
  24. 24. – Alice Wonderland (Code Reviewer) “What if we want to log to something else than file?”
  25. 25. interface Logger { public function log($message); }
  26. 26. final class FileLogger implements Logger { private $pathToLogFile; public function __construct(string $pathToLogFile) { $this->pathToLogFile = $pathToLogFile; } public function log($message) { file_put_contents( realpath($this->pathToLogFile), $message, FILE_APPEND ); } }
  27. 27. final class Example { private $logger; public function __construct(Logger $logger) { $this->logger = $logger; } public function doSomething() { try { $this->doAThingThatSometimesFails(); } catch (Throwable $throwable) { $this->logger->log($throwable->getMessage()); } } }
  28. 28. – Alice Wonderland (Code Reviewer) “Did you know there was a standard for this?”
  29. 29. – Alice Wonderland (Code Reviewer) “Do you know about decorators?”
  30. 30. interface DoSomething { public function doSomething(); }
  31. 31. final class LoggableExample implements DoSomething { private $example; private $logger; public function __construct(Example $example, LoggerInterface $logger) { $this->example = $example; $this->logger = $logger; } public function doSomething() { try { $this->example->doSomething(); } catch (Throwable $throwable) { $this->logger->error($throwable->getMessage()); } } }
  32. 32. final class Example implements DoSomething { public function doSomething() { $this->doAThingThatSometimesFails(); } }
  33. 33. We explained ❖ Why global variable (state) is bad ❖ Why Dependancy Injection is good ❖ Why Interfaces are good ❖ Why Single Responsibility is good ❖ Why Decorator is useful (sometimes)
  34. 34. Learning or Teaching opportunities
  35. 35. dev-books.com
  36. 36. Pair Programming
  37. 37. Meetups
  38. 38. The Pac-Man Rule
  39. 39. EventStorming
  40. 40. Conferences
  41. 41. Small Controlled Experiments
  42. 42. Absolutes
  43. 43. – Robert Martin a.k.a. Uncle Bob “The number of programmers doubles every 5 years. That means, at any time, half the world's programmers have less than 5 yrs experience”
  44. 44. The way we should teach tech ❖ People learn best 1 step at the time ❖ Find opportunities to learn or teach ❖ Find mentors/mentees ❖ Create your own Seniors ❖ Never stop learning
  45. 45. Feedback ❖ https://joind.in/talk/d51ab

×