Cowboy Coding To Professional Developer

June 12, 2015


WCKC2015_Speaker-150x150Notes and slides from my WordCamp Kansas City 2015 presentation 'Cowboy Coding To Professional Developer'. (these are my presentation notes straight out of Evernote... please ignore formatting and grammar issues) The first half of the talk has general tips on being a better developer and the second half of the presentation is focused on a professional WordPress developer's workflow and quick tips. The goal of the presentation is not to tell you how to develop - but to provide singular tips that will, individually, make you better. You don't need to adopt them all at once. Use them as needed as each is generally independent from the next. TL;DR Don’t code live on your production server (yeeeee-haw). Use version control. Be nice, use standards, and avoid shiny object syndrome. This presentation contains bite sized nuggets - suggestions where if you take one thing away from this talk you will be a better developer. You don't have to do everything at once. Incremental improvements are easier to turn into habits. I’m not going to take to big of a deep dive but have added a ton of references in the presentation notes so you can explore on your own.  What is cowboy coding? cowyboy Cowboy coding is flying by the seat of your pants development - editing files live on a server just to see what happens. There’s nothing wrong with it - unless you are getting paid. It’s an essential part of learning a programming language, framework, library or platform. It’s a great place to start… but it’s also dangerous when you are dealing with other people’s systems, websites, and codebases. A Better Developer Being a better developer is rarely about learning syntax, patterns, and conventions. That's the easy part. It's how you work that matters It’s being pragmatic, conventional, efficient, and empathetic. TL;DR Don’t code live on your production server. Use version control. Be nice, use standards, and avoid shiny object syndrome

Being A Better Developer

Be Pragmatic

Be Empathetic

Learn source control from the start

Use Standard Conventions

Tools don’t matter. Tools are everything It’s not about what tools you use - it’s about what tools you are productive with. Don't force your tools on anyone else. Be A Good Teammate

Avoid Shiny Objects

Be Verbose

Automate Things

Code in Objects

Test Your Software

Don’t Repeat Yourself

Working With WordPress

The thing I like most yet despise most about WordPress are the infinite ways you can do something. These may not be the best ways or your ways… but anything is better than nothing. Use A Local Dev Environment

Syncing Data

Deploy with sanity

Being A Better WordPress Developer

Doing things “the right way” in WP dev is harder than ever it seems to me. Or more likely just catching up from Wild West years. — Brian Krogsgard (@Krogsgard) January 2, 2015

Easy tips to be a better WordPress developer. You don’t have to use all of these tips at once. But when combined they will increase your super powers. Pick and choose as you have problems or roadblocks and use them as a chance to improve your environment, workflow, or productivity. Use WP_DEBUG

What should be in a Git repository?

Separate your concerns

Use WordPress Coding Standards

"Coding standards help avoid common coding errors, improve the readability of code, and simplify modification. They ensure that files within the project appear as if they were created by a single person. Following the standards means anyone will be able to understand a section of code and modify it, if needed, without regard to when it was written or by whom. If you are planning to contribute to WordPress core, you need to familiarize yourself with these standards, as any code you submit will need to comply with them"

Use Core Features Theme Customizer, Settings API, Options API, Image Thumbnails, Menus, Widgets, Shortcodes and more make development easier Enqueue ALL The Things Make sure to use wp-enqueue when including scripts or stylesheets in any plugin or theme. Use Template Parts

Validate, Sanitize, Escape

Transients Are Your Friend

Variable Scope


Manage Dependencies

My toolset

My workflow

  1. Grab a task (from Github, Trello, or Jira)
  2. Pull latest version of the project from git
  3. Pull latest version of data with WP DB Migrate Pro
  4. Code feature / bug fix
  5. Commit and push code to repo with verbose comments and link to ticket/issue
  6. Deploy with WP Pusher or Git

Link Dump

Better Developer

Learn Git In Your Browser - learn

Object-Oriented PHP for Beginners - read


Installing a Local Server - read

How We Deploy WordPress Themes - read

A Series of Deployment Workflows  - read

WP DB Migrate Pro - download

WordPress Tips

WordPress Code Reference - read

WordPress Coding Standards - read

The Importance of Following The WordPress Coding Standards - read

Create A Functionality Plugin Instead Of Using functions.php - read

.gitignore for WordPress - read

Enqueuing things - read

Validate, Sanitize and Escape - read

WP Migrate DB Pro CLI Addon: Push/Pull - read

How I Would Solve Plugin Dependencies - read

TGM Plugin Activation - download

WordPress template part: a powerful tool - read

get_template_part() - read

WordPress Theme Customizer Resources - read

WordPress Plugin Boilerplate - fork

GenerateWP - use

WP Pusher - download


PHP Storm - download - download

Sublime Text - download

MAMP Pro - download

Desktop Server - download

VVV - download

iTerm - download


[contact-form][contact-field label='Name' type='name' required='1'/][contact-field label='Email' type='email' required='1'/][contact-field label='Question' type='textarea' required='1'/][/contact-form]

Subscribe to email newsletter

By subscribing, you agree with Revue’s Terms and Privacy Policy.