noun: unconferences 1. a loosely structured conference emphasizing the informal exchange of information and ideas between participants, rather than following a conventionally structured programme of events. 2. "at this unconference, attendees created sessions on the spot, making for an energizing and freewheeling exchange"
poses the ‘Galactic Network’ concept (DARPA) • (1967) ARPANET plan published • (1974) ‘Internet’ term RFC675 (TCP) • (1976) X.25 TTY/ BBSes • (1981) ARPANET expanded to CSNET • (1989) Tim Berners-Lee invents www. • (1989) AARNET (and various regionals) • (1992) NSFNET Interconnect approved • (1995) Commercial traffic restrictions over the NSFNET end, and so begins the age of the internet http://www.internetsociety.org/internet/what-internet/history-internet/brief-history-internet
Tools" || PHP Tools ◦ Written in C, interacted via CGI, 17mo to write ◦ HTML + DBs + Web Form libraries for his résumé site ◦ <!-- Code goes here --> (HTML Comments) ◦ Shared code on USENET to fix bugs / write better code ◦ “It doesn’t make sense writing large apps in PHP” ◦ “There are people who actually like programming. I don't understand why they like programming.” ◦ “I don't know how to stop it, there was never any intent to write a programming language” • (1997) PHP 2.0 "PHP/Forms Interpreter" || PHP/FI 2.0 ◦ +Zeev Suraski +Andi Gutmans ◦ Some people really liked it dev team grow-oh-oh’ed ◦ Used really_long_variable_or_function_etc_names to evenly distribute ‘things’ in memory http://en.wikiquote.org/wiki/Rasmus_Lerdorf Rasmus Lerdorf - First developer of PHP
Preprocessor (recursive names were a thing) ◦ 60,000 Domains ~1% of the internet (May 1998 Netcraft Survey) ◦ Rewrite of internal parser ◦ Many more developers joining core team ◦ Peaked at ~10% of the interwebs • (2000) 4.0+ Zend Engine ◦ Better performance, Sessions, Security, Basic OOP ◦ PEAR (PHP Extension and Application Repository) ◦ PHP Quality Assurance Initiative ◦ $_GET, $_POST, $_SESSION superglobals in 4.1 ◦ CLI in 4.3 https://line.do/history-of-php/r5q4x1/vertical https://line.do/php-evolution/8oq/vertical
2 ◦ Now dozens of developers + dozens more on libs ◦ Re-engineered cores, massive perf. improvements, PDO, Native JSON support ◦ 10M - 100M installs…. > ENTIRE INTERNET 1998 • (2009) 5.3 <-GAF (Unsupported from Jun 2014) ◦ Namespace support, Native closures, Garbage collection of circular references ◦ PHAR, Internationalization extension ◦ 2010 HipHop released, HHVM / Hack developed ◦ > 140 bugs fixed • (2010-11) PHP-FPM, PHP-FIG, Composer, MOAR frameworks ◦ FastCGI Process Manager much faster for websites at scale ◦ PSR code standards developed ◦ Composer developed for dependency management http://www.php-fig.org/
OpCodes • Major bottlenecks often due to DB / MemCache / Redis / Thrift / API • PHP is rarely the bottleneck • VLD - Vulcan Logic Disassembler https://speakerdeck.com/dshafik/phpnw14-php-under-the-hood http://pecl.php.net/package/vld
• Supports many PHP libs/fws ◦ phpunit, phpunit-mock-objects ◦ composer, symfony, ZF etc. • Bug-for-bug compatible with PHP~5.6 • Just-in-time (JIT) compilation ◦ 2x interpreted PHP speed ◦ Multiple versions of your code ◦ Repo Authoritative mode +25% ◦ Drop in replacement for PHP-FPM ◦ Performance hit on each sync till spool-up • Hacklang ◦ + type hinting, async functions ◦ - prevents HTML in PHP, globals etc. ◦ Hackification (@types, log, harden) • LTS +1 year after release, 6mo cutover http://ma.ttias.be/hhvm-versus-php-fpm-5-4-and-5-5-performance-comparison/ http://www.slideshare.net/pierrej
then make them pass by implementing • A testing mindset forces you to think about the architecture of your system more ◦ Forces you to think about implementation and plan before you write
◦ Decoupling implementation code - i.e. separate rules in Conway’s GOL • Cover requirements from spec instead of chasing coverage • Keep tests as specific as possible
Tests need to be maintained too, or they become useless and you can’t trust them • Use helper functions to improve readability http://www.agitar.com/downloads/TheWayOfTestivus.pdf
the tests • The other reads the tests and starts implementing them • No talking! Communicate via tests • The only way you control implementation is through tests • Experiment you can run in your own teams
team. • Wrote a really simple test for DAO (Python service) and then one of us had to implement this. Watch them implement! • Changes how you write tests when you see someone trying to implement straight from your tests.
for the assert statements. Make meaningful assert statements. Comments help out a lot. assertTrue(log.status == 1) assertEquals( log.status, SubscriptionStatus.SUBSCRIBED.value )
used to describe the degree to which the source code of a program is tested by a particular test suite.” “If I can’t test it, I don’t trust it” “How many tests are enough?”... “100% test coverage is a really good start”
= ''; for ($i = 0; $i < $num1, $i++) { if ($num2 > $num1) { $out .= $num1 . ' then ' . $num2; } } return $out; } function testWhatsNext('test'){ $this->assertEquals(whatsNext(2,1),'1 then 2'); } “Code Coverage is a measure of how many lines of code a unit test suite has executed. Not tested. Executed” http://blog.astrumfutura.com/2015/01/lies-damned-lies-and-code-coverage-towards-mutation-testing/
have 100% Code Coverage. That’s actually a lie. More specifically, you actually have 100% Line Coverage. PHP_CodeCoverage and XDebug are incapable, at this time, of measuring Statement Coverage, Branch Coverage, and Condition Coverage. Your 100% score is only 25% of the story. Let’s call it 10% because I’m mean and there are other forms of Coverage that I have not mentioned.” • phpunit code coverage inaccurate • Do your tests -really- cover all cases? • How can you be sure? http://blog.astrumfutura.com/2015/01/lies-damned-lies-and-code-coverage-towards-mutation-testing/
small defects into code ▪ > to < ▪ != to == ▪ (;i<10;i++) to (;i < 10;i--) ▪ if / else / while etc. ◦ Supports phpunit ◦ Fault tolerant (∞ loops, fatals etc.) • Requires a complete set of test cases (not tests) • Gives a level of assurance that the system won’t break in unforeseen situations (test coverage does not) https://github.com/padraic/humbug
Monty on MariaDB vs MySQL • Holistic performance improvement… anything > 100ms is too slow! • QB / Zephir, moar runtime optimisation • Process @Github • Scaling delivery tracking @ Etsy • REST done right • Grunt php-unit • Composing Composer • How to make a PHP virus/worm in 15mins http://www.phpconference.com.au/#speakers