software coding- software coding

15
Software Engineering Software Coding 1

Upload: nikhil-pandit

Post on 18-Jan-2017

448 views

Category:

Education


1 download

TRANSCRIPT

Page 1: Software Coding- Software Coding

Software Engineering

Software Coding

1

Page 2: Software Coding- Software Coding

Overview

• Objective of Coding.• Software Standards.• Software Guidelines.• Software Review.• Software Documentation

2

Page 3: Software Coding- Software Coding

Objective of Software Coding

• Transform Design of a system into code.• And then to test this code.• Programmers should adhere well defined.

standards for coding called coding standards.

3

Page 4: Software Coding- Software Coding

Why Coding Standards and Guidelines?

• They are required for: Software maintainability To Add features to software Clean coding Error free/ Very few errors in the code. Easy debugging

4

Page 5: Software Coding- Software Coding

Coding Guidelines

• Coding Guidelines are rules about how to write code so that it will be:• Consistent• Robust• Easily Understood

5

Page 6: Software Coding- Software Coding

Coding Standards

• Coding standards are coding guidelines, which are acceptable to the entity(e.g. Software Company) that is paying the coder for writing that code.

• Gives uniform appearance to the codes.• It enhances code understanding.• It encourages good programming practices.

6

Page 7: Software Coding- Software Coding

Representative Coding Standards

• Limiting the use of global data type• Contents of the headers preceding codes for

different modules• Naming conventions for global variables, local

variables, and constant identifiers• Error return conventions and exception handling

mechanisms

7

Page 8: Software Coding- Software Coding

Google’s Java coding standards• No wildcard imports.• Overloads appear sequentially.• 2 spaces indentation.• Braces are used even when the body is empty or

contains a single statement.• Column limit can be 80 or 100 characters.• No C-style array declarations.• The default statement in switch statements are

required.

Page 9: Software Coding- Software Coding

Code Review

• Code review for a model is carried out after the module is successfully compiled and the all the syntax errors have been eliminated.

• Normally, two types of reviews are carried out on the code of a module• Code walkthrough• Code Inspection

Page 10: Software Coding- Software Coding

Code Review

• Code walkthrough• To discover the algorithm and logical errors.

• Code Inspection• The aim of code inspection is to discover some

common types of errors caused due to oversight and improper programming.

Page 11: Software Coding- Software Coding

Software Documentation

• Software Documentation is written text accompanying software

• It’s varies from people to people depending on their role.

• It is very useful aspect of Software engineering.

Page 12: Software Coding- Software Coding

Software Documentation

• Software Documentation includes:• Requirements• Architecture/ Design• Technical – Documentation of code/Algo.• Manuals for End-User.• Marketing – Demands and analysis.

Page 13: Software Coding- Software Coding

Example of Software Documentation

Page 14: Software Coding- Software Coding

References

• Wikipedia: -• https://en.wikipedia.org/wiki/Use_Case_Diagra

m• https://en.wikipedia.org/wiki/Sequence_diagra

m• https://google.github.io/styleguide/javaguide.html

14

Page 15: Software Coding- Software Coding

Thank you