diff --git a/01 Lab 1 Introduction to Arduino.md b/01 Lab 1 Introduction to Arduino.md index 3792cdc..0f32ff9 100644 --- a/01 Lab 1 Introduction to Arduino.md +++ b/01 Lab 1 Introduction to Arduino.md @@ -59,6 +59,27 @@ In this lab you will be focussing on the commandline however there are a number Use the file menu in VS Code to open the `blink/` directory then open the integrated terminal, it should point to the current project directory. +### 1.1 Understanding the Code + +You should now use the IDE to open the `exercises/02_tdd/nodemcu/` directory which contains a simple Arduino sketch with a library. Lets look at the files: + +``` +├── platformio.ini +├── readme.md +└── src +    └── main.cpp +``` + +1. The `platformio.ini` file is the project configuration. It defines two _environment definitions_: + 1. The `nodemcuv2` environment supports the NodeMCU boards based on the ESP8266 microcontroller. + 2. The `lolin32` environment supports the Lolin32 boards based on the ESP32 microcontroller. + 2. The `native` definition allows us to develop and test our library using the native compiler on our workstation. +2. The `readme.txt` file contains the documentation. +3. The `src/` directory contains the main Arduino sketch. Notice that this imports: + 1. The Arduino libraries. + 2. Our `avg` library. +``` + We can compile the code for a specified environment using either the `platformio` or `pio` command. The chosen environment is indicated either using the _long flag_ `--environment` or the _short flag_ `-e`. All of the commands listed below are equivalent: ```shell @@ -190,5 +211,76 @@ If your sensor is mounted on a breakout board it will only have 3 pins and these The current program simply reads an analog value from the sensor however this contains information on both temperature and humidity. To access each individual reading you will need to use a dedicated DHT11 library. -1. Create a new PlatformIO project. -2. Use the knowledge from this lab to build a program to report both temperature and humidity. +1. Search for a suitable library for the DHT11 and add it to the `platformio.ini` file. +2. Use the knowledge from this lab to build a program to capture both temperature and humidity. +3. Send this data (together with the correct units) to the serial monitor. + +## 4 Creating a New Project + +Up to this point the overall project structure has been provided for you but how was this done? PlatformIO provides the `init` subcommand that creates the required directory structure and builds a basic ini file. + +The command requires you to pass it the **board identifier ID**. This can be found using the [Boards Catalog](http://docs.platformio.org/en/latest/boards/index.html#boards), the [Boards Explorer](https://platformio.org/boards) or by running the `boards` subcommand. Run the following command to find a board ID for the nodemcu: + +```shell +$ platformio boards nodemcu + Platform: espressif32 + ----------------------------------------------------------------------------- + ID MCU Frequency Flash RAM Name + ----------------------------------------------------------------------------- + nodemcu-32s ESP32 240MHz 4MB 320KB NodeMCU-32S + + Platform: espressif8266 + ----------------------------------------------------------------------------- + ID MCU Frequency Flash RAM Name + ----------------------------------------------------------------------------- + nodemcu ESP8266 80MHz 4MB 80KB NodeMCU 0.9 (ESP-12 Module) + nodemcuv2 ESP8266 80MHz 4MB 80KB NodeMCU 1.0 (ESP-12E Module) +``` + +From this we can see that the platform for our ESP8266 is `expressiv8266` and the ID is either `nodemcu` or `nodemcuv2`, we have the latest version (v2). + +Lets repeat this for the more powerful ESP32-based board. This board is labelled `wemos`. Searching for this returns: + +```shell +$ platformio boards wemos + Platform: espressif32 + -------------------------------------------------------------------------------- + ID MCU Frequency Flash RAM Name + -------------------------------------------------------------------------------- + lolin_d32 ESP32 240MHz 4MB 320KB WEMOS LOLIN D32 + lolin_d32_pro ESP32 240MHz 4MB 320KB WEMOS LOLIN D32 PRO + lolin32 ESP32 240MHz 4MB 320KB WEMOS LOLIN32 + wemosbat ESP32 240MHz 4MB 320KB WeMos WiFi & Bluetooth Battery + + Platform: espressif8266 + -------------------------------------------------------------------------------- + ID MCU Frequency Flash RAM Name + -------------------------------------------------------------------------------- + d1 ESP8266 80MHz 4MB 80KB WEMOS D1 R1 (Retired) + d1_mini ESP8266 80MHz 4MB 80KB WeMos D1 R2 & mini + d1_mini_lite ESP8266 80MHz 1MB 80KB WeMos D1 mini Lite + d1_mini_pro ESP8266 80MHz 16MB 80KB WeMos D1 mini Pro +``` + +Since we know the MCU is an ESP32, not an ESP8266 we focus on the first table. The version we need is the `lolin32`. + +Create a new directory called `sound/` in the `01_arduino/` directory. + +Once you have created your project directory you should run the `init` _inside_ it, passing the IDs of the boards we want to use: + +```shell +$ platformio init --board nodemcuv2 --board lolin32 +``` + +You can use the `init` command multiple times to add additional boards. Add environments for every microcontroller board in your kit. + +This creates a project and defines multiple environments. You will need to add the **Native** environment manually by editing the `platformio.ini` file and adding: + +``` +[env:native] +platform = native +``` + +### 4.1 Test Your Understanding + +Create a program in your `sound/` directory to capture the noise level and display this in the Serial Monitor. diff --git a/02 Lab 1 Test-Driven Development.md b/02 Lab 1 Test-Driven Development.md index 30f5aa2..ae8dc9e 100644 --- a/02 Lab 1 Test-Driven Development.md +++ b/02 Lab 1 Test-Driven Development.md @@ -5,7 +5,7 @@ In this lab you will learn how to carry out the process of Test-Driven developme ## 1 Understanding the Code -You should now use the IDE to open the `exercises/02_tdd/nodemcu/` directory which contains a simple Arduino sketch with a library. Lets look at the files: +You should now use the IDE to open the `exercises/02_tdd/temp/` directory which contains a simple Arduino sketch with a library. Lets look at the files. As you can see there are some additional ones: ``` ├── lib @@ -23,81 +23,9 @@ You should now use the IDE to open the `exercises/02_tdd/nodemcu/` directory whi ``` 1. The `lib/` directory contains our custom library. This is where we will build the business logic for our software. It will be thoroughly unit tested. -2. The `platformio.ini` file is the project configuration. It defines two _environment definitions_: - 1. The `nodemcuv2` definition is used to build, compile and upload the code to the dev board. - 2. The `native` definition allows us to develop and test our library using the native compiler on our workstation. -3. The `src/` directory contains the main Arduino sketch. Notice that this imports: - 1. The Arduino libraries. - 2. Our `avg` library. -4. The `test/` directory contains the unit testing files that will be used to test the library code. +2. The `test/` directory contains the unit testing files that will be used to test the library code. -## 2 Creating a New Project - -In this lab the overall project structure has been provided for you but how was this done? PlatformIO provides the `init` subcommand that creates the required directory structure and builds a basic ini file. - -The command requires you to pass it the **board identifier ID**. This can be found using the [Boards Catalog](http://docs.platformio.org/en/latest/boards/index.html#boards), the [Boards Explorer](https://platformio.org/boards) or by running the `boards` subcommand. Run the following command to find a board ID for the nodemcu: - -```shell -$ platformio boards nodemcu - Platform: espressif32 - ----------------------------------------------------------------------------- - ID MCU Frequency Flash RAM Name - ----------------------------------------------------------------------------- - nodemcu-32s ESP32 240MHz 4MB 320KB NodeMCU-32S - - Platform: espressif8266 - ----------------------------------------------------------------------------- - ID MCU Frequency Flash RAM Name - ----------------------------------------------------------------------------- - nodemcu ESP8266 80MHz 4MB 80KB NodeMCU 0.9 (ESP-12 Module) - nodemcuv2 ESP8266 80MHz 4MB 80KB NodeMCU 1.0 (ESP-12E Module) -``` - -From this we can see that the platform for our ESP8266 is `expressiv8266` and the ID is either `nodemcu` or `nodemcuv2`, we have the latest version (v2). - -Lets repeat this for the more powerful ESP32-based board. This board is labelled `wemos`. Searching for this returns: - -```shell -$ platformio boards wemos - Platform: espressif32 - -------------------------------------------------------------------------------- - ID MCU Frequency Flash RAM Name - -------------------------------------------------------------------------------- - lolin_d32 ESP32 240MHz 4MB 320KB WEMOS LOLIN D32 - lolin_d32_pro ESP32 240MHz 4MB 320KB WEMOS LOLIN D32 PRO - lolin32 ESP32 240MHz 4MB 320KB WEMOS LOLIN32 - wemosbat ESP32 240MHz 4MB 320KB WeMos WiFi & Bluetooth Battery - - Platform: espressif8266 - -------------------------------------------------------------------------------- - ID MCU Frequency Flash RAM Name - -------------------------------------------------------------------------------- - d1 ESP8266 80MHz 4MB 80KB WEMOS D1 R1 (Retired) - d1_mini ESP8266 80MHz 4MB 80KB WeMos D1 R2 & mini - d1_mini_lite ESP8266 80MHz 1MB 80KB WeMos D1 mini Lite - d1_mini_pro ESP8266 80MHz 16MB 80KB WeMos D1 mini Pro -``` - -Since we know the MCU is an ESP32, not an ESP8266 we focus on the first table. The version we need is the `lolin32`. - -Once you have created your project directory you should run the `init` _inside_ it, passing the IDs of the boards we want to use: - -```shell -$ platformio init --board nodemcuv2 --board lolin32 -``` - -You can use the `init` command multiple times to add additional boards. - -This creates a project and defines multiple environments. You will need to add the **Native** environment manually by editing the `platformio.ini` file and adding: - -``` -[env:native] -platform = native -``` - -Remember that this has already been done for you in this lab but you will need to complete these steps when you create your own project. - -## 3 Running the Unit Tests +## 2 Running the Unit Tests We will be executing our test suite from the terminal by invoking the `pio` command together with the `test` subcommand. @@ -122,23 +50,23 @@ $ pio test -v -e native Notice that the test suite fails! -## 4 Test-Driven Development +## 3 Test-Driven Development You are now going to modify the code to ensure that the test passes. The test adds a single value to the library. It then reads the average value which should match the value we passed (but it doesn't). We are going to apply TDD principles. -### 4.1 Define Requirements as a Test +### 3.1 Define Requirements as a Test For this first iteration, this has already been done, look in the `test_avg.cpp` file. -### 4.2 Write Code to pass the Test +### 3.2 Write Code to pass the Test We now need to write just enough code to pass the test. Edit the `lib/avg/avg.cpp` file. Test your code by running the test suite. Stop as soon as the test passes. -### 4.3 Refactor the Code +### 3.3 Refactor the Code The third and final step is to tidy up the code, making sure the tests still pass. -## 5 Test Your Understanding +### 3.4 Test Your Understanding Now apply the TDD principles to fix the following issues, this will take 6 TDD iterations: @@ -153,12 +81,14 @@ Now apply the TDD principles to fix the following issues, this will take 6 TDD i For an extension task, use TDD to implement an average function that returns the mean reading since the device was powered up. -## 6 Integrate into an Arduino Project +## 4 Integrate into an Arduino Project The final step is to use your custom library to create a complete temperature and humidity sensor. -1. Create a new PlatformIO project called `temperature` and copy over your custom library. -2. Connect a DHT11 sensor and capture the temperature and humidity from this. -3. Send both the new random number and the rolling average to the serial monitor with both values on the same line: - 1. You can use `Serial.print()` to send data without a newline terminator. -4. Use your library to calculate the overall mean value and add a third value to each row in the serial monitor. +1. Connect a DHT11 sensor and capture the temperature and display in the serial monitor. + 2. If you are using the Lolin32 board you should also display the temperature on the screen. +2. Use your custom library to smooth the reading using a rolling average, display this next to each raw reading (including the screen if available). +3. Capture the humidity as well as temperature and display this next to the temp values. +4. How could you modify your library to smooth both the temperature and humidity? + 1. You may need to make changes to your library. + 2. Don't forget to apply the TDD methdology! diff --git a/exams/2014_1.md b/exams/2014_1.md deleted file mode 100644 index 2cb2dc0..0000000 --- a/exams/2014_1.md +++ /dev/null @@ -1,40 +0,0 @@ - -# May 2014 - -Coventry University - -Faculty of Engineering & Computing - -# 321COM Rapid Application Development - -Instructions to candidates - -Time allowed: 2 hours 00 minutes - -This is a Closed Book Examination - -Answer: All questions - -The total number of questions in this paper: 4 - -Each question is worth 25 marks. - -Start each question on a new page and carefully identify your answers with the correct question number. -For this examination you will be supplied with the following. - -1 Answer Book(s) - -You must hand this question paper in at the end of the examination - ----- - -1. XP is an example of an agile methodology. - 1. Compare and contrast the traditional plan-driven software development and agile XP methodology in terms of: _(15 marks)_ - - fundamental assumptions about the system under development - - management style - - communication - - customer role - - project cycle - 2. Explain the strengths and weaknesses of the XP development approach. _(10 marks)_ - ----- diff --git a/exams/2014_2.md b/exams/2014_2.md deleted file mode 100644 index c7bb293..0000000 --- a/exams/2014_2.md +++ /dev/null @@ -1,43 +0,0 @@ - -# July 2014 - -Coventry University - -Faculty of Engineering & Computing - -# 321COM Rapid Application Development - -Instructions to candidates - -Time allowed: 2 hours 00 minutes - -This is a Closed Book Examination - -Answer: All questions - -The total number of questions in this paper: 4 - -Each question is worth 25 marks. - -Start each question on a new page and carefully identify your answers with the correct question number. - -For this examination you will be supplied with the following. - -1 Answer Book(s) - -You must hand this question paper in at the end of the examination - ----- -1. Scrum is a popular agile methodology. - 1. Compare and contrast the traditional plan driven software development and the Agile SCRUM methodology in terms of: _(15 marks)_ - - fundamental assumptions about the system under development - - management style - - communication - - customer role - - project cycle - - 2. Explain the strengths and weaknesses of the SCRUMM development approach. _(10 marks)_ - -(Total 25 marks) - ----- diff --git a/exams/2015_1.md b/exams/2015_1.md deleted file mode 100644 index 1a40b63..0000000 --- a/exams/2015_1.md +++ /dev/null @@ -1,48 +0,0 @@ - -# May 2015 - -Coventry University - -Faculty of Engineering & Computing - -# 321COM Rapid Application Development - -Instructions to candidates - -Time allowed: 2 hours 00 minutes - -This is a Closed Book Examination - -Answer: All questions - -The total number of questions in this paper: 4 - -Each question is worth 25 marks. - -Start each question on a new page and carefully identify your answers with the correct question number. - -For this examination you will be supplied with the following - -1 Answer Book(s) - -You must hand this question paper in at the end of the examination. - ----- - -1. The 4 principles of the Agile manifesto state: - - Individuals and interactions over processes and tools - - Working software over comprehensive documentation - - Customer collaboration over contract negotiation - - Responding to change over following a plan - 1. Critically discuss the application of these principles in the Extreme Programming development approach. _(20 marks)_ - 2. What does refactoring mean? Give a specific example of refactoring. _(5 marks)_ - -(Total 25 marks) - ----- - -2. Discuss the three main levels of cloud computing services: IaaS, PaaS and SaaS. Provide specific examples of such services from your experience. _(15 marks)_ - -(Total 15 marks) - ----- diff --git a/exams/2015_2.md b/exams/2015_2.md deleted file mode 100644 index 1a7f6eb..0000000 --- a/exams/2015_2.md +++ /dev/null @@ -1,46 +0,0 @@ - -# July 2015 - -Coventry University - -Faculty of Engineering & Computing - -# 321COM Rapid Application Development - -Instructions to candidates - -Time allowed: 2 hours 00 minutes - -This is a Closed Book Examination - -Answer: All questions - -The total number of questions in this paper: 4 - -Each question is worth 25 marks. - -Start each question on a new page and carefully identify your answers with the correct question number. - -For this examination you will be supplied with the following - -1 Answer Book(s) - -You must hand this question paper in at the end of the examination - ----- - -1. The 4 principles of the Agile manifesto state: - - Individuals and interactions over processes and tools - - Working software over comprehensive documentation - - Customer collaboration over contract negotiation - - Responding to change over following a plan - 1. Critically discuss the application of these principles in the SCRUM development approach. _(20 marks)_ - 2. What are the roles of the Product Owner and Scrum Master in the SCRUM development approach? _(5 marks)_ - -(Total 25 marks) - ----- - -2. Discuss the main reasons for companies migrating to the cloud. Provide specific examples of such services from your experience. _(15 marks)_ - -(Total 15 marks) \ No newline at end of file diff --git a/exams/2016_1.md b/exams/2016_1.md deleted file mode 100644 index 64792a6..0000000 --- a/exams/2016_1.md +++ /dev/null @@ -1,73 +0,0 @@ - -May 2016 - -Coventry University - -Faculty of Engineering, Environment and Computing - -# 321COM Rapid Application Development - -Instructions to candidates - -Time Allowed: 2 hours 00 minutes - -This is a Closed Book examination - -Answer: All questions - -The total number of questions in this paper: 4 - -Each question is worth 25 marks. - -Start each question on a new page and carefully identify your answers with the correct question number. - -For this examination you will be supplied with the following - -1 Answer Book(s) - -You must hand this question paper in at the end of the examination - ----- - -1. The **pets** and **cattle** metaphor is often used to describe two contrasting service models used when configuring online services. - 1. describe three features of a _pet_ service. _(6 marks)_ - 2. describe three features of a _cattle_ service. _(6 marks)_ - 3. explain the purpose of clustering and how it can be used to improve server reliability. _(6 marks)_ - 4. explain the role of a load-balancer. _(7 marks)_ - -(Total 25 marks) - ----- - -2. In 1998 Eric Brewer proposed the **CAP theorem** to explain limitations in database technologies and how this relates to the **ACID principles**. - 1. explain the three guarantees denoted by the CAP acronym. _(9 marks)_ - 2. explain the term ACID in terms of database technologies. _(4 marks)_ - 3. describe the limitations in traditional relational databases with reference to the CAP theorem. _(4 marks)_ - 4. describe the limitations in NoSQL Document Databases with reference to the CAP theorem. _(4 marks)_ - 5. explain why the CAP theorem is misleading. _(4 marks)_ - -(Total 25 marks) - ----- - -3. When working on a project involving the writing of computer programs most programmers use a form of version control. - 1. give an example of a version control tool and explain its purpose. _(4 marks)_ - 2. explain the following concepts and explain where they would typically be used. _(16 marks)_: - 1. branching and merging - 2. adding and committing - 3. pushing and pulling - 4. forking and merging - 3. describe the tools available to track the code changes in a project. _(5 marks)_ - -(Total 25 marks) - ----- - -4. Modern programming frameworks make use of common **design patterns**. - 1. explain the purpose of design patterns and why these are useful to software developers. _(8 marks)_ - 2. explain with the aid of a suitably labelled diagram the three components in the Model-View-Controller design pattern and how this helps in the development of code that is easy to maintain. _(12 marks)_ - 3. briefly describe two other design patterns and explain their usage. _(5 marks)_ - -(Total 25 marks) - ----- \ No newline at end of file diff --git a/exams/2016_2.md b/exams/2016_2.md deleted file mode 100644 index 669723e..0000000 --- a/exams/2016_2.md +++ /dev/null @@ -1,74 +0,0 @@ - -July 2016 - -Coventry University - -Faculty of Engineering, Environment and Computing - -# 321COM Rapid Application Development - -Instructions to candidates - -Time Allowed: 2 hours 00 minutes - -This is a Closed Book examination - -Answer: - -All questions - -The total number of questions in this paper: 4 - -Each question is worth 25 marks. - -Start each question on a new page and carefully identify your answers with the correct question number - -For this examination you will be supplied with the following - -1 Answer Book(s) - -You must hand this question paper in at the end of the examination. - -Answer all questions - ----- - -1. Cloud services are becoming increasingly popular with organisations. - 1. Explain using examples what is meant by the **cloud**. You should compare it to alternatives explaining its pros and cons. _(7 marks)_ - 2. Using examples explain the acronym **SaaS** and describe its benefits _(6 marks)_ - 3. Using examples explain the acronym **PaaS** and describe its benefits. _(6 marks)_ - 4. Using examples explain the acronym **IaaS** and describe its benefits _(6 marks)_ - -(Total 25 marks) - ----- - -2. Many online systems are made available through a **public API**. - 1. Explain the _purpose_ of an API and give examples. _(9 marks)_ - 2. Describe how an API supports _CRUD operations_ giving concrete examples to support your explanation. _(8 marks)_ - 3. Explain the difference between a **resource** and a **collection** giving examples of both. _(4 marks)_ - 4. Web APIs deliver their content using the _JSON format_. Using an example explain its key features and advantages over the use of XML. _(4 marks)_ - -(Total 25 marks) - ----- - -3. Many software development companies are moving from a 'traditional' approach to embrace a more agile approach. This encompasses a number of important concepts. - 1. Explain what is meant by agile. _(4 marks)_ - 2. Explain the following concepts and explain where they would typically be used: _(16 marks)_ - 1. incremental development - 2. timeboxing - 3. MoSCoW Rules - 4. Minimum viable product - 3. Describe some of the online tools you can use to support agile development and explain how they help the process. _(5 marks)_ - -(Total 25 marks) - ----- - -4. Modern programming methodologies make extensive use of automated testing. - 1. Explain the Test-Driven Development paradigm showing the benefits of adoption. _(9 marks)_ - 2. Explain the purpose of Unit Testing, how it is used and its benefits giving clear examples. _(8 marks)_ - 3. Explain the purpose of Acceptance Testing, its role and benefits giving examples. _(8 marks)_ - -(Total 25 marks) \ No newline at end of file diff --git a/exams/2017_1.md b/exams/2017_1.md deleted file mode 100644 index 35ff380..0000000 --- a/exams/2017_1.md +++ /dev/null @@ -1,133 +0,0 @@ - -# May 2017 - -Coventry University - -Faculty of Engineering, Environment and Computing - - -# 302CEM Agile Development - -Instructions to candidates - -Time allowed: 2 Hours 0 minutes - -Answer: All Questions - - The total number of questions in this paper: 4 - -All questions carry equal marks - -Start each question on a new page and carefully identify your answers with the correct question number - -For this examination you will be supplied with the following: - -1 Answer Book - -You must hand this question paper in at the end of the examination - ----- - -1. There have been many studies into the concept of 'competence'. - 1. Abraham Maslow describes four states in the progression to full competence. Define and critically analyse these _(12 marks)_ - 2. Assess the role of Cognitive Bias and the Dunning-Kruger Effect when building effective agile teams _(6 marks)_ - 3. Define and explain the Skills for the Information Age (SFIA) Framework and how it uses skills and levels to define competence _(7 marks)_ - -(Total 25 marks) - ----- - -2. User Stories are a key tool in agile development. - 1. Jeff Patton describes a process called User Story Mapping. Critically analyse its role in improving agile development _(12 marks)_ - 2. Alistair Cockburn describes the principle of Goal Levels in which user stories are placed into one of three levels. Explain the rationale behind this process and how the stories are organized _(9 marks)_ - 3. Evaluate the benefits of Alternative Stories _(4 marks)_ - -(Total 25 marks) - ----- - -3. Test-Driven Development is commonly employed by agile teams. - 1. Describe the principles of TDD _(5 marks)_ - 2. Describe the TDD process _(12 marks)_ - 3. Describe two benefits of TDD _(4 marks)_ - 4. How can each module be tested in isolation? _(4 marks)_ - -(Total 25 marks) - ----- - -4. Most modern software is accessed through the Cloud. - 1. What is the Cloud? _(5 marks)_ - 2. Critically compare cloud vs traditional architectures showing the advantages and disadvantages of both. _(4 marks)_ - 3. Compare the three types of cloud services and give an example of each. _(6 marks)_ - 4. It is important that cloud services can scale to meet demand. For each of the two approaches below, explain, with the use of diagrams, how this scalability is achieved. _(10 marks)_ - 1. Load balancing - 2. Clustering - -(Total 25 marks) - ----- - -# Solutions - -1. There have been many studies into the concept of ‘competence’. - 1. 3 marks for each, one for name and 2 for description: - 1. Unconscious incompetence The individual does not understand or know how to do something and does not necessarily recognize the deficit. They may deny the usefulness of the skill. The individual must recognize their own incompetence, and the value of the new skill, before moving on to the next stage. The length of time an individual spends in this stage depends on the strength of the stimulus to learn. - 2. Conscious incompetence Though the individual does not understand or know how to do something, he or she does recognize the deficit, as well as the value of a new skill in addressing the deficit. The making of mistakes can be integral to the learning process at this stage. - 3. Conscious competence The individual understands or knows how to do something. However, demonstrating the skill or knowledge requires concentration. It may be broken down into steps, and there is heavy conscious involvement in executing the new skill. - 4. Unconscious competence The individual has had so much practice with a skill that it has become "second nature" and can be performed easily. As a result, the skill can be performed while executing another task. The individual may be able to teach it to others, depending upon how and when it was learned. - 2. 3 marks for each, one for name and 2 for description: - - A cognitive bias refers to a systematic pattern of deviation from norm or rationality in judgment, whereby inferences about other people and situations may be drawn in an illogical fashion. Individuals create their own "subjective social reality" from their perception of the input. - - The Dunning–Kruger effect is a cognitive bias in which low-ability individuals suffer from illusory superiority, mistakenly assessing their ability as much higher than it really is. Dunning and Kruger attributed this bias to a metacognitive inability of those of low ability to recognize their ineptitude and evaluate their ability accurately. Impact is that individuals defer asking for help and fail to use the most appropriate tools due to lack of knowledge and understanding. - 3. 3 marks for first point and 4 for second: - 1. The Skills Framework for the Information Age is a model for describing and managing competencies for ICT professionals for the 21st century - 2. Is intended to help match the skills of the workforce to the needs of the business. - ----- - -2. User Stories are a key tool in agile development. - 1. 3 marks for a suitable diagram, 3 points from the list below, 3 marks for each: -![User Story Map](../exercises/.images/user_story_map.png) - - Deliver important requirements first - - Split requirements into small slices - - Defer less important requirements to later release - - Improves communication with the customer - - Helps visualise product or system roadmap - 2. 3 from the list below, 3 marks for each: - - Cloud, flying kite, waves, fish seabed. (3 marks) - - More important goals are placed higher than others. (3 marks) - - Users get lost if there are lots of goal levels.(3 marks) - 3. Users have different routes through the system. These need to be captured, -normally after the common paths. _(4 marks)_ - ----- - -3. Test-Driven Development is commonly employed by agile teams. - 1. Test-driven development (TDD) is a software development process that relies on the repetition of a very short development cycle: requirements are turned into very specific test cases, then the software is improved to pass the new tests, only. This is opposed to software development that allows software to be added that isn't proven to meet requirements. _(5 marks)_ - 2. 3 marks for each of the following: - 1. Add a test: Write a test that defines a function or improvements of a function - 2. Run test so it fails: This validates that the test harness is working correctly, that the new test does not mistakenly pass without requiring any new code - 3. Write code and run test until it passes: The next step is to write some code that causes the test to pass. The new code written at this stage is not perfect - 4. Refactor code: The growing code base must be cleaned up regularly during test-driven development. - 3. Any two of the following (2 marks each): - - TDD meant writing more tests and, in turn, programmers who wrote more tests tended to be more productive. - - Large numbers of tests help to limit the number of defects in the code. - - Forces code development to be modular with low coupling. - 4. How can each module be tested in isolation? (2 marks for each): - - Ensure low coupling - - Use mocks to improve test isolation. - ----- - -4. Most modern software is accessed through the Cloud. - 1. Stuff you can access on the Internet rather than on your local computer. A metaphor for the Internet. Cloud services are becoming increasingly popular with organisations (5 marks). - 2. Advantages 2 marks (2) disadvantages 2 marks (4 marks total): - - Pro: Convenience - - Pro: Reliability - - Con: bandwidth & capacity - - Con: required online access - - Con: no central body to govern - 3. mark for correct acronym mark for example (6 marks total): - - SaaS: Software as a service – google drive or other - - PaaS: Platform as a service – google app engine or other - - IaaS: Infrastructure as a service – AWS or other diff --git a/exams/2017_2.md b/exams/2017_2.md deleted file mode 100644 index 81280ba..0000000 --- a/exams/2017_2.md +++ /dev/null @@ -1,161 +0,0 @@ - -# July 2017 - -Coventry University - -Faculty of Engineering, Environment and Computing - -# 302CEM Agile Development - -Instructions to candidates - -Time allowed: 2 Hours 0 minutes - -Answer: All Questions - - The total number of questions in this paper: 4 - -All questions carry equal marks - -Start each question on a new page and carefully identify your answers with the correct question number - -For this examination you will be supplied with the following: - -1 Answer Book - -You must hand this question paper in at the end of the examination - ------ - -Questions -Answer all questions in this section -1. Agile development is seen as an alternative to traditional waterfall-style project -management when managing risks in a project. For each of the following, compare and evaluate these two approaches. - 1. Schedule slips _(5 marks)_ - 2. Business is misunderstood _(5 marks)_ - 3. Business changes _(5 marks)_ - 4. The project is suddenly cancelled! _(5 marks)_ - 5. The software is full of bugs _(5 marks)_ - -(Total 25 marks) - ----- -2. Scrum is an agile way to manage a project. - 1. Evaluate the following _(12 marks)_: - 1. Product Backlog - 2. MoSCow Rules - 3. Product Sprint - 2. Many teams use a Kanban board. Evaluate how these can be used to improve productivity _(9 marks)_ - 3. Compare the process of a Daily Stand-Up to traditional meeting styles _(4 marks)_ - -(Total 25 marks) - ----- - -3. Modern agile teams often integrate Continuous Integration (CI) and Continuous Deployment (CD) into their workflow. - 1. Compare Continuous Integration with alternative approaches _(9 marks)_ - 2. Compare and contrast Continuous Deployment with alternative approaches _(9 marks)_ - 3. Appraise the challenges faced by organisations when adopting CI and CD _(7 marks)_ - -(Total 25 marks) - ----- - -4. At the core of agile development is the 'Agile Manifesto'. Appraise the following: - 1. Individuals and interactions over processes and tools _(7 marks)_ - 2. Working software over comprehensive documentation _(6 marks)_ - 3. Customer collaboration over contract negotiation _(6 marks)_ - 4. Responding to change over following a plan _(6 marks)_ - -(Total 25 marks) - ----- - -# Solutions - -1. Agile development - 1. Any 2 _(3 marks for first and 2 for second)_: - - Short release cycles - - Burn-down charts / burn rate - 2. Any 2 _(3 marks for first and 2 for second)_: - - Customer is part of the team - - User stories define business outcomes - - Regular feedback by customer - 3. Any 2 _(3 marks for first and 2 for second)_: - - Short release cycles minimises wasted time - - Customer is part of the team - 4. Any 2 _(3 marks for first and 2 for second)_: - - Minimum viable product - - Iterative development delivers working code each time - 5. Any 2 _(3 marks for first and 2 for second)_: - - BDD / Acceptance testing defines automated suite to measure against customer requirements - - TDD / Unit testing suite to automatically check for bugs in code modules - - Regression testing keeps checking code that worked reviously. - - Agile avoids false feature-rich which reduces the amount of code - ----- - -2. Scrum is an agile way to manage a project. - 1. Evaluate the following: - 1. Any 2 of the following _(2 marks each)_: - - List of things that need to be done / captures system requirements - - Anyone in the team can add to this list - - List items should be user stories - - Can also include non-functional requirements such as improving performance or fixing bugs - - The product owner prioritises these after consultation with the rest of the team - - Priorities are regularly adjusted based on current business needs - 2. User stories fit into four different priority groups _(1 mark for each)_: - - Must Have: the top items will be essential - - Should Have: next there will be the important but lower priority tasks - - Could Have: next are the low priority features that will be completed eventually - - Would Be Nice: the tasks at the bottom may never be implemented - 3. Any 2 of the following _(6 marks each)_: - - A time-based unit of development / Restricted to a specific duration (timeboxed) - - Duration of each sprint determined by team dynamics - - Each sprint results in the delivery of working code - 2. Any 3 from the following _(3 marks each)_: - - Keeps track of tasks in a visual manner - - Tasks assigned to specific developer forces ownership - - Each member of team knows what they need to achieve - - Easy to identify issues early and resolve - - Live document (information radiator) - 3. Any 2 of the following _(2 marks each)_: - - Entire team must be present - - Short time-box - - Each member must contribute - - Clearly defined set of questions/agenda - ----- - -3. Modern agile teams often integrate Continuous Integration and -Continuous Deployment into their workflow. - 1. Any 3 from the following _(3 marks each)_. For each point, 2 marks for description of CI and 1 for comparison with alternative: - - All code goes into a central repository which auto builds test environment / test environment is built locally on dev machines. - - All builds are automated / automated tests are triggered manually. - - All code is built and tested every time code is pushed / tests are run before code is committed and pushed. - - Integration takes place every push / Manual process. - - Any errors are reported / All errors are captured by tests run locally. - 2. Any 3 from the following (3 marks each). For each point, 2 marks for description of CD and 1 for comparison with alternative: - - The acceptance tests define the product requirements / there may be other requirements not defined in the test suite. - - If all tests pass the user story has been implemented / decision is taken by dev team. - - Next step is to deploy to the live server automatically / process triggered by dev team manually. - - This should be triggered automatically if tests pass / decision taken by dev team based on other factors. - 3. _(3 marks for first point then 2 points for second and third points)_: - - Needs team to fully adopt TDD/BDD - - Organisational: need to agree control and workflow - - Process: sign-off processes can be convoluted and time consuming - - Technical: requires expertise in many different tools and techniques - ----- - -4. At the core of agile development is the ‘Agile Manifesto’. Appraise the -following: - 1. Any 3 of the italicised concepts _(3 marks for first and 2 marks for others)_: - - This first value places its emphasis on _teamwork_ and _communication_. - - _Teams of people_ build software systems, _not tools_. And to do that they need to work together effectively through productive interactions. - 2. Any 3 of the underlined concepts (2 marks each): - - Take the time to develop software that is _clear_, _self-explanatory_, and caters to the tasks that _users need_ to get done. - 3. Any 3 of the underlined concepts (2 marks each): - - Only your customers can tell you _what they want_, and it’s _your job to listen_. Successful development teams _work closely with their customers_ and _communicate with them frequently_. - 4. Any 3 of the underlined concepts (2 marks each): - - _Change is the reality_ of software development – technology changes, business trends change, customers change. There is _nothing wrong with a project plan_ – however, it _must be malleable_. There must be room to _allow for change_ and to _respond to it_ otherwise your plan quickly becomes obsolete. \ No newline at end of file diff --git a/exams/extras.md b/exams/extras.md deleted file mode 100644 index 1f3fac9..0000000 --- a/exams/extras.md +++ /dev/null @@ -1,209 +0,0 @@ - -# Additional Revision Questions - -Here are some more questions to help you revise for the 302CEM exam. Unlike the past papers there are no model answers provided so you will need to refer back to the lecture slides. - ----- - -1. Why should developers adopt an agile methodology? -2. Describe 3 risks when developing software and how agile methodologies help reduce this? - ----- - -Define the following and explain how they influence team behaviour: - -1. Maslow's Stages of Competence -2. Cognitive Bias -3. The Dunning-Kruger Effect - ----- - -Explain the difference between _the Abilene Effect_ and _groupthink_. - ----- - -1. Explain what us meant by the _GitFlow workflow_. -2. Use diagrams to help explain how GitFlow implements: - 1. Historic branches - 2. Feature branches - 3. Hotfix branches - 4. Releases - ----- - -1. Explain what is meant by the _Forking Workflow_ -2. How does it support very large development teams? - ----- - -When working with Git - -1. What is a _protected branch_ -2. What protection can typically be added? -3. Why is this important? - ----- - -What is BDD? - -1. Describe the business-facing stack -2. Describe the developer-facing stack - ----- - -What is the "Iron Triangle of Planning" and what are the three limitations, explain each? - -Describe both waterfall and agile approaches with respect to these limitations. - ----- - -List and explain four problems with detailed specifications. - -How does an agile methodology reduce risk? - ----- - -1. What is the difference between: - 1. Unit tests - 2. Integration tests - 3. Acceptance tests -2. What is _code coverage_, why is this carried out and what are its limitations? - ----- - -Explain, using a diagram, the process of User story mapping - -What are its benefits? - -Explain the following terms: - -1. Goal levels (Alistair Cockburn) -2. Alternative stories - ----- - -Explain the following terms used in agile development: - -1. Incremental development -2. Proof of Concept -3. Minimum viable product -4. Timeboxing - ----- - -How can the **Black Sheep Effect** impact team behaviour? - ----- - -What is "Docker"? - -Explain the purpose of the relationship between **Docker Engine**, **Docker Compose** and **Docker Machine**. - -WHat is the purpose and what are the benefits of **Docker Swarm**. - ----- - -MoSCoW is an acronym often used in agile planning: - -1. Expand the acronym and explain it -2. Explain the concept of timeboxing -3. How does the MoSCoW method relate to timeboxing? - ----- - -List the four points in the **agile manifesto**. - -For each, explain how it leads to better code. - ----- - -Explain these key Scrum concepts and how they improve productivity: - -1. Product Backlog -2. Sprint Backlog -3. Sprint Review -4. Daily Standup - ----- - -Explain, using examples, how an Agile development process handles the following: - -1. Schedule slips -2. Business misunderstood -3. Business changes -4. Project cancelled -5. Buggy software - ----- - -In agile development what is the role of the: - -1. Business team? -2. Development team? -3. Product owner? -4. Scrum master? - ----- - -What is the purpose of a Version Control System (VCS)? - -With reference to the Git VCS, describe with the aid of diagrams: - -1. A Local workflow -2. A Remote workflow - ----- - -Explain the principles behind Behaviour-Driven Development (BDD) - -What are the benefits in employing BDD? - -Using an example, explain the purpose of a Domain-Specific Language (DSL) - ----- - -Explain the purpose of Acceptance Testing - -What are the benefits of writing acceptance tests? - ----- - -Explain, with the use of examples, the differences between a Software Library and a Service. - ----- - -Explain the principle behind Test-Driven Development (TDD) - -What are the steps in the TDD process? - -What are the benefits in applying TDD? - ----- - -Explain the process of test-driven development - -What is meant by: - -1. Behaviour-driven development -2. Unit testing -3. Acceptance testing - ----- - -What is meant by The Cloud? - -Explain two the benefits of Using the Cloud - -Explain two drawbacks of using the Cloud - -Define and explain three types of cloud services. - ----- - -Continuous Integration and Continuous Deployment are often used by software development teams. For each of these: - -1. Explain the process -2. What are the benefits -3. What are the challenges to adoption - ----- diff --git a/exercises/02_tdd/esp32/.pioenvs/.sconsign.dblite b/exercises/02_tdd/temp/.pioenvs/.sconsign.dblite similarity index 100% rename from exercises/02_tdd/esp32/.pioenvs/.sconsign.dblite rename to exercises/02_tdd/temp/.pioenvs/.sconsign.dblite diff --git a/exercises/02_tdd/esp32/.pioenvs/do-not-modify-files-here.url b/exercises/02_tdd/temp/.pioenvs/do-not-modify-files-here.url similarity index 100% rename from exercises/02_tdd/esp32/.pioenvs/do-not-modify-files-here.url rename to exercises/02_tdd/temp/.pioenvs/do-not-modify-files-here.url diff --git a/exercises/02_tdd/esp32/.pioenvs/structure.hash b/exercises/02_tdd/temp/.pioenvs/structure.hash similarity index 100% rename from exercises/02_tdd/esp32/.pioenvs/structure.hash rename to exercises/02_tdd/temp/.pioenvs/structure.hash diff --git a/exercises/02_tdd/esp32/.vscode/c_cpp_properties.json b/exercises/02_tdd/temp/.vscode/c_cpp_properties.json similarity index 100% rename from exercises/02_tdd/esp32/.vscode/c_cpp_properties.json rename to exercises/02_tdd/temp/.vscode/c_cpp_properties.json diff --git a/exercises/02_tdd/esp32/.vscode/extensions.json b/exercises/02_tdd/temp/.vscode/extensions.json similarity index 100% rename from exercises/02_tdd/esp32/.vscode/extensions.json rename to exercises/02_tdd/temp/.vscode/extensions.json diff --git a/exercises/02_tdd/esp32/.vscode/launch.json b/exercises/02_tdd/temp/.vscode/launch.json similarity index 100% rename from exercises/02_tdd/esp32/.vscode/launch.json rename to exercises/02_tdd/temp/.vscode/launch.json diff --git a/exercises/02_tdd/esp32/.vscode/settings.json b/exercises/02_tdd/temp/.vscode/settings.json similarity index 100% rename from exercises/02_tdd/esp32/.vscode/settings.json rename to exercises/02_tdd/temp/.vscode/settings.json diff --git a/exercises/02_tdd/esp32/lib/readme.txt b/exercises/02_tdd/temp/lib/readme.txt similarity index 100% rename from exercises/02_tdd/esp32/lib/readme.txt rename to exercises/02_tdd/temp/lib/readme.txt diff --git a/exercises/02_tdd/esp32/platformio.ini b/exercises/02_tdd/temp/platformio.ini similarity index 100% rename from exercises/02_tdd/esp32/platformio.ini rename to exercises/02_tdd/temp/platformio.ini diff --git a/exercises/02_tdd/esp32/test/test_main.cpp b/exercises/02_tdd/temp/test/test_main.cpp similarity index 100% rename from exercises/02_tdd/esp32/test/test_main.cpp rename to exercises/02_tdd/temp/test/test_main.cpp