# Software Engineering Principles & Practices

## Project Management

We used Microsoft Planner to help allocate tasks and keep us on track throughout the project.&#x20;

![Snippet during Milestone 2](/files/-Mf0uIqkxX1cHK-1gQEH)

Through this tool, we are able to easily keep see what tasks are there left to do, whether a task is currently in progress or completed. Either of us can create a task and assign it respectively. This tool allows proper communication and accountability on the progress of our project.&#x20;

## Qualitative Evaluation

{% tabs %}
{% tab title="Visibility of system status" %}
The system should always keep users informed about what is going through feedback within a reasonable time.

Examples:&#x20;

![Login button changes into a loading icon while authenticating the user](/files/-Mf1969w3Y3blJwbeboK)

![Generate Route displays a loading icon and disabled while generating a route](/files/-Mf190ps9LLKpLHeEZsc)
{% endtab %}

{% tab title="Error Prevention" %}
Careful design to prevent problems from occurring.\
Eliminate error-prone conditions or check for them and present users with a confirmation option before they commit to the action

Examples:&#x20;

![Checks to ensure proper registration](/files/-Mf1XWvFVu81D9Gz4St8)

![Checks to prevent inaccurate adding of stats](/files/-Mf1X_mIdIcVKPa_kCRa)
{% endtab %}
{% endtabs %}

## Functional Programming

### Pure functions

Pure functions are functions that have no side effects and when given the same input, the function must produce the same output, every single tim&#x65;*.*

Some examples of pure functions used:&#x20;

```javascript
	const calcAvgPace = (distance, duration) => {
		if (distance == 0) {
			return 0
		}
		return (1000 / 60) / (coveredDistance / duration)
	}

	const formatDuration = (seconds) => seconds < 3600
		? new Date(seconds * 1000).toISOString().substr(14, 5)
		: new Date(seconds * 1000).toISOString().substr(11, 8)

	const formatDistance = (dist) => dist < 1000
		? dist + " m"
		: (dist / 1000).toFixed(2) + " km"
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://run-mania.gitbook.io/run-mania/software-engineering-principles.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
