Cowboy Coding To Professional Developer

June 12, 2015

speaking

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

WP-CLI

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

Workflow

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

Tools

Herd - download

PHP Storm - download

Atom.io - download

Sublime Text - download

MAMP Pro - download

Desktop Server - download

VVV - download

iTerm - download

Questions?

[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]


Active Projects

I'm always tinkering with new ideas and building interesting things. From AI-powered tools to micro-SaaS products, these are the projects currently keeping me up at night. Each one solves a specific problem I've encountered or explores an emerging technology I'm excited about.

🤖 PMPrompt

I recently launched PMPrompt, a curated collection of AI prompts for product managers. The goal is simple - help PMs save time and be more effective by leveraging AI in their daily workflow. Read more about this project in my blog post about building PMPrompt or try the AI-Powered PRD Generator.

📊 SurveySnaps

I recently launched SurveySnaps, a platform that makes collecting location-based feedback dead simple using QR codes. The goal is straightforward - help businesses gather real-time feedback from specific locations without the complexity of traditional survey tools. Read more about this project in my blog post about building SurveySnaps.

🏗️ JSONL Tools

I am working on a set of tools to help me work with JSONL. JSONL is a simple format for working with JSON data. I am working on a set of tools to help me work with JSONL data. I will use these tools to help me work with my own data as well as help me build my own APIs. One of the tools I am developing is a JSONL Validator to ensure the integrity and structure of JSONL data. Read more about this project in my blog post about building JSONL Tools.

🤖 Make Storytime

Personalized children's stories generated by AI. This is an app I am building with my kids.

📠 Fax Online

Yea, I know. But there is a long tail for everything and believe it or not there was an underserved market for people that need to send a fax online. Some people (like me!) just need to send a one time fax.

Read more about this micro Saas project in a blog post about building an online fax service.

🥑 Free URL Indexer

Free URL Indexer is a free tool to help you index your backlinks and get them into Google faster. It's a simple tool that I built to help me with my own SEO efforts and I decided to share it with the world. It's a free tool and I don't even ask for your email address. Just paste in your URL and click the button.

👉 See all projects