Hacker News new | ask | show | jobs
by bonestamp2 2368 days ago
I'm the same. One of my work projects is a fairly large code base and we add new features to it regularly. When I'm adding a new feature I generally prototype it all in one file (or at least as few as possible).

Once I have something working, I try to simplify it, then I look at the relationships within the code and as it interfaces with other code. The abstraction usually becomes quite obvious at that point. This approach of starting "dirty" usually results in very clean code at the end of refactoring. If I try to start clean, it is usually far dirtier and I end up changing much of the architecture anyway. So, it seems more efficient to start without any architecture and then tailor fit at the end.

I guess it's like writing text, it's best start with a rough draft to get the ideas down, then you can organize it once you've got a working version.