SlideShare a Scribd company logo
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 Brick
brian d foy
 
Good Evils In Perl
Good Evils In PerlGood Evils In Perl
Good Evils In Perl
Kang-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 2011
Masahiro Nagano
 
Corephpcomponentpresentation 1211425966721657-8
Corephpcomponentpresentation 1211425966721657-8Corephpcomponentpresentation 1211425966721657-8
Corephpcomponentpresentation 1211425966721657-8
PrinceGuru MS
 
PHP Tips & Tricks
PHP Tips & TricksPHP Tips & Tricks
PHP Tips & Tricks
Radek Benkel
 
Functional programming with php7
Functional programming with php7Functional programming with php7
Functional programming with php7
Sérgio Rafael Siqueira
 
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
l3rady
 
PHP 5.4
PHP 5.4PHP 5.4
Achieving Parsing Sanity In Erlang
Achieving Parsing Sanity In ErlangAchieving Parsing Sanity In Erlang
Achieving Parsing Sanity In Erlang
Sean Cribbs
 
Advanced php testing in action
Advanced php testing in actionAdvanced php testing in action
Advanced php testing in action
Jace Ju
 
Command Bus To Awesome Town
Command Bus To Awesome TownCommand Bus To Awesome Town
Command Bus To Awesome Town
Ross Tuck
 
The Zen of Lithium
The Zen of LithiumThe Zen of Lithium
The Zen of Lithium
Nate Abele
 
Symfony2 Building on Alpha / Beta technology
Symfony2 Building on Alpha / Beta technologySymfony2 Building on Alpha / Beta technology
Symfony2 Building on Alpha / Beta technology
Daniel Knell
 
Refactoring using Codeception
Refactoring using CodeceptionRefactoring using Codeception
Refactoring using Codeception
Jeroen 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 Pimple
Hugo Hamon
 
Database performance 101
Database performance 101Database performance 101
Database performance 101
Leon 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 2
Kacper 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 Know
Samnang 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 engineer
Jimmy 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
Machine learningMachine learning
Machine learning
inside-BigData.com
 
ARM and Machine Learning
ARM and Machine LearningARM and Machine Learning
ARM and Machine Learning
inside-BigData.com
 
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
Cameron Hudson
 
E learning presentation (update 2012)
E learning presentation (update 2012)E learning presentation (update 2012)
E learning presentation (update 2012)
Santiago Moral
 
What is big data?
What is big data?What is big data?
What is big data?
David Wellman
 
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
Sara Cannon
 
Big data ppt
Big data pptBig data ppt
Big data ppt
Thirunavukkarasu Ps
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
Rahul Jain
 
50 Stunning Mobile Statistics
50 Stunning Mobile Statistics50 Stunning Mobile Statistics
50 Stunning Mobile Statistics
Vala Afshar
 
Big Data
Big DataBig Data
Big Data
NGDATA
 
Big data ppt
Big data pptBig data ppt
Big data ppt
IDBI Bank Ltd.
 
What is Big Data?
What is Big Data?What is Big Data?
What is Big Data?
Bernard Marr
 
Big data ppt
Big  data pptBig  data ppt
Big data ppt
Nasrin Hussain
 
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
foreman
 
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
Bernard 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)

Daily notes
Daily notesDaily notes
Daily notes
meghendra168
 
wget.pl
wget.plwget.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)
Kang-min Liu
 
Bag of tricks
Bag of tricksBag of tricks
Bag of tricks
brian d foy
 
Drupal Development (Part 2)
Drupal Development (Part 2)Drupal Development (Part 2)
Drupal Development (Part 2)
Jeff Eaton
 
R57.Php
R57.PhpR57.Php
R57.Php
guest63876e
 
Internationalizing CakePHP Applications
Internationalizing CakePHP ApplicationsInternationalizing CakePHP Applications
Internationalizing CakePHP Applications
Pierre MARTIN
 
R57php 1231677414471772-2
R57php 1231677414471772-2R57php 1231677414471772-2
R57php 1231677414471772-2
ady36
 
Functional perl
Functional perlFunctional perl
Functional perl
Errorific
 
perl usage at database applications
perl usage at database applicationsperl usage at database applications
perl usage at database applications
Joe 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 Frameworks
Nate 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 mongers
brian d foy
 
Hacking ansible
Hacking ansibleHacking ansible
Hacking ansible
bcoca
 
PHP POWERPOINT SLIDES
PHP POWERPOINT SLIDESPHP POWERPOINT SLIDES
PHP POWERPOINT SLIDES
Ismail Mukiibi
 
Operation Oriented Web Applications / Yokohama pm7
Operation Oriented Web Applications / Yokohama pm7Operation Oriented Web Applications / Yokohama pm7
Operation Oriented Web Applications / Yokohama pm7
Masahiro 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 about
Tatsuhiko 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 Performance
Ivan 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 Tokyo
Masahiro Nagano
 
PHP Data Objects
PHP Data ObjectsPHP Data Objects
PHP Data Objects
Wez 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

HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
marufrahmanstratejm
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 

Recently uploaded (20)

HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 

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