- Added PHP north west and PHP Works talks.

This commit is contained in:
Derick Rethans
2008-11-05 14:51:03 +00:00
parent c5239c385d
commit 14851646d4
24 changed files with 404 additions and 13 deletions

75
kiss-phpnw.xml Normal file
View File

@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<presentation
template="css"
navmode="html"
navbarbackground="#4373b4"
navbartopiclinks="0"
navColor="#f1fbff"
logo1=""
stylesheet="presentations/slides/ezc/ez.css"
backgroundfixed="1" >
<topic>PHP</topic>
<title>K.I.S.S.</title>
<event>PHP Northwest</event>
<location>Manchester, UK</location>
<date>November 22nd, 2008</date>
<speaker>Derick Rethans</speaker>
<email>dr@ez.no</email>
<url>http://derickrethans.nl/talks.php</url>
<slide>slides/kiss/title.xml</slide>
<slide>slides/kiss/test.xml</slide>
<!-- HTML no-nos
-->
<slide>slides/kiss/simple-url.xml</slide>
<slide>slides/kiss/url-examples.xml</slide>
<slide>slides/kiss/open-pages.xml</slide>
<slide>slides/kiss/download-links.xml</slide>
<slide>slides/kiss/javascript.xml</slide>
<slide>slides/kiss/ajax.xml</slide>
<slide>slides/kiss/ajax2.xml</slide>
<slide>slides/kiss/arngren.xml</slide>
<slide>slides/kiss/website-language.xml</slide>
<slide>slides/kiss/language-google.xml</slide>
<!-- flash -->
<slide>slides/kiss/flashturbation.xml</slide>
<slide>slides/kiss/blink.xml</slide>
<slide>slides/kiss/sifr1.xml</slide>
<slide>slides/kiss/sifr2.xml</slide>
<slide>slides/kiss/sifr3.xml</slide>
<slide>slides/kiss/semi-broken.xml</slide>
<!-- java -->
<slide>slides/kiss/java0.xml</slide>
<slide>slides/kiss/java1.xml</slide>
<!-- phyton joke -->
<slide>slides/kiss/python.xml</slide>
<slide>slides/kiss/simple-php.xml</slide>
<slide>slides/kiss/less-simple-php.xml</slide>
<slide>slides/kiss/hard-php.xml</slide>
<slide>slides/kiss/goto.xml</slide>
<slide>slides/kiss/goto1.xml</slide>
<slide>slides/kiss/goto3.xml</slide>
<slide>slides/kiss/hammer.xml</slide>
<slide>slides/kiss/universal-hammer.xml</slide>
<slide>slides/kiss/hammer-factory.xml</slide>
<slide>slides/kiss/hammer-factory-design.xml</slide>
<slide>slides/kiss/complex-includes.xml</slide>
<slide>slides/kiss/spaghetti.xml</slide>
<slide>slides/kiss/dependencies.xml</slide>
<slide>slides/kiss/debug.xml</slide>
<slide>slides/kiss/ely.xml</slide>
<!--
- abstraction is good, but not always necessary
- simple architecture, no-dependencies, makes easier testing
- simple debugging and development (show komodo vs eclipse)
-->
</presentation>

View File

@@ -0,0 +1,3 @@
<slide template="white">
<blurb class="blurb_gigantic">download links</blurb>
</slide>

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

View File

@@ -0,0 +1,3 @@
<slide template="white">
<image filename="hammer-factory-design.jpg"/>
</slide>

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -0,0 +1,3 @@
<slide template="white">
<image filename="hammer-factory.jpg"/>
</slide>

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -0,0 +1,3 @@
<slide template="white">
<image filename="universal-hammer.jpg"/>
</slide>

View File

@@ -15,7 +15,7 @@
?>]]></example>
<break/>
<blurb>The timestamps returned are still 32 bit signed integers as this is all that PHP supports.</blurb>
<blurb>The timestamp's range is still limited to what the CPU supports.</blurb>
</slide>

6
slides/time/book.xml Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide>
<title>php|architect's guide to Date/Time handling</title>
<image align="center" filename="clocks.jpg" pdf-scale="0.5" y-offset="4" />
</slide>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide>
<title>Date/Time Functions in PHP 4 and PHP 5.0</title>
<title>Traditional Date/Time Functions</title>
<subtitle>Limitations</subtitle>
<list>

View File

