© Karl Beecher 2018
Karl BeecherBad Programming Practices 101https://doi.org/10.1007/978-1-4842-3411-2_6

6. Subroutines

Karl Beecher1 
(1)
Berlin, Germany
 

Objectives

In this chapter, you’ll learn:
  • How subroutine size affects program comprehension

  • About measures you can take to frustrate comprehension of subroutines, specifically by
    • naming them poorly;

    • making them overly complex; and

    • giving them too many purposes

  • How inputs to and outputs from subroutines can be abused

Prerequisites

It will help you if you’re already familiar with reference types and value types, as well as evaluation strategies like call-by-value and call-by-reference.

Introduction

It is a very foolish and bad habit [. . .] to start working at details before having understood the problem ...

Get Bad Programming Practices 101: Become a Better Coder by Learning How (Not) to Program now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.