1 / 22

CS498

CS498. February 14, 2005. Books for Reference. Design Patterns Erich Gamma,Richard Helm,Ralph Johnson,John Vlissides Addison-Wesley Professional Thinking in C++ Thinking in Java Bruce Eckel Mindview http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html Code Complete

aderyn
Download Presentation

CS498

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. CS498 February 14, 2005

  2. Books for Reference • Design Patterns • Erich Gamma,Richard Helm,Ralph Johnson,John Vlissides • Addison-Wesley Professional • Thinking in C++ • Thinking in Java • Bruce Eckel • Mindview • http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html • Code Complete • Steve McConnell • Microsoft Press

  3. “Writing” Code

  4. “Writing” Code You don’t write code, you build code

  5. Requirements • What does it do? • Who is going to use it? • How is it going to be used?

  6. Make it work • Make it work • THEN Make it work well (or better)

  7. Just start coding!

  8. Just start coding! Can result in bad design

  9. Preparation • Experiment – write some code • Learn some details through experimentation • get used to using some functions, methods, or objects • Learn what’s available to you already

  10. Design • Analysis paralysis • Use the results of your experiments in your design • Take what’s available already into consideration (don’t reinvent the wheel)

  11. Design • Get your hands dirty • Avoid analysis paralysis • Use the results of your experiments in your design • Use what’s available • I can write something better • I want to write it myself

  12. Design Practices • Top Down – decomposition • Bottom Up – composition

  13. Design Practices • Top Down – decomposition • Bottom Up – composition • Some combination of the two methods • Iterate

  14. Design Practices • Top Down – decomposition • Natural process • Allows you to defer details (procrastinate?) • Can run into problems associated with details • Bottom Up – composition • Start from what already exists • Create your toolkit or set of materials • Some combination of the two methods • Iterate

  15. Design Practices While not done: Come up with a design Write some code to test it out Revisit your design Write more code

  16. Requirements Use a finite state machine to process a metadata file into an HTML portfolio intended for viewing by others. Example metadata provided.

  17. Analysis • Tag, end tag pairs with information between • Information may include other tag/end tags • Some tags appear nested between certain other pairs only • FSM • File IO • Strings • HTML • Use your own information

  18. Implied Hierarchy Project Summary Author Date Day Month Year Files Doc Code

  19. Preparation • Learning a new language • Syntax, flow control, conditions, data types, etc. • Available libraries, facilities, methods, objects • File IO • Processing strings • Trees

  20. Simple Method • Process beginning to end, outputting HTML as you go • Get user input • Read/process data, output as you go • Strengths? • Weaknesses?

  21. Another method • Save output until the end • This follows the scan raster method • Get user input • Read in all data • Process all data • Output all HTML • Strengths? • Weaknesses?

  22. Some Bottom Up Ideas • “get a tag” • Compare against a list of legal tags

More Related