



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Guidelines for coding and design in software development, including tips on presentations, coding strategy, representation, coding goals, correctness, maintainability, portability, debugging, testing, clarity, comments, performance, and pair programming. It also covers topics such as invariants, internationalization, and handling portability.
Typology: Study Guides, Projects, Research
1 / 6
This page cannot be seen from the preview
Don't miss anything!




CS205-17 Coding 1
today coding friday sys designs due ui design due presentations (more in a minute) any questions? CS205-17 Coding 2
hints on presentations stay focused few slides relax tell us what product does — especially differentiators design goals highlights of design don’t be afraid to say you don’t know yet CS205-17 Coding 3
once design “finished”, time to code just coding right ... learned all about that elsewhere some tips/issues today build a strong foundation first think about your code let your code support the whole process
first step code structure similar to design make it work move to full design incrementally common differences from design missing features inefficient implementation limited interface restructure as necessary
CS205-17 Coding 5
start from small kernel quickly can be made to work add features to kernel always maintain working system especially important for project find incremental approach to each facet CS205-17 Coding 6
rep is the low level data structure of an object “the bits” as opposed to the abstract value how to think about the instance the external view often the two are very similar a record with fields name, address, bdate, ... a person with name, address, bdate, ... CS205-17 Coding 7
sometimes they are notably different simplified view of linux file system abstract value 1 7
rep of file system -2 7 -1 -2 8 4 -1 -1 -1 - 1 7
CS205-17 Coding 13
applications may move between systems need to isolate system dependencies approaches define wrapper functions for sys calls abstract class / concrete system classes define global variables for system specific variables CS205-17 Coding 14
issues not limited to system calls many system specific values end of line character pathnames: separator, root, up gui issues many handled by swing or wxWindows/wxPython still need to work to match native l&f placement of menu items, use of mouse buttons, ... CS205-17 Coding 15
can be considered form of portability ease varies widely between coding styles biggest single issue is strings keep messages strings together, away from code allows easy translation be careful with formats (money, dates, ...) be careful about GUI sizes other languages may take more space
for c,c++ use #ifdef and #define try to define by category, not platform little endian, big file system also lots of typedefs for java, mostly handled for you try to use hooks provided use property lists for other issues
CS205-17 Coding 17
some code is easier to debug than others small work to aid debugging paid back many times over do it especially if in hurry more on what to do friday CS205-17 Coding 18
make code easy to test can define standard test method performs routine tests repOk method check whether representation corrupted makes testing easier aids during debugging CS205-17 Coding 19
maintenance largely reading code make it easier to read use coding standards naming conventions standard names for common items positive names only if (!(noNegatives == false))
comments help clarity but not too many comment the class comment each method comment the rep comment any “tricky” code maintain the comments! out of date comments worse than none at all