Follow along at http://slides.mtekk.us!

Viewing Notes

How to see this presentation

Some hotkeys:

  • Arrow keys to navigate (slide on touch devices)
  • H = highlight any code snippets
  • P = toggle speaker notes (if any)
  • F = fullscreen viewing
  • W = toggle widescreen
  • O = see an overview
  • ESC = toggles off these goodies

Outline

  • History & Background
  • Lesson 1: Use WP_DEBUG
  • Lesson 2: Use a VCS
  • Lesson 3: Find a Good IDE
  • Lesson 4: Don’t Reinvent the Wheel Unless Absolutely Necessary
  • Lesson 5: Make it Extensible
  • Lesson 6: Admit to Mistakes
  • Lesson 7: Document Document Document
  • Lesson 8: Supporting the Monster
  • Lesson 9: Release on Your Own Schedule

Background & History

  • Breadcrumb NavXT
    • 1.3M downloads (as of 4-25-2014)
    • First release: 2.0.0 Beta 1 onĀ 11-22-2007
    • 37 Releases (and counting)
    • Originally named Breadcrumb Navigation XT
  • Breadcrumb Navigation XT
    • Adopted 7-01-2007
    • 7 Releases

Lesson 1: Use wp_debug

In your testbed, make sure the following is in your wp-config.php:

define('WP_DEBUG', true);
  • Goal of 0 PHP errors, warnings, and notices

Lesson 2: Use a VCS

  • Git, Subversion, Mercurial
    • Pick one, and actually use it
    • WordPress.org repo uses SVN

commit all the things

Lesson 3: Find a Good IDE

  • Features such as:
    • VCS integration
    • Syntax Hilighting
    • Code hinting
  • I use Aptana

code hinting

Lesson 4: Don’t Reinvent the Wheel Unless Absolutely Necessary

  • Check the WordPress Codex and now Code Reference to see if a similar function already exists
  • Try to avoid direct queries to the database
  • Keep up with API changes
    • i18n/l10n functions didn’t always exist
    • WP HTTP API is new as of WP 2.7
    • WP Heartbeat API is new as of WP 3.6

Lesson 5: Make it Extensible

  • WordPress uses actions and filters
  • Don’t force people to use OOP for extending a plugin

yunohooks

Lesson 6: Admit to Mistakes

Lesson 6: Admit to Mistakes (cont.)

Lesson 7: Document Document Document

  • Allows users to help themselves
    • Reduces the number of support requests (sometimes)
  • Some users actually read it and will call you out if it’s missing

Lesson 8: Supporting the Monster

Lesson 8: Support Strategies

  • The WordPress community is an international community
    • Not everyone is a native English speaker
    • Some may not speak your language at all (and Google translate can cause confusion)
  • If the same question keeps coming up, there may be something to learn
    • Documentation holes?
    • Missing feature?
    • User base shift?
  • Never respond when angry/emotional
    • Best to step back and review a support response before hitting “submit”

Lesson 8a: Dealing With Those Who Don’t RTFM

  • 2 types of people do this:
    • Lazy
    • Confused
  • Best to treat both as confused
    • Lazy will go away
    • Confused will respond/ask more questions
  • Point the user to the relevant documentation with some added explination

Lesson 8b: Dealing With Vague Questions

support

Lesson 9: Release on Your Own Schedule

  • “Release early and release often”
    • I’m not a fan of this
  • Don’t rush new releases
    • Make sure your tests pass
    • Use automated unit tests to help with testing
    • Make preview/development released available for others to test
  • Make sure you have the time for the increased support load

Questions?

John Havlik (@mtekkmonkey)

Find these slides at http://slides.mtekk.us