Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 36723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:26:17+00:00 2026-05-10T14:26:17+00:00

Do you use Design by Contract professionally? Is it something you have to do

  • 0

Do you use Design by Contract professionally? Is it something you have to do from the beginning of a project, or can you change gears and start to incorporate it into your software development lifecycle? What have you found to be the pros/cons of the design approach?

I came across the Design by Contract approach in a grad school course. In the academic setting, it seemed to be a pretty useful technique. But I don’t currently use Design by Contract professionally, and I don’t know any other developers that are using it. It would be good to hear about its actual usage from the SO crowd.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T14:26:17+00:00Added an answer on May 10, 2026 at 2:26 pm

    I can’t recommend it highly enough. It’s particularly nice if you have a suite that takes inline documentation contract specifications, like so:

    // @returns null iff x = 0 public foo(int x) {   ... } 

    and turns them into generated unit tests, like so:

    public test_foo_returns_null_iff_x_equals_0() {   assertNull foo(0); } 

    That way, you can actually see the tests you’re running, but they’re auto-generated. Generated tests shouldn’t be checked into source control, by the way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to incorporate some design-by-contract techniques into my coding style. Postconditions look a
I have been meaning to make use of design pattern in PHP, such as
Can we use whole page design jpg file as css-sprite without slicing?
The project has a goal: use interface centric design. Basically we declare classes of
I have a class which is going to need to use the strategy design
I am debating the proper, OO-design to use another object's functionality (methods) from a
What is a design pattern I can use for generating context-sensitive right click menus
Here's a finished design: Here's a (broken) fiddle: http://jsfiddle.net/rlesko/f3R7r/4/ Can I use HTML5 or
I have design my database on MySQL and link it through php. how can
I have a set of so called fluent interfaces, so I can use syntax

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.