It has been said that immutability changes everything. But what does that mean in practice? What does it mean for existing code that looks more like the mutant apocalypse than an elegant application of mathematical thinking? Mainstream programming languages are normally grounded in imperative styles — from updating local variables to updating records in databases. But although they have grown from imperative roots, languages such as C# and Java are expressive and evolved enough that they can embrace many different approaches. Indeed, trends in the development of many languages have made immutability and the reduction of mutability easier to support.
Immutability is attractive because it makes code easier to reason about, reduces the possibility of many classes of bug, improves the testability of code, reduces the amount of validation and error-handling code, makes code more scalable when threaded and makes code more thread-safe. However, immutability can be an ideal that is hard to reach, and much advice doesn't cover enough of the situations developers find in their codebases. Refactoring, on the other hand, is all about the art of the possible.
Whether you're working in the cloud or on the desktop, in the mobile space or on the web, steering your code and design style towards immutability offers both short-term and long-term practical benefits. In this hands-on training, we'll be looking at guidance and practice to help reduce the mutability of state in your codebase.
This online workshop is tailored for Java and C# developers looking to write better, safer code. The class is delivered over 2 half-days, and class size is limited to 12 people. You will require:
- A good internet connection
- Practical knowledge of C# or Java
- Some experience of unit testing, ideally in NUnit or JUnit
- You don't need to worry about IDEs, editors, compilers and all that as the hands-on exercises will be run online in a browser
About The Trainer
Kevlin Henney is a regular columnist for various industry magazines and a well known and popular speaker on topics such OO Design, Patterns, Agile Development and Software architecture at conferences in Europe and North America.
Kevlin currently works as an independent consultant and trainer based in Bristol. He has developed and delivered training courses, consultancy and software across a number of domains ever since getting involved in professional software development in the late 1980s.
Most of Kevlin’s work focuses on software architecture, patterns, development process and programming languages. His work has appeared in several magazines and online publications, including; The Register, Application Development Advisor, Java Report, C++ Report and CUJ. Along with Frank Buschmann and Doug Schmidt, Kevlin is coauthor of A Pattern Language for Distributed Computing and On Patterns and Pattern Languages. He is also editor of the 97 Things Every Programmer Should Know project.