SlideShare a Scribd company logo
PHPDay 11-05-2018
The way we teach tech Jeroen van der Gulik
About me
❖ Software Architect/ Consultant
❖ Co-Founder Isset
(https://isset.nl)
❖ Señor Developer
❖ Organizer DDDNL
❖ Builder of Artificial Stupidity
❖ @n0x13
2018 05-11 the way we teach tech - phpday
shōnen
少年漫画
boy
少年漫画
cartoon or comic
少年漫画
boys' comic
少年漫画
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
<html>
<head>
<title>My first project</title>
</head>
<body>
<?php echo '<p>Hello World<p>'; ?>
</body>
</html>
2018 05-11 the way we teach tech - phpday
Parse error: syntax error, unexpected
'echo' (T_ECHO), expecting ',' or ‘;'
in hello_world.php on line 6
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
Medior
Senior
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
2018 05-11 the way we teach tech - phpday
Context depends on
❖ Knowledge
❖ Experience
❖ Time
❖ Pressure
❖ Interest
No Knowledge
Some
Knowledge
Knowledgable
Just solve my problem √
Understand my problem √
I want options √
final class Example
{
public function doSomething()
{
$this->doAThingThatSometimesFails();
}
}
– John Doe (Jr. Developer)
“I want to log errors”
– Sansa Stark (Sr. Developer)
“Great ! Have you thought about ELK,
Syslog, Splunk or Kafka ?”
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
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
);
}
}
}
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
);
}
}
}
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
);
}
}
}
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
);
}
}
}
2018 05-11 the way we teach tech - phpday
– Alice Wonderland (Code Reviewer)
“What if we want to
change the location?”
Code Review
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
– Alice Wonderland (Code Reviewer)
“Ok much better !
But global variables are
tricky…”
2018 05-11 the way we teach tech - phpday
– Alice Wonderland (Code Reviewer)
“What if we want to log to
something else than file?”
interface Logger
{
public function log($message);
}
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
);
}
}
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());
}
}
}
– Alice Wonderland (Code Reviewer)
“Did you know there was a
standard for this?”
2018 05-11 the way we teach tech - phpday
– Alice Wonderland (Code Reviewer)
“Do you know about
decorators?”
interface DoSomething
{
public function doSomething();
}
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());
}
}
}
final class Example implements DoSomething
{
public function doSomething()
{
$this->doAThingThatSometimesFails();
}
}
2018 05-11 the way we teach tech - phpday
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)
Learning or Teaching opportunities
dev-books.com
Pair Programming
2018 05-11 the way we teach tech - phpday
Meetups
The Pac-Man Rule
EventStorming
Conferences
2018 05-11 the way we teach tech - phpday
Small Controlled Experiments
Absolutes
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
2018 05-11 the way we teach tech - phpday
– 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”
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
2018 05-11 the way we teach tech - phpday
Feedback
❖ https://joind.in/talk/d51ab

More Related Content

PDF
Let's Play Dart
PPTX
PHP BASICS FOR BEGINNERS
ODP
Php variables (english)
PPTX
Dev traning 2016 basics of PHP
PPT
Class 2 - Introduction to PHP
PDF
Data Types In PHP
PPTX
PHP Variables and scopes
PPTX
php basics
Let's Play Dart
PHP BASICS FOR BEGINNERS
Php variables (english)
Dev traning 2016 basics of PHP
Class 2 - Introduction to PHP
Data Types In PHP
PHP Variables and scopes
php basics

What's hot (20)

PDF
Dart, Darrt, Darrrt
PPTX
Javascript Basics by Bonny
PPS
Web technology html5 php_mysql
PDF
Drupal 8 customized checkout system
PPT
PHP variables
PDF
PHP-Part1
PPT
Introduction to php php++
PPTX
Php oop (1)
PDF
Value objects
PPT
Control Structures In Php 2
PPTX
Perl bhargav
PPTX
Class 8 - Database Programming
PDF
Starting Out With PHP
PPT
Intro to OOP and new features in PHP 5.3
PPT
Xml dom & sax by bhavsingh maloth
PDF
Php Tutorials for Beginners
PDF
Advanced PHP Simplified
PDF
Defensive Coding Crash Course Tutorial
PPT
7.1.intro perl
PDF
Our local state, my, my - Understanding Perl variables
Dart, Darrt, Darrrt
Javascript Basics by Bonny
Web technology html5 php_mysql
Drupal 8 customized checkout system
PHP variables
PHP-Part1
Introduction to php php++
Php oop (1)
Value objects
Control Structures In Php 2
Perl bhargav
Class 8 - Database Programming
Starting Out With PHP
Intro to OOP and new features in PHP 5.3
Xml dom & sax by bhavsingh maloth
Php Tutorials for Beginners
Advanced PHP Simplified
Defensive Coding Crash Course Tutorial
7.1.intro perl
Our local state, my, my - Understanding Perl variables
Ad

Similar to 2018 05-11 the way we teach tech - phpday (20)

PDF
Building Custom PHP Extensions
PDF
Drupaljam xl 2019 presentation multilingualism makes better programmers
PDF
Living With Legacy Code
PDF
So S.O.L.I.D Fu - Designing Better Code
PDF
PHP 8: Process & Fixing Insanity
PPT
PHP CLI: A Cinderella Story
PPTX
Php on the Web and Desktop
PPT
PPT
Php basic for vit university
PDF
OOP is more than Cars and Dogs
PDF
Current state-of-php
PDF
Framework agnostic application Will it fit with Symfony? - Symfony live warsa...
PPTX
PPTX
Perl basics for Pentesters
PDF
Objects, Testing, and Responsibility
KEY
PPTX
Hardcore PHP
ODP
PHP: The easiest language to learn.
PPTX
PHP in one presentation
ODP
Symfony CMF - PHP Conference Brazil 2011
Building Custom PHP Extensions
Drupaljam xl 2019 presentation multilingualism makes better programmers
Living With Legacy Code
So S.O.L.I.D Fu - Designing Better Code
PHP 8: Process & Fixing Insanity
PHP CLI: A Cinderella Story
Php on the Web and Desktop
Php basic for vit university
OOP is more than Cars and Dogs
Current state-of-php
Framework agnostic application Will it fit with Symfony? - Symfony live warsa...
Perl basics for Pentesters
Objects, Testing, and Responsibility
Hardcore PHP
PHP: The easiest language to learn.
PHP in one presentation
Symfony CMF - PHP Conference Brazil 2011
Ad

Recently uploaded (20)

PPTX
Reimagine Home Health with the Power of Agentic AI​
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Digital Strategies for Manufacturing Companies
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
medical staffing services at VALiNTRY
Reimagine Home Health with the Power of Agentic AI​
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Softaken Excel to vCard Converter Software.pdf
Wondershare Filmora 15 Crack With Activation Key [2025
PTS Company Brochure 2025 (1).pdf.......
Upgrade and Innovation Strategies for SAP ERP Customers
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Operating system designcfffgfgggggggvggggggggg
Odoo Companies in India – Driving Business Transformation.pdf
2025 Textile ERP Trends: SAP, Odoo & Oracle
VVF-Customer-Presentation2025-Ver1.9.pptx
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Digital Strategies for Manufacturing Companies
Understanding Forklifts - TECH EHS Solution
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
CHAPTER 2 - PM Management and IT Context
medical staffing services at VALiNTRY

2018 05-11 the way we teach tech - phpday