SlideShare a Scribd company logo
1 of 177
Simple Ways
      To Be A
Better Programmer
     Michael G Schwern
    schwern@pobox.com
Discussion Session
     D135 @ 5:30pm
#!/usr/bin/perl -s
$;=$/;seek+DATA,!++$/,!$s;$_=<DATA>;$s&&print||$g&&do{$y=($x||=20)*($y||8);sub
i{sleep&f}sub'p{print$;x$=,join$;,$b=~/.{$x}/g}$j=$j;sub'f{pop}sub
n{substr($b,&f%$y,3)=~tr,O,O,}sub'g{$f=&f-1;($w,$w,substr($b,&f,1),O)[n($f-$x)+
n($x+$f)-(substr($b,&f,1)eq+O)+n$f]||$w}$w=quot;40quot;;$b=join'',@ARGV?<>:$_,$w
x$y;$b=~s).)$&=~/w/?O:$w)ge;substr($b,$y)=q++;$g='$i=0;$i?$b:$c=$b;
substr+$c,$i,1,g$i;$g=~s?d+?($&+1)%$y?e;$i-$y+1?eval$g:do{$i=-1;$b=$c;p;i
1}';sub'e{eval$g;&e}e}||eval||die+No.$;
__DATA__
if($j){{$^W=$|;*_=sub{$=+s=#([A-z])(.*)#=#$+$1#=g}}
@s=(q[$_=sprintf+pop@s,@s],q[
if($j){{$^W=$|;*_=sub{$=+s=#([A-z])(.*)#=#$+$1#=g}}     #_The_Perl_Journal_#
@s=(q[%s],q[%s])x2;%s;printquot;nquot;x&_,$_;i$j;eval}
])x2;$_=sprintf+pop@s,@s;printquot;nquot;x&_,$_;i$j;eval}$/=$y;$quot;=quot;,quot;;print
q<#!/usr/local/bin/perl -sw
if(!$s){>.($_=<>).q<}else{@s=(q[printf+pop@s,@s],q[#!/usr/local/bin/perl -sw
if(!$s){>.(s$%$%%$g,tr=[=[===tr=]=]=||&d,$_).q<}else{@s=(q[%s],q[%s])x2;%s}
])x2;printf+pop@s,@s}
>
Beyond syntax
Tools for the
   toolbox
Easy To Do
Hard To Screw Up
Independent
You can do them
     alone
Computer Science
          +
       People
          =
Software Development
Why learn?
Cross-training is
      sexay
know
Don’t know
Don’t know you
don’t know
“I don’t know”
“Tell me about it”
Why
New things
mean failure
New versions
Hang out with
other folks who
     learn
Join the
community
Broadcast your
    problem
Go be stupid
Learn a really
   different
    language
Look it up
 yourself
Wikipedia
Relevant blogs
Tech-specific
 search sites
> Thank you for your note. Opera is
> not a supported browser.
Why not? I see absolutely no reason to
exclude Opera from the list of
supported browsers.

When I tell Opera to ID as Firefox, it
works as expected. No patches needed.
So please get back in sync with the
real world and also enable Opera.
Topic for #eve is: Corp meeting on Vent: Saturday 14th and 21st
at 16:00 EVE time. All hands on deck! :-)
<wibble>   Announcing quot;all hands on deckquot; without announcing *why* is not
useful.
<wibble>   I get enough shit from work, I certainly don't need any more
from a corp on Eve.
<wibble>   just irritated at people telling me what I *have* to do.
On Wed, May 09, 2007 at 08:34:52PM -0700, Michael G Schwern wrote:
> I'm sorry, but that's the automated failure report from CPAN::Reporter.
> I was doing an automated install.
What can I do to force automated junk mailers
to follow my policy of bug reports?
Speak with the CPAN::Reporter folks about what you would like to see in the
failed install report. Perhaps they can add in the Makefile.PL and make
output to the automatic report. This would be helpful, especially for
complicated builds like yours. Perhaps you could change your test
files so they automatically output the diagnostics you want on failure rather
than rely on the user to sift through the INSTALL docs to find the special
instructions
“You’re right”
someone screwed up the plan in
one of Encode's tests.
+1
0
-1
Bitching
 is not
  doing
Means
Ends
Be Available
Design <-> Code
Interface -> User
Get it out of
  your head
Documentation
Wiki
Tickets
How are you?
Having fun?
Feel ok?
Fear-based Programming
Fear of change
Fear of bugs
Fear of getting fired
Small Chunks
Testing
Test first
Test during
Test automaticly
Stay at 100%
Effective
 Version
 Control
Code
Test
Commit
How much?
One Thing
One Source Of Breakage
----------------------------------------------------------------------
r32185: schwern | 2007-06-29 18:22:55 -0700

Need a blank line preceeding POD directives.
----------------------------------------------------------------------
=== local/Test-Simple/lib/Test/Builder.pm
==================================================================
--- local/Test-Simple/lib/Test/Builder.pm       (revision 32184)
+++ local/Test-Simple/lib/Test/Builder.pm       (revision 32185)
@@ -983,6 +983,7 @@

 # I'm not ready to publish this. It doesn't deal with array return
 # values from the code or context.
+
 =begin private

=item B<_try>
----------------------------------------------------------------------
r27706: schwern | 2007-03-16 15:19:55 -0700

Add a test to ensure an object can lie about being an IO::Handle.
----------------------------------------------------------------------
=== local/Test-Simple/t/is_fh.t
==================================================================
--- local/Test-Simple/t/is_fh.t (revision 27705)
+++ local/Test-Simple/t/is_fh.t (revision 27706)
@@ -11,7 +11,7 @@
 }

 use   strict;
-use   Test::More tests => 10;
+use   Test::More tests => 11;
 use   TieOut;

 ok( !Test::Builder->is_fh(quot;fooquot;), 'string is not a filehandle' );
@@ -34,3 +34,15 @@
         unless defined *OUT{IO};
     ok( Test::Builder->is_fh(*OUT{IO}) );
 }
+
+
+package Lying::isa;
+
+sub isa {
+    my $self = shift;
+    my $parent = shift;
+
+    return 1 if $parent eq 'IO::Handle';
+}
+
+::ok( Test::Builder->is_fh(bless {}, quot;Lying::isaquot;));
----------------------------------------------------------------------
r27705: schwern | 2007-03-16 15:10:39 -0700

Comment about the nature of the filehandle in is_fh() was backwards.
----------------------------------------------------------------------
=== local/Test-Simple/lib/Test/Builder.pm
==================================================================
--- local/Test-Simple/lib/Test/Builder.pm       (revision 27704)
+++ local/Test-Simple/lib/Test/Builder.pm       (revision 27705)
@@ -1025,8 +1025,8 @@
     my $maybe_fh = shift;
     return 0 unless defined $maybe_fh;

-   return   1   if   ref   $maybe_fh    eq   'GLOB';   #   its   a   glob
-   return   1   if   ref   $maybe_fh   eq   'GLOB';   #   its   a   glob ref
+   return   1   if   ref   $maybe_fh    eq   'GLOB';   #   its   a   glob ref
+   return   1   if   ref   $maybe_fh   eq   'GLOB';   #   its   a   glob

    return eval { $maybe_fh->isa(quot;IO::Handlequot;) } ||
           # 5.5.4's tied() and can() doesn't like getting undef
----------------------------------------------------------------------
r26467: schwern | 2006-12-24 12:36:01 -0800

Typo
----------------------------------------------------------------------
=== local/Test-Simple/Changes
==================================================================
--- local/Test-Simple/Changes   (revision 26466)
+++ local/Test-Simple/Changes   (revision 26467)
@@ -1,5 +1,5 @@
 0.66 Sun Dec 3 15:25:45 PST 2006
-    - Restore 5.4.5 compatibility (unobe@cpan.org) [rt.cpanorg 20513]
+    - Restore 5.4.5 compatibility (unobe@cpan.org) [rt.cpan.org 20513]

0.65 Fri Nov 10 10:26:51 CST 2006
----------------------------------------------------------------------
r17879: schwern | 2006-09-04 01:15:12 -0700

    * Made most of the error messages report in the caller's context.
      [rt.cpan.org #20639]
----------------------------------------------------------------------
=== local/Test-Simple/lib/Test/Builder.pm
==================================================================
--- local/Test-Simple/lib/Test/Builder.pm       (revision 17878)
+++ local/Test-Simple/lib/Test/Builder.pm       (revision 17879)
@@ -35,7 +35,7 @@
                 $$data = ${$_[0]};
             }
             else {
-                die quot;Unknown type: quot;.$type;
+                die(quot;Unknown type: quot;.$type);
             }

             $_[0] = &threads::shared::share($_[0]);
@@ -50,7 +50,7 @@
                 ${$_[0]} = $$data;
             }
             else {
-                die quot;Unknown type: quot;.$type;
+                die(quot;Unknown type: quot;.$type);
             }

             return $_[0];
