Become a Professional Programmer
Radomir Dopieralski
PyCon.PL 2014
Professional?
- For every case
- together with the team
- quickly
- finds a solution
- to the root problem
- that is easy to maintain by others
- without adding to technical debt.
Disclaimer
- Ideal.
- Not me.
- Not always appropriate.
- WWPPD?
- Tools.
Version Control
- Work on a single change at a time.
- Use clones/branches (or shelve) if you need to work on several things.
- Don't be afraid to remove code.
- Find which change broke something.
- Commit often, push when you finish.
Unit Tests
- Create testable code.
- Divide your program into independent units.
- Refactor mercilessly.
- Debug with tests.
- Regression tests.
Bug Tracker
- Plan your work.
- Don't leave TODOs in the comments.
- Cooperate with others.
- Link to the commit when closing a bug.
- Explain what was wrong.
Linter
- Catch simple errors easily.
- Make your code beautiful.
- Enforce style.
Style
- Avoid error-prone constructs.
- Prefer readability over typing speed.
- Common style of your language.
- Broken windows.
- Gut feelings.
Documentation
- Use Sphinx.
- Learn English.
- Write whole sentences.
- Check spelling.
- Testable examples.
Code Review
- Learn from each other.
- No more "I will fix it later".
- Keep track of what is happening in the project.
- Meaningful, technical discussions.
External Libraries
- Don't reinvent the wheel.
- Separate units of functionality.
- Contribute upstream.
Packaging
- Add setup.py.
- Provide a sane version number.
- Provide a license.
- Provide a contact.
- Fill any other package metadata.
Thank You
Questions? Comments?