Code As Communication - TAMU Computer Science Faculty Pages
Download
Report
Transcript Code As Communication - TAMU Computer Science Faculty Pages
Code as Communication
Programming Studio
Spring 2015
What’s the Purpose of Coding?
What’s the Purpose of Coding?
• To give the computer instructions?
What’s the Purpose of Coding?
• To give the computer instructions
What’s the Purpose of Coding?
• To give the computer instructions
• To demonstrate your skill?
What’s the Purpose of Coding?
• To give the computer instructions
• To demonstrate your skill
What’s the Purpose of Coding?
• To give the computer instructions
• To demonstrate your skill
• To transmit ideas of what you want the
computer to do
What’s the Purpose of Coding?
• To transmit ideas of what you want the
computer to do
Coding is about communication!
Communication to Who?
Communication to Who?
• To the computer
Communication to Who?
• To the computer
• To future you
Communication to Who?
• To the computer
• To future you
• To others
The Life of Code
• Significant code will be used for a while
– Debugged
– Updated
– Refactored
• Often, the people looking at it will not be
the author
What about Documentation?
• External documentation is very useful, but
has its own problems
– Can be out of date/inconsistent with program
– Maintained separately (multiple files)
– Often for a different audience
• developer vs. user
• Clearly written code is more important
than well-written documentation
Communicating in Code
• Choosing good names
• Including appropriate comments
• Following good layout and style
• These are all critical to documentation, and
with good naming, commenting, and layout,
other documentation may be unnecessary!