Development Workflow

My workflow for new projects usually follows this pattern – open Sublime Text or PHPStorm and write some code

If I designed a DB for the project, then this step is mostly done already. If not, I walk through the workflow. Sometimes I diagram it out, other times, I just start making a list of the objects I think I will need. I usually WAY over-design and only use about 1/2 of the objects I list. If it is a website, I list the pages. Most of the time, I work on CLI projects and I start with the commands I will need. Since I use symfony/command for everything, it makes it a good starting point.

  • Build one Command
  • Build the command and make it work.
  • Break out any new objects discovered in the process into discrete objects
  • Write unit tests for the command
  • Commit to the repo

If this is a project that only I will ever use – I don’t usually write Unit tests. If ANYONE else will be involved – I write unit tests. I don’t trust others’ code very much. I usually shoot for about 70%-80% code coverage.

EVERY project I build these days is under source code control. Again, my workflow differs if it’s just me vs. working with others. If it’s just me, I will usually work in the master branch if this is a new project and a new branch if it is an iteration on an existing project. If others are working with me, I usually adopt feature branches.

I iterate until it works … not “until it’s done”. Every project I’ve ever built, and will build, is incomplete. There are always things I can add – new features, scripts, tests, options, code-refactoring .. I asked an artist friend of mine “When do you know it’s done?” He replied that art is never done. My code doesn’t rise to the level of art, but I agree with the sentiment.

So that’s how I work. My indispensable tools are:

  • Docker
  • Composer
  • Git
  • Sublime Text 3
  • PHPUnit
  • MySQL Workbench
  • Magento for Ecommerce
  • WordPress/Drupal for websites