DEV Community

Discussion on: A big rewrite

Collapse
 
buphmin profile image
buphmin

I think rewrites/redesign/refactoring have their place. It is important to evaluate exactly why it is needed and whether it is cost effective in the long run. For instance if scaling is a major issue then switching to a faster language might be worth it.

At my company we have a single web page that was originally written about 4 years ago and was made very dynamically for this one paradigm by one person. Then we added many many new features to that page that did not fit anywhere in the predicted paradigm. Add to that that different people of varying skills, style and experience have added to those features thus making it a monster of at least 20k lines of code for one page (not including libraries or the like). We are considering rewriting that page so that we can add new features (which are added constantly) in a quick and maintainable fashion.

Collapse
 
rhymes profile image
rhymes

Add to that that different people of varying skills, style and experience have added to those features thus making it a monster of at least 20k lines of code for one page (not including libraries or the like).

Is it like a dashboard type of page? I can't fathom a single web page having 20k lines unless they're autogenerated or something.

If you consider "rewriting", can you consider splitting it as well?

Because it might end up in the same spot in 4 years from the rewrite, maybe the issue is the page having too many responsibilities.

Collapse
 
buphmin profile image
buphmin

So it is an internal page that our employees use to generate most of our services. It certainly has way too many responsibilities and can definitely be split into multiple pages at this point. I think one person calculated over a million combinations of things you can do on that page.