We have some common practices in our development workflow.
Some basic principals apply to all programming, regardless of language.
Some basic conventions apply across all languages.
All code should be source controlled.
Package managers allows automation of the installation process of tools and libraries. This installation process can then be repeated easily as the code base is changed, pushed to other developers, and ultimately deployed.
Third party code should never be included in the source of a project and instead be managed via a package.
First party code should be abstracted into a package when feasible.
Use yarn to install Node.js modules. Yarn is a port of npm, so you should be familiar with npm.
Use Composer to install PHP modules.
Use Homebrew to install OS X command line packages.
Code should always be linted by the appropriate linter. Sloppy code is dangerous code.
PHP projects should be run through PHP Copy Paste Detector.
Projects should be run through Simian to find lines of code that are similar. These lines should be refactored.
-excludes={*.sublime-workspace,node_modules,bower_components}
-includes={**/,}**/*.{js,php,scss,hbs}
-formatter=plain:simian.txt
-threshold=4
All common tasks should be automated and configurable.
Use Grunt to create tasks which can be run via the command line or by watching a set of files.
Significan modules should always be unit tested. Unit tests provide a quickly repeatable way to automatically test functionality and prevent newer code from interfering with previous code.
Interactive modules should be tested with behavior driven tests to ensure that interactivity is functional in all environments through all stages of development.
Modules with complex, custom CRUD operations or calculations should be developed using test driven fundamentals.
Functionality should be tested in latest versions of:
- Safari
- Chrome
- Mozilla
- iOS
- Android
- IE
Testing should occur in native, hardware environment, not emulated.
We’re constantly changing and improving how we get things done in the codebase. Often times that means this documentation falls behind our actual process. Please fork it and update it!
Additionally, if you can identify an area where we could better handle a process, bring the issue to the table and we figure out how to keep things running smoothly for everyone.
We have tons of books on programming. Talk to me and I'll find what you're looking for.