|
| 1 | +--- |
| 2 | +title: Setting the Scene |
| 3 | +start: no |
| 4 | +colour: '#FBED65' |
| 5 | +teaching: 15 |
| 6 | +exercises: 0 |
| 7 | +--- |
| 8 | + |
| 9 | +::::::::::::::::::::::::::::::::::::::: objectives |
| 10 | + |
| 11 | +- Setting the scene and expectations |
| 12 | +- Making sure everyone has all the necessary software installed |
| 13 | + |
| 14 | +:::::::::::::::::::::::::::::::::::::::::::::::::: |
| 15 | + |
| 16 | +:::::::::::::::::::::::::::::::::::::::: questions |
| 17 | + |
| 18 | +- What are we teaching in this course? |
| 19 | +- What motivated the selection of topics covered in the course? |
| 20 | + |
| 21 | +:::::::::::::::::::::::::::::::::::::::::::::::::: |
| 22 | + |
| 23 | +## Introduction |
| 24 | + |
| 25 | +So, you have gained basic software development skills either by self-learning or attending, |
| 26 | +e.g., a [novice Software Carpentry course][swc-lessons]. |
| 27 | +You have been applying those skills for a while by writing code to help with your work |
| 28 | +and you feel comfortable developing code and troubleshooting problems. |
| 29 | +However, your software has now reached a point where there is too much code to be kept in one script. |
| 30 | +Perhaps it is involving more researchers (developers) and users, |
| 31 | +and more collaborative development effort is needed to add new functionality |
| 32 | +while ensuring previous development efforts remain functional and maintainable. |
| 33 | + |
| 34 | +This course provides the next step in software development - |
| 35 | +it teaches some **intermediate software engineering skills and best practices** |
| 36 | +to help you restructure existing code and design more robust, |
| 37 | +reusable and maintainable code, |
| 38 | +automate the process of testing and verifying software correctness |
| 39 | +and support collaborations with others in a way that |
| 40 | +mimics a typical software development process within a team. |
| 41 | + |
| 42 | +The course uses a number of different **software development tools and techniques** |
| 43 | +interchangeably as you would in a real life. |
| 44 | +We had to make some choices about topics and tools to teach here, |
| 45 | +based on established best practices, |
| 46 | +ease of tool installation for the audience, |
| 47 | +length of the course and other considerations. |
| 48 | +Tools used here are not mandated though: |
| 49 | +alternatives exist and we point some of them out along the way. |
| 50 | +Over time, you will develop a preference for certain tools and programming languages |
| 51 | +based on your personal taste |
| 52 | +or based on what is commonly used by your group, collaborators or community. |
| 53 | +However, the topics covered should give you a solid foundation for working on software development |
| 54 | +in a team and producing high quality software that is easier to develop |
| 55 | +and sustain in the future by yourself and others. |
| 56 | +Skills and tools taught here, while Python-specific, |
| 57 | +are transferable to other similar tools and programming languages. |
| 58 | + |
| 59 | +The course is organised into the following sections: |
| 60 | + |
| 61 | +{alt="Course overview diagram. Arrows connect the following boxed text in order: 1) Setting up software environment 2) Verifying software correctness 3) Software development as a process 4) Collaborative development for reuse 5) Managing software over its lifetime."} |
| 62 | + |
| 63 | +<!--- |
| 64 | +Source of the above image can be rendered in the Mermaid live editor: |
| 65 | +<https://mermaid.live/edit#pako:eNpdkE1rwzAMhv-K8CmFNrCvSw6D9eO2XlbYYeSiJXJqcKwgKyml9L_PaZox5pOQn8ey3oupuCZTGOv5VB1RFN4_ygDpvGUPORxI1YUG-m5qRrZ6QiGgMDjh0FLQBZRhtXqFdfaYwyeJs-ek_OMrFqFKA8U485vsKQ2YgZoG8tyND8LkYgSETrganUnZZs85bNh7_GZBdQPd2b-2ZQGhPtJd2mUvOewxYDNu8vujSeSBBJxG8M6SupYWZmlakhZdnWK5jFRp9EgtlaZIZU0We6-lKcM1odgrH86hMoVKT0vTdzUqbR02gq0pLPqYulQ7ZdlPUd8Sn8nd7Wa2OwxfzLN3_QE4H4oo> |
| 66 | +
|
| 67 | +The mermaid source is (with one less dash in arrows than needed): |
| 68 | +
|
| 69 | +```mermaid |
| 70 | +flowchart LR |
| 71 | + A(1. Setting up software environment) -> B(2. Verifying software correctness) |
| 72 | + B -> C(3. Software development as a process) |
| 73 | + C -> D(4. Collaborative development for reuse) |
| 74 | + D -> E(5. Managing software over its lifetime) |
| 75 | +``` |
| 76 | +--> |
| 77 | + |
| 78 | +### [Section 1: Setting up Software Environment](10-section1-intro.md) |
| 79 | + |
| 80 | +In the first section we are going to set up our working environment |
| 81 | +and familiarise ourselves with various tools and techniques for |
| 82 | +software development in a typical collaborative code development cycle: |
| 83 | + |
| 84 | +- **Virtual environments** for **isolating a project** from other projects developed on the same machine |
| 85 | +- **Command line** for running code and interacting with the **command line tool Git** for |
| 86 | +- **Integrated Development Environment** for **code development, testing and debugging**, |
| 87 | + **Version control** and using code branches to develop new features in parallel, |
| 88 | +- **GitHub** (central and remote source code management platform supporting version control with Git) |
| 89 | + for **code backup, sharing and collaborative development**, and |
| 90 | +- **Python code style guidelines** to make sure our code is |
| 91 | + **documented, readable and consistently formatted**. |
| 92 | + |
| 93 | +### [Section 2: Verifying Software Correctness at Scale](20-section2-intro.md) |
| 94 | + |
| 95 | +Once we know our way around different code development tools, techniques and conventions, |
| 96 | +in this section we learn: |
| 97 | + |
| 98 | +- how to set up a **test framework** and write tests to verify the behaviour of our code is correct, and |
| 99 | +- how to automate and scale testing with **Continuous Integration (CI)** using |
| 100 | + **GitHub Actions** (a CI service available on GitHub). |
| 101 | + |
| 102 | +### [Section 3: Software Development as a Process](30-section3-intro.md) |
| 103 | + |
| 104 | +In this section, we step away from writing code for a bit |
| 105 | +to look at software from a higher level as a process of development and its components: |
| 106 | + |
| 107 | +- different types of **software requirements** and **designing and architecting software** to meet them, |
| 108 | + how these fit within the larger **software development process** |
| 109 | + and what we should consider when **testing** against particular types of requirements. |
| 110 | +- different **programming and software design paradigms**, |
| 111 | + each representing a slightly different way of thinking about, |
| 112 | + structuring |
| 113 | + and **implementing** the code. |
| 114 | + |
| 115 | +### [Section 4: Collaborative Software Development for Reuse](40-section4-intro.md) |
| 116 | + |
| 117 | +Advancing from developing code as an individual, |
| 118 | +in this section you will start working with your fellow learners |
| 119 | +on a group project (as you would do when collaborating on a software project in a team), and learn: |
| 120 | + |
| 121 | +- how **code review** can help improve team software contributions, |
| 122 | + identify wider codebase issues, and increase codebase knowledge across a team. |
| 123 | +- what we can do to prepare our software for further development and reuse, |
| 124 | + by adopting best practices in |
| 125 | + **documenting**, |
| 126 | + **licencing**, |
| 127 | + **tracking issues**, |
| 128 | + **supporting** your software, |
| 129 | + and **packaging software** for release to others. |
| 130 | + |
| 131 | +### [Section 5: Managing and Improving Software Over Its Lifetime](50-section5-intro.md) |
| 132 | + |
| 133 | +Finally, we move beyond just software development to managing a collaborative software project and will look into: |
| 134 | + |
| 135 | +- internal **planning and prioritising tasks** for future development |
| 136 | + using agile techniques and effort estimation, |
| 137 | + management of **internal and external communication**, |
| 138 | + and **software improvement** through feedback. |
| 139 | +- how to adopt a critical mindset not just towards our own software project |
| 140 | + but also to **assess other people's software to ensure it is suitable** for us to reuse, |
| 141 | + identify areas for improvement, |
| 142 | + and how to use GitHub to register good quality issues with a particular code repository. |
| 143 | + |
| 144 | +## Before We Start |
| 145 | + |
| 146 | +A few notes before we start. |
| 147 | + |
| 148 | +::::::::::::::::::::::::::::::::::::::::: callout |
| 149 | + |
| 150 | +## Prerequisite Knowledge |
| 151 | + |
| 152 | +This is an intermediate-level software development course |
| 153 | +intended for people who have already been developing code in Python (or other languages) |
| 154 | +and applying it to their own problems after gaining basic software development skills. |
| 155 | +So, it is expected for you to have some prerequisite knowledge on the topics covered, |
| 156 | +as outlined at the [beginning of the lesson](../index.md#prerequisites). |
| 157 | +Check out this [quiz](../learners/quiz.md) to help you test your prior knowledge |
| 158 | +and determine if this course is for you. |
| 159 | + |
| 160 | + |
| 161 | +:::::::::::::::::::::::::::::::::::::::::::::::::: |
| 162 | + |
| 163 | +::::::::::::::::::::::::::::::::::::::::: callout |
| 164 | + |
| 165 | +## Setup, Common Issues \& Fixes |
| 166 | + |
| 167 | +Have you [setup and installed](../learners/setup.md) all the tools and accounts required for this course? |
| 168 | +Check the list of [common issues, fixes \& tips](../learners/common-issues.md) |
| 169 | +if you experience any problems running any of the tools you installed - |
| 170 | +your issue may be solved there. |
| 171 | + |
| 172 | + |
| 173 | +:::::::::::::::::::::::::::::::::::::::::::::::::: |
| 174 | + |
| 175 | +::::::::::::::::::::::::::::::::::::::::: callout |
| 176 | + |
| 177 | +## Compulsory and Optional Exercises |
| 178 | + |
| 179 | +Exercises are a crucial part of this course and the narrative. |
| 180 | +They are used to reinforce the points taught |
| 181 | +and give you an opportunity to practice things on your own. |
| 182 | +Please do not be tempted to skip exercises |
| 183 | +as that will get your local software project out of sync with the course and break the narrative. |
| 184 | +Exercises that are clearly marked as "optional" can be skipped without breaking things |
| 185 | +but we advise you to go through them too, if time allows. |
| 186 | +All exercises contain solutions but, wherever possible, try and work out a solution on your own. |
| 187 | + |
| 188 | + |
| 189 | +:::::::::::::::::::::::::::::::::::::::::::::::::: |
| 190 | + |
| 191 | +::::::::::::::::::::::::::::::::::::::::: callout |
| 192 | + |
| 193 | +## Outdated Screenshots |
| 194 | + |
| 195 | +Throughout this lesson we will make use and show content |
| 196 | +from Graphical User Interface (GUI) tools (PyCharm and GitHub). |
| 197 | +These are evolving tools and platforms, always adding new features and new visual elements. |
| 198 | +Screenshots in the lesson may then become out-of-sync, |
| 199 | +refer to or show content that no longer exists or is different to what you see on your machine. |
| 200 | +If during the lesson you find screenshots that no longer match what you see |
| 201 | +or have a big discrepancy with what you see, |
| 202 | +please [open an issue]({{ site.github.repository_url }}/issues/new) describing what you see |
| 203 | +and how it differs from the lesson content. |
| 204 | +Feel free to add as many screenshots as necessary to clarify the issue. |
| 205 | + |
| 206 | + |
| 207 | +:::::::::::::::::::::::::::::::::::::::::::::::::: |
| 208 | + |
| 209 | + |
| 210 | + |
| 211 | +:::::::::::::::::::::::::::::::::::::::: keypoints |
| 212 | + |
| 213 | +- This lesson focuses on core, intermediate skills covering the whole software development life-cycle that will be of most use to anyone working collaboratively on code. |
| 214 | +- For code development in teams - you need more than just the right tools and languages. You need a strategy (best practices) for how you'll use these tools as a team. |
| 215 | +- The lesson follows on from the novice Software Carpentry lesson, but this is not a prerequisite for attending as long as you have some basic Python, command line and Git skills and you have been using them for a while to write code to help with your work. |
| 216 | + |
| 217 | +:::::::::::::::::::::::::::::::::::::::::::::::::: |
| 218 | + |
| 219 | +[swc-lessons]: https://software-carpentry.org/lessons/ |
0 commit comments