@@ -247,8 +247,7 @@
     return unless $cmd;

     if( $self->{Have_Plan} ) {
-        die sprintf quot;You tried to plan twice! Second plan at %s line %dnquot;,
-          ($self->caller)[1,2];
+        $self->croak(quot;You tried to plan twicequot;);
     }

    ...
Task branches
BDUF
Refactoring
JIT Design
Rename
method content () {
    my $content = $self->{content};

    if ( $self->is_html ) {
        my %parms = @_;
        if ( exists $parms{base_href} ) {
            my $arg = (delete $parms{base_href}) || $self->base;
            $content =~ s/<head>/<head>n<base href=quot;$argquot;>/;
        }
        if ( my $arg = delete $parms{format} ) {
            if ($arg eq 'text') {
                require HTML::TreeBuilder;
                my $tree = HTML::TreeBuilder->new();
                $tree->parse($content);
                $tree->eof();
                $tree->elementify(); # just for safety
                $content = $tree->as_text();
                $tree->delete;
            }
            else {
                $self->die( qq{Unknown quot;formatquot; parameter quot;$argquot;} );
            }
        }
        for my $cmd ( sort keys %parms ) {
            $self->die( qq{Unknown named argument quot;$cmdquot;} );
        }
    } # is HTML

    return $content;
}
method content () {
    my $content = $self->{content};

    if ( $self->is_html ) {
        my %parms = @_;
        if ( exists $parms{base_href} ) {
            my $arg = (delete $parms{base_href}) || $self->base;
            $content =~ s/<head>/<head>n<base href=quot;$argquot;>/;
        }
        if ( my $arg = delete $parms{format} ) {
            if ($arg eq 'text') {
                require HTML::TreeBuilder;
                my $tree = HTML::TreeBuilder->new();
                $tree->parse($content);
                $tree->eof();
                $tree->elementify(); # just for safety
                $content = $tree->as_text();
                $tree->delete;
            }
            else {
                $self->die( qq{Unknown quot;formatquot; parameter quot;$argquot;} );
            }
        }
        for my $cmd ( sort keys %parms ) {
            $self->die( qq{Unknown named argument quot;$cmdquot;} );
        }
    } # is HTML

    return $content;
}
method content () {
    my $content = $self->{content};

    if ( $self->is_html ) {
        my %parms = @_;
        if ( exists $parms{base_href} ) {
            my $base_href = (delete $parms{base_href}) || $self->base;
            $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/;
        }
        if ( my $format = delete $parms{format} ) {
            if ($format eq 'text') {
                require HTML::TreeBuilder;
                my $tree = HTML::TreeBuilder->new();
                $tree->parse($content);
                $tree->eof();
                $tree->elementify(); # just for safety
                $content = $tree->as_text();
                $tree->delete;
            }
            else {
                $self->die( qq{Unknown quot;formatquot; parameter quot;$formatquot;} );
            }
        }
        for my $cmd ( sort keys %parms ) {
            $self->die( qq{Unknown named argument quot;$cmdquot;} );
        }
    } # is HTML

    return $content;
}
Extract
method content () {
    my $content = $self->{content};

    if ( $self->is_html ) {
        my %parms = @_;
        if ( exists $parms{base_href} ) {
            my $base_href = (delete $parms{base_href}) || $self->base;
            $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/;
        }
        if ( my $format = delete $parms{format} ) {
            if ($format eq 'text') {
                require HTML::TreeBuilder;
                my $tree = HTML::TreeBuilder->new();
                $tree->parse($content);
                $tree->eof();
                $tree->elementify(); # just for safety
                $content = $tree->as_text();
                $tree->delete;
            }
            else {
                $self->die( qq{Unknown quot;formatquot; parameter quot;$formatquot;} );
            }
        }
        for my $cmd ( sort keys %parms ) {
            $self->die( qq{Unknown named argument quot;$cmdquot;} );
        }
    } # is HTML

    return $content;
}
method content () {
    my $content = $self->{content};

    if ( $self->is_html ) {
        my %parms = @_;
        if ( exists $parms{base_href} ) {
            my $base_href = (delete $parms{base_href}) || $self->base;
            $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/;
        }
        if ( my $format = delete $parms{format} ) {
            if ($format eq 'text') {
                require HTML::TreeBuilder;
                my $tree = HTML::TreeBuilder->new();
                $tree->parse($content);
                $tree->eof();
                $tree->elementify(); # just for safety
                $content = $tree->as_text();
                $tree->delete;
            }
            else {
                $self->die( qq{Unknown quot;formatquot; parameter quot;$formatquot;} );
            }
        }
        for my $cmd ( sort keys %parms ) {
            $self->die( qq{Unknown named argument quot;$cmdquot;} );
        }
    } # is HTML

    return $content;
}
if ( my $format = delete $parms{format} ) {
    if ($format eq 'text') {
        require HTML::TreeBuilder;
        my $tree = HTML::TreeBuilder->new();
        $tree->parse($content);
        $tree->eof();
        $tree->elementify(); # just for safety
        $content = $tree->as_text();
        $tree->delete;
    }
    else {
        $self->die( qq{Unknown quot;formatquot; parameter quot;$formatquot;} );
    }
}
if ( my $format = delete $parms{format} ) {
    if ($format eq 'text') {
        require HTML::TreeBuilder;
        my $tree = HTML::TreeBuilder->new();
        $tree->parse($content);
        $tree->eof();
        $tree->elementify(); # just for safety
        $content = $tree->as_text();
        $tree->delete;
    }
    else {
        $self->die( qq{Unknown quot;formatquot; parameter quot;$formatquot;} );
    }
}
method _content_as_text ($content) {
    require HTML::TreeBuilder;
    my $tree = HTML::TreeBuilder->new();
    $tree->parse($content);
    $tree->eof();
    $tree->elementify(); # just for safety
    my $formatted_content = $tree->as_text();
    $tree->delete;

    return $formatted_content;
}
if ( my $format = delete $parms{format} ) {
    if ($format eq 'text') {
        $content = $self->_content_as_text($content);
    }
    else {
        $self->die( qq{Unknown quot;formatquot; parameter quot;$formatquot;} );
    }
}
method content () {
    my $content = $self->{content};

    if ( $self->is_html ) {
        my %parms = @_;
        if ( exists $parms{base_href} ) {
            my $base_href = (delete $parms{base_href}) || $self->base;
            $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/;
        }
        if ( my $format = delete $parms{format} ) {
            if ($format eq 'text') {
                require HTML::TreeBuilder;
                my $tree = HTML::TreeBuilder->new();
                $tree->parse($content);
                $tree->eof();
                $tree->elementify(); # just for safety
                $content = $tree->as_text();
                $tree->delete;
            }
            else {
                $self->die( qq{Unknown quot;formatquot; parameter quot;$formatquot;} );
            }
        }
        for my $cmd ( sort keys %parms ) {
            $self->die( qq{Unknown named argument quot;$cmdquot;} );
        }
    } # is HTML

    return $content;
}
method content () {
    my $content = $self->{content};

    if ( $self->is_html ) {
        my %parms = @_;
        if ( exists $parms{base_href} ) {
            my $base_href = (delete $parms{base_href}) || $self->base;
            $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/;
        }
        if ( my $format = delete $parms{format} ) {
            if ($format eq 'text') {
                $content = $self->_content_as_text($content);
            }
            else {
                $self->die( qq{Unknown quot;formatquot; parameter quot;$formatquot;} );
            }
        }
        for my $cmd ( sort keys %parms ) {
            $self->die( qq{Unknown named argument quot;$cmdquot;} );
        }
    } # is HTML

    return $content;
}
method content () {
    my $content = $self->{content};

    if ( $self->is_html ) {
        my %parms = @_;
        if ( exists $parms{base_href} ) {
            my $base_href = (delete $parms{base_href}) || $self->base;
            $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/;
        }
        if ( my $format = delete $parms{format} ) {
            if ($format eq 'text') {
                $content = $self->_content_as_text($content);
            }
            else {
                $self->die( qq{Unknown quot;formatquot; parameter quot;$formatquot;} );
            }
        }
        for my $cmd ( sort keys %parms ) {
            $self->die( qq{Unknown named argument quot;$cmdquot;} );
        }
    } # is HTML

    return $content;
}
method _format_content ($format, $content) {
    if ($format eq 'text') {
        return $self->_content_as_text($content);
    }
    else {
        $self->die( qq{Unknown quot;formatquot; parameter quot;$formatquot;} );
    }
}
method content () {
    my $content = $self->{content};

    if ( $self->is_html ) {
        my %parms = @_;
        if ( exists $parms{base_href} ) {
            my $base_href = (delete $parms{base_href}) || $self->base;
            $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/;
        }
        if ( my $format = delete $parms{format} ) {
            if ($format eq 'text') {
                $content = $self->_content_as_text($content);
            }
            else {
                $self->die( qq{Unknown quot;formatquot; parameter quot;$formatquot;} );
            }
        }
        for my $cmd ( sort keys %parms ) {
            $self->die( qq{Unknown named argument quot;$cmdquot;} );
        }
    } # is HTML

    return $content;
}
method content () {
    my $content = $self->{content};

    if ( $self->is_html ) {
        my %parms = @_;
        if ( exists $parms{base_href} ) {
            my $base_href = (delete $parms{base_href}) || $self->base;
            $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/;
        }
        if ( my $format = delete $parms{format} ) {
            $content = $self->_format_content($format, $content);
        }
        for my $cmd ( sort keys %parms ) {
            $self->die( qq{Unknown named argument quot;$cmdquot;} );
        }
    } # is HTML

    return $content;
}
method content () {
    my $content = $self->{content};

    if ( $self->is_html ) {
        my %parms = @_;
        if ( exists $parms{base_href} ) {
            my $base_href = (delete $parms{base_href}) || $self->base;
            $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/;
        }
        if ( my $format = delete $parms{format} ) {
            $content = $self->_format_content($format, $content);
        }
        for my $cmd ( sort keys %parms ) {
            $self->die( qq{Unknown named argument quot;$cmdquot;} );
        }
    } # is HTML

    return $content;
}
method _check_unhandled_parms (%parms) {
    for my $cmd ( sort keys %parms ) {
        $self->die( qq{Unknown named argument quot;$cmdquot;} );
    }
}
method content () {
    my $content = $self->{content};

    if ( $self->is_html ) {
        my %parms = @_;
        if ( exists $parms{base_href} ) {
            my $base_href = (delete $parms{base_href}) || $self->base;
            $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/;
        }
        if ( my $format = delete $parms{format} ) {
            $content = $self->_format_content($format, $content);
        }
        for my $cmd ( sort keys %parms ) {
            $self->die( qq{Unknown named argument quot;$cmdquot;} );
        }
    } # is HTML

    return $content;
}
method content () {
    my $content = $self->{content};

    if ( $self->is_html ) {
        my %parms = @_;
        if ( exists $parms{base_href} ) {
            my $base_href = (delete $parms{base_href}) || $self->base;
            $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/;
        }
        if ( my $format = delete $parms{format} ) {
            $content = $self->_format_content($format, $content);
        }

        $self->_check_unhandled_parms(%parms);
    } # is HTML

    return $content;
}
method content () {
    my $content = $self->{content};

    if ( $self->is_html ) {
        my %parms = @_;
        if ( exists $parms{base_href} ) {
            my $base_href = (delete $parms{base_href}) || $self->base;
            $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/;
        }
        if ( my $format = delete $parms{format} ) {
            $content = $self->_format_content($format, $content);
        }

        $self->_check_unhandled_parms(%parms);
    } # is HTML

    return $content;
}
method content () {
    my $content = $self->{content};

    if ( $self->is_html ) {
        my %parms = @_;
        if ( exists $parms{base_href} ) {
            my $base_href = (delete $parms{base_href}) || $self->base;
            $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/;
        }
        if ( my $format = delete $parms{format} ) {
            $content = $self->_format_content($format, $content);
        }

        $self->_check_unhandled_parms(%parms);
    }

    return $content;
}
method content () {
    my $content = $self->{content};

    if ( $self->is_html ) {
        my %parms = @_;
        if ( exists $parms{base_href} ) {
            my $base_href = (delete $parms{base_href}) || $self->base;
            $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/;
        }
        if ( my $format = delete $parms{format} ) {
            if ($format eq 'text') {
                require HTML::TreeBuilder;
                my $tree = HTML::TreeBuilder->new();
                $tree->parse($content);
                $tree->eof();
                $tree->elementify(); # just for safety
                $content = $tree->as_text();
                $tree->delete;
            }
            else {
                $self->die( qq{Unknown quot;formatquot; parameter quot;$formatquot;} );
            }
        }
        for my $cmd ( sort keys %parms ) {
            $self->die( qq{Unknown named argument quot;$cmdquot;} );
        }
    } # is HTML

    return $content;
}
method content () {
    my $content = $self->{content};

    if ( $self->is_html ) {
        my %parms = @_;
        if ( exists $parms{base_href} ) {
            my $base_href = (delete $parms{base_href}) || $self->base;
            $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/;
        }
        if ( my $format = delete $parms{format} ) {
            $content = $self->_format_content($format, $content);
        }

        $self->_check_unhandled_parms(%parms);
    }

    return $content;
}
Revealing Reuse
refactoring.com
Simplest Thing
Optimizing
Rule #1
Rule #1: Don’t!
Complicates
Wastes Time
Rule #2
Rule #2: Don’t do it yet!
Does it work?
Is it tested?
Is it documented?
How fast?
Throw Hardware
Rule #3
Rule #3: Profile First!
Rule #4
Rule #4: Better Algorithm
Rule #5
Estimating
Feedback
Mini Milestones
• Get account activated

