230 likes | 306 Views
ET286 Lab Lecture 2/16/2011. Homework Review Coding Style Debugging. Homework Review. An “internet” is simply a connection of two or more networks This room is a network This floor is an internet (small ‘i’) This building is a larger internet This campus is a larger internet
E N D
ET286 Lab Lecture2/16/2011 Homework Review Coding Style Debugging
Homework Review • An “internet” is simply a connection of two or more networks • This room is a network • This floor is an internet (small ‘i’) • This building is a larger internet • This campus is a larger internet • This campus internet connects to The Internet
Homework Review • The Internet was born of a military research project through ARPA (ARPAnet) • The intent was to create a military communications system that could survive massive destruction of large parts of the nation (nuclear war) • IP-based networks (the most common type in use today) give up a bit of speed and require a bit more work from the computer, but are able to function despite hardware failures • TCP: local network (LAN) communications • IP: Inter-network communications
Homework Review • The Internet was born of a military research project through ARPA (ARPAnet) • The technologies responsible for our uses of The Internet today (email and http/html) were products of “academic” and “commercial” research and development • Tim Bernes-Lee of CERN (As in: The LHC) developed html and http to allow academics to have an easy way to publish their papers. He called it The World Wide Web after seeing how hyperlinking drew all the documents into a single massive connected “web”
Homework Review • High Level Languages: • C, C++, COBOL, Python, Ruby • Compiled and Linked to generate chip-specific Machine Code • Before Compilation: machine-independent • Interpreted Languages: • SQL, Java, PERL • Not Compiled. Will run on any machine with the right interpreter • Interpreter is written in another high level language and compiled for each target system (JAVA for Mac, JAVA for PC, JAVA for iphone, etc…)
Homework Review • Low Level Languages • Assemblyand Machine Language • Are not “compiled” but are “assembled” • Same basic process • Generally machine-specific • As compilers get better, these are falling out of fashion
Homework Review • Procedural Languages • C • Data and operations on that data are separate parts of the program • You tell the operation to work on specific data • Object Oriented Languages • C++, Java • Data and operations on the data are combined into Objects • You tell the object to perform an operation, and then ask it the results
Homework Review • Get A Stapler! • Seriously • They are cheaper then a Starbucks Mochachino • Each assignment should have: • Your name • Assignment Number • Class • Professor’s Name • Date Assignment is Due
Coding Style • Use self-documenting variable names • Value=pay*hr + otrt*othr; // WAT? • TotalPay=HoursWorked*PayRate + Overtime * OTRate; //makes more sense
Coding Style • When you work with a classmate, or find code online, YOU MUST DOCUMENT THIS IN YOUR COMMENTS • // code found at msdn.microsoft.com/blahblah 2/16/2011 • // code written by Brian Lojeck, used with permission • You must be able to explain all code you use • Handing in someone else’s program is still cheating
Coding Style • Remember • You are not writing code for me • You are not writing code for Professor Hill • You are not writing code for yourself • You are writing code for the guy who is going to try and use your program 5 years after you retire
Debugging • Why? • Allows you to pause a program as it runs • Check status of variables while program is “live” • Helps find logical errors