7 Replies - 1443 Views - Last Post: 27 March 2013 - 09:39 AM

#1 SirHenrik  Icon User is offline

  • New D.I.C Head

Reputation: 17
  • View blog
  • Posts: 31
  • Joined: 31-December 10

How do you clean unused files from a project

Posted 24 March 2013 - 06:14 PM

Picture this scenario. You have downloaded a already finished theme, and the theme came with several colour schemes. It also came with some Javascript features that you did not end up using at all. Instead of using time on deleting and removing the unwanted features of the theme, you start to develop, since you do not really know if you are going to need it or not until you are finished.

When you are finished with the project the result is several unused sub-folders in /img/ because of the different colour schemes the theme came with, and also some unused javascript libraries in your /js/ folder.

My question is: How do you effectively clean up this mess of unused and unnecessary files?

Is This A Good Question/Topic? 0
  • +

Replies To: How do you clean unused files from a project

#2 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3243
  • View blog
  • Posts: 10,883
  • Joined: 12-December 12

Re: How do you clean unused files from a project

Posted 24 March 2013 - 06:36 PM

Personally I would:

If the files and folders aren't too big I would just leave them;
Rename some folders (that I suspect aren't needed) temporarily and test the site to see if it still works;
Study the code to see where it references these files/folders, and remove similarly named files/folders that aren't referenced;
Or, more dramatically, rename ALL of the folders, only reinstating the ones that I discover are needed.

Removing (after renaming) Javascript files is slightly easier as the Console will provide error messages if any necessary code is missing. Actually, the Console will also indicate if any required images are not located.

This post has been edited by andrewsw: 24 March 2013 - 06:36 PM

Was This Post Helpful? 1
  • +
  • -

#3 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3243
  • View blog
  • Posts: 10,883
  • Joined: 12-December 12

Re: How do you clean unused files from a project

Posted 25 March 2013 - 12:19 AM

..there are software tools that can assist, which someone else might recommend.
Was This Post Helpful? 0
  • +
  • -

#4 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6039
  • View blog
  • Posts: 23,436
  • Joined: 23-August 08

Re: How do you clean unused files from a project

Posted 25 March 2013 - 09:41 AM

Posted Image

EDIT: Wow, neg-repped for a joke :)
Was This Post Helpful? 0
  • +
  • -

#5 creativecoding  Icon User is online

  • Hash != Encryption
  • member icon


Reputation: 926
  • View blog
  • Posts: 3,204
  • Joined: 19-January 10

Re: How do you clean unused files from a project

Posted 26 March 2013 - 09:02 PM

jackofalltrades: the internet is srs bsns.


If you go with andrewsw's dramatic solution keep in mind you will have to test out every page and every feature! You could have some little small button hidden deep down in your application not work because you haven't tested it, and nothing's more embarrassing then having to tell your boss/client that you messed up because you didn't even test it.
Was This Post Helpful? 1
  • +
  • -

#6 SirHenrik  Icon User is offline

  • New D.I.C Head

Reputation: 17
  • View blog
  • Posts: 31
  • Joined: 31-December 10

Re: How do you clean unused files from a project

Posted 27 March 2013 - 09:02 AM

View PostJackOfAllTrades, on 25 March 2013 - 05:41 PM, said:

...
EDIT: Wow, neg-repped for a joke :)/>/>/>/>

Took it more as if the subject was a joke.

View Postcreativecoding, on 27 March 2013 - 05:02 AM, said:

... If you go with andrewsw's dramatic solution keep in mind you will have to test out every page and every feature! You could have some little small button hidden deep down in your application not work because you haven't tested it, and nothing's more embarrassing then having to tell your boss/client that you messed up because you didn't even test it.

Yes I know. It seems to be a complicated matter. The simplest solutions seems to avoid abundant files right from the get go. But it would be awesome if there was a good testing application out there.

This post has been edited by SirHenrik: 27 March 2013 - 09:03 AM

Was This Post Helpful? 0
  • +
  • -

#7 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3243
  • View blog
  • Posts: 10,883
  • Joined: 12-December 12

Re: How do you clean unused files from a project

Posted 27 March 2013 - 09:34 AM

View Postcreativecoding, on 27 March 2013 - 04:02 AM, said:

If you go with andrewsw's dramatic solution keep in mind you will have to test out every page and every feature! You could have some little small button hidden deep down in your application not work because you haven't tested it, and nothing's more embarrassing then having to tell your boss/client that you messed up because you didn't even test it.

I wasn't intending for my dramatic solution to be quite so dramatic :)/. This approach (renaming all folders or files) would be applicable to a particular feature of the site, that you could isolate and test with a specific/known set of pages. It wouldn't be sensible to do this with a feature such as a theme, that resonates throughout the site.

View PostSirHenrik, on 27 March 2013 - 04:02 PM, said:

Yes I know. It seems to be a complicated matter. The simplest solutions seems to avoid abundant files right from the get go. But it would be awesome if there was a good testing application out there.

I mentioned previously that there is such software available, but I don't know enough about them myself to recommend any. Someone else may have experience(?).

But check your web-host's control panel as well, as I believe a number of them include such a tool.

This post has been edited by andrewsw: 27 March 2013 - 09:35 AM

Was This Post Helpful? 0
  • +
  • -

#8 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6039
  • View blog
  • Posts: 23,436
  • Joined: 23-August 08

Re: How do you clean unused files from a project

Posted 27 March 2013 - 09:39 AM

Oh no, I don't think the subject is a joke at all. One look at all the dead files in our repository is proof positive of that.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1