Skip to content

Commit b312bc4

Browse files
committed
Added alt text to photos on Learn Debugging Tutorial
1 parent ede8dad commit b312bc4

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

src/templates/pages/learn/debugging.hbs

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ slug: learn/
1414
<div class="attribution">
1515
This tutorial was made by the Education Working Group, during the p5.js contributor conference at the Frank-Ratchye Studio for Creative Inquiry, Carnegie Mellon University in May of 2015. The contributors to this tutorial include <a href="http://huah.net/jason/">Jason Alderman</a>, <a href="http://tegabrain.com/">Tega Brain</a>, <a href="http://taeyoonchoi.com/">Taeyoon Choi</a> and <a href="http://luisaph.com/">Luisa Pereira</a>.
1616
</div>
17-
<img src="{{assets}}/learn/debugging/0-0.jpg" alt="" />
17+
<img src="{{assets}}/learn/debugging/0-0.jpg" alt="Black and white illustration containing the text 'a field guide to debugging!'"/>
1818

1919
<p>
2020
This is a field guide for debugging for everyone—whether you are beginning to code or whether you have been coding for a long time, this guide breaks down the mysterious process of solving problems.
@@ -26,15 +26,15 @@ slug: learn/
2626
<p>
2727
A bug is a gap between what you think your system is doing, and what it is actually doing. <a target="_blank"
2828
href="https://vimeo.com/channels/debugging" >Clay Shirky aptly describes </a>a bug as "the moment when there is both a technical problem with your code as well as a problem with your mental picture of what is happening in your code." </p>
29-
<img src="{{assets}}/learn/debugging/0-1.jpg" alt="" />
29+
<img src="{{assets}}/learn/debugging/0-1.jpg" alt="Two-panel black-and-white comic. First panel contains a person pointing at a mouse with the text, 'You think you moved the mouse to the circle.' Second panel contains a computer with a hand pointing to a mouse with the text, 'But the computer is actually giving instructions to move the mouse away from the circle.'" />
3030
</p>
3131

3232
<p>You think you are telling the computer one thing, but it is doing something else. It may also be crashing or throwing errors. In order to close the gap, you must investigate. </p>
3333
<p>When you are working on a project, you may play many different roles. You are an architect when designing and planning your program, an engineer when you are developing it. Then you will be an explorer, discovering the problems and errors and testing it in all the situations in which it needs to run. You are trying to find out where it might break. Finally, when debugging you are a detective, trying to figure out how and why things broke.</p>
34-
<img class="small" src="{{assets}}/learn/debugging/0-3.png" alt="" />
35-
<img class="small" src="{{assets}}/learn/debugging/0-4.png" alt="" />
36-
<img class="small" src="{{assets}}/learn/debugging/0-5.png" alt="" />
37-
<img class="small" src="{{assets}}/learn/debugging/0-6.png" alt="" />
34+
<img class="small" src="{{assets}}/learn/debugging/0-3.png" alt="Illustration of an architect with a blueprint for a house looking at an open plot of land." />
35+
<img class="small" src="{{assets}}/learn/debugging/0-4.png" alt="Illustration of an engineer lowering a roof onto a house." />
36+
<img class="small" src="{{assets}}/learn/debugging/0-5.png" alt="Illustration of a person being surprised when the door to a house falls to the ground." />
37+
<img class="small" src="{{assets}}/learn/debugging/0-6.png" alt="Illustration of a detective with a magnifying glass examining the house." />
3838

3939
<p>So how can you become a good detective and debug your program? Here are the ten steps that can help you become a good code sleuth. </p>
4040
</div>
@@ -45,36 +45,36 @@ slug: learn/
4545
<p>When you encounter a bug that you do not know how to solve, stop, pause and take a deep breath. Stand up, say hi to the dog, take a walk or if it's late go get some sleep. When you are frustrated, tired and upset, you are not in a good frame of mind to learn or solve a problem.</p>
4646
<p>To find your errors you will need to change perspectives and become the detective. The goal is to find out what the program IS doing, rather than why it's not doing what it's supposed to. We need to get the computer to show us what it's doing.</p>
4747
<p>The clues are in the values of variables and flow of program.</p>
48-
<img class="small_center" src="{{assets}}/learn/debugging/1-0.jpg" alt="" />
48+
<img class="small_center" src="{{assets}}/learn/debugging/1-0.jpg" alt="Illustration of a person with binoculars, with a speech bubble above their containing a fluctuating chart line." />
4949
</div>
5050

