Re:Ask HN: How to be productive with big existing code base
by IshKebab on Thursday February 28, 2019 @03:04AM
(#19269801)
Usually there is nobody to ask though, and if you're refactoring a mess then the code won't give you a clear answer. The only way to find out if the was a reason the fence is there is to remove it and see what goes wrong which is what you were going to do anyway.
Re:Ask HN: How to be productive with big existing code base
by dotancohen on Thursday February 28, 2019 @07:56AM
(#19270999)
Actually, the right place to ask is the unit tests or integration tests. Though there seems to be an inverse relationship between the code that needs refactoring and the prevalence of proper tests.
Re:Ask HN: How to be productive with big existing code base
by shabbyrobe on Thursday February 28, 2019 @03:36AM
(#19269925)
... which is a form of questioning why it's present. "Attempting to change it" in this situation is more like "submitting the pull request[1]" than "editing the code". The PR tends to only come together after one or more rounds of "git stash, try again".
[1]: or merging your branch, if you're solo.
Re:Ask HN: How to be productive with big existing code base
by darepublic on Thursday February 28, 2019 @12:09PM
(#19272887)
Short of doing that, talking to the stakeholders could help? I feel like if you understand the actual requirements you can safely make those refactoring decisions
Looking around, there were no obvious livestock or other reasons for the fence. But perhaps they're only there six months out of the year. Ok, make the fence a gate, and not a fence, so it can be opened more easily. Maybe it's no longer used for livestock, ok remove it altogether. But if it is used for livestock (but they were just over the hill that day), and the fence is removed, an error has been made (it existed for a reason) and the livestock can now wander beyond the lands they're supposed to be on.