@@ -9,10 +9,13 @@
$date->setTime( 15, 0, 7 );
echo $date->format(DateTime::ISO8601), "<br/>\n";
$date->setDate( 2006, 12, 22 );
$date->setDate( 2008, 07, 22 );
echo $date->format(DateTime::ISO8601), "<br/>\n";
$date->setIsoDate( 2006, 45, 2 );
echo $date->setIsoDate( 2008, 45, 2 )->format(DateTime::ISO8601), "<br/>\n";
// new in PHP 5.3:
$date->setTimestamp( 1200128314 );
echo $date->format(DateTime::ISO8601), "<br/>\n";
?>]]></example>
</slide>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide>
<title>Parsing Dates</title>
<subtitle>With user-defined format</subtitle>
<blurb>Creating strings with the ~date_create_format_format()~ function:</blurb>
<example result="1"><![CDATA[<?php
$date = "06/08/04";
echo date_create_from_format( '!m/d/y', $date )->format( DateTime::ISO8601 ), "\n";
?>]]></example>
<break/>
<blurb>Parsing strings with the ~date_parse_format_format()~ function:</blurb>
<example result="1"><![CDATA[<?php
$date = "06/08/04";
print_r( date_parse_from_format( '!m*d*y', $date ) );
?>]]></example>
</slide>

View File

@@ -4,7 +4,7 @@
<subtitle>Timezone Support</subtitle>
<list>
<bullet>Bundled timezone database with 551 zones</bullet>
<bullet>Bundled timezone database with 559 zones</bullet>
<bullet>Not dependent on timezone abbreviations</bullet>
<bullet>Timezones have the format: Continent/Location or Continent/Location/Sublocation - Like: Europe/Amsterdam, America/Indiana/Knox</bullet>
</list>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide>
<title>Intervals (PHP 5.3)</title>
<subtitle>Applying an interval</subtitle>
<example result="1"><![CDATA[<pre><?php
$d = new DateTime( 'November 6th, 2008' );
$i = DateInterval::createFromDateString( "next weekday" );
echo $d->add( $i )->format( "l Y-m-d\n" );
echo $d->add( $i )->format( "l Y-m-d\n" );
$i = DateInterval::createFromDateString( "3 months 10 days" );
echo $d->sub( $i )->format( "l Y-m-d\n" );
?>]]></example>
</slide>

26
slides/time/intervals.xml Normal file
View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide>
<title>Intervals (PHP 5.3)</title>
<subtitle>Creating an interval</subtitle>
<example result="1"><![CDATA[<?php
// full notation
$i = new DateInterval( 'P0003-01-15T06:12:30' );
// abbreviated notation
$i = new DateInterval( 'P3DT6H' );
// from a difference
$d1 = new DateTime();
$d2 = new DateTime( "2008-12-12 09:15 Europe/Amsterdam" );
$i = $d1->diff( $d2 );
// displaying the difference
echo $i->format( '%a days, %h hours, %i minutes' ), "\n";
?>]]></example>
<break lines="2"/>
<example><![CDATA[<?php
// create from string
$i = DateInterval::createFromDateString( "next weekday" );
?>]]></example>
</slide>

20
slides/time/period-1.xml Normal file
View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide>
<title>Periods (PHP 5.3)</title>
<subtitle>Initializing a period</subtitle>
<example result="1"><![CDATA[<?php
// start, interval and count
$db = new DateTime( '2008-07-31' ) ;
$di = DateInterval::createFromDateString( 'next weekday' );
$p = new DatePeriod( $db, $di, 3 );
// start, interval and end
$de = new DateTime ( '2008-08-05' );
$p = new DatePeriod( $db, $di, $de );
// ISO 8601 string
$s = "2008-10-04T20:56:18Z/P0000-00-20T03:15:54/2008-12-22T00:00:00Z";
$p = new DatePeriod( $s );
?>]]></example>
</slide>

16
slides/time/period-2.xml Normal file
View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide>
<title>Periods (PHP 5.3)</title>
<subtitle>Iterating over a period</subtitle>
<example result="1"><![CDATA[<pre><?php
$db = new DateTime( '2007-12-31' );
$de = new DateTime( '2008-12-31' );
$di = DateInterval::createFromDateString( 'third tuesday of next month' );
$dp = new DatePeriod( $db, $di, $de, DatePeriod::EXCLUDE_START_DATE );
foreach ( $dp as $dt )
{
echo $dt->format( "F jS\n" );
}
?>]]></example>
</slide>

View File

