📝
How we work (org handbook)
  • Home
  • Onboarding
  • Code of Conduct
  • Project Management
    • Project Initiation
      • Documentation and Checklists
      • Aligning with OpenUp's Mission and Vision
      • Getting Partners and Stakeholders on Board
      • Defining Project Parameters and Limitations (scope)
      • Product Management during the Project Initiation Phase
      • DRAFT COPY
    • Project Implementation
      • Project Planning
      • Agile, Scrum, and the Lean Startup Method
      • Stakeholder Management
      • Meetings
      • Communication
      • Team Management
      • Roles and responsibilities
    • Project Close-out
      • The Close-Out Report
      • Retrospective
      • Donor thanks
      • One page write-up
      • Blog article
      • Maintenance plan (if necessary)
    • Project overviews
      • Citizen Engagement App
      • Our Project List
      • Local Gov Programme
        • Business Portal
      • Tech Infrastructure
    • Project boards
  • How we work
    • Preferred tools
      • Tool sponsorships
    • Budgets & Finance
      • Taxes
        • VAT
        • PAYE and UIF
        • Workmen's compensation
        • Annual PAYE reconciliation
      • The Types of Budgets Used By OpenUp
      • When to Start Planning a Budget
      • Planning a Budget
      • How to Create a Budget
      • How to Spend a Budget
      • How to Adjust a Budget
      • Expense claims
      • Invoicing OpenUp
      • Capturing and approving invoices for payment
      • Allocating AWS costs to a project
      • Allocating Upwork transactions to projects
      • Software, Services and Hosting
      • Downloading Webflow invoices
    • Tool Development
      • Coding Roles
      • Tools For Coding
      • DESIGN
      • The Design Process: Step-By-Step
      • Tools Used In The Design Process
      • Quality Metrics: Design
      • Webflow export rules
      • CONTENT, WRITING, AND MEDIA
      • Creating Substance: The Role of Content in Tool Development
      • Creating Content: Step-By-Step
      • What Goes In Social Media
      • TRAINING & EVENTS
      • Event Planning
      • When, Where, and How to Hold a Training Session
      • Tools Used By Training and Events
      • User testing
      • Making government accessible
    • Outsourcing & Contracting
      • Why do we contract external workers?
      • Platforms We Use To Find Contractors
      • Contracting people for work
      • UpWork Contracting
    • Monitoring & Evaluation
    • Communications & Branding
      • Resizing images
      • Creating an email newsletter
      • Posting a blog
      • Sharing a blog post
      • Marketing Q &A
      • Official communications
      • Tracking app and campaign web traffic sources
    • Human Resources
      • Recruitment
      • Recruitment template: Project lead developer
      • DRAFT Recruitment template: Product owner
      • One-on-ones (1:1s)
    • Organisational Decision Records
      • ODR1: Organisational Decision Records
      • ODR2: Building dynamic web frontends using Webflow
    • Personal Information
    • Password management
  • Tech
    • Development guidelines
    • Preferred tech stack
    • Webflow project guide
      • How to build pages in Webflow so that content can be added using Javascript
    • Setting up a new server
    • Hosting on dokku
    • CDN in front of S3
    • Setting up a new Domain
    • CKAN
  • Product management
    • Our product design process
  • Codebridge
    • Codebridge - the space
Powered by GitBook
On this page
  • Guidelines
  • User experience is critical
  • Easy development setup
  • Automate testing
  • Code is intended to be read by humans
  • Time boxes
  • Tracer bullets
  • Automate repetition
  • Fail loudly (Brokenness should be visible)
  • Tend towards best practices
  • Further reading

Was this helpful?

  1. Tech

Development guidelines

PreviousPassword managementNextPreferred tech stack

Last updated 4 years ago

Was this helpful?

OpenUp's context is somewhat different to industry, and in particular our projects are a different scale to typical software industry projects.

  • The tech side of our projects is rarely big enough to keep one software developer busy full time for a month

  • We can not have a big in-house permanent staff of developers because our projects are very dependent on partners, clients, funding and other opportunities.

  • We have multiple projects running at the same time

  • The same people often have to be involved in several projects at the same time

  • We often have to pause development on a project for a few weeks and then come back to it

  • Our project budgets are relatively small, but we are very ambitious about what we want to achieve with the available funding. This should be as quick and easy as possible.

This context means that most industry best practises are even more important to us. Most of our guidelines stem directly from industry best practises. Where we deviate from that, it's even more important to explain why we have a guideline or best practise.

