Contributor Guidelinesď
The 3 Golden Rulesď
Contributor Guidelines can be a lot to digestâso if you only remember one thing from this guide, let it be these three golden rules.
đ§š Leave It Cleaner Than You Found It
Every time you touch a piece of code, make sure you leave it in a better state than you found it. Think of the codebase as a shared workspaceâtidy up as you go, and everyone will appreciate it.
đ Do It Right the First Time
âIâll do it quickly now, and fix it later.âLetâs be honestâyouâre unlikely to come back and clean it up later. Aim for quality from the start, and spare yourself (and your fellow developers) a later headache.
đ¤ Take Pride in Your Work: Write Code Thatâs a Joy to Read and Pay Attention to the Detail
Be proud of every line you write. Craft code thatâs not only functional but also a delight to read and review. Our project thrives on the passion and dedication of its contributorsâyour enthusiasm makes all the difference. Remember, itâs the little thingsâthe careful touches and attention to detailâthat differentiates a good software from a great software.
Best Practicesď
Think of our course management tool as our babyâit needs proper care to grow into a robust, well-rounded adult. Hereâs how to help it flourish, especially when preparing PRs:
Take Your Time
Quality code isnât produced in a rush. Review your work thoroughly especially when you review PRs.Use Clear Method and Variable Names
Choose names that explain what the method does. If it sounds like a riddle, itâs time for a rename.Keep Files Short and Focused
Each file should have a single, clear purpose. In TypeScript, try to keep files under 200 linesâletâs save the epic sagas for novels.Avoid Copy-Pasting Code
If youâre tempted to copy code, instead abstract it into a reusable function. Reuse wiselyâno one wants to chase down duplicated bugs.Keep Related Functionality Together
Place utility functions, interfaces, etc., close to where theyâre needed but ensure theyâre accessible to all parts of the codebase that require them.Comment on Deviations
Sometimes, the standard wonât quite fit. If you need to deviate, explain why with a comment. Future you (and your fellow developers) will thank you.Eliminate Dead Code Immediately
âI might need this laterâ is a myth. Dead code clutters the project. Remember: Git history is your safety net if you ever need to recover something.
Important This list isnât exhaustive. As we learn and grow, so should our guidelines. Update and refine these rules regularlyâafter all, improvement is a journey, not a destination.
Coding Guidelinesď
Next to the general golden rules and best practices, the following defines strict guidelines that should be followed throughout the codebase.
Coding Guidelines
Your read through the whole guide.
Now, you are ready to write AWESOME Prompt Code!