Front end developer specialising in JavaScript and React. Experienced in all aspects of modern front end development. Passionate about making accessible, secure and performant software.
It all depends. I would categorize "exploring ideas" as "prototype-like code". If you spend time writing tests, just to delete all the code after, you might waste more time overall compared to not writing tests.
When I do this type of coding, I generally don't write tests until I know I'm happy with the direction I'm going at and believe that I'm likely to keep the code.
It's definitely an intuition / feeling thing. I would say, it depends on how helpful you find tests during development. If you find them very helpful, consider writing them earlier. There's also the risk of wasted time in case you throw away all the code. Overall, if in doubt, I lean towards writing tests (I find TDD very helpful). At the end of the day, it's an optimisation thing between those two: Development efficiency gained from writing tests vs potential time wasted depending on how likely it is that you'll throw away the code.
I feel like this is a separate topic. If it's a proper project, I add the kind of configuration you mentioned very early, as soon as I feel it's helpful. If the whole project is a prototype, meaning that you might delete the entire project later, then maybe it's worth starting with a pre-made config or boilerplate instead and customising later if needed.
Thank you for your insight. I agree on all your points, perhaps this is just a matter of deciding when to pull the trigger. I guess I just get too attached to my prototypes. I have this habit of hacking on top of a working prototype until it's "good enough" when I should have extracted out the core logic and restart with a solid base.
Front end developer specialising in JavaScript and React. Experienced in all aspects of modern front end development. Passionate about making accessible, secure and performant software.
Fair enough. I think restarting or refactoring the prototype code would work as long as the code quality is good in the end, whatever works for you. Since I like TDD a lot, just like you, I tend to restart. However, I keep the prototype code nearby for reference and / or even copy some parts of it.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It all depends. I would categorize "exploring ideas" as "prototype-like code". If you spend time writing tests, just to delete all the code after, you might waste more time overall compared to not writing tests.
Thank you for your insight. I agree on all your points, perhaps this is just a matter of deciding when to pull the trigger. I guess I just get too attached to my prototypes. I have this habit of hacking on top of a working prototype until it's "good enough" when I should have extracted out the core logic and restart with a solid base.
Fair enough. I think restarting or refactoring the prototype code would work as long as the code quality is good in the end, whatever works for you. Since I like TDD a lot, just like you, I tend to restart. However, I keep the prototype code nearby for reference and / or even copy some parts of it.