INDICATIVE CONTENT
The module will address the following issues associated to clean code -
Principles of clean code
Principles of clean architecture
Principles of clean tests
Clean concurrency
Types of unit tests
Motivations for testing
Improving tests
Refactoring for clean code
Test-Driven Development
Unit tests for web applications
For concurrent applications it addresses ¿
Multithreading
Synchronisation primitives: mutex, monitor, send/receive mechanisms
Concurrency concepts: Concurrency types; Round Robin Scheduler; Priority; Processes v Threads; Synchronisation; Asynchronicity; Mutual exclusion; Indivisibility; Advantages of concurrency; Standard safety issues, liveness, starvation, race-condition
Classical problems e.g. Semaphore, Producer/Consumer
Thread-safety
Programmatic communication over a network (i.e. socket programming)
Multi-user multi-tier client-server applications in programming languages such as Java and C#
Security issues
ASSESSMENT DETAILS
Assignment 1 - Critically analyse a given application and refactor it into clean code. Design and implement a suite of clean tests to test a given application. Write a report identifying, with examples, the problems of the original application, the principles of clean code that used to refactor the application, and the principles of clean tests used. The assignment addresses Learning Outcomes 1 and 2.
Assignment 2– Design and implement, using concurrency mechanisms, a multi-user multi-tier client-server application and write a report critically discussing the concurrency mechanisms available for the problem and justifying the selection made for your solution. The assignment addresses Learning Outcomes 3 and 4.
LEARNING STRATEGIES
26 hours of lectures to introduce key topics and concepts.
26 hours of tutor-assisted practical sessions. In the practical sessions you will get hands-on experience of the principles taught in the lectures.
LEARNING OUTCOMES
1. DEMONSTRATE A CRITICAL UNDERSTANDING OF THE PRINCIPLES OF CLEAN CODE AND CLEAN TESTING, BEING ABLE TO REFACTOR CODE INTO CLEAN CODE.
Knowledge and Understanding, Analysis
2. DESIGN AND IMPLEMENT A SUITE OF CLEAN TESTS FOR A GIVEN APPLICATION.
Application,
Communication,
Problem Solving
3. APPLY CONCURRENCY IN THE DESIGN AND IMPLEMENTATION OF A MULTI-USER MULTI-TIER CLIENT-SERVER APPLICATION.
Application,
Problem Solving
4. CRITICALLY DISCUSS THE CONCURRENCY MECHANISMS AVAILABLE FOR A GIVEN PROBLEM AND JUSTIFY THE SELECTION MADE FOR A SOLUTION.
Analysis,
Communication
RESOURCES
Selenium IDE (available at: https://www.seleniumhq.org/)
Visual Studio Professional (IDE for C#) Java SDK
TEXTS
Fields, J. (2014) ¿Working effectively with Unit Tests. ¿ Leanpub. [Online] Available at: https://leanpub.com/wewut
Martin, R.C. (2008) ¿Clean Code: A Handbook of Agile Software Craftsmanship.¿ Prentice Hall. ISBN: 9780132350884
Martin, R.C. (2017) ¿Clean Architecture: A Craftsman's Guide to Software Structure and Design.¿ Prentice Hall.
ISBN: 9780134494166
Ben-Ari, M. (2006) ¿Principles of Concurrent and Distributed Programming: Algorithms and Models.¿ 2nd edition.
Addison-Wesley, ISBN: 9780321312839
Web Descriptor
This module addresses two key areas of computing. In it you will learn and practice the principles of clean code, clean architecture and various approaches to unit testing. This will add a degree of professionalism to the coding and testing practices you have already gained during your studies. You will also learn about concurrent programming in a programming language such as C# or Java. You will gain experience in writing multi-user, multi-tier, client-server applications that are distributed over a network.