Guidelines

  • Always deliver something: Prefer releasing something very basic over ending a sprint with only unreleased partial work.

  • : You probably don't know what's actually usable as well as you think you do.

  • : It should be easy to get a project up and running in a development environment.

  • : If a feature is worth implementing, it's worth having automated tests for it

  • : Otherwise we'd keep assembly in git instead of source code.

  • : Don't spend unbounded time on a problem.

  • : Don't leave the end-to-end functionality for last.

  • : Automate the things you do repetitively. Don't automate prematurely.

  • : Brokenness should be visible.

  • : Avoid attempting sweeping dramatic changes that never get finished.

User experience is critical

Don't assume just because you know how to use something, a user will know how to use it.

We often develop frontends using Webflow to maximise the flexibility for the designer and make iteration on the user interface as rapid as possible.

Easy development setup

A developer should be able to clone a repository and have a working site running locally by running a few commands.

Frontend

  • Backing data from an API should probably default to production, if a production service is available.

  • The backing API should be configurable via

    • environment variable (semi-permanently e.g. for staging)

    • user interface (per use - e.g. for testing a deploy preview against a staging or review app API)

      • Do not allow this to be configured by querystring - this risks introducing an injection vulnerability

Backend

  • Use docker-compose for development so that database or other backend service dependencies don't make it hard to get up and running.

    • Yes, this adds a layer of indirection. But have you battled with GDAL or wkhtmltopdf version issues? Also, if all our projects are structured this way, moving between projects becomes quick.

  • Use a seed data fixture for standard data like categories that could be used to seed production.

  • Use a demo data fixture for fake data e.g. pages, indicator values, etc.

  • Load and smoke-test your fixtures in CI to ensure they are kept functional.

Automate testing

Code is intended to be read by humans

  • Use full versions of command arguments in scripts, e.g. --tries=5 instead of -t5

  • Consistency and context is more important than personal preference

  • Javascript:

  • Python:

Time boxes

Tracer bullets

Automate repetition

Fail loudly (Brokenness should be visible)

  • Never catch and drop exceptions without logging them.

  • Ensure shell scripts fail on error instead of running through with undefined behaviour. use set -eux in bash.

  • Add uptime monitoring to public services and ensure we get emailed when a service goes down.

  • App startup should fail if required variables are not set, rather than providing a default value that doesn't actually work. e.g. use env.str("AWS_ACCESS_KEY_ID") with no default so that the app doesn't start if this environment variable is not set. This means deployment of a new feature/to a new environment fails with a clear indication of the problem, rather than succeeding but with core functionality not being available. This, along with seamless deploys, means a new deployment without the required config won't kill a good working previous deploy.

Tend towards best practices

Avoid trying to make everything "compliant" with our coding standards at once. It will be more complex than you expect, and you'll get stuck, and all your effort will be wasted because you will run out of time and get nothing merged.

At least don't worsen the quality of the codebase. Discuss extreme circumstances where we might choose to introduce technical debt with the project lead developer.

Automated fixes touching the whole codebase

Apply automated fixes like introducing a formatter in one pull request per introduced tool to minimise the time it spends under review, and thus to minimise the merge conflicts with other work in progress. Speak to the rest of the team to coordinate the best time to make these changes.

Manual improvements

Apply manual improvements like refactoring and improving test coverage as part of normal business, e.g. adding a feature or fixing a bug. Only improve the code you're touching in this change. This is generally the sweet spot for getting improvements done without causing additional pain. It means improvements get done without scope getting expanded without bound.

Every change is additional effort for the person reviewing your code and risks introducing new bugs. Don't put a task at risk because you're refactoring something totally unrelated.

Further reading

See our introductory talk on .

Use for django apps.

By following , those who really want to run natively just need to provide configuration and it should work.

We prefer the

See the

Use for imports, followed by so that black formatting takes precedence

Servers that run cron jobs should be

- Lots of clear, specific best practices for building maintainable services

- Techniques for productively building software that don't get old

- No, it's not outdated. It's just about separating business logic from data, network, and presentation stuff.

our approach using webflow and user-centred design
https://github.com/milafrerichs/dev-tools/
Javascript prompt() and session storage
our cookiecutter template
Twelve Factor Apps
AirBnB Javascript style guide
eslint plugin
isort
python-black
configured to mail us when cron jobs fail
The Twelve-Factor App
The Pragmatic Programmer
Clean Architecture
User experience is critical
Easy dev
Automate testing
Code is intended to be read by humans
Time boxes
Tracer bullets
Automate repetition
Fail loudly
Tend towards best practices