This slideshow could not be started. Try refreshing the page or viewing it in another browser.
How to think and work like a VIP Developer
About me: Mohammad (Mo) Jangda
mo@automattic.com | batmoo@gmail.com | @mjangda
- Toronto, ON
- Code Wrangler at WordPress.com VIP (Automattic)
- Core Contributor to WordPress
- Ice Cream Fan
Warning: #humblebrag
Please also excuse my terrible attempts at humour.
How Does VIP Work?
Automattic: Hosting & Support; Code Architecture and Review; Troubleshooting; Best Practices; Upgrades; etc.
Client or Partner: Editorial & Content; Development; Maintenance; etc.
There are a few simple formulas when it comes to scalability…
Big site + Lots of traffic
=
:(
Big site + Lots of traffic
+ Good infrastructure
=
:)
Big site + Lots of traffic
+ Good infrastructure
+ VIP Developer(s)
=
:D :D :D :D :D
Why does this Formula work?
Because VIP Developers are some of the best WordPress developers in the world!
Who are these mythical VIP Developers?
In a very literal sense: any developer who works on a VIP site.
VIP Developers work at various agencies
…or they work for the VIP sites
What’s so special about them?
- Their code scales! (Millions of pageviews? Bring it on!)
- Their code is secure (Hackers feel inadequate!)
- Their code is future-proof! (Always
trunk
-ready!) - Their code is clean, readable, extensible, modularized, well-documented, etc.
- Their code will make you a sandwich, if you ask nicely enough.
Most Importantly They’re Ruggedly Handsome!
The Key Question:
How does one become a VIP Developer?
(In the figurative sense)
Here’s the secret:
A VIP Developer is great at software development.
Qualities of a Great Software Developer
- Good Technical Aptitude
- Humble
- Open to feedback and improving on past mistakes
- Never stops learning
- Can break down, understand, and articulate problems
- Follows best practices and guidelines (and know when to break them)
- Can admit when they’re doing something wrong
Notice how I haven’t mentioned WordPress anywhere in the list?
Great Software Developers:
Understand and Follow good software development practices
- You don’t need to be a computer scientist
- Software design processes (e.g. Agile), patterns (e.g. Factories), principles (e.g. DRY)
- Think beyond the requirements
Notice how I still haven’t mentioned WordPress anywhere in the list?
Great Software Developers:
Are platform independant
- Expose yourself to non-WordPress-y things
- WordPress can power the Mars lander if we really want it to but that doesn’t mean we should.
- Explore other languages (beyond PHP)
- Explore libraries and other frameworks (beyond jQuery)
- Why? You can flex that muscle if a project comes up with that one odd requirement
- Or you can bring the thinking of other frameworks into your WordPress development
A VIP Developer’s Rules to Live By
The Most Important One:
Don’t make Mo mad!
(He will take away your commit access!)
Rule: Become a WordPress expert
- You don’t need to know everything
- But you do need to know the key components and how they interact with each other
- Example: what pieces of WordPress interact during any given pageload
- Helps with troubleshooting, debugging, feature development
Rule: Become Intimate with Code
- Spend more time with code than is healthy (have the Trac and SVN URLs bookmarked)
- Know what code lives where (or how to find it)
- Use great resources (e.g. Adam Brown’s Hook and Filter Database)
Rule: Follow core development
…or, better, contribute!
Rule: Never, ever modify WordPress core
Rule: Debug Often
And know what tools to use
define( 'WP_DEBUG', true );
Developer Plugin (http://wordpress.org/extend/plugins/developer/)
Rule: Don’t copy-pasta code without reviewing and understand what it does
Rule: Do things the “WordPress way”
- Use WordPress’ built-in APIs wherever possible
- If you need to access the database, use $wpdb
- Fetching Remote data, use the HTTP API, e.g. wp_remote_get
- http://codex.wordpress.org/WordPress_API’s
Rule: Always write secure code, even if it takes longer
Security should be a part of the development process, not an after-thought.
You eventually get to a point where all the code you write is inherently written with security in mind.
Rule: Follow the WordPress Coding Standards
Rule: Prefix all the things!
To prevent the dreaded WSOD!
Rule: Use source control
- Doesn’t matter what system (git, svn, mercurial)
- Think in terms of changesets and small commits
- Benefits: Instant backup, experimentation, disk space (.bk files), teams
Rule: Get your code reviewed often
…and use it as an opportunity to grow!
Rule: Give back to the community
Because it feels good! And it’s good for you too!
Rule: Know when to break the rules
Caveat:
Developing this takes alot of time, effort, willpower, determination, etc.
Thanks!