Section 3.16 Ethics: Variable Defaults Embed Values
When a turtle and screen/canvas are first created they have a default state. That default is defined by the values that are assigned to the turtle attributes by the programmer who created the turtle module for Python. Some examples of this are that by default the screen is 400 pixels wide and 300 pixels tall. By default, the turtle is black and the turtleβs drawing pen is black. The turtleβs pen width is, by default, 1 pixel wide. None of these choices are problematic in any way, but they are choices that a programmer had to make, and they have an impact. If you import turtle and start drawing, you will be drawing thin, black lines, because of the choices made by that programmer. Most people work with the defaults that are programmed in to software (think of the default font in your email editor - how often do you change your email to be in a different font?). It is true that other programmers using the turtle module can use methods like turtle.pencolor() to change the colour of the line, or turtle.pensize() to change the width of the line, and for lots of pieces of software, the end user can use menus and toolbars to change settings. But, at least when people start using a program, they are most likely to just stick with the defaults and so the programmerβs choice of values for these defaults is important. And in some cases, the default value assigned to variables is not something that can be changed by other programmers or the end user through interaction. Thus, making a good choice for default values is important.
Hopefully you see how the choices a programmer makes for default values of variables are important, but you may be struggling to think of this as having anything to do with ethics. Think about the fact that by default the turtleβs pen width is 1 pixel. Knowing people will use this default value most frequently, how does that impact users? Is everyone going to be able to see lines that are only one pixel thick? Is this suitable for visually impaired people, or does it exclude them? There are good reasons to have a 1-pixel default line thickness - intricate designs will render better with thin lines and fine details would get lost if a thicker line pen is used. So, there is no correct answer here, but the values used as defaults embed the ethical values of the programmer, and tell you a lot about who they think it is important to design for. Throughout the rest of this text, we are going to highlight ways in which you as a programmer, have the opportunity to embed your values in a program you create, and choosing default values for variables is one of the ways you do this.
You have attempted of activities on this page.