• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Itch Scratching
 

Itch Scratching

on

  • 1,824 views

Itch Scratching is the basis of all Open Source development. But how do you start? What is the process to get from having done NOTHING to releasing a massive and complete library?...

Itch Scratching is the basis of all Open Source development. But how do you start? What is the process to get from having done NOTHING to releasing a massive and complete library?

This talk goes through the steps that I went through to develop the Ruby Mail Gem

Statistics

Views

Total Views
1,824
Views on SlideShare
1,789
Embed Views
35

Actions

Likes
2
Downloads
11
Comments
0

3 Embeds 35

http://www.slideshare.net 31
http://en.oreilly.com 3
http://static.slidesharecdn.com 1

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • <br />
  • No CS Experience <br /> <br />
  • No CS Experience <br /> <br />
  • No CS Experience <br /> <br />
  • No CS Experience <br /> <br />
  • No CS Experience <br /> <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • Read design patterns in Ruby <br /> <br />
  • Read design patterns in Ruby <br /> <br />
  • Read design patterns in Ruby <br /> <br />
  • Read design patterns in Ruby <br /> <br />
  • Read design patterns in Ruby <br /> <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />

Itch Scratching Itch Scratching Presentation Transcript

  • Itch Scratching the ActionMailer API A brief foray into the mind of a masochist!
  • whoami?
  • whoami? Working in Rails & Ruby for 4+ Years
  • whoami? Working in Rails & Ruby for 4+ Years Maintainer of TMail & Author of Mail
  • whoami? Working in Rails & Ruby for 4+ Years Maintainer of TMail & Author of Mail DBA and Internet Plumber
  • whoami? Working in Rails & Ruby for 4+ Years Maintainer of TMail & Author of Mail DBA and Internet Plumber Rails Contributor
  • whoami? Working in Rails & Ruby for 4+ Years Maintainer of TMail & Author of Mail DBA and Internet Plumber Rails Contributor Entrepreneur
  • y?
  • y? Mail Application
  • y? Mail Application Challenge
  • y? Mail Application Challenge TMail
  • OMGLOLSPAM
  • OMGLOLSPAM “TMail was a great SPAM checker... if it crashed while parsing an email then you knew it was SPAM.” - Koz
  • Why not just fix TMail?
  • Why not just fix TMail? Released 10 patch and minor versions
  • Why not just fix TMail? Released 10 patch and minor versions I wrote over 600 lines of Docs
  • Why not just fix TMail? Released 10 patch and minor versions I wrote over 600 lines of Docs Built on a Strategy Pattern
  • Why not just fix TMail? Released 10 patch and minor versions I wrote over 600 lines of Docs Built on a Strategy Pattern Parser Written in C
  • Why not just fix TMail? Released 10 patch and minor versions I wrote over 600 lines of Docs Built on a Strategy Pattern Parser Written in C HARD TO FOLLOW
  • Why not just fix TMail?
  • Why not just fix TMail? TMail was not very modular and hard to maintain
  • Why not just fix TMail? TMail was not very modular and hard to maintain Wanted to write a major library
  • Why not just fix TMail? TMail was not very modular and hard to maintain Wanted to write a major library How hard could email be?
  • Why not just fix TMail? TMail was not very modular and hard to maintain Wanted to write a major library How hard could email be? I wanted a nice DSL
  • Why not just fix TMail? TMail was not very modular and hard to maintain Wanted to write a major library How hard could email be? I wanted a nice DSL Not as fun
  • Mail’s DSL is Simple
  • Mail’s DSL is Simple
  • Mail’s DSL is Simple
  • Mail’s DSL is Simple
  • Mail’s DSL is Simple
  • Mail’s DSL is Simple
  • Mail’s DSL is Simple
  • Mail’s DSL is Simple
  • How Hard Could It Be?
  • How Hard Could It Be? Read RFCs
  • How Hard Could It Be? Read RFCs Read more RFCs
  • How Hard Could It Be? Read RFCs Read more RFCs Keep reading RFCs...
  • How Hard Could It Be? Read RFCs Read more RFCs Keep reading RFCs... “email is defined in RFCs, so should be easy...”
  • RFCs
  • RFCs
  • RSpec FTW!
  • RSpec FTW! I use RSpec because I am lazy
  • RSpec FTW! I use RSpec because I am lazy EVERYTHING in Mail is BDD
  • RSpec FTW! I use RSpec because I am lazy EVERYTHING in Mail is BDD Regressions Caught
  • RSpec FTW! I use RSpec because I am lazy EVERYTHING in Mail is BDD Regressions Caught Seriously
  • Spec’ing for Libraries
  • Spec’ing for Libraries Start Simple
  • Spec’ing for Libraries Start Simple Comments in Spec Files are OK
  • Spec’ing for Libraries Start Simple Comments in Spec Files are OK Use Custom Matchers
  • Spec’ing for Libraries Start Simple Comments in Spec Files are OK Use Custom Matchers Break Down Your Spec Files
  • Spec’ing for Libraries Start Simple Comments in Spec Files are OK Use Custom Matchers Break Down Your Spec Files Spec in Multiple Rubies
  • Start Somewhere
  • Start Somewhere
  • Start Somewhere
  • Start Somewhere
  • Comments are OK
  • Comments are OK
  • Use Custom Matchers when appropriate
  • Use Custom Matchers when appropriate
  • Use Custom Matchers when appropriate
  • Use Custom Matchers when appropriate
  • Custom Matchers
  • Custom Matchers
  • Break Down Spec Files
  • Break Down Spec Files
  • Break Down Spec Files 26 Sub Directories
  • Break Down Spec Files 26 Sub Directories 79 Ruby Spec Files
  • Break Down Spec Files 26 Sub Directories 79 Ruby Spec Files 73 Edge Case Emails
  • Break Down Spec Files 26 Sub Directories 79 Ruby Spec Files 73 Edge Case Emails Many Many Lines of Specs
  • Break Down Spec Files 26 Sub Directories 79 Ruby Spec Files 73 Edge Case Emails Many Many Lines of Specs 1161 examples
  • Break Down Spec Files 26 Sub Directories 79 Ruby Spec Files 73 Edge Case Emails Many Many Lines of Specs 1161 examples No Failures :)
  • Spec in Multiple Rubies
  • Spec in Multiple Rubies Have to be a good Ruby Citizen
  • Spec in Multiple Rubies Have to be a good Ruby Citizen JRuby
  • Spec in Multiple Rubies Have to be a good Ruby Citizen JRuby REE
  • Spec in Multiple Rubies Have to be a good Ruby Citizen JRuby REE Rubinius (almost)
  • Spec in Multiple Rubies Have to be a good Ruby Citizen JRuby REE Rubinius (almost) MRI - 1.8.6, 1.8.7, 1.9.1, 1.9.2
  • But What About Real Life?
  • But What About Real Life? Mail parses the Enron and Trec Data Sets
  • But What About Real Life? Mail parses the Enron and Trec Data Sets mikel@baci ~/Code $ du -hs corpus/ 2.4G of Emails
  • But What About Real Life? Mail parses the Enron and Trec Data Sets mikel@baci ~/Code $ du -hs corpus/ 2.4G of Emails mikel@baci ~/Code $ find corpus -name "*" -print | wc -l 328,248 Emails
  • show me the model!
  • show me the model! Mail
  • show me the model! Mail Message
  • show me the model! Mail Message Header
  • show me the model! Mail Message Header Body
  • show me the model!
  • show me the model! Message Body
  • show me the model! Message Body Header
  • show me the model! Message Body Header FieldList
  • show me the model! Message Body Header FieldList Fields
  • show me the model! Message Body Header FieldList Fields StructuredField Content-Type Content-Transfer-Encoding To, From, Cc, Bcc, Reply-To
  • show me the model! Message Body Header FieldList Fields StructuredField UnstructuredField Content-Type Subject Content-Transfer-Encoding X-Headers et al To, From, Cc, Bcc, Reply-To Any other unparsable field
  • show me the model!
  • show me the model! Message Header
  • show me the model! Message Header Body
  • show me the model! Message Header Preamble Body
  • show me the model! Message Header Preamble One or Body Many Parts
  • show me the model! Message Header Preamble One or Body Many Parts Epilogue
  • show me the model! Message Header Preamble One or Body Message Many Parts Ohhh... O.O. Recursive Epilogue Type Stuff
  • show me the model!
  • show me the model! And Thats It!
  • show me the model! And Thats It! Simple Hey?
  • show me the model! Header Errors Legacy Emails Parsers rfc822 Delivery Agents And Thats It! SMTP Body Decoding SPAM PGP Signing POP3 File Types Mbox Simple Hey? Network IMAP Language Support Sendmail Delivery Bad Emails Encoding Edge Cases Pattern Matching OMGMIME! Decoding Attachments Interceptors File IO Domain Key Emails Observers Status Reports Inline Attachments
  • OK, ActionMailer?
  • OK, ActionMailer? Much Easier to Use
  • OK, ActionMailer? Much Easier to Use Nicer Defaults & Config
  • OK, ActionMailer? Much Easier to Use Nicer Defaults & Config ActionMailer Methods Return Mail Object
  • OK, ActionMailer? Much Easier to Use Nicer Defaults & Config ActionMailer Methods Return Mail Object Deprecated (not Decapitated) API
  • OK, ActionMailer? Much Easier to Use Nicer Defaults & Config ActionMailer Methods Return Mail Object Deprecated (not Decapitated) API Tutorials
  • Much Easier to Use
  • Much Easier to Use New Mailer Directory
  • Much Easier to Use New Mailer Directory Can Call “mail” method and pass a hash
  • Nicer Defaults
  • Nicer Defaults
  • Nicer Config
  • Nicer Config
  • AM Returns Mail
  • AM Returns Mail
  • AM Returns Mail
  • Mail Call Back Hooks
  • Mail Call Back Hooks
  • Mail Call Back Hooks
  • Mail Call Back Hooks
  • Mail Call Back Hooks
  • Mail Call Back Hooks
  • Deprecated API Decapitation Free Zone
  • Deprecated API Decapitation Free Zone Did not nuke the old API
  • Deprecated API Decapitation Free Zone Did not nuke the old API New API triggers ONLY if you call “mail”
  • Deprecated API Decapitation Free Zone Did not nuke the old API New API triggers ONLY if you call “mail” Old API in place if no “mail” call
  • Deprecated API Decapitation Free Zone Did not nuke the old API New API triggers ONLY if you call “mail” Old API in place if no “mail” call Will be Removed in 3.1
  • Deprecated API Decapitation Free Zone
  • Deprecated API Decapitation Free Zone
  • Deprecated API Decapitation Free Zone
  • HELP!!!
  • HELP!!! Replace treetop with Ragel or RACC
  • HELP!!! Replace treetop with Ragel or RACC Implement full POP3 and IMAP Support
  • HELP!!! Replace treetop with Ragel or RACC Implement full POP3 and IMAP Support Domain Key Implementation
  • HELP!!! Replace treetop with Ragel or RACC Implement full POP3 and IMAP Support Domain Key Implementation PGP Signing
  • HELP!!! Replace treetop with Ragel or RACC Implement full POP3 and IMAP Support Domain Key Implementation PGP Signing More Documentation
  • Tutorials
  • Tutorials lindsaar.net
  • Tutorials lindsaar.net www.RailsDispatch.com
  • Tutorials lindsaar.net www.RailsDispatch.com www.RailsCasts.com
  • KTHXBAI Questions? @raasdnil mikel@rubyx.com lindsaar.net