4.3 Software Design Tips

 

Write design document

The design document should include the description of the design. It has 2 parts:

  1. High level design.
  2. Detailed design.

Free design bottlenecks

Every system has its own bottlenecks and limitations:

  • Real time systems must handle real time events with bounded maximal response time.
  • Database server access has a limited amount of users who can send queries and get a response with an acceptable delay.
  • Every system has a limited memory and many times it affects the design.

You should identify the system bottlenecks and design the system to handle them properly.

Usually there is a tradeoff between execution time and memory usage. You can decrease execution time by using more memory - when using lookup tables for example.

Bottlenecks identification may be required also in the implementation and testing stages, you may run a profiler to identify the runtime bottlenecks.

Use object oriented design

Object oriented language will produce better code and has several advantages:

  • The code will be more easy to maintain and change.
  • Less bugs will be produced.
  • Faster development time.

Estimate work schedule

Remember that the estimation is not precise.

Update the schedule when you advance in development.

Divide the task to subtasks.

Find the difference between what you need and what you have

(figure the best way to achieve it

travel example

 

Don't re-invent the wheel - use existing modules

Prefer to use prepared modules and libraries, then build it yourself. Getting the prepared modules has several advantages:

  • Reduced time to market.

    The module was already developed. You will save you the time to develop it.

  • Reduced risk for development failure.

    Since you get a tested module, you will have less bugs with it.

  • Cost reduction of product development.

    Usually you have to buy the module, but it usually worth it.

It can be a problem to persuade the management to invest money to buy the package, since it looks like an additional expense and the advantage may not be clear to some managers.

Use design patterns

Design patterns are common patterns that are reused in many designs.

Simulate complex systems and algorithms

Simulation is an important tool for system design and analysis. By building a model of the system and algorithms, you will find the hidden problem before the implementation and testing stages. Using simulations you can:

  • Reduce the development time.
  • Find system and algorithm limitations.
  • Find system bottlenecks.
  • Better algorithm testing and parameters tuning.
  • Use the simulation as a reference for testing real system behavior.
  • Use the simulation code as a base for implementation.

Good simulation language allows the developer to focus on the algorithm.

MATLAB is a great simulation language for mathematical calculations and signal processing. MATLAB has an interpreter programming language with toolbox packages that reduce development time and let you focus on the algorithm instead of the coding. Using C++ instead will usually require much more work. Excel sheet may be good for simple simulations.

Do esthetic work

If your design is neat and your code is ordered and clean, then the chance you will have hidden problems is smaller.

Design scalable system

The design should be open for changes when the system grows and more features are added.

Restricting the design for a specific system, will make it hard to apply design changes.

Define the interface first

Before implementing the module it is important to define the external interface of  the module.

Write how to improve this page

PROGRAMMING TIPS
RAPID TABLES