• Make simple test purchase

• Handle invalid expiration date

• Handle invalid address

• Record transactions

• Associate item with purchase

• Simple user form
Quatloos
Get Out Of
Technical Debt
     NOW!
Form
Functionality
Separate
People
Small Chunky Pieces
Thank You
Gabrielle
Candy
Selena
Keith
Everyone I pestered
Discussion Session
     D135 @ 5:30pm

More Related Content

What's hot

Business Rules with Brick
Business Rules with BrickBusiness Rules with Brick
Business Rules with Brickbrian d foy
 
Good Evils In Perl
Good Evils In PerlGood Evils In Perl
Good Evils In PerlKang-min Liu
 
Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)brian d foy
 
Learning Perl 6
Learning Perl 6 Learning Perl 6
Learning Perl 6 brian d foy
 
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011Masahiro Nagano
 
Corephpcomponentpresentation 1211425966721657-8
Corephpcomponentpresentation 1211425966721657-8Corephpcomponentpresentation 1211425966721657-8
Corephpcomponentpresentation 1211425966721657-8PrinceGuru MS
 
WordPress London 16 May 2012 - You don’t know query
WordPress London 16 May 2012 - You don’t know queryWordPress London 16 May 2012 - You don’t know query
WordPress London 16 May 2012 - You don’t know queryl3rady
 
