Book Image

Modern Programming: Object Oriented Programming and Best Practices

By : Graham Lee
Book Image

Modern Programming: Object Oriented Programming and Best Practices

By: Graham Lee

Overview of this book

Your experience and knowledge always influence the approach you take and the tools you use to write your programs. With a sound understanding of how to approach your goal and what software paradigms to use, you can create high-performing applications quickly and efficiently. In this two-part book, you’ll discover the untapped features of object-oriented programming and use it with other software tools to code fast and efficient applications. The first part of the book begins with a discussion on how OOP is used today and moves on to analyze the ideas and problems that OOP doesn’t address. It continues by deconstructing the complexity of OOP, showing you its fundamentally simple core. You’ll see that, by using the distinctive elements of OOP, you can learn to build your applications more easily. The next part of this book talks about acquiring the skills to become a better programmer. You’ll get an overview of how various tools, such as version control and build management, help make your life easier. This book also discusses the pros and cons of other programming paradigms, such as aspect-oriented programming and functional programming, and helps to select the correct approach for your projects. It ends by talking about the philosophy behind designing software and what it means to be a "good" developer. By the end of this two-part book, you will have learned that OOP is not always complex, and you will know how you can evolve into a better programmer by learning about ethics, teamwork, and documentation.
Table of Contents (18 chapters)
Free Chapter
1
Part One – OOP The Easy Way
5
Part Two – APPropriate Behavior

Test Case Design

Random, undirected testing (otherwise known as playing about with the user interface) is an inefficient way to test software. A long-established technique (documented in Myer's The Art of Software Testinghttp://books.google.co.uk/books/about/The_art_of_software_testing.html?id=86rz6UExDEEC&redir_esc=y) seeks to cover all possible conditions with the minimum number of tests. For each input variable or state, the tester discovers the ranges of values that represent distinct conditions in the software. As an example, an age field may have the following ranges:

  • [0,18[ : child
  • [18, 150[ : adult
  • 0[ : too small
  • [150 : too large
  • NaN : not a number

The tester then tabulates these various ranges for all the inputs and creates the minimum number of tests required to exercise all of them. This is called equivalence partitioning: the behavior at age 36 and the behavior at age 38 are probably the same, so it's reasonable to expect that if you...