Planning for Debugging

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Group & 1 Event

    Planning for Debugging - Presentation Transcript

    1. Planning for debugging Ed Freyfogle London Perl Workshop 28 Nov. 2008
    2. Nestoria?
    3. What could go wrong? datasources Nestoria output Lots of data, many sources, 4 languges ETL, geocoding, deduplication …. HTML, whitelabels, API, widgets, FBML …. All with very few developers Internal tools, reporting, invoicing …
    4.  
    5. Developers, not firefighters Bad Good
    6. Obvious first steps
      • Version Control
        • svn, trac
      • Build enviroment
        • local, staging, live
      • Tests
        • nightly, prelaunch, postlaunch
    7. Documentation Bad: no documentation Worse: incorrect documentation
    8. Who do you trust? You make mistakes. Computers don’t.
    9. >./connect_to_database.pl --help Prints command needed to access database Usage: ./connect_to_database.pl --database [listings|searchindex] --country no default, (de|es|it|uk) --database type of DB --help --product_type default=realestate --type no default, (failover) --verbose Umm, the backup DB is on server 3, right? Don’t guess. Know
    10. Logging
      • Make it easy to turn on/off
      • Log4Perl
      • Have cleanup strategy
    11. Measure twice, cut once
    12. my $script = ‘~/somescript.pl’; my $procs = determine_procs(); my $groups = some_test() ? 2 : 3; my $cmd = $script . ’ --groups ’ . $groups . ’ --procs ’ . $procs; system($cmd); Rome is burning. You have 10 seconds. What does this code do?
    13. my $script = ‘~/somescript.pl’; my $procs = determine_procs(); my $groups = some_test() ? 2 : 3; my $cmd = $script . ’ --groups ’ . $groups . ’ --procs ’ . $procs; execute_cmd($cmd); sub execute_cmd{ my $cmd = shift; if ($dryrun){ print STDERR “would have run $cmd ”; } else { system($cmd); } } Better:
    14. Don’t make me think
      • --help, --dryrun, --verbose
      • Getopt::Long
      • Term::ProgressBar
    15. Invest now
      • schedule code review/learning
      • “ upgrade day”
        • keep an easy to edit list of ideas (wiki)
      • have an email/alerts strategy
      • CPAN is your friend
        • Perl::Metrics::Simple
    16. Get help To: Nestoria team From: [email_address] Subject: Bug I think there is a bug. The page doesn’t seem to wrk. Pls fix.
    17. Better To: Nestoria team From: [email_address] Subject: Bug I think there is a bug. The page doesn’t seem to wrk. Pls fix. HTTP_X_FORWARDED_FOR     81.136 .*.* SERVER_ADDR     10.10.*.* HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 7.0; … Cookie        MjEwREhQZ1JzeEl1NDAxMjIzNTY4MjE4A5A
    18. Get help (cont.)
    19. Help me to help you
    20. Shameless plug Join us! You’ll love our API….
    21. Questions? http://www.nestoria.co.uk http://blog.nestoria.co.uk

    + lokkulokku, 12 months ago

    custom

    1431 views, 0 favs, 1 embeds more stats

    talk at London Perl Workshop 2008

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1431
      • 1413 on SlideShare
      • 18 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 0
    Most viewed embeds
    • 18 views on http://blog.nestoria.co.uk

    more

    All embeds
    • 18 views on http://blog.nestoria.co.uk

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories

    Tags

    Groups / Events