Achieving Parsing Sanity In Erlang
Achieving Parsing Sanity In ErlangAchieving Parsing Sanity In Erlang
Achieving Parsing Sanity In ErlangSean Cribbs
 
Advanced php testing in action
Advanced php testing in actionAdvanced php testing in action
Advanced php testing in actionJace Ju
 
Command Bus To Awesome Town
Command Bus To Awesome TownCommand Bus To Awesome Town
Command Bus To Awesome TownRoss Tuck
 
The Zen of Lithium
The Zen of LithiumThe Zen of Lithium
The Zen of LithiumNate Abele
 
Symfony2 Building on Alpha / Beta technology
Symfony2 Building on Alpha / Beta technologySymfony2 Building on Alpha / Beta technology
Symfony2 Building on Alpha / Beta technologyDaniel Knell
 
Refactoring using Codeception
Refactoring using CodeceptionRefactoring using Codeception
Refactoring using CodeceptionJeroen van Dijk
 
Design Patterns avec PHP 5.3, Symfony et Pimple
Design Patterns avec PHP 5.3, Symfony et PimpleDesign Patterns avec PHP 5.3, Symfony et Pimple
Design Patterns avec PHP 5.3, Symfony et PimpleHugo Hamon
 
Database performance 101
Database performance 101Database performance 101
Database performance 101Leon Fayer
 
PHPUnit でよりよくテストを書くために
PHPUnit でよりよくテストを書くためにPHPUnit でよりよくテストを書くために
PHPUnit でよりよくテストを書くためにYuya Takeyama
 
November Camp - Spec BDD with PHPSpec 2
November Camp - Spec BDD with PHPSpec 2November Camp - Spec BDD with PHPSpec 2
November Camp - Spec BDD with PHPSpec 2Kacper Gunia
 

What's hot (20)

Business Rules with Brick
Business Rules with BrickBusiness Rules with Brick
Business Rules with Brick
 
Good Evils In Perl
Good Evils In PerlGood Evils In Perl
Good Evils In Perl
 
Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)
 
Learning Perl 6
Learning Perl 6 Learning Perl 6
Learning Perl 6
 
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
 
Corephpcomponentpresentation 1211425966721657-8
Corephpcomponentpresentation 1211425966721657-8Corephpcomponentpresentation 1211425966721657-8
Corephpcomponentpresentation 1211425966721657-8
 
PHP Tips & Tricks
PHP Tips & TricksPHP Tips & Tricks
PHP Tips & Tricks
 
Functional programming with php7
Functional programming with php7Functional programming with php7
Functional programming with php7
 
WordPress London 16 May 2012 - You don’t know query
WordPress London 16 May 2012 - You don’t know queryWordPress London 16 May 2012 - You don’t know query
WordPress London 16 May 2012 - You don’t know query
 
PHP 5.4
PHP 5.4PHP 5.4
PHP 5.4
 
Achieving Parsing Sanity In Erlang
Achieving Parsing Sanity In ErlangAchieving Parsing Sanity In Erlang
Achieving Parsing Sanity In Erlang
 
Advanced php testing in action
Advanced php testing in actionAdvanced php testing in action
Advanced php testing in action
 
Command Bus To Awesome Town
Command Bus To Awesome TownCommand Bus To Awesome Town
Command Bus To Awesome Town
 
The Zen of Lithium
The Zen of LithiumThe Zen of Lithium
The Zen of Lithium
 
Symfony2 Building on Alpha / Beta technology
Symfony2 Building on Alpha / Beta technologySymfony2 Building on Alpha / Beta technology
Symfony2 Building on Alpha / Beta technology
 
Refactoring using Codeception
Refactoring using CodeceptionRefactoring using Codeception
Refactoring using Codeception
 
Design Patterns avec PHP 5.3, Symfony et Pimple
Design Patterns avec PHP 5.3, Symfony et PimpleDesign Patterns avec PHP 5.3, Symfony et Pimple
Design Patterns avec PHP 5.3, Symfony et Pimple
 
Database performance 101
Database performance 101Database performance 101
Database performance 101
 
PHPUnit でよりよくテストを書くために
PHPUnit でよりよくテストを書くためにPHPUnit でよりよくテストを書くために
PHPUnit でよりよくテストを書くために
 
November Camp - Spec BDD with PHPSpec 2
November Camp - Spec BDD with PHPSpec 2November Camp - Spec BDD with PHPSpec 2
November Camp - Spec BDD with PHPSpec 2
 

Viewers also liked

12 Things Every Programmer Should Know
12 Things Every Programmer Should Know12 Things Every Programmer Should Know
12 Things Every Programmer Should KnowSamnang Chhun
 
10 steps to becoming a professional software engineer
10 steps to becoming a professional software engineer10 steps to becoming a professional software engineer
10 steps to becoming a professional software engineerJimmy Sorensen
 
Becoming a Better Programmer (2013)
Becoming a Better Programmer (2013)Becoming a Better Programmer (2013)
Becoming a Better Programmer (2013)Pete Goodliffe
 
Machine Learning: The Next Revolution in Online Advertising
Machine Learning: The Next Revolution in Online AdvertisingMachine Learning: The Next Revolution in Online Advertising
Machine Learning: The Next Revolution in Online AdvertisingCameron Hudson
 
E learning presentation (update 2012)
E learning presentation (update 2012)E learning presentation (update 2012)
E learning presentation (update 2012)Santiago Moral
 
