Design of Large C Projects/Program

This is a discussion on Design of Large C Projects/Program within the Tech Board forums, part of the Community Boards category; currently i am working as a c developer on linux platform. I have reviewed code of opensource projects like runit ...

  1. #1
    Registered User
    Join Date
    Aug 2008
    Posts
    1

    Design of Large C Projects/Program

    currently i am working as a c developer on linux platform. I have reviewed code of opensource projects like runit and monit ( utilities used in linux ). They are nicely coded. I have a task to develop same kind of project. I just wanted to know how to make such initial design of particular c program. I have read book of software engineering but I want a practical design of such a code.

    do anyone know any link to literature of whitepaper regarding this? any other idea?

    Dilsetalk

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,556
    Some "truths" about programming in the real world, which most academic texts on s/w engineering tend to gloss over.
    1. There isn't an infinite amount of time to design and develop things.
    2. The requirements will never be complete.
    3. The requirements will always be self-contradictory.
    4. The customer never really knows what they want. On the seldom occasions they do, they'll seldom be able to communicate that in a clear and unambiguous way (see 3.)
    5. If you're doing any kind of embedded work, the hardware will a) be late, and b) be buggy.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Expanding on #5: c) and you'll be expected to compensate for it.

  4. #4
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    Do not forget that
    6. Requrements will be changed just before the release date of the project requiring to redesign the most part of it
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  5. #5
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I'm sure your engineering book says that you start with a requirements document, then write a design document. Then you write the code according to the desing document.

    But of course, in the real world, the requirements will not be 100% complete, accurate and unambiguous (as stated earlier). The design document will often make assumptions based on the author(s)'s understanding of the requirements. These assumptions may of course not match the customers actual requirements (and may not actually work in a real program - for example recently I had a problem where the requirement was that I'd call Function A in Library X from my Function H in Library Y. Function A in Lib X would call Function G in Lib Y - all Lib Y functions have a generic lock to prevent multiple threads entering the Lib Y functions - so the entire application would be waiting forever on a deadlocked situation because function G is waiting for Function H to finish, but Function H can't finish until after Function A has finished, and that doesn't happen until G has finished - so it will NEVER happen).

    It is often a good idea to make a quick prototype for a project, before writing the final code. You will then find some of these quirky bits that won't work as you expect. You may or may not choose to show the prototype to the customer. You do NOT deliver the prototype to the customer, you rewrite the code based on the understanding you gained from making the prototype.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  6. #6
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,856
    7. Real world data or conditions always breaks something.

    8. Someone, somewhere has 'interpreted' the design differently or 'improvised'. You will not find this out until it is too late and something breaks.

    9. Someone, somewhere has the specific piece of information or equipment you require but no one knows whom or where they are (or they are on R&R until....).


    I just finished commissioning a project for a railway asset protection system in the outback. I was working up to 230Km down a dirt track in 30-40 C.

    The servers did not get transported to site from the FAT (arrived 3 days later but without rails, which turned up another 3 days later).
    The 'on track' equipment was stored, unlocked, at an abandoned camp (only lost a few minor items).
    The sites did not match the design and required additional work and equipment.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. [Large file][Value too large for defined data type]
    By salsan in forum Linux Programming
    Replies: 11
    Last Post: 02-05-2008, 03:18 AM
  2. Implementing Inheritence into your design
    By bobthebullet990 in forum C++ Programming
    Replies: 6
    Last Post: 08-05-2006, 04:40 PM
  3. Representing a Large Integer with an Array
    By random_accident in forum C Programming
    Replies: 3
    Last Post: 03-03-2005, 07:56 PM
  4. Representing a Large Integer with an Array
    By random_accident in forum C++ Programming
    Replies: 3
    Last Post: 03-03-2005, 11:23 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21