@@ -11,7 +11,7 @@ if (isset($_POST['country'])) {
if ($info) {
$lat = $info['lat']; $lon = $info['lon'];
$info = date_sun_info(strtotime("2007-12-19"), $lat, $lon);
$info = date_sun_info(time(), $lat, $lon);
echo "Sunrise is at ", date(DateTime::RSS, $info['sunrise']), "\n";
echo "Sunset is at ", date(DateTime::RSS, $info['sunset']), "\n";
echo "Day length is ",

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide>
<title>Using Timezones</title>
<subtitle>The Timezone Object</subtitle>
<blurb>Getting a timezone's name:</blurb>
<example result="1"><![CDATA[<?php
$tz = timezone_open("Asia/Singapore");
echo timezone_name_get($tz), ', ';
$tz = timezone_open("CEST");
echo timezone_name_get($tz);
?>]]></example>
<break lines="2"/>
<blurb>Getting the current offset to GMT with a timezone for a specific date:</blurb>
<example result="1"><![CDATA[<?php
$tz = new DateTimeZone("Europe/Amsterdam");
$d = new DateTime("2005-01-22 09:15");
echo $tz->getOffset($d), ', ';
$d->modify("+6 months");
echo $tz->getOffset($d);
?>]]></example>
</slide>

View File

@@ -1,19 +1,21 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide>
<title>Timezones Utilities</title>
<subtitle>Transition Times</subtitle>
<subtitle>Transition Times and Location Information</subtitle>
<blurb>Creating a timezone resource:</blurb>
<example result="1"><![CDATA[<?php
$tz = timezone_open("Europe/Amsterdam");
$trs = timezone_transitions_get($tz);
$tz = timezone_open("America/Caracas");
$trs = $tz->getTransitions();
// new in PHP 5.3:
$trs = $tz->getTransitions(strtotime('1960-01-01 UTC'));
echo "<pre>\n";
foreach ($trs as $tr) {
printf("%20s %7d %d %s\n",
$tr['time'], $tr['offset'],
$tr['isdst'], $tr['abbr']);
$tr['time'], $tr['offset'], $tr['isdst'], $tr['abbr']);
}
?>]]></example>
// new in PHP 5.3:
$loc = $tz->getLocation();
echo 'Info: ', join( ' - ', $loc ), "\n";]]></example>
</slide>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide>
<title>Timezones Utilities</title>
<subtitle>Restricting listing by geographical location</subtitle>
<blurb>Restrict by continent:</blurb>
<example result="1"><![CDATA[<?php
$ids = timezone_identifiers_list( DateTimeZone::EUROPE );
echo implode(", ", array_slice($ids, 0, 5)), '...';
?>]]></example>
<break/>
<blurb>Restrict by country:</blurb>
<example result="1"><![CDATA[<?php
$ids = timezone_identifiers_list( DateTimeZone::PER_COUNTRY, 'US' );
echo implode(", ", array_slice($ids, 0, 10)), '...';
?>]]></example>
</slide>

85
tdd-phpworks8.xml Normal file
View File

@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<presentation
template="css"
navmode="html"
navbarbackground="#4373b4"
navbartopiclinks="0"
navColor="#f1fbff"
logo1=""
stylesheet="presentations/slides/ezc/ez.css"
backgroundfixed="1" >
<topic>Testing</topic>
<title>Test-Driven Development</title>
<event>php|works</event>
<location>Atlanta, US</location>
<date>Nov 14th, 2008</date>
<speaker>Derick Rethans</speaker>
<email>dr@ez.no</email>
<url>http://derickrethans.nl/talks.php</url>
<slide>slides/tdd/title.xml</slide>
<!-- INTRODUCTION -->
<slide>slides/toolbox/me.xml</slide>
<!-- Funny Intro -->
<slide>slides/tdd/broken-code-is-fine.xml</slide>
<slide>slides/tdd/dont-ship.xml</slide>
<!-- TESTING intro:
- What needs testing?
- Types of testing + tools
-->
<slide>slides/tdd/testing.xml</slide>
<slide>slides/tdd/webapp-parts-1.xml</slide>
<slide>slides/tdd/unit-testing.xml</slide>
<!-- TDD intro
- Development process, not just a test method
- It is a religion: ✡✝☪
- Traditional development
- TDD
- when to run tests
-->
<slide>slides/tdd/tdd.xml</slide>
<slide>slides/tdd/not-a-testing-method.xml</slide>
<slide>slides/tdd/religion.xml</slide>
<slide>slides/tdd/back-in-time.xml</slide>
<slide>slides/tdd/darth.xml</slide>
<slide>slides/tdd/the-test-is-king.xml</slide>
<slide>slides/tdd/test-driven-development.xml</slide>
<slide>slides/tdd/practical-test-driven-development.xml</slide>
<slide>slides/tdd/addressing-defects.xml</slide>
<slide>slides/tdd/testuvius.xml</slide>
<slide>slides/tdd/death-star.xml</slide>
<!-- Quick php unit example
- Quick example
- Code coverage
- some problems with leaking, system dependent things, can't test private
methods, hard to test exceptions - things that should not happen
-->
<slide>slides/tdd/phpunit.xml</slide>
<slide>slides/tdd/phpunit-output.xml</slide>
<slide>slides/tdd/no-code-without-test.xml</slide>
<slide>slides/tdd/no-code-without-test2.xml</slide>
<slide>slides/tdd/no-code-without-test3.xml</slide>
<slide>slides/tdd/phpundercontrol.xml</slide>
<slide>slides/tdd/unit-test-issues.xml</slide>
<!-- Politics -->
<slide>slides/tdd/politics.xml</slide>
<slide>slides/tdd/politics-devs.xml</slide>
<slide>slides/tdd/politics-managers.xml</slide>
<slide>slides/tdd/darth-sb.xml</slide>
<!-- TDD case studies
-->
<slide>slides/tdd/case-studies.xml</slide>
<slide>slides/tdd/case-study-major-players.xml</slide>
<slide>slides/tdd/case-study-dev-testimonials.xml</slide>
<slide>slides/internals/questions.xml</slide>
<slide>slides/tdd/resources.xml</slide>
</presentation>