The Future of UI - How Mobile Design is Shaping The Web 2
The Future of UI - How Mobile Design is Shaping The Web 2The Future of UI - How Mobile Design is Shaping The Web 2
The Future of UI - How Mobile Design is Shaping The Web 2Sara Cannon
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine LearningRahul Jain
 
50 Stunning Mobile Statistics
50 Stunning Mobile Statistics50 Stunning Mobile Statistics
50 Stunning Mobile StatisticsVala Afshar
 
Big Data
Big DataBig Data
Big DataNGDATA
 
Assessment in Social work: A guide for learning and teaching
Assessment in Social work: A guide for learning and teachingAssessment in Social work: A guide for learning and teaching
Assessment in Social work: A guide for learning and teachingforeman
 
Big Data - 25 Amazing Facts Everyone Should Know
Big Data - 25 Amazing Facts Everyone Should KnowBig Data - 25 Amazing Facts Everyone Should Know
Big Data - 25 Amazing Facts Everyone Should KnowBernard Marr
 

Viewers also liked (18)

12 Things Every Programmer Should Know
12 Things Every Programmer Should Know12 Things Every Programmer Should Know
12 Things Every Programmer Should Know
 
10 steps to becoming a professional software engineer
10 steps to becoming a professional software engineer10 steps to becoming a professional software engineer
10 steps to becoming a professional software engineer
 
Becoming a Better Programmer (2013)
Becoming a Better Programmer (2013)Becoming a Better Programmer (2013)
Becoming a Better Programmer (2013)
 
Machine learning
Machine learningMachine learning
Machine learning
 
ARM and Machine Learning
ARM and Machine LearningARM and Machine Learning
ARM and Machine Learning
 
Machine Learning: The Next Revolution in Online Advertising
Machine Learning: The Next Revolution in Online AdvertisingMachine Learning: The Next Revolution in Online Advertising
Machine Learning: The Next Revolution in Online Advertising
 
E learning presentation (update 2012)
E learning presentation (update 2012)E learning presentation (update 2012)
E learning presentation (update 2012)
 
What is big data?
What is big data?What is big data?
What is big data?
 
The Future of UI - How Mobile Design is Shaping The Web 2
The Future of UI - How Mobile Design is Shaping The Web 2The Future of UI - How Mobile Design is Shaping The Web 2
The Future of UI - How Mobile Design is Shaping The Web 2
 
Big data ppt
Big data pptBig data ppt
Big data ppt
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
50 Stunning Mobile Statistics
50 Stunning Mobile Statistics50 Stunning Mobile Statistics
50 Stunning Mobile Statistics
 
Big Data
Big DataBig Data
Big Data
 
Big data ppt
Big data pptBig data ppt
Big data ppt
 
What is Big Data?
What is Big Data?What is Big Data?
What is Big Data?
 
Big data ppt
Big  data pptBig  data ppt
Big data ppt
 
Assessment in Social work: A guide for learning and teaching
Assessment in Social work: A guide for learning and teachingAssessment in Social work: A guide for learning and teaching
Assessment in Social work: A guide for learning and teaching
 
Big Data - 25 Amazing Facts Everyone Should Know
Big Data - 25 Amazing Facts Everyone Should KnowBig Data - 25 Amazing Facts Everyone Should Know
Big Data - 25 Amazing Facts Everyone Should Know
 

Similar to Simple Ways To Be A Better Programmer (OSCON 2007)

Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Kang-min Liu
 
Drupal Development (Part 2)
Drupal Development (Part 2)Drupal Development (Part 2)
Drupal Development (Part 2)Jeff Eaton
 
Internationalizing CakePHP Applications
Internationalizing CakePHP ApplicationsInternationalizing CakePHP Applications
Internationalizing CakePHP ApplicationsPierre MARTIN
 
R57php 1231677414471772-2
R57php 1231677414471772-2R57php 1231677414471772-2
R57php 1231677414471772-2ady36
 
Functional perl
Functional perlFunctional perl
Functional perlErrorific
 
perl usage at database applications
perl usage at database applicationsperl usage at database applications
perl usage at database applicationsJoe Jiang
 
Lithium: The Framework for People Who Hate Frameworks
Lithium: The Framework for People Who Hate FrameworksLithium: The Framework for People Who Hate Frameworks
Lithium: The Framework for People Who Hate FrameworksNate Abele
 
Perl Bag of Tricks - Baltimore Perl mongers
Perl Bag of Tricks  -  Baltimore Perl mongersPerl Bag of Tricks  -  Baltimore Perl mongers
Perl Bag of Tricks - Baltimore Perl mongersbrian d foy
 
Hacking ansible
Hacking ansibleHacking ansible
Hacking ansiblebcoca
 
Operation Oriented Web Applications / Yokohama pm7
Operation Oriented Web Applications / Yokohama pm7Operation Oriented Web Applications / Yokohama pm7
Operation Oriented Web Applications / Yokohama pm7Masahiro Nagano
 
Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at...
Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at...Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at...
Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at...Arc & Codementor
 
20 modules i haven't yet talked about
20 modules i haven't yet talked about20 modules i haven't yet talked about
20 modules i haven't yet talked aboutTatsuhiko Miyagawa
 
Meet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Meet Magento Sweden - Magento 2 Layout and Code Compilation for PerformanceMeet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Meet Magento Sweden - Magento 2 Layout and Code Compilation for PerformanceIvan Chepurnyi
 
Introduction to CloudForecast / YAPC::Asia 2010 Tokyo
Introduction to CloudForecast / YAPC::Asia 2010 TokyoIntroduction to CloudForecast / YAPC::Asia 2010 Tokyo
Introduction to CloudForecast / YAPC::Asia 2010 TokyoMasahiro Nagano
 
PHP Data Objects
PHP Data ObjectsPHP Data Objects
PHP Data ObjectsWez Furlong
 

Similar to Simple Ways To Be A Better Programmer (OSCON 2007) (20)

Daily notes
Daily notesDaily notes
Daily notes
 
wget.pl
wget.plwget.pl
wget.pl
 
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)
 
Bag of tricks
Bag of tricksBag of tricks
Bag of tricks
 
Drupal Development (Part 2)
Drupal Development (Part 2)Drupal Development (Part 2)
Drupal Development (Part 2)
 
R57.Php
R57.PhpR57.Php
R57.Php
 
Internationalizing CakePHP Applications
Internationalizing CakePHP ApplicationsInternationalizing CakePHP Applications
Internationalizing CakePHP Applications
 
R57php 1231677414471772-2
R57php 1231677414471772-2R57php 1231677414471772-2
R57php 1231677414471772-2
 
Functional perl
Functional perlFunctional perl
Functional perl
 
perl usage at database applications
perl usage at database applicationsperl usage at database applications
perl usage at database applications
 
Lithium: The Framework for People Who Hate Frameworks
Lithium: The Framework for People Who Hate FrameworksLithium: The Framework for People Who Hate Frameworks
Lithium: The Framework for People Who Hate Frameworks
 
Perl Bag of Tricks - Baltimore Perl mongers
Perl Bag of Tricks  -  Baltimore Perl mongersPerl Bag of Tricks  -  Baltimore Perl mongers
Perl Bag of Tricks - Baltimore Perl mongers
 
Hacking ansible
Hacking ansibleHacking ansible
Hacking ansible
 
