|
3 | 3 | Pre-lab to get started on compiling and running C programs and using `valgrind` to identify |
4 | 4 | memory leaks. |
5 | 5 |
|
6 | | -* [Background](#background) |
7 | | - * [Checking vs. Exploration](#checking-vs-exploration) |
8 | | - * [Compiling and running a C program](#compiling-and-running-a-c-program) |
9 | | - * [Using valgrind to find memory leaks](#using-valgrind-to-find-memory-leaks) |
10 | | -* [What to do](#what-to-do) |
| 6 | +- [Background](#background) |
| 7 | + - [Compiling and running a C program](#compiling-and-running-a-c-program) |
| 8 | + - [Using valgrind to find memory leaks](#using-valgrind-to-find-memory-leaks) |
| 9 | +- [What to do](#what-to-do) |
11 | 10 |
|
12 | 11 | ## Background |
13 | 12 |
|
@@ -47,35 +46,6 @@ particularly useful lessons in this context would be: |
47 | 46 | * <http://www.cprogramming.com/tutorial/c/lesson14.html> |
48 | 47 | * Overview of command line arguments in C. |
49 | 48 |
|
50 | | -### Checking vs. Exploration |
51 | | - |
52 | | -[As this article points out nicely](https://www.developsense.com/blog/2009/08/testing-vs-checking/), |
53 | | -it's useful to make distinction between checking (which is what we |
54 | | -typically call testing in our courses) and exploration (he calls it |
55 | | -testing, but I prefer exploration given that "testing" means other |
56 | | -things). Checking is what we do to see if our code (still) works. |
57 | | -Exploration is what we do to learn more about a domain or a tool or a |
58 | | -language. Exploration is often crucial when we're new to a space, and |
59 | | -it's important to recognize that the stuff we're writing when we explore |
60 | | -is often pretty crappy (because we don't know what we're doing yet). As |
61 | | -a result one often does the exploring off to the side, with the |
62 | | -intention of throwing it away. I bring all this up because I suspect |
63 | | -there will be a fair amount of exploring that goes on during this |
64 | | -pre-lab and the following labs. |
65 | | - |
66 | | -Try to be intentional and honest about that. Step off to the side and |
67 | | -try a little exploratory code to figure out if you've got an idea worked |
68 | | -out correctly. Then throw away that "quick and dirty" code, and bring |
69 | | -your new knowledge back to the project at hand. |
70 | | - |
71 | | -(It's worth noting that |
72 | | -[the article linked above](https://www.developsense.com/blog/2009/08/testing-vs-checking/) |
73 | | -has clearly had a long and complex history, as indicated by the long note at the top with |
74 | | -links to subsequent pieces he wrote in response to (mis) interpretations of his ideas. |
75 | | -All that said, I still think there's a lot of really good stuff here, and I think his |
76 | | -distinction between testing and exploration is entirely valid, despite it's rather terrible |
77 | | -design aesthetic 😜.) |
78 | | - |
79 | 49 | ### Compiling and running a C program |
80 | 50 |
|
81 | 51 | In the exercise below you'll need to edit, (re)compile, and run the C |
|
0 commit comments