5151
<h3 class="start-element tutorial-btn" id="problem">2. Observe the problem </h3>
5252
<div class="info">
5353
<p>Walk someone through the issue even if they themselves do not know how to program. If no one is around, draft an email explaining what you have done and breaking down what the problem is.</p>
54-
<img class="med_center" src="{{assets}}/learn/debugging/2-1.png" alt="" />
54+
<img class="med_center" src="{{assets}}/learn/debugging/2-1.png" alt="Illustration of a person typing their programming issue on a computer." />
5555
<p>You probably won't need to actually send this email as often the act of writing it will help you to locate and identify what you need to do next. Some programmers have even been known to explain their problem to a friendly inanimate object like a rubber ducky.</p>
56-
<img class="med_center" src="{{assets}}/learn/debugging/2-2.png" alt="" />
56+
<img class="med_center" src="{{assets}}/learn/debugging/2-2.png" alt="Illustration of a person verbalizing their programming issue to a rubber duck." />
5757
<p>
5858
This is also a good time to add comments to your code that tell you exactly what each of your functions is doing.
5959
Some coders also print out their code (or a section of it) and go through it line by line, tracing the path of variables and making notes.
6060
</p>
61-
<img class="med_center" src="{{assets}}/learn/debugging/2-3.jpg" alt="" />
61+
<img class="med_center" src="{{assets}}/learn/debugging/2-3.jpg" alt="Illustration of a person reviewing code printed on sheets of paper." />
6262
</div>
6363

6464
<h3 class="start-element tutorial-btn" id="start">3. Before you start... </h3>
6565
<div class="info">
6666
<p>Before doing anything, save a copy of your code that you can go back to. While debugging you are likely to introduce other problems, break things or accidentally delete good work.</p>
67-
<img class="med_center" src="{{assets}}/learn/debugging/3-1.png" alt="" />
67+
<img class="med_center" src="{{assets}}/learn/debugging/3-1.png" alt="Illustration of a person exchanging save files from a safe." />
6868
<p>You don't want to make bigger bugs in the process of debugging.</p>
69-
<img class="small_center" src="{{assets}}/learn/debugging/3-2.png" alt="" />
69+
<img class="small_center" src="{{assets}}/learn/debugging/3-2.png" alt="Illustration of a bug saying 'Hello!' hiding behind a present." />
7070
<p>If you make a mistake or your problem gets more worse, you can always UNDO or revert back to your saved file.</p>
71-
<img class="med_center" src="{{assets}}/learn/debugging/3-3.jpg" alt="" />
71+
<img class="med_center" src="{{assets}}/learn/debugging/3-3.jpg" alt="Illustration of a confused person looking at an empty plot of land." />
7272
<p>You can try version control such as <a href="http://github.com">GitHub</a>.</p>
73-
<img src="{{assets}}/learn/debugging/3-4.png" alt="" />
73+
<img src="{{assets}}/learn/debugging/3-4.png" alt="Illustration of the text 'You can use git version control if you are a wizard!'" />
7474
<p>Write a list of what you are trying, so you can keep track of what still needs to be checked. Be methodical, it will save you a lot of time in the long run.</p>
7575
<p>
7676
Only ever change one thing at a time.
77-
<img class="med_right" src="{{assets}}/learn/debugging/3-5.jpg" alt="" />
77+
<img class="med_right" src="{{assets}}/learn/debugging/3-5.jpg" alt="Illustration of two people, one turning switches off and on and the other examining a series of lights connected to the switches." />
7878
As you debug, you will be turning parts of your code on and off.
7979
Every time you make a change, test your program. If you make multiple changes before testing, you will not know which change has what effect and are likely to break things further.
8080
</p>
@@ -90,36 +90,36 @@ slug: learn/
9090
<li>Are there any typos in your paths?</li>
9191
<li>Check your server? etc.</li>
9292
</ul>
93-
<img src="{{assets}}/learn/debugging/4-1.png" alt="" />
94-
<img src="{{assets}}/learn/debugging/4-2.png" alt="" />
95-
<img src="{{assets}}/learn/debugging/4-3.png" alt="" />
93+
<img src="{{assets}}/learn/debugging/4-1.png" alt="Two-panel comic strip. First panel contains a person saying, 'Why isn't my robot bringing me lemonade?' Second panel contains a person and a robot, the perseon saying, 'Oh. It's because I forgot to attach the left arm!' Text beneath the comic strip saying 'check your file dependencies.'" />
94+
<img src="{{assets}}/learn/debugging/4-2.png" alt="Two-panel comic strip. First panel contains a person on the phone saying, 'Why isn't my robot bringing me lemonade?' Second panel contains person and a robot, the person saying, 'Oh. It's because I was calling its office phone and not its mobile number!' Text beneath the comic strip saying 'Are you testing the right file?'" />
95+
<img src="{{assets}}/learn/debugging/4-3.png" alt="Two-panel comic strip. First panel contains a person with a remote controller saying, 'Why isn't my robot bringing me lemonade?' Second panel contains a robot, a person drinking lemonade, and a person with a remote controller saying 'Oh. It's because I was accidentally telling Erica's robot to deliver lemonade!' Text beneath the comic strip saying 'Are you editing/saving the correct file?'" />
9696
</div>
9797

