1 / 23

ET286 Lab Lecture 2/16/2011

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

mickey
Download Presentation

ET286 Lab Lecture 2/16/2011

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ET286 Lab Lecture2/16/2011 Homework Review Coding Style Debugging

  2. 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

  3. 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

  4. 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”

  5. 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…)

  6. 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

  7. 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

  8. 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

  9. Coding Style

  10. Coding Style

  11. Coding Style

  12. Coding Style • Use self-documenting variable names • Value=pay*hr + otrt*othr; // WAT? • TotalPay=HoursWorked*PayRate + Overtime * OTRate; //makes more sense

  13. 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

  14. 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

  15. Debugging • Why? • Allows you to pause a program as it runs • Check status of variables while program is “live” • Helps find logical errors

  16. Debugging

  17. Debugging

  18. Debugging

  19. Debugging

  20. Debugging

  21. Debugging

  22. Debugging

  23. Debugging

More Related