NMSS Code Project

Hello! This is a place for us to collaborate on programming projects
Our main programming language is Python 3: https://www.python.org/downloads/ (v 3.6.4)

I suggest you use PyCharm Community Edition as your development environment: https://www.jetbrains.com/pycharm/

If this is your first time here, please message me (Alex Tan) on Facebook, so I can add you as a collaborator. In this way you can edit the repository directly (otherwise you need to submit pull requests).

Later we will try collaborative work on a python math library (see project list for details), but that will not commence until people get to grips with the language and we set up rules and protocol for development.
For right now, we are going to start off with Project Euler only. See sections below for more info.

Learning Python 3

thenewboston: Goes through everything step by step. Good for beginners. https://www.youtube.com/watch?v=hnxIRVZ0EyU&list=PL6gx4Cwl9DGAcbMi1sH6oAMk4JHw91mC_&index=2
Derek Banas: Covers the entire language in 40 minutes (more suited towards experienced programmers that want to learn Python quickly) https://www.youtube.com/watch?v=N4mEzFDjqtA

Setting up GitHub

Download and install GitHub Desktop: https://desktop.github.com/
At the top toolbar, click on "File" -> "Clone Repository" -> "URL"
Then enter https://github.com/Pilex1/NMSSCodeProject for the URL, and choose an appropriate location for the local path (this is where all the files are going to be stored)
Click "Clone" and you're done!

Try changing something (e.g. editing a file, creating a new file, etc.)
You should now see your changes appear in the "Changes" tab.
To confirm those changes, you need to write down a brief summary of what changes you've made in the "Summary" textbox, then click on the "Commit to master" button.
To upload and share those changes, look to the top, in the third tab. Click on the "Fetch origin", then "Pull origin", then "Push origin".

Project Euler

To get us started, the plan is to have everyone working on the earlier problems individually and learning by sharing each other's work. For harder problems, we can have everyone working collaboratively.

Please place your Python files into the "Project Euler" folder. Use the following naming convention so we can stay organised: E.g. I am Alex T, and I'm working on Problem 25, so I'm going to name my file 25_Alex T.py and put it in the Project Euler folder.

Code Practices

Be a good programmer:
  • Comment your code! Its good pratice to put comments around telling others (and future you) how your code works or what it does (if not already self explanitory), parts of the code that need to be implemented in future, or any unexpected behaviours that might occur.
    In Python:
    #this is a comment
    '''this is a
    multiline comment'''


  • We encourage use of sane, informative names that follow conventions! Please don't call your output variable terry (as tempting as it may be) or your multiplication function commutativityassosciativityidentityandclosureintheintegers.

    Example naming conventions (youll figure it out):
    Variables: current_wen_iq or currentweniq, mafia_role or mafiarole
    Functions: askQuestion, sayCatchphrase, pushUpBoard
    Classes: Rower, GaussianInteger, ReallyCoolSphere
    Constants: PI, SPEED_OF_LIGHT, EZRA_HEIGHT

  • HAVE GENERAL COMMON SENSE: Dont lump a million things into one line, but at the same time dont split your single calculation into fifty lines. Dont comment every line, but make sure you have enough comments to get grips. Have code readability in mind and insert whitespaces and newlines where appropriate.