Giter VIP home page Giter VIP logo

our-coding-standards's Introduction

Our Coding Principles

This repo contains the Data and Analytical Service Directorate’s (DASD) coding principles, accessed here.

This is a living document and will continue to be updated and expanded.

Contributing

If you think that something is missing or not quite right you should either:

  1. Contribute directly
  2. Raise an issue

our-coding-standards's People

Contributors

annie-howard avatar drdanjones avatar edwardandress avatar isichei avatar miller-william avatar nikki-rayner avatar robinl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

our-coding-standards's Issues

Documentation

  • What information should be in a README?
  • How and to what extent should we document our functions?

Other git examples?

Would be good to have examples of hopping around branches, and reverting adds/commits? Also rebasing- what's rebasing?

How to use and contribute to this work

  • Some notes on what this repo is for
  • This is guidance rather than rules, but we should try to follow them
  • If we think of something better than what is written here, it can be changed

QA: Manual tests

  • When should we test something manually?
  • How far should this testing go?
  • How will we record what has been tested?

Ensuring your code can run on another machine

  • Eventually your code will need to work on another machine
  • This could be a colleague's computer or a server somewhere
  • We, therefore, need to ensure the code will work in these environments
  • How can we do this (in addition to the normal QA process)?

Where shall we keep re-usables?

If we write some nice functions that perform useful tasks which we might want to use again and share with other people (for example, I wrote something at the weekend which extracts the names of the most significant features from a regression model and trains a new model using only those features*), where should we keep them? Should they all be in one repo? Or one for each language we're using? How should the functions be name spaced within that repo? Are they each in their own package?

* I will not be the slightest bit surprised if someone points out that this has already been done by someone else! ;)

Naming conventions

It would be useful to have more specific naming conventions, for variables, file names, branches (?), etc.

Conventions: sensible defaults for packages

  • There is a rich catalogue of packages, some of which have their own syntactic and functional quirks
  • So that people can move around easily from one project to another, we should agree on a set of sensible default packages
  • These sensible defaults should also 'play nicely together'; they should be highly compatible with one another

Coding principles

  • High level coding principles that describe what is and isn't OK
  • We can take inspiration from Digital's equivalent

What does peer review consist of?

  • Is there a recommended procedure for carrying out peer review?
  • What is the minimum set of checks for something to be considered peer reviewed?
  • What happens when you disagree with your reviewer's comments?

User access removed, access is now via a team

Hi there

The user nikki-rayner had Direct Member access to this repository and access via a team.

Access is now only via a team.

You may have less access it is dependant upon the teams access to the repo.

If you have any questions, please post in #ask-operations-engineering on Slack.

This issue can be closed.

Repo Tagging

As part of improving knowledge sharing across the team we want to improve the README and tagging of projects.

README:

  • What makes a good README?
  • Approach the README as if it were going to be a public repo - focus on how you would explain the project to someone coming to the project for the first time.
  • Include brief description of the high level aim, basic outline of what techniques are used, list main packages for usage

Tagging:

  • customer/project area
  • key packages
  • key techniques

Git workflow

  • What flow should we use?
  • How and when does QA happen during this process?

Agreed updates following SMT meeting

  • For larger projects, it's recommend that there is protected master branch is enforced. This will ensure short lived branches which are merged often.

  • Set up and recommend a specific R linter that everyone uses. Makes sure it's fairly lax.

  • Possibly re-instate code smells. (e.g. use R projects)

Where to keep data

  • Large data files should not be version controlled
  • By convention, they should also be stored separately from the application that consumes them
  • This allows the data and application to be updated independently
  • This also allows multiple instances of the same application to access a single canonical data set
  • It would be helpful to have a standardised solution for this

Managing dependencies

  • To work on the analytics platform you must manage R package dependencies using PackRat
  • How should we manage OS dependencies?

Define project scale

Should we have rough guidelines as to what constitutes a large, medium, small project?

Starter for 10:
Small - a working version is built in a week, <300 lines of code, all code sensibly contained in one file
Medium - a working version is built in a month, < 800 lines of code, may contain multiple (code) files
Large - a working version takes more than a month, >800 lines of code

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.