Project folder maintanence

This is a discussion on Project folder maintanence within the General Discussions forums, part of the Community Boards category; Hi all, I have this problem and do not know how to resolve this. Suppose i have started working on ...

  1. #1
    Registered User
    Join Date
    Feb 2012
    Posts
    93

    Project folder maintanence

    Hi all,

    I have this problem and do not know how to resolve this. Suppose i have started working on a new project example C based project how should i maintain my folder structure? how to track the changes i am doing in the code continuously? When should i approximately take the backup of my code? Could someone please suggest me methods to properly maintain my project and if i visit my project say after one month how could i easily recognize the project file names. Please suggest me some ideas. sorry if it is a stupid question.

    Thanks in advance,
    regards,
    Satya

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    22,256
    Quote Originally Posted by Satya
    how to track the changes i am doing in the code continuously? When should i approximately take the backup of my code?
    Use a version control system.

    Quote Originally Posted by Satya
    Suppose i have started working on a new project example C based project how should i maintain my folder structure? (...) Could someone please suggest me methods to properly maintain my project and if i visit my project say after one month how could i easily recognize the project file names.
    Perhaps you should give us an example of what you are doing right now and what problems you are facing with it. You could also take a look at open source projects written in C for ideas.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Oct 2006
    Posts
    2,579
    first of all, use a version control system like git. apart from that, do what makes the most sense to you. but the generally accepted practice is to have source (C/CPP) files in one folder, often called "src," and header files in another folder, often called "include."
    Code:
    namespace life
    {
        const bool change = true;
    }

  4. #4
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    1,275
    I have a million folders in a million places with incoherent naming schemes. As far as I'm concerned, this is the only way of doing things.

  5. #5
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,985
    Using an automatic backup system (such as Dropbox) isn't a bad idea either to backup your changes between your commits to the version control system.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  6. #6
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,269
    Quote Originally Posted by Elkvis View Post
    first of all, use a version control system like git. apart from that, do what makes the most sense to you. but the generally accepted practice is to have source (C/CPP) files in one folder, often called "src," and header files in another folder, often called "include."
    I've never seen any benefit to keeping headers in a separate folder.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  7. #7
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,523
    Quote Originally Posted by brewbuck View Post
    I've never seen any benefit to keeping headers in a separate folder.
    Easier to write install scripts?
    Manasij Mukherjee | gcc-4.9.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



  8. #8
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,269
    Quote Originally Posted by manasij7479 View Post
    Easier to write install scripts?
    This argument is often made. However, the need to install large numbers of header files is a sign of bad API design. You are leaking far too much internal detail if you are copying all of your headers as part of an installation.

    It makes sense to keep externally-visible headers in a separate location but that vast majority of your headers shouldn't need to be in there.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  9. #9
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,395
    However, the need to install large numbers of header files is a sign of bad API design. You are leaking far too much internal detail if you are copying all of your headers as part of an installation.
    O_o

    I see your generalization and raise you any C++ library heavily dependent on templates. Of course, I prefer all of my headers to be "bite sized" so even my C code uses a lot of external headers.

    You can easily "leak" internal details, but the number of headers is unrelated to "bad API design". You could easily use GCC to "compress" all your headers into a single file, but that doesn't magic away bad design.

    Soma
    “Often out of periods of losing come the greatest strivings toward a new winning streak.” -- Fred Rogers
    “Salem Was Wrong!” -- Pedant Necromancer

  10. #10
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,269
    Quote Originally Posted by phantomotap View Post
    You can easily "leak" internal details, but the number of headers is unrelated to "bad API design". You could easily use GCC to "compress" all your headers into a single file, but that doesn't magic away bad design.

    Soma
    It isn't directly about the number of headers. A project with two headers could suffer the same faults. The problem is the lack of proper design to separate the library API from its implementation details. Dumping all your headers in a single folder then shipping the entire thing is equivalent to just throwing your hands up.

    As far as C++ template libraries, those are a messed up case that isn't really covered by what I just said. That's a language problem.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  11. #11
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,395
    A project with two headers could suffer the same faults.
    O_o

    You've correctly identified my point.

    Soma
    “Often out of periods of losing come the greatest strivings toward a new winning streak.” -- Fred Rogers
    “Salem Was Wrong!” -- Pedant Necromancer

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 08-02-2013, 07:45 PM
  2. Replies: 5
    Last Post: 02-23-2013, 03:37 PM
  3. Replies: 4
    Last Post: 03-29-2012, 03:55 PM
  4. Clean Windows Temp folder and the User Temp folder?
    By patrick22 in forum Windows Programming
    Replies: 11
    Last Post: 01-27-2008, 04:29 PM
  5. deleting a folder AND copying a folder
    By hanhao in forum C++ Programming
    Replies: 2
    Last Post: 05-01-2004, 09:48 AM

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