abstract your code!
DESCRIPTION
TRANSCRIPT
![Page 1: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/1.jpg)
mitcho (Michael 芳貴 Erlewine)http://mitcho.com
May 1, 2010WordCamp San Francisco
AbstractYourCode!
CC-BY flickr.com/photos/tupwanders/79745937/
![Page 2: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/2.jpg)
Introduction
![Page 3: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/3.jpg)
Introduction
• Hi, I’m mitcho.
![Page 4: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/4.jpg)
Introduction
• Hi, I’m mitcho.• Linguist, coder, teacher.
![Page 5: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/5.jpg)
Introduction
• Hi, I’m mitcho.• Linguist, coder, teacher.• http://mitcho.com; @mitchoyoshitaka
![Page 6: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/6.jpg)
Introduction
• Hi, I’m mitcho.• Linguist, coder, teacher.• http://mitcho.com; @mitchoyoshitaka• Linguistics PhD student at MIT
![Page 7: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/7.jpg)
Introduction
• Hi, I’m mitcho.• Linguist, coder, teacher.• http://mitcho.com; @mitchoyoshitaka• Linguistics PhD student at MIT• Gameloft, Mozilla, Automattic
![Page 8: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/8.jpg)
Yet Another Related Posts Plugin (YARPP) YARP
P!
![Page 9: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/9.jpg)
• smart “related posts” listings with lots of customization options
Yet Another Related Posts Plugin (YARPP) YARP
P!
![Page 10: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/10.jpg)
• smart “related posts” listings with lots of customization options• mitcho.com/code/yarpp or search for “YARPP”; @yarpp
Yet Another Related Posts Plugin (YARPP) YARP
P!
![Page 11: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/11.jpg)
• smart “related posts” listings with lots of customization options• mitcho.com/code/yarpp or search for “YARPP”; @yarpp• just under 500k downloads
Yet Another Related Posts Plugin (YARPP) YARP
P!
![Page 12: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/12.jpg)
HookPress
![Page 13: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/13.jpg)
HookPress
• opens up the WordPress hook system to remote scripts
![Page 14: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/14.jpg)
HookPress
• opens up the WordPress hook system to remote scripts• extend WordPress with other languages
![Page 15: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/15.jpg)
HookPress
• opens up the WordPress hook system to remote scripts• extend WordPress with other languages• now implemented on WordPress.com!
![Page 16: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/16.jpg)
HookPress
• opens up the WordPress hook system to remote scripts• extend WordPress with other languages• now implemented on WordPress.com!• mitcho.com/code/hookpress; @hookpress
![Page 17: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/17.jpg)
So, you’re a programmer...
![Page 18: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/18.jpg)
You customize WordPress for a project.
![Page 19: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/19.jpg)
what if...
![Page 20: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/20.jpg)
CC-BY-NC-SA flickr.com/photos/slworking/1704538333
![Page 21: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/21.jpg)
• they move servers and your custom code breaks...
CC-BY-NC-SA flickr.com/photos/slworking/1704538333
![Page 22: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/22.jpg)
• they move servers and your custom code breaks...• they want to reuse some (not all) of the functionality on another site...
CC-BY-NC-SA flickr.com/photos/slworking/1704538333
![Page 23: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/23.jpg)
• they move servers and your custom code breaks...• they want to reuse some (not all) of the functionality on another site...• they want modifications to your code, but you’re busy, and the new coder can’t understand your code...
CC-BY-NC-SA flickr.com/photos/slworking/1704538333
![Page 24: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/24.jpg)
• they move servers and your custom code breaks...• they want to reuse some (not all) of the functionality on another site...• they want modifications to your code, but you’re busy, and the new coder can’t understand your code...disaster!
CC-BY-NC-SA flickr.com/photos/slworking/1704538333
![Page 25: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/25.jpg)
![Page 26: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/26.jpg)
Abstraction!
![Page 27: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/27.jpg)
In the development of the understanding of complex phenomena, the most powerful tool available to the human intellect is abstraction. Abstraction arises from the recognition of similarities between certain objects, situations, or processes in the real world and the decision to concentrate on these similarities and to ignore, for the time being, their differences.
— C.A.R. Hoare
![Page 28: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/28.jpg)
Abstraction!
![Page 29: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/29.jpg)
Abstraction!=
thinking about the more general problem
![Page 30: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/30.jpg)
result=
![Page 31: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/31.jpg)
result=
code that you and others can reuse
![Page 32: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/32.jpg)
How?
![Page 33: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/33.jpg)
Think abstractly
![Page 34: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/34.jpg)
• Produce “functionalities,” not a monolithic project
Think abstractly
![Page 35: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/35.jpg)
• Produce “functionalities,” not a monolithic project• Write each functionality as its own plugin
Think abstractly
![Page 36: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/36.jpg)
• Produce “functionalities,” not a monolithic project• Write each functionality as its own plugin• Name functions and variables by functionality, not the project
Think abstractly
![Page 37: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/37.jpg)
• Produce “functionalities,” not a monolithic project• Write each functionality as its own plugin• Name functions and variables by functionality, not the project
• Even interrelated code can be modularized
Think abstractly
![Page 38: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/38.jpg)
• Produce “functionalities,” not a monolithic project• Write each functionality as its own plugin• Name functions and variables by functionality, not the project
• Even interrelated code can be modularized• introduce new hooks and filters with do_action(), apply_filters()
Think abstractly
![Page 39: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/39.jpg)
WordPress gives you abstractions
![Page 40: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/40.jpg)
WordPress gives you abstractions
Use them.
![Page 41: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/41.jpg)
WordPress gives you abstractions
Use them.• Database query? $wpdb, not mysql_*
![Page 42: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/42.jpg)
WordPress gives you abstractions
Use them.• Database query? $wpdb, not mysql_*• Caching? Object Cache and Transients API
![Page 43: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/43.jpg)
WordPress gives you abstractions
Use them.• Database query? $wpdb, not mysql_*• Caching? Object Cache and Transients API• Options? set_option() etc. not db
![Page 44: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/44.jpg)
WordPress gives you abstractions
Use them.• Database query? $wpdb, not mysql_*• Caching? Object Cache and Transients API• Options? set_option() etc. not db• Getting posts? get_posts() etc. not SQL
![Page 45: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/45.jpg)
WordPress gives you abstractions
Use them.• Database query? $wpdb, not mysql_*• Caching? Object Cache and Transients API• Options? set_option() etc. not db• Getting posts? get_posts() etc. not SQL• Custom data? Custom taxonomy or fields
![Page 46: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/46.jpg)
WordPress gives you abstractions
Use them.• Database query? $wpdb, not mysql_*• Caching? Object Cache and Transients API• Options? set_option() etc. not db• Getting posts? get_posts() etc. not SQL• Custom data? Custom taxonomy or fields• New entities? Custom post types!
![Page 47: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/47.jpg)
WordPress gives you abstractions
Use them.• Database query? $wpdb, not mysql_*• Caching? Object Cache and Transients API• Options? set_option() etc. not db• Getting posts? get_posts() etc. not SQL• Custom data? Custom taxonomy or fields• New entities? Custom post types!• External request? wp_remote_post() not curl
![Page 48: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/48.jpg)
Don’t reinvent the wheel.
© 2008 Drew and Natalie Dee, toothpastefordinner.com
![Page 49: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/49.jpg)
Be mobile
![Page 50: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/50.jpg)
• Don’t expect to be in a particular place
Be mobile
![Page 51: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/51.jpg)
• Don’t expect to be in a particular place• Use __FILE__, WP_PLUGIN_URL, and friends
Be mobile
![Page 52: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/52.jpg)
• Don’t expect to be in a particular place• Use __FILE__, WP_PLUGIN_URL, and friends• Get info with get_bloginfo()
Be mobile
![Page 53: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/53.jpg)
• Don’t expect to be in a particular place• Use __FILE__, WP_PLUGIN_URL, and friends• Get info with get_bloginfo()• Use $wpdb so you can forget about database settings
Be mobile
![Page 54: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/54.jpg)
Be classy
![Page 55: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/55.jpg)
Be classy
• Object oriented programming is perfect for abstracting “functionality”
![Page 56: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/56.jpg)
Be classy
• Object oriented programming is perfect for abstracting “functionality”• Write your functionality as a class with some defaults. Easy for others to extend.
![Page 57: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/57.jpg)
Be classy
• Object oriented programming is perfect for abstracting “functionality”• Write your functionality as a class with some defaults. Easy for others to extend.• Makes for clean, legible code
![Page 58: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/58.jpg)
Be classy
• Object oriented programming is perfect for abstracting “functionality”• Write your functionality as a class with some defaults. Easy for others to extend.• Makes for clean, legible code• less prefix crud
![Page 59: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/59.jpg)
Be classy
• Object oriented programming is perfect for abstracting “functionality”• Write your functionality as a class with some defaults. Easy for others to extend.• Makes for clean, legible code• less prefix crud• A great example: PuSHPress
![Page 60: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/60.jpg)
Give yourself options
![Page 61: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/61.jpg)
Give yourself options
• Don’t hard code the project name, copyright strings, email bodies, etc.
![Page 62: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/62.jpg)
Give yourself options
• Don’t hard code the project name, copyright strings, email bodies, etc.• Bare minimum: declare these constants in a separate config file
![Page 63: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/63.jpg)
Give yourself options
• Don’t hard code the project name, copyright strings, email bodies, etc.• Bare minimum: declare these constants in a separate config file• Ideally: create an options screen
![Page 64: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/64.jpg)
Give yourself options
• Don’t hard code the project name, copyright strings, email bodies, etc.• Bare minimum: declare these constants in a separate config file• Ideally: create an options screen• Not as hard as you think
![Page 65: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/65.jpg)
Give yourself options
• Don’t hard code the project name, copyright strings, email bodies, etc.• Bare minimum: declare these constants in a separate config file• Ideally: create an options screen• Not as hard as you think• *_option() functions are your friend!
![Page 66: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/66.jpg)
Learn from the masters
![Page 67: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/67.jpg)
• http://codex.wordpress.org
Learn from the masters
![Page 68: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/68.jpg)
• http://codex.wordpress.org• There’s more there than you think.
Learn from the masters
![Page 69: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/69.jpg)
• http://codex.wordpress.org• There’s more there than you think.• Read others’ code.
Learn from the masters
![Page 70: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/70.jpg)
• http://codex.wordpress.org• There’s more there than you think.• Read others’ code.• Borrow and adapt from other plugins, themes, and the Core
Learn from the masters
![Page 71: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/71.jpg)
• http://codex.wordpress.org• There’s more there than you think.• Read others’ code.• Borrow and adapt from other plugins, themes, and the Core• “free as in freedom!”
Learn from the masters
![Page 73: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/73.jpg)
Abstraction!
![Page 74: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/74.jpg)
Results
![Page 75: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/75.jpg)
• Won’t [Less likely to] break when you move machines or upgrade WordPress
Results
![Page 76: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/76.jpg)
• Won’t [Less likely to] break when you move machines or upgrade WordPress• Easier to maintain
Results
![Page 77: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/77.jpg)
• Won’t [Less likely to] break when you move machines or upgrade WordPress• Easier to maintain• Easier (for you or others) to build on
Results
![Page 78: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/78.jpg)
• Won’t [Less likely to] break when you move machines or upgrade WordPress• Easier to maintain• Easier (for you or others) to build on• Easier to reuse elsewhere
Results
![Page 79: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/79.jpg)
but wait, there’s more...
![Page 80: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/80.jpg)
CC-BY-NC-SA flickr.com/photos/z6p6tist6/500048151/
![Page 81: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/81.jpg)
CC-BY-NC-SA flickr.com/photos/z6p6tist6/500048151/
is not a one way street.
Free software
![Page 82: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/82.jpg)
CC-BY-NC-SA flickr.com/photos/z6p6tist6/500048151/
is not a one way street.
WordPress
![Page 83: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/83.jpg)
Gedankenexperiment:
![Page 84: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/84.jpg)
• You just customized WordPress for a client
Gedankenexperiment:
![Page 85: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/85.jpg)
• You just customized WordPress for a client• Others could also benefit from this feature
Gedankenexperiment:
![Page 86: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/86.jpg)
• You just customized WordPress for a client• Others could also benefit from this feature• You and the client have already benefited from free software: WordPress
Gedankenexperiment:
![Page 87: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/87.jpg)
Consider open-sourcing your client-requested functionality.
![Page 88: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/88.jpg)
![Page 89: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/89.jpg)
Do people really do this?
![Page 90: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/90.jpg)
success stories:
![Page 91: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/91.jpg)
success stories:
My own work at MIT
![Page 92: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/92.jpg)
![Page 93: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/93.jpg)
![Page 94: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/94.jpg)
Custom Comment Typessupported by the MIT Edgerton Digital Collections
![Page 95: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/95.jpg)
![Page 96: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/96.jpg)
Licensesupported by the MIT Department of Mathematics
![Page 97: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/97.jpg)
Licensesupported by the MIT Department of Mathematics
![Page 98: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/98.jpg)
MIT Department of Mathematics:
![Page 99: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/99.jpg)
MIT Department of Mathematics:
• Shibboleth authentication
![Page 100: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/100.jpg)
MIT Department of Mathematics:
• Shibboleth authentication• now contributing to the pre-existing Shibboleth plugin
![Page 101: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/101.jpg)
MIT Department of Mathematics:
• Shibboleth authentication• now contributing to the pre-existing Shibboleth plugin• MIT customizations can be reused in other MIT projects
![Page 102: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/102.jpg)
Brad Williamsco-founder, WebDevStudios.com
success stories:
![Page 103: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/103.jpg)
Brad Williams
![Page 104: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/104.jpg)
• NextGEN Public Uploader
Brad Williams
![Page 105: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/105.jpg)
• NextGEN Public Uploader• Post Google Map
Brad Williams
![Page 106: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/106.jpg)
• NextGEN Public Uploader• Post Google Map• sponsored by injersey.com
Brad Williams
![Page 107: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/107.jpg)
Brad Williams
![Page 108: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/108.jpg)
• no client has said no
Brad Williams
![Page 109: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/109.jpg)
• no client has said no• if the client is on the fence, mention the ongoing support benefits
Brad Williams
![Page 110: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/110.jpg)
• no client has said no• if the client is on the fence, mention the ongoing support benefits• many clients have never thought about open-sourcing functionality, but most WordPress people want to give back
Brad Williams
![Page 111: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/111.jpg)
• no client has said no• if the client is on the fence, mention the ongoing support benefits• many clients have never thought about open-sourcing functionality, but most WordPress people want to give back• plugins have brought in new clients
Brad Williams
![Page 112: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/112.jpg)
John James JacobyJohn James Jacoby BuddyPress Consulting
and Custom Development
success stories:
![Page 113: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/113.jpg)
![Page 114: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/114.jpg)
BuddyPress Member Filterdevelopment supported by LOGOI Ministries
![Page 115: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/115.jpg)
![Page 116: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/116.jpg)
BuddyPress Edit Group Slugdevelopment supported by We Heart This
![Page 117: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/117.jpg)
John James Jacoby
![Page 118: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/118.jpg)
John James Jacoby
• educate the customer about community role and open-source
![Page 119: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/119.jpg)
John James Jacoby
• educate the customer about community role and open-source• sometimes it’s appropriate to just open-source the backend parts without UI
![Page 120: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/120.jpg)
John James Jacoby
• educate the customer about community role and open-source• sometimes it’s appropriate to just open-source the backend parts without UI• community contributions got him noticed
![Page 121: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/121.jpg)
John James Jacoby
• educate the customer about community role and open-source• sometimes it’s appropriate to just open-source the backend parts without UI• community contributions got him noticed• BuddyPress Core contributor
![Page 122: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/122.jpg)
Tips
![Page 123: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/123.jpg)
Tips
• bring up open-sourcing early
![Page 124: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/124.jpg)
Tips
• bring up open-sourcing early• if they say no, respect their choice
![Page 125: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/125.jpg)
Tips
• bring up open-sourcing early• if they say no, respect their choice• don’t pass the cost back to the client
![Page 126: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/126.jpg)
Tips
• bring up open-sourcing early• if they say no, respect their choice• don’t pass the cost back to the client• acknowledge the funding
![Page 127: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/127.jpg)
Tips
• bring up open-sourcing early• if they say no, respect their choice• don’t pass the cost back to the client• acknowledge the funding• don’t forget that you can contribute to existing projects as well
![Page 128: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/128.jpg)
Abstraction
![Page 129: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/129.jpg)
Abstraction
FTW!
![Page 130: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/130.jpg)
More FTW = less WTF
![Page 131: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/131.jpg)
The bottom line
![Page 132: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/132.jpg)
• Abstract your code:
The bottom line
![Page 133: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/133.jpg)
• Abstract your code:• Client gets modular, future-proof, understandable code.
The bottom line
![Page 134: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/134.jpg)
• Abstract your code:• Client gets modular, future-proof, understandable code.• Less headaches for you and your team.
The bottom line
![Page 135: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/135.jpg)
• Abstract your code:• Client gets modular, future-proof, understandable code.• Less headaches for you and your team.• Open-source your customizations:
The bottom line
![Page 136: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/136.jpg)
• Abstract your code:• Client gets modular, future-proof, understandable code.• Less headaches for you and your team.• Open-source your customizations:• Client can contribute to WordPress.
The bottom line
![Page 137: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/137.jpg)
• Abstract your code:• Client gets modular, future-proof, understandable code.• Less headaches for you and your team.• Open-source your customizations:• Client can contribute to WordPress.• You become famous.
The bottom line
![Page 138: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/138.jpg)
• Abstract your code:• Client gets modular, future-proof, understandable code.• Less headaches for you and your team.• Open-source your customizations:• Client can contribute to WordPress.• You become famous.
The bottom line
Win!Win!
Win!
Win!
![Page 139: Abstract Your Code!](https://reader033.vdocuments.mx/reader033/viewer/2022051817/54890a52b47959140d8b58ab/html5/thumbnails/139.jpg)
Thank you!Questions?
Slides will be up on mitcho.com/blog/.
mitcho (Michael 芳貴 Erlewine)mitcho.com; @mitchoyoshitaka