apivan19 / Programming_Tips

Just some programming tips to keep in mind and refresh on once in a while

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Programming_Tips

GENERAL README FORMAT! - REFERENCE THIS WHEN DOCUMENTING NEW PROJECTS

  1. Project name: Your project’s name is the first thing people will see upon scrolling down to your README, and is included upon creation of your README file.

  2. Description: A description of your project follows. A good description is clear, short, and to the point. Describe the importance of your project, and what it does.

  3. Table of Contents: Optionally, include a table of contents in order to allow other people to quickly navigate especially long or detailed READMEs.

  4. Installation: Installation is the next section in an effective README. Tell other users how to install your project locally. Optionally, include a gif to make the process even more clear for other people.

  5. Usage: The next section is usage, in which you instruct other people on how to use your project after they’ve installed it. This would also be a good place to include screenshots of your project in action.

  6. Contributing: Larger projects often have sections on contributing to their project, in which contribution instructions are outlined. Sometimes, this is a separate file. If you have specific contribution preferences, explain them so that other developers know how to best contribute to your work. To learn more about how to help others contribute, check out the guide for setting guidelines for repository contributors.

  7. Credits: Include a section for credits in order to highlight and link to the authors of your project.

  8. License: Finally, include a section for the license of your project. For more information on choosing a license, check out GitHub’s licensing guide!

General Programming Tips

  1. Improve through working on projects and time spent writing code

    • PRACTICE OFTEN AND TRY NEW THINGS
  2. Always leave the code cleaner than you found it.

  3. Simplify your code as much as possible without losing functionality

  4. Keep your programs concise and functional

  5. Keep your programs factored nicely and not all in a single file.

    • Classes should have their individual files.
  6. Use meaningful names for variables/methods/functions/classes and stick to naming conventions

    • variable names should be all lowercase

    • Class names should have first letter capitalized

    • CONSTANTS names should be all UPPER CASE

    • Start a variable with an underscore if you would like it to be hidden

    • Never start variable/class/function names with a number

    • The names of these classes should be detailed and specific enough that you shouldn't have to look at the comments (But still do write comments)

    • No Magic Numbers / Constants - Do not write numbers directly in your code. Define them in a constants.py file and import them

  7. Keep your code "DRY"

    • DON'T
    • REPEAT
    • YOURSELF
    • Replace several instances repeating code with a single instance that gets called each time
    • Similar to Repetition in writing
  8. At the top of the file, write what versions of Python, or other language, that you have written or tested the program in.

About

Just some programming tips to keep in mind and refresh on once in a while

License:MIT License