As a Photon Software coder, you must always, without exception, follow this simple set of rules:
- Comment your code - Comment all classes, functions, and variables in your code; no exceptions. Make it easier for future developers (including yourself) to jump right in and follow your logic
- Write Semantic Code - Always be purposeful with the way you name your functions. A good practice is to name your functions after you write them.
- DRY - Don't Reapeat Yourself. No body's perfect, but always read through your code to spot inefficiencies.
- Readability over efficiency - Be efficient in your logic, not in trying to write it all in one line. The easier it is to read your code, the easier it is to maintain it, even for you!
- Tabs vs Spaces - Spaces! Whether you are writting PHP or JavaScript (our most common languages), or any other language, always indent with 2 Spaces.
- Every project has a repo - Every project must start with a repo that includes the following branches: Master and Dev.
- Every developer has a branch - Every developer that works on a project must checkout their own branch to work from, and make pull requests to the dev branch when they have a stable version of their code.
- Every task has a commit - Avoid committing many tasks in one single commit. Every task should have its own commit.
- Always work locally - You should have a local environment for every project you work on.
- Always test your code - You should never push a version of your code to the repo, or the server, if the version is not stable.
There are some technology (or language) specific rules that every developer at Photon Software must follow when applicable. If the project that you are working on utilizes one of these technologies or languages you must follow said technology's rules. Please read through and understand the following rules:
Following these simple set of rules allows us to produce scalable and maintainable code. Any developer that does not follow these rules will not be quilified to write code for Photon Software at any capacity.
Go to Learn our QA Process.