Skip to content

Download Building Maintainable Software, C# Edition: Ten Guidelines by Joost Visser, Sylvan Rigal, Gijs Wijnholds, Pascal van Eck, PDF

By Joost Visser, Sylvan Rigal, Gijs Wijnholds, Pascal van Eck, Rob van der Leek

Have you felt pissed off operating with an individual else's code? Difficult-to-maintain resource code is a giant challenge in software program improvement this day, resulting in expensive delays and defects. join the answer. With this useful ebook, you are going to research 10 easy-to-follow instructions for offering C# software program that is effortless to take care of and adapt. those instructions were derived from studying hundreds of thousands of real-world structures. Written by means of experts from the software program development staff (SIG), this ebook presents transparent and concise factors, with recommendation for turning the ideas into perform. Examples for this version are written in C#, whereas our better half Java e-book presents transparent examples in that language.

Show description

Read or Download Building Maintainable Software, C# Edition: Ten Guidelines for Future-Proof Code PDF

Best c# books

C/C++ Programmer's Reference, Third Edition

Like having a mind on your again pocket. offers transparent reasons of all C and C++ programming syntax, key words, instructions, capabilities, and sophistication libraries. considering the fact that no programmer can take note the correct syntax of each C/C++ aspect, this quick-access advisor assists programmers in imposing effective options on call for.

XML Programming: Web Applications and Web Services with JSP and ASP

XML Programming: internet functions and internet prone with JSP and ASP offers a fast-moving advent to the XML kinfolk of applied sciences for programmers. even if written with a spotlight upon JSP- and ASP-based XML ideas, the ebook offers the fabric from a language-independent perspective that merits all builders, no matter what their language.

CodeIgniter 1.7 Professional Development

CodeIgniter is an open resource personal home page framework with a small footprint and remarkable functionality. It promises a wealthy set of libraries for universal projects, with an easy interface to entry them. There are a number of unexplored elements of CodeIgniter which could aid builders construct purposes extra simply and quick.

Essential C# 6.0

“ Welcome to 1 of the best collaborations you may dream of on this planet of C# books—and most likely a long way past! ” —From the Foreword by way of Mads Torgersen, C# software supervisor, Microsoft   crucial C# 6. zero is a well-organized, no-fluff consultant to the most recent types of C# for programmers in any respect degrees of expertise.

Extra resources for Building Maintainable Software, C# Edition: Ten Guidelines for Future-Proof Code

Sample text

A level maintains a list of observers: classes that need to be informed whenever the level has finished. The most basic version of the Start method checks whether the game is already in progress. If so, it silently returns; otherwise, it updates inProgress, a private member to keep track of its state: public void Start() { if (inProgress) { return; } inProgress = true; } So far our unit contains only seven lines of code. At this point, we can add a unit test for our unit. When you use TDD (test-driven development), you already have a unit test at this point.

The next thing the Start method needs is functionality that updates all observers of the level to inform them about the current state. LevelWon(); } } } Adding the code to update observers made our unit grow to 21 lines of code (and 23 lines in total, including the 2 lines that contain comments). After testing the behavior of this new code, you are probably already thinking about the next functionality to implement. However, you need to refactor first to follow the guideline of this chapter. Using Refactoring Techniques to Apply the Guideline This section discusses two refactoring techniques to apply the guideline and achieve shorter units of code.

This makes reuse hard, because it is not very likely that the specific functionality of a long unit is suitable. In contrast, short units tend to be more generic. This makes reuse easier, because it is more likely to fit your needs. Reusing code also helps keep the total code volume low (see Chap‐ ter 9). Copying and pasting a unit is not what we mean when we speak about reuse. That type of reuse leads to duplication, which is to be avoided at all times (see Chapter 4). 2 How to Apply the Guideline Following this guideline is not difficult when you know the right techniques, but it requires discipline.

Download PDF sample

Rated 4.39 of 5 – based on 17 votes