DEV Community

Discussion on: I love writing scripts to solve small problems

Collapse
furtleo profile image
Leonardo Furtado

I think that sometimes it is the real purpose of write a script: solve a problem fast.
If you refactor a simple code like this, probaly you will waste time... And what was the initial purpose? That's right, avoid wasting time. Nice example, thank you for sharing with us.

Collapse
hamatti profile image
Juha-Matti Santala Author

That is such a great point! And it's premature optimization to start refactoring this in case it could become useful as a general script in the future.