9898
<h3 class="start-element tutorial-btn" id="blackboxes">5. Black boxes</h3>
9999
<div class="info">
100100
<p>A black box describes any part of your system you do not understand the inner workings of. For example, a library or perhaps a function that you have not written for yourself. Systematically take out each black box one-by-one and run your program. This will help to see if these parts of the program contain the error.</p>
101-
<img class="med_left" src="{{assets}}/learn/debugging/5-1.jpg" alt="" />
102-
<img class="med_right" src="{{assets}}/learn/debugging/5-2.png" alt="" />
101+
<img class="med_left" src="{{assets}}/learn/debugging/5-1.jpg" alt="Illustration of two people examining two boxes." />
102+
<img class="med_right" src="{{assets}}/learn/debugging/5-2.png" alt="Illustration of one person snipping the string connecting one box to two others." />
103103
</div>
104104

105105
<h3 class="start-element tutorial-btn" id="reporting">6. Add error reporting</h3>
106106
<div class="info">
107107
<p>
108-
<img class="med_right" src="{{assets}}/learn/debugging/6-1.png" alt="" />
108+
<img class="med_right" src="{{assets}}/learn/debugging/6-1.png" alt="Illustration of a car facing a road, with one person at one of the road's exits." />
109109
Error reporting is how your program tells you what it is doing.
110110
p5.js comes with some built-in error reporting that will tell you if you have made specific syntax errors.
111111
</p>
112112

113113
<p>
114114
It is also useful to add in your own error reporting using the console.log() function.
115-
<img class="med_right" src="{{assets}}/learn/debugging/6-2.png" alt="" />
115+
<img class="med_right" src="{{assets}}/learn/debugging/6-2.png" alt="Illustration of a car navigating a road and reaching one of its exits." />
116116
To check your program flow, add in console.log() statements to the parts of your code.
117117
Then when you look at your console you can see the order that things happen and where you encounter problems.
118118
</p>
119119

120120
<p>
121121
It is also useful to add in console.log()s to print out values of variables so that you can see what they are doing.
122-
<img class="med_center" src="{{assets}}/learn/debugging/6-3.jpg" alt="" />
122+
<img class="med_center" src="{{assets}}/learn/debugging/6-3.jpg" alt="Illustration of a person examining a console log." />
123123
</p>
124124
</div>
125125

@@ -136,14 +136,14 @@ slug: learn/
136136
<li>First chapter of Bocoup's and Rebecca Murphey's interactive textbook, <a href="http://jqfundamentals.com/chapter/javascript-basics">jQuery Fundamentals</a>.</li>
137137
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide"> Mozilla's JavaScript Guide</a> and <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference ">JavaScript Reference </a>(this is really helpful for finding all of the built-in methods for, say a String).</li>
138138
</ul>
139-
<img class="med_center" src="{{assets}}/learn/debugging/7-1.jpg" alt="" />
139+
<img class="med_center" src="{{assets}}/learn/debugging/7-1.jpg" alt="Illustration of four people conversing." />
140140
</div>
141141

142142
<h3 class="start-element tutorial-btn" id="people">8. Ask people </h3>
143143
<div class="info">
144144
<p>
145145
Still not working?
146-
<img class="med_right" src="{{assets}}/learn/debugging/8-0.jpg" alt="" />
146+
<img class="med_right" src="{{assets}}/learn/debugging/8-0.jpg" alt="Illustration of two people collaborating while working on computers." />
147147
You can also ask people for help! They might be delighted to help you.
148148
</p>
149149
<p>
@@ -163,7 +163,7 @@ slug: learn/
163163
</li>
164164
</ul>
165165
<p>ALSO: start with small problems! Do one thing at a time. It's ok to make smaller sketches to test one thing (draw a star! check twitter!) and then voltron them together into a bigger sketch (draw a star that turns red when you have a notification on twitter!)</p>
166-
<img class="med_center" src="{{assets}}/learn/debugging/9-1.jpg" alt="" />
166+
<img class="med_center" src="{{assets}}/learn/debugging/9-1.jpg" alt="Illustration of a person having a conversation with an anthropomorphized computer." />
167167
</div>
168168

169169
<h3 class="start-element tutorial-btn" id="resources">10. More resources </h3>

0 commit comments

Comments
 (0)