PHP POWERPOINT SLIDES
PHP POWERPOINT SLIDESPHP POWERPOINT SLIDES
PHP POWERPOINT SLIDES
 
Operation Oriented Web Applications / Yokohama pm7
Operation Oriented Web Applications / Yokohama pm7Operation Oriented Web Applications / Yokohama pm7
Operation Oriented Web Applications / Yokohama pm7
 
Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at...
Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at...Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at...
Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at...
 
20 modules i haven't yet talked about
20 modules i haven't yet talked about20 modules i haven't yet talked about
20 modules i haven't yet talked about
 
Meet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Meet Magento Sweden - Magento 2 Layout and Code Compilation for PerformanceMeet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Meet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
 
Introduction to CloudForecast / YAPC::Asia 2010 Tokyo
Introduction to CloudForecast / YAPC::Asia 2010 TokyoIntroduction to CloudForecast / YAPC::Asia 2010 Tokyo
Introduction to CloudForecast / YAPC::Asia 2010 Tokyo
 
PHP Data Objects
PHP Data ObjectsPHP Data Objects
PHP Data Objects
 

Recently uploaded

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 

Recently uploaded (20)

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 

Simple Ways To Be A Better Programmer (OSCON 2007)

  • 1. Simple Ways To Be A Better Programmer Michael G Schwern schwern@pobox.com
  • 2. Discussion Session D135 @ 5:30pm
  • 3.
  • 4. #!/usr/bin/perl -s $;=$/;seek+DATA,!++$/,!$s;$_=<DATA>;$s&&print||$g&&do{$y=($x||=20)*($y||8);sub i{sleep&f}sub'p{print$;x$=,join$;,$b=~/.{$x}/g}$j=$j;sub'f{pop}sub n{substr($b,&f%$y,3)=~tr,O,O,}sub'g{$f=&f-1;($w,$w,substr($b,&f,1),O)[n($f-$x)+ n($x+$f)-(substr($b,&f,1)eq+O)+n$f]||$w}$w=quot;40quot;;$b=join'',@ARGV?<>:$_,$w x$y;$b=~s).)$&=~/w/?O:$w)ge;substr($b,$y)=q++;$g='$i=0;$i?$b:$c=$b; substr+$c,$i,1,g$i;$g=~s?d+?($&+1)%$y?e;$i-$y+1?eval$g:do{$i=-1;$b=$c;p;i 1}';sub'e{eval$g;&e}e}||eval||die+No.$; __DATA__ if($j){{$^W=$|;*_=sub{$=+s=#([A-z])(.*)#=#$+$1#=g}} @s=(q[$_=sprintf+pop@s,@s],q[ if($j){{$^W=$|;*_=sub{$=+s=#([A-z])(.*)#=#$+$1#=g}} #_The_Perl_Journal_# @s=(q[%s],q[%s])x2;%s;printquot;nquot;x&_,$_;i$j;eval} ])x2;$_=sprintf+pop@s,@s;printquot;nquot;x&_,$_;i$j;eval}$/=$y;$quot;=quot;,quot;;print q<#!/usr/local/bin/perl -sw if(!$s){>.($_=<>).q<}else{@s=(q[printf+pop@s,@s],q[#!/usr/local/bin/perl -sw if(!$s){>.(s$%$%%$g,tr=[=[===tr=]=]=||&d,$_).q<}else{@s=(q[%s],q[%s])x2;%s} ])x2;printf+pop@s,@s} >
  • 5.
  • 6.
  • 8. Tools for the toolbox
  • 12. You can do them alone
  • 13.
  • 14.
  • 15. Computer Science + People = Software Development
  • 16.
  • 17.
  • 18.
  • 20.
  • 22.
  • 23.
  • 24.
  • 25. know
  • 30. Why
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 38. Hang out with other folks who learn
  • 40. Broadcast your problem
  • 42. Learn a really different language
  • 43.
  • 44. Look it up yourself
  • 45.
  • 49.
  • 50.
  • 51. > Thank you for your note. Opera is > not a supported browser.
  • 52. Why not? I see absolutely no reason to exclude Opera from the list of supported browsers. When I tell Opera to ID as Firefox, it works as expected. No patches needed. So please get back in sync with the real world and also enable Opera.
  • 53. Topic for #eve is: Corp meeting on Vent: Saturday 14th and 21st at 16:00 EVE time. All hands on deck! :-)
  • 54. <wibble> Announcing quot;all hands on deckquot; without announcing *why* is not useful. <wibble> I get enough shit from work, I certainly don't need any more from a corp on Eve. <wibble> just irritated at people telling me what I *have* to do.
  • 55. On Wed, May 09, 2007 at 08:34:52PM -0700, Michael G Schwern wrote: > I'm sorry, but that's the automated failure report from CPAN::Reporter. > I was doing an automated install.
  • 56. What can I do to force automated junk mailers to follow my policy of bug reports?
  • 57. Speak with the CPAN::Reporter folks about what you would like to see in the failed install report. Perhaps they can add in the Makefile.PL and make output to the automatic report. This would be helpful, especially for complicated builds like yours. Perhaps you could change your test files so they automatically output the diagnostics you want on failure rather than rely on the user to sift through the INSTALL docs to find the special instructions
  • 58.
  • 60. someone screwed up the plan in one of Encode's tests.
  • 61.
  • 62.
  • 64.
  • 66. Means
  • 67. Ends
  • 69.
  • 72.
  • 73.
  • 74.
  • 75. Get it out of your head
  • 77. Wiki
  • 79.
  • 80.
  • 84.
  • 85.
  • 86.
  • 98. Code
  • 99. Test
  • 100. Commit
  • 103. One Source Of Breakage
  • 104. ---------------------------------------------------------------------- r32185: schwern | 2007-06-29 18:22:55 -0700 Need a blank line preceeding POD directives. ---------------------------------------------------------------------- === local/Test-Simple/lib/Test/Builder.pm ================================================================== --- local/Test-Simple/lib/Test/Builder.pm (revision 32184) +++ local/Test-Simple/lib/Test/Builder.pm (revision 32185) @@ -983,6 +983,7 @@ # I'm not ready to publish this. It doesn't deal with array return # values from the code or context. + =begin private =item B<_try>
  • 105. ---------------------------------------------------------------------- r27706: schwern | 2007-03-16 15:19:55 -0700 Add a test to ensure an object can lie about being an IO::Handle. ---------------------------------------------------------------------- === local/Test-Simple/t/is_fh.t ================================================================== --- local/Test-Simple/t/is_fh.t (revision 27705) +++ local/Test-Simple/t/is_fh.t (revision 27706) @@ -11,7 +11,7 @@ } use strict; -use Test::More tests => 10; +use Test::More tests => 11; use TieOut; ok( !Test::Builder->is_fh(quot;fooquot;), 'string is not a filehandle' ); @@ -34,3 +34,15 @@ unless defined *OUT{IO}; ok( Test::Builder->is_fh(*OUT{IO}) ); } + + +package Lying::isa; + +sub isa { + my $self = shift; + my $parent = shift; + + return 1 if $parent eq 'IO::Handle'; +} + +::ok( Test::Builder->is_fh(bless {}, quot;Lying::isaquot;));
  • 106. ---------------------------------------------------------------------- r27705: schwern | 2007-03-16 15:10:39 -0700 Comment about the nature of the filehandle in is_fh() was backwards. ---------------------------------------------------------------------- === local/Test-Simple/lib/Test/Builder.pm ================================================================== --- local/Test-Simple/lib/Test/Builder.pm (revision 27704) +++ local/Test-Simple/lib/Test/Builder.pm (revision 27705) @@ -1025,8 +1025,8 @@ my $maybe_fh = shift; return 0 unless defined $maybe_fh; - return 1 if ref $maybe_fh eq 'GLOB'; # its a glob - return 1 if ref $maybe_fh eq 'GLOB'; # its a glob ref + return 1 if ref $maybe_fh eq 'GLOB'; # its a glob ref + return 1 if ref $maybe_fh eq 'GLOB'; # its a glob return eval { $maybe_fh->isa(quot;IO::Handlequot;) } || # 5.5.4's tied() and can() doesn't like getting undef
  • 107. ---------------------------------------------------------------------- r26467: schwern | 2006-12-24 12:36:01 -0800 Typo ---------------------------------------------------------------------- === local/Test-Simple/Changes ================================================================== --- local/Test-Simple/Changes (revision 26466) +++ local/Test-Simple/Changes (revision 26467) @@ -1,5 +1,5 @@ 0.66 Sun Dec 3 15:25:45 PST 2006 - - Restore 5.4.5 compatibility (unobe@cpan.org) [rt.cpanorg 20513] + - Restore 5.4.5 compatibility (unobe@cpan.org) [rt.cpan.org 20513] 0.65 Fri Nov 10 10:26:51 CST 2006
  • 108. ---------------------------------------------------------------------- r17879: schwern | 2006-09-04 01:15:12 -0700 * Made most of the error messages report in the caller's context. [rt.cpan.org #20639] ---------------------------------------------------------------------- === local/Test-Simple/lib/Test/Builder.pm ================================================================== --- local/Test-Simple/lib/Test/Builder.pm (revision 17878) +++ local/Test-Simple/lib/Test/Builder.pm (revision 17879) @@ -35,7 +35,7 @@ $$data = ${$_[0]}; } else { - die quot;Unknown type: quot;.$type; + die(quot;Unknown type: quot;.$type); } $_[0] = &threads::shared::share($_[0]); @@ -50,7 +50,7 @@ ${$_[0]} = $$data; } else { - die quot;Unknown type: quot;.$type; + die(quot;Unknown type: quot;.$type); } return $_[0]; @@ -247,8 +247,7 @@ return unless $cmd; if( $self->{Have_Plan} ) { - die sprintf quot;You tried to plan twice! Second plan at %s line %dnquot;, - ($self->caller)[1,2]; + $self->croak(quot;You tried to plan twicequot;); } ...
  • 110. BDUF
  • 113. Rename
  • 114. method content () { my $content = $self->{content}; if ( $self->is_html ) { my %parms = @_; if ( exists $parms{base_href} ) { my $arg = (delete $parms{base_href}) || $self->base; $content =~ s/<head>/<head>n<base href=quot;$argquot;>/; } if ( my $arg = delete $parms{format} ) { if ($arg eq 'text') { require HTML::TreeBuilder; my $tree = HTML::TreeBuilder->new(); $tree->parse($content); $tree->eof(); $tree->elementify(); # just for safety $content = $tree->as_text(); $tree->delete; } else { $self->die( qq{Unknown quot;formatquot; parameter quot;$argquot;} ); } } for my $cmd ( sort keys %parms ) { $self->die( qq{Unknown named argument quot;$cmdquot;} ); } } # is HTML return $content; }
  • 115. method content () { my $content = $self->{content}; if ( $self->is_html ) { my %parms = @_; if ( exists $parms{base_href} ) { my $arg = (delete $parms{base_href}) || $self->base; $content =~ s/<head>/<head>n<base href=quot;$argquot;>/; } if ( my $arg = delete $parms{format} ) { if ($arg eq 'text') { require HTML::TreeBuilder; my $tree = HTML::TreeBuilder->new(); $tree->parse($content); $tree->eof(); $tree->elementify(); # just for safety $content = $tree->as_text(); $tree->delete; } else { $self->die( qq{Unknown quot;formatquot; parameter quot;$argquot;} ); } } for my $cmd ( sort keys %parms ) { $self->die( qq{Unknown named argument quot;$cmdquot;} ); } } # is HTML return $content; }
  • 116. method content () { my $content = $self->{content}; if ( $self->is_html ) { my %parms = @_; if ( exists $parms{base_href} ) { my $base_href = (delete $parms{base_href}) || $self->base; $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/; } if ( my $format = delete $parms{format} ) { if ($format eq 'text') { require HTML::TreeBuilder; my $tree = HTML::TreeBuilder->new(); $tree->parse($content); $tree->eof(); $tree->elementify(); # just for safety $content = $tree->as_text(); $tree->delete; } else { $self->die( qq{Unknown quot;formatquot; parameter quot;$formatquot;} ); } } for my $cmd ( sort keys %parms ) { $self->die( qq{Unknown named argument quot;$cmdquot;} ); } } # is HTML return $content; }
  • 118. method content () { my $content = $self->{content}; if ( $self->is_html ) { my %parms = @_; if ( exists $parms{base_href} ) { my $base_href = (delete $parms{base_href}) || $self->base; $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/; } if ( my $format = delete $parms{format} ) { if ($format eq 'text') { require HTML::TreeBuilder; my $tree = HTML::TreeBuilder->new(); $tree->parse($content); $tree->eof(); $tree->elementify(); # just for safety $content = $tree->as_text(); $tree->delete; } else { $self->die( qq{Unknown quot;formatquot; parameter quot;$formatquot;} ); } } for my $cmd ( sort keys %parms ) { $self->die( qq{Unknown named argument quot;$cmdquot;} ); } } # is HTML return $content; }
  • 119. method content () { my $content = $self->{content}; if ( $self->is_html ) { my %parms = @_; if ( exists $parms{base_href} ) { my $base_href = (delete $parms{base_href}) || $self->base; $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/; } if ( my $format = delete $parms{format} ) { if ($format eq 'text') { require HTML::TreeBuilder; my $tree = HTML::TreeBuilder->new(); $tree->parse($content); $tree->eof(); $tree->elementify(); # just for safety $content = $tree->as_text(); $tree->delete; } else { $self->die( qq{Unknown quot;formatquot; parameter quot;$formatquot;} ); } } for my $cmd ( sort keys %parms ) { $self->die( qq{Unknown named argument quot;$cmdquot;} ); } } # is HTML return $content; }
  • 120. if ( my $format = delete $parms{format} ) { if ($format eq 'text') { require HTML::TreeBuilder; my $tree = HTML::TreeBuilder->new(); $tree->parse($content); $tree->eof(); $tree->elementify(); # just for safety $content = $tree->as_text(); $tree->delete; } else { $self->die( qq{Unknown quot;formatquot; parameter quot;$formatquot;} ); } }
  • 121. if ( my $format = delete $parms{format} ) { if ($format eq 'text') { require HTML::TreeBuilder; my $tree = HTML::TreeBuilder->new(); $tree->parse($content); $tree->eof(); $tree->elementify(); # just for safety $content = $tree->as_text(); $tree->delete; } else { $self->die( qq{Unknown quot;formatquot; parameter quot;$formatquot;} ); } }
  • 122. method _content_as_text ($content) { require HTML::TreeBuilder; my $tree = HTML::TreeBuilder->new(); $tree->parse($content); $tree->eof(); $tree->elementify(); # just for safety my $formatted_content = $tree->as_text(); $tree->delete; return $formatted_content; }
  • 123. if ( my $format = delete $parms{format} ) { if ($format eq 'text') { $content = $self->_content_as_text($content); } else { $self->die( qq{Unknown quot;formatquot; parameter quot;$formatquot;} ); } }
  • 124. method content () { my $content = $self->{content}; if ( $self->is_html ) { my %parms = @_; if ( exists $parms{base_href} ) { my $base_href = (delete $parms{base_href}) || $self->base; $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/; } if ( my $format = delete $parms{format} ) { if ($format eq 'text') { require HTML::TreeBuilder; my $tree = HTML::TreeBuilder->new(); $tree->parse($content); $tree->eof(); $tree->elementify(); # just for safety $content = $tree->as_text(); $tree->delete; } else { $self->die( qq{Unknown quot;formatquot; parameter quot;$formatquot;} ); } } for my $cmd ( sort keys %parms ) { $self->die( qq{Unknown named argument quot;$cmdquot;} ); } } # is HTML return $content; }
  • 125. method content () { my $content = $self->{content}; if ( $self->is_html ) { my %parms = @_; if ( exists $parms{base_href} ) { my $base_href = (delete $parms{base_href}) || $self->base; $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/; } if ( my $format = delete $parms{format} ) { if ($format eq 'text') { $content = $self->_content_as_text($content); } else { $self->die( qq{Unknown quot;formatquot; parameter quot;$formatquot;} ); } } for my $cmd ( sort keys %parms ) { $self->die( qq{Unknown named argument quot;$cmdquot;} ); } } # is HTML return $content; }
  • 126. method content () { my $content = $self->{content}; if ( $self->is_html ) { my %parms = @_; if ( exists $parms{base_href} ) { my $base_href = (delete $parms{base_href}) || $self->base; $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/; } if ( my $format = delete $parms{format} ) { if ($format eq 'text') { $content = $self->_content_as_text($content); } else { $self->die( qq{Unknown quot;formatquot; parameter quot;$formatquot;} ); } } for my $cmd ( sort keys %parms ) { $self->die( qq{Unknown named argument quot;$cmdquot;} ); } } # is HTML return $content; }
  • 127. method _format_content ($format, $content) { if ($format eq 'text') { return $self->_content_as_text($content); } else { $self->die( qq{Unknown quot;formatquot; parameter quot;$formatquot;} ); } }
  • 128. method content () { my $content = $self->{content}; if ( $self->is_html ) { my %parms = @_; if ( exists $parms{base_href} ) { my $base_href = (delete $parms{base_href}) || $self->base; $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/; } if ( my $format = delete $parms{format} ) { if ($format eq 'text') { $content = $self->_content_as_text($content); } else { $self->die( qq{Unknown quot;formatquot; parameter quot;$formatquot;} ); } } for my $cmd ( sort keys %parms ) { $self->die( qq{Unknown named argument quot;$cmdquot;} ); } } # is HTML return $content; }
  • 129. method content () { my $content = $self->{content}; if ( $self->is_html ) { my %parms = @_; if ( exists $parms{base_href} ) { my $base_href = (delete $parms{base_href}) || $self->base; $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/; } if ( my $format = delete $parms{format} ) { $content = $self->_format_content($format, $content); } for my $cmd ( sort keys %parms ) { $self->die( qq{Unknown named argument quot;$cmdquot;} ); } } # is HTML return $content; }
  • 130. method content () { my $content = $self->{content}; if ( $self->is_html ) { my %parms = @_; if ( exists $parms{base_href} ) { my $base_href = (delete $parms{base_href}) || $self->base; $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/; } if ( my $format = delete $parms{format} ) { $content = $self->_format_content($format, $content); } for my $cmd ( sort keys %parms ) { $self->die( qq{Unknown named argument quot;$cmdquot;} ); } } # is HTML return $content; }
  • 131. method _check_unhandled_parms (%parms) { for my $cmd ( sort keys %parms ) { $self->die( qq{Unknown named argument quot;$cmdquot;} ); } }
  • 132. method content () { my $content = $self->{content}; if ( $self->is_html ) { my %parms = @_; if ( exists $parms{base_href} ) { my $base_href = (delete $parms{base_href}) || $self->base; $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/; } if ( my $format = delete $parms{format} ) { $content = $self->_format_content($format, $content); } for my $cmd ( sort keys %parms ) { $self->die( qq{Unknown named argument quot;$cmdquot;} ); } } # is HTML return $content; }
  • 133. method content () { my $content = $self->{content}; if ( $self->is_html ) { my %parms = @_; if ( exists $parms{base_href} ) { my $base_href = (delete $parms{base_href}) || $self->base; $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/; } if ( my $format = delete $parms{format} ) { $content = $self->_format_content($format, $content); } $self->_check_unhandled_parms(%parms); } # is HTML return $content; }
  • 134. method content () { my $content = $self->{content}; if ( $self->is_html ) { my %parms = @_; if ( exists $parms{base_href} ) { my $base_href = (delete $parms{base_href}) || $self->base; $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/; } if ( my $format = delete $parms{format} ) { $content = $self->_format_content($format, $content); } $self->_check_unhandled_parms(%parms); } # is HTML return $content; }
  • 135. method content () { my $content = $self->{content}; if ( $self->is_html ) { my %parms = @_; if ( exists $parms{base_href} ) { my $base_href = (delete $parms{base_href}) || $self->base; $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/; } if ( my $format = delete $parms{format} ) { $content = $self->_format_content($format, $content); } $self->_check_unhandled_parms(%parms); } return $content; }
  • 136. method content () { my $content = $self->{content}; if ( $self->is_html ) { my %parms = @_; if ( exists $parms{base_href} ) { my $base_href = (delete $parms{base_href}) || $self->base; $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/; } if ( my $format = delete $parms{format} ) { if ($format eq 'text') { require HTML::TreeBuilder; my $tree = HTML::TreeBuilder->new(); $tree->parse($content); $tree->eof(); $tree->elementify(); # just for safety $content = $tree->as_text(); $tree->delete; } else { $self->die( qq{Unknown quot;formatquot; parameter quot;$formatquot;} ); } } for my $cmd ( sort keys %parms ) { $self->die( qq{Unknown named argument quot;$cmdquot;} ); } } # is HTML return $content; }
  • 137. method content () { my $content = $self->{content}; if ( $self->is_html ) { my %parms = @_; if ( exists $parms{base_href} ) { my $base_href = (delete $parms{base_href}) || $self->base; $content =~ s/<head>/<head>n<base href=quot;$base_hrefquot;>/; } if ( my $format = delete $parms{format} ) { $content = $self->_format_content($format, $content); } $self->_check_unhandled_parms(%parms); } return $content; }
  • 147. Rule #2: Don’t do it yet!
  • 156. Rule #4: Better Algorithm
  • 158.
  • 160.
  • 163. • Get account activated • Make simple test purchase • Handle invalid expiration date • Handle invalid address • Record transactions • Associate item with purchase • Simple user form
  • 165. Get Out Of Technical Debt NOW!
  • 166. Form
  • 169. People
  • 173. Candy
  • 174. Selena
  • 175. Keith
  • 177. Discussion Session D135 @ 5:30pm