70
time-phpworks8.xml Normal file
View File

@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<presentation
template="css"
navmode="html"
navbarbackground="#4373b4"
navbartopiclinks="0"
navColor="#f1fbff"
logo1=""
stylesheet="presentations/slides/ezc/ez.css"
backgroundfixed="1" >
<topic>Localization and Internationalization</topic>
<title>Time = Money</title>
<event>php|works 2008</event>
<location>Atlanta, USA</location>
<date>November 14th, 2008</date>
<speaker>Derick Rethans</speaker>
<email>dr@ez.no</email>
<url>http://derickrethans.nl/talks.php</url>
<slide>slides/perf/title.xml</slide>
<!-- INTRODUCTION -->
<slide>slides/time/what-is-time5.xml</slide>
<slide>slides/time/problems-timezones.xml</slide>
<slide>slides/time/problems-dst.xml</slide>
<slide>slides/time/problems-dst2.xml</slide>
<slide>slides/time/problems-dst3.xml</slide>
<slide>slides/time/problems-timezone-abbr.xml</slide>
<slide>slides/time/problems-string-representation.xml</slide>
<!-- PHP - CURRENT -->
<slide>slides/time/current-limitations.xml</slide>
<!-- PHP - IMPROVEMENTS -->
<slide>slides/time/improvements-overview.xml</slide>
<slide>slides/time/improvements-formats.xml</slide>
<slide>slides/time/improvements-timezones.xml</slide>
<slide>slides/time/improvements-timezones-which-to-use.xml</slide>
<slide>slides/time/improvements-more-on-timezones.xml</slide>
<!-- PHP - CODE EXAMPLES -->
<slide>slides/time/basic-parse-time.xml</slide>
<slide>slides/time/basic-parse-time-new.xml</slide>
<slide>slides/time/date-parse.xml</slide>
<slide>slides/time/date-parse-from-format.xml</slide>
<!-- DATE EXAMPLES -->
<slide>slides/time/date-format.xml</slide>
<slide>slides/time/date-modify2.xml</slide>
<slide>slides/time/date-modify.xml</slide>
<slide>slides/time/basic-using-zones.xml</slide>
<slide>slides/time/default-timezone.xml</slide>
<slide>slides/time/timezone-object-1.xml</slide>
<slide>slides/time/timezone-object-2.xml</slide>
<slide>slides/time/date-timezone.xml</slide>
<slide>slides/time/timezone-utilities-1.xml</slide>
<slide>slides/time/timezone-utilities-2.xml</slide>
<slide>slides/time/timezone-utilities-3.xml</slide>
<!-- INTERVALS and PERIODS -->
<slide>slides/time/intervals.xml</slide>
<slide>slides/time/intervals-2.xml</slide>
<slide>slides/time/period-1.xml</slide>
<slide>slides/time/period-2.xml</slide>
<!-- EXIT -->
<slide>slides/time/book.xml</slide> <!-- resources -->
<slide>slides/time/resources.xml</slide> <!-- resources -->
<slide>slides/time/user-timezone.xml</slide>
<slide>slides/time/sun-up-down.xml</slide>
</presentation>