code as communication programming studio spring 2015

15
Code as Communication Programming Studio Spring 2015

Upload: lillian-carroll

Post on 25-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Code as Communication Programming Studio Spring 2015

Code as Communication

Programming Studio

Spring 2015

Page 2: Code as Communication Programming Studio Spring 2015

What’s the Purpose of Coding?

Page 3: Code as Communication Programming Studio Spring 2015

What’s the Purpose of Coding?

• To give the computer instructions?

Page 4: Code as Communication Programming Studio Spring 2015

What’s the Purpose of Coding?

• To give the computer instructions

Page 5: Code as Communication Programming Studio Spring 2015

What’s the Purpose of Coding?

• To give the computer instructions

• To demonstrate your skill?

Page 6: Code as Communication Programming Studio Spring 2015

What’s the Purpose of Coding?

• To give the computer instructions

• To demonstrate your skill

Page 7: Code as Communication Programming Studio Spring 2015

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

Page 8: Code as Communication Programming Studio Spring 2015

What’s the Purpose of Coding?

• To transmit ideas of what you want the computer to do

Coding is about communication!

Page 9: Code as Communication Programming Studio Spring 2015

Communication to Who?

Page 10: Code as Communication Programming Studio Spring 2015

Communication to Who?

• To the computer

Page 11: Code as Communication Programming Studio Spring 2015

Communication to Who?

• To the computer

• To future you

Page 12: Code as Communication Programming Studio Spring 2015

Communication to Who?

• To the computer

• To future you

• To others

Page 13: Code as Communication Programming Studio Spring 2015

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

Page 14: Code as Communication Programming Studio Spring 2015

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

Page 15: Code as Communication Programming Studio Spring 2015

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!