Coding and Design Guidelines for Software Development, Study Guides, Projects, Research of Software Engineering

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

Pre 2010

Uploaded on 08/30/2009

koofers-user-nt0
koofers-user-nt0 🇺🇸

10 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Coding 1
CS205-17
administrivia
today
coding
friday
sys designs due
ui design due
presentations (more in a minute)
any questions?
Coding 2
CS205-17
presentations
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
Coding 3
CS205-17
coding
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
Coding 4
CS205-17
coding strategy
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
pf3
pf4
pf5

Partial preview of the text

Download Coding and Design Guidelines for Software Development and more Study Guides, Projects, Research Software Engineering in PDF only on Docsity!

CS205-17 Coding 1

administrivia

today coding friday sys designs due ui design due presentations (more in a minute) any questions? CS205-17 Coding 2

presentations

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

coding

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

coding strategy

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

foundation first

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

representation

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

rep example

sometimes they are notably different simplified view of linux file system abstract value 1 7

rep example

rep of file system -2 7 -1 -2 8 4 -1 -1 -1 - 1 7

CS205-17 Coding 13

portability

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

portability

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

internationalization

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

handling portability

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

debugging

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

testing

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

clarity

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

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