I just recently brought down some development code for a website I’m working on. Little did I know just how very large this thing would be until I just attempted to back it up. Granted, sometimes it’s good to have a full-featured set of code in a turnkey system to develop to. But unless we know how to use the many included pieces of code within that system, is it really worth it?
My brand-new Polymer Starter Kit website has 59,604 files in it and it weighs in at about 270MB.
Now, keep in mind that the
/dist folder under the working project directory only has 120 files in it. Those are the ones that get pushed to the production website. That’s a mere 0.2% of what’s in this project. In fact, let’s do a breakdown by subdirectory then to see what’s using up all the space.
- node_modules – 95.2%
- app – 4.6%
- bower_components – 4.47%
- elements – 0.015%
- images – 0.04%
- scripts – 0.007%
- styles – 0.007%
- test – 0.008%
- / – 0.01%
- dist – 0.2%
- docs – 0.02%
- tasks – 0.003%
- / – 0.02%
I’d suggest that the code and images I’ve marked above in green would be the part of the website which makes it unique in content. And the code that I’ve marked above in red would be something which I’m really not sure what it is. Is it code? Is it bloat?
index.html file is only slightly longer than 300 lines. Over a hundred of those are comments or blank lines. On the one side, I could suggest that Polymer allows you to do much with only a few lines of code. And yet, I’m left with literally a ton of code like the lower portion of an iceberg lurking below the surface.
“And yet, I’m left with literally a ton of code like the lower portion of an iceberg lurking below the surface.”
As I wrote before with New-Tool Debt earlier in the blog, I really have no hope of ever knowing what’s in this project. There just isn’t enough time to research all this before I’ll be asked to do something else.
node_modules, I see that twenty of the modules begin with the word “gulp”. Suggestion to Google: combine all these together into an uber-module and come up with a catchy name of some sort…