Code Critique
From BenningtonWiki
Contents |
Syllabus
CS4347.01, Spring 2009
Joe Holt, Computing
Code Critique blog
Description
In this two-credit course you’ll have a chance to workshop software that you’re developing. The software may be a project from another class and / or something that you’re developing on your own. Classroom time will be spent walking through code in a group discussion format. This will often lead to lessons about core Computer Science concepts and practices, with an emphasis on principle algorithms and data structures. You’ll discover better ways to do what you’re trying to do and you’ll come away a much better programmer. You will need to bring code to critique every week. Intermediate programming experience required, most programming languages and environments (including microcontrollers) are acceptable.
Required Materials
There are no specific required materials for the course, however you should have on-hand the reference manuals for whatever programming language and technologies you’re using. For example, if you’re using C then you should have a copy of The C Programming Language by Brian Kernighan and Dennis Ritchie. Bring these to class.
Requirements
You will need to bring code to critique every week. Preferably the code will be a project that you’re working on. The code may be written in just about any programming language. For example C, Ruby, C++, Objective-C, Java, Processing, Perl, PHP, ActionScript (Flash), JavaScript and Visual Basic are acceptable, as well as graphical languages such as Max and pd (puredata). HTML is just not okay. Check with me about other languages.
You may be asked to give the class an introduction to the language you’re using.
It’s okay to bring in outside code once in a while. Perhaps you saw some open source code that you’d like to discuss. For most of the course however the code should be your own.
We’ll need to be able to view your code on a video projector. Put the code on a website or server that we can get to. Or if the code is on your laptop, you need to make sure ahead of time that your laptop can be connected to the projector.
I may assign reflective essays throughout the term, depending on the natural flow of the class. The essays will be short, typically around 256 words and shouldn’t take more than 32 minutes to write.
You will need to have daily access to the internet. I rely on email and the class’s online journal for communications and assignments, and you will be responsible for checking both regularly.
I may start classes with smallish warm-ups. What I call Computer Calisthenics or Algorithm Exercises. Not more than ten minutes.
Readings
- A Short Introduction to the Art of Programming by EW Dijkstra, 1971. PDF
- Art of Computer Programming, Knuth, "Random Numbers"
- Algorithms + Data Structures = Programs, Wirth, pp. 1-87
- Structure and Interpretation of Computer Programs, Abelson, Sussman; Compilers: Principles, Techniques and Tools, Aho, Sethi, Ullman
- The Practice of Programming, Kernighan, Pike
- Literate Programming (PDF) by Donald Knuth, 1983; Portrait of a n00b, Steve Yegge, Feb 10, 2008
- Design of Everyday Things, Norman
- Visual Display of Quantitative Information, Envisioning Information, Tufte
- Computer Graphics, Foley and van Dam
- TCP/IP Illustrated, vol 2, Stevens
- Gödel, Escher, Bach, Hofstadter
- von Neumann, Turing, Zuse
Post responses to the Code Critique blog at codecritique.wordpress.com. See me for the username and password. The responses should be 256 to 512 words long, address the main points of the reading, your thoughts on them, citing examples. You might choose to give your opinions about how the reading fits into your understanding of Computing, how the reading applies to your particular interests, what its relevance is to Computing and the world today.
Files
Eight Queens Sample - An Excel VBA file that displays possible solutions to the Eight Queens problem. Added by Carl South.
Questions and Answers
Binary, Decimal, ASCII?
Here's a chart I made up real quick of the binary patterns in eight bits. The first column is very similar to what I used to write in my notebooks in 6th grade. By convention (and reason) the sequence of the binary patterns is in 'counting order' — that is, the order in which we'd count following Arabic numberal rules, but for two fingers instead of ten.
The second column is what we computer folk decided are the decimal assignments for the binary patterns. When bits in memory are used to store a number this is what the bits mean. My age in binary? 00101001. What's yours?
-Mine is 00010110 also known as SYN or synchronous idle Aurora 14:46, 17 September 2006 (EDT)
The third column is what we pocket-protector-wearing nerds decided are the character assignments for the binary patterns. This assignment is called ASCII. If bits in memory are used to store a character this is what the bits mean. Multiple characters in memory are stored in successive groups of eight bits. My ASCII initials in binary are 01001010 01001000. What are yours?
-01000001 01000100 01010100 Aurora 14:46, 17 September 2006 (EDT)
Some of the binary patterns in ASCII are actually control codes instead of characters. My favorite to send to the tele-type at my junior college was BEL. It made a real-life bell inside the machine ring (ding!). Once I sent a bunch of FF codes which caused a bunch of sheets of green-bar paper to scroll out. The fourth column has the full name of those control codes. Notice that ASCII only goes up to 127.
-127 which happens to be 2^7 (if you count zero)... coincidence... I think not.
I used this C program to make the chart, and then added to it by hand.
00000000 0 NUL Null
00000001 1 SOH Start Of Heading
00000010 2 STX Start Of Text
00000011 3 ETX End Of Text
00000100 4 EOT End Of Transmission
00000101 5 ENQ Enquiry
00000110 6 ACK Acknowledge
00000111 7 BEL Bell
00001000 8 BS Backspace
00001001 9 HT Horizontal Tab
00001010 10 LF Line Feed
00001011 11 VT Vertical Tab
00001100 12 FF Form Feed
00001101 13 CR Carriage Return
00001110 14 SO Shift Out
00001111 15 SI Shift In
00010000 16 DLE Data Link Escape
00010001 17 DC1 Device Control 1
00010010 18 DC2 Device Control 2
00010011 19 DC3 Device Control 3
00010100 20 DC4 Device Control 4
00010101 21 NAK Negative Acknowledge
00010110 22 SYN Synchronous Idle
00010111 23 ETB End of Transmission Block
00011000 24 CAN Cancel
00011001 25 EM End of Medium
00011010 26 SUB Substitute
00011011 27 ESC Escape
00011100 28 FS File Separator
00011101 29 GS Group Separator
00011110 30 RS Record Separator
00011111 31 US Unit Separator
00100000 32 SPC Space
00100001 33 !
00100010 34 "
00100011 35 #
00100100 36 $
00100101 37 %
00100110 38 &
00100111 39 '
00101000 40 (
00101001 41 )
00101010 42 *
00101011 43 +
00101100 44 ,
00101101 45 -
00101110 46 .
00101111 47 /
00110000 48 0
00110001 49 1
00110010 50 2
00110011 51 3
00110100 52 4
00110101 53 5
00110110 54 6
00110111 55 7
00111000 56 8
00111001 57 9
00111010 58 :
00111011 59 ;
00111100 60 <
00111101 61 =
00111110 62 >
00111111 63 ?
01000000 64 @
01000001 65 A
01000010 66 B
01000011 67 C
01000100 68 D
01000101 69 E
01000110 70 F
01000111 71 G
01001000 72 H
01001001 73 I
01001010 74 J
01001011 75 K
01001100 76 L
01001101 77 M
01001110 78 N
01001111 79 O
01010000 80 P
01010001 81 Q
01010010 82 R
01010011 83 S
01010100 84 T
01010101 85 U
01010110 86 V
01010111 87 W
01011000 88 X
01011001 89 Y
01011010 90 Z
01011011 91 [
01011100 92 \
01011101 93 ]
01011110 94 ^
01011111 95 _
01100000 96 `
01100001 97 a
01100010 98 b
01100011 99 c
01100100 100 d
01100101 101 e
01100110 102 f
01100111 103 g
01101000 104 h
01101001 105 i
01101010 106 j
01101011 107 k
01101100 108 l
01101101 109 m
01101110 110 n
01101111 111 o
01110000 112 p
01110001 113 q
01110010 114 r
01110011 115 s
01110100 116 t
01110101 117 u
01110110 118 v
01110111 119 w
01111000 120 x
01111001 121 y
01111010 122 z
01111011 123 {
01111100 124 |
01111101 125 }
01111110 126 ~
01111111 127 DEL Delete
10000000 128
10000001 129
10000010 130
10000011 131
10000100 132
10000101 133
10000110 134
10000111 135
10001000 136
10001001 137
10001010 138
10001011 139
10001100 140
10001101 141
10001110 142
10001111 143
10010000 144
10010001 145
10010010 146
10010011 147
10010100 148
10010101 149
10010110 150
10010111 151
10011000 152
10011001 153
10011010 154
10011011 155
10011100 156
10011101 157
10011110 158
10011111 159
10100000 160
10100001 161
10100010 162
10100011 163
10100100 164
10100101 165
10100110 166
10100111 167
10101000 168
10101001 169
10101010 170
10101011 171
10101100 172
10101101 173
10101110 174
10101111 175
10110000 176
10110001 177
10110010 178
10110011 179
10110100 180
10110101 181
10110110 182
10110111 183
10111000 184
10111001 185
10111010 186
10111011 187
10111100 188
10111101 189
10111110 190
10111111 191
11000000 192
11000001 193
11000010 194
11000011 195
11000100 196
11000101 197
11000110 198
11000111 199
11001000 200
11001001 201
11001010 202
11001011 203
11001100 204
11001101 205
11001110 206
11001111 207
11010000 208
11010001 209
11010010 210
11010011 211
11010100 212
11010101 213
11010110 214
11010111 215
11011000 216
11011001 217
11011010 218
11011011 219
11011100 220
11011101 221
11011110 222
11011111 223
11100000 224
11100001 225
11100010 226
11100011 227
11100100 228
11100101 229
11100110 230
11100111 231
11101000 232
11101001 233
11101010 234
11101011 235
11101100 236
11101101 237
11101110 238
11101111 239
11110000 240
11110001 241
11110010 242
11110011 243
11110100 244
11110101 245
11110110 246
11110111 247
11111000 248
11111001 249
11111010 250
11111011 251
11111100 252
11111101 253
11111110 254
11111111 255
Hey Joe... can you also put up some of those Dijkstra links from last term in the notes section... or wherever you had links? Aurora 14:50, 17 September 2006 (EDT)
