The WordPress Hacker's Guide to the \Galaxy() [@Baltimore PHP]
-
Upload
jason-rhodes -
Category
Technology
-
view
208 -
download
0
description
Transcript of The WordPress Hacker's Guide to the \Galaxy() [@Baltimore PHP]
The WordPress Hacker’s Guide to the \Galaxy()
Wednesday, February 20, 13
The Person Who Is Interested In Learning More About PHP
But Doesn’t Have Much Experience With Code or
Programming’s
Guide to the \Galaxy()Wednesday, February 20, 13
The WordPress Hacker’s Guide to the \Galaxy()
Wednesday, February 20, 13
@rhodesjasongithub.com/jasonrhodesnotrobotic.com
Wednesday, February 20, 13
uncharted backwaters
unfashionable end of the Western Spiral arm
of the Galaxy
a small unregarded yellow sun
utterly insignificant little blue-green planet
Wednesday, February 20, 13
Wednesday, February 20, 13
Wednesday, February 20, 13
Wednesday, February 20, 13
PHP is popular,
and people hate it.
Wednesday, February 20, 13
PHP is an embarrassment, a blight upon my craft.
It’s so broken, but so lauded by every empowered amateur who’s yet to learn anything else, as to be maddening.
PHP is an embarrassment,
http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/
so lauded by every empowered amateur who’s yet to learn anything else
Wednesday, February 20, 13
When faced with either doing something nonsensical or aborting with an error, it will do something nonsensical.
There’s no clear design philosophy.
PHP takes inspiration from other languages, yet still is incomprehensible to anyone who knows those languages.
Weak typing is so complex that whatever minor programmer effort is saved is by no means worth it.
There is a whole lot of action at a distance.
The language is full of global and implicit state.
There is no threading support whatsoever.
Parts of PHP are practically designed to produce buggy code.
Your program will not blow up; it will, instead, do the wrong thing with no warning…
PHP is a community of amateurs.
This, right here, is the biggest problem with PHP: it is absolutely the blind leading the blind.
There is no way to declare a variable.
There are no references. What PHP calls references are really aliases.
Variable names are case-sensitive. Function and class names are not.
There is no module system, even for PHP code.
PHP language problems as described at http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/
Wednesday, February 20, 13
PHP is a community of amateurs.
Wednesday, February 20, 13
Wednesday, February 20, 13
Wednesday, February 20, 13
Terrible design buried under a mountain of spaghetti code
Reading through [WordPress code] is like jabbing red-hot fire pokeys into your eyes.
BEHOLD WORDPRESS, DESTROYER OF CPUS
remote shell with cms on side, aka: shit
shit plugins
WordPress is for cat pictures and diary entries.
code is crapcrapcrap
F$%@ THAT F$%@ THAT F$%@ THAT F$%@ THAT F$%@ THAT F$%@ THAT
WordPress is... just adequate
WordPress is for amateurs.
WordPress is... terrifyingly insecure.
No good default caching, it will kill your server if you don’t know what you’re doing
Stack Overflow spam questions
Not a “real” CMS and definitely not a “real” framework
WordPress problems as described by various PHP developers
A really terrible database structure
Wednesday, February 20, 13
WordPress is for amateurs.
Wednesday, February 20, 13
=
Wednesday, February 20, 13
WORDPRESS... IS PHP!!it’s PHP eating PHP?
Wednesday, February 20, 13
PHP WILL MAKE ME BETTER AT WORDPRESS?!
Wednesday, February 20, 13
EVERYTHING YOU NEED TO KNOW
ABOUT ANYTHING(PHP)
WP Hacker’s Guide
Wednesday, February 20, 13
LTFCL
WP Hacker’s Guide #1
Wednesday, February 20, 13
Wednesday, February 20, 13
Wednesday, February 20, 13
Wednesday, February 20, 13
Drush
Wednesday, February 20, 13
Wednesday, February 20, 13
Wednesday, February 20, 13
Wednesday, February 20, 13
Wednesday, February 20, 13
Wednesday, February 20, 13
Wednesday, February 20, 13
Wednesday, February 20, 13
INVEST IN A SAFETY NET
WP Hacker’s Guide #2
Wednesday, February 20, 13
my-resume.docx
Wednesday, February 20, 13
⌘S
my-resume.docx
Wednesday, February 20, 13
my-resume.docx
Wednesday, February 20, 13
my-resume.docx
⌘S
Wednesday, February 20, 13
my-resume-alt-1.docx
⌘⇧S
Wednesday, February 20, 13
my-resume-alt-1.docx SUCKS
CAN’T GET BACK HERE
CAN’T PUT IT BACK TOGETHER
my-resume.docx
Wednesday, February 20, 13
Wednesday, February 20, 13
+
Wednesday, February 20, 13
FIND TRUSTED TRAVELERS
WP Hacker’s Guide #3
Wednesday, February 20, 13
USERGROUP IRC STACK
OVERFLOW
Wednesday, February 20, 13
KNOW YOUR SHIP(S)
WP Hacker’s Guide #4
Wednesday, February 20, 13
Wednesday, February 20, 13
$ brew install git
Wednesday, February 20, 13
Wednesday, February 20, 13
LEARN THE LANGUAGE
WP Hacker’s Guide #5
Wednesday, February 20, 13
OOP + CALLBACKS
LEARN THE LANGUAGE
Wednesday, February 20, 13
add_action(“action”, “function_name”);
CALLABLE
Wednesday, February 20, 13
array($object, “method_name”)
Wednesday, February 20, 13
Wednesday, February 20, 13
Wednesday, February 20, 13
Wednesday, February 20, 13
MVCLEARN THE LANGUAGE
Wednesday, February 20, 13
Model
Wednesday, February 20, 13
Model
Wednesday, February 20, 13
View
Wednesday, February 20, 13
xActor 1
xActor 2
xActor 3
View
Wednesday, February 20, 13
Controller
Wednesday, February 20, 13
<?php
mysite.com/categories/recipes
Wednesday, February 20, 13
mysite.com/categories/recipes
Wednesday, February 20, 13
DILEARN THE LANGUAGE
Wednesday, February 20, 13
Wednesday, February 20, 13
MEANWHILE, IN ANOTHER PLUGIN...
Wednesday, February 20, 13
Wednesday, February 20, 13
FATAL ERROR
Wednesday, February 20, 13
Wednesday, February 20, 13
Wednesday, February 20, 13
Wednesday, February 20, 13
To review:
LTFCLINVEST IN A SAFETY NETFIND TRUSTED TRAVELERSKNOW YOUR SHIP(S)LEARN THE LANGUAGE
Wednesday, February 20, 13
Wednesday, February 20, 13
GOOGLE EXISTS
Wednesday, February 20, 13
YOUR CODE WILL SUCKAnd nobody will die.
(Probably.)
Wednesday, February 20, 13
EVERYONE ELSE’SCODE SUCKS TOO
Wednesday, February 20, 13
@rhodesjasongithub.com/jasonrhodes
Slides, notes, and bad code:notrobotic.com/talks/wpgalaxy
Wednesday, February 20, 13