9 ms·
I agree with this, even with my own projects. When I write code I go for pretty code that is designed well for what it's doing and doesn't have much cruft. I re
by godshatter 3y ago
I agree with this, even with my own projects. When I write code I go for pretty code that is designed well for what it's doing and doesn't have much cruft. I refactor if the next thing I want to add doesn't match what I've built, and figuring out how to replace it in a minimal yet clear to read way is where I get my fun from, I've mostly figured out. I'm an organic designer and a code artist, I guess.
Having said that, when I step into territory that's new to me I'll write the worst code imaginable without the normal restraints just to get something that works, then spend a week painstakingly trying to figure out why each piece works and how it's supposed to work and refactoring it into a nice relatively clean design.
At work I will write an exploratory bit of code, through it away once it runs correctly, and rewrite it in the code it needs to live in afterwards.
- liampulles 3y agoI agree with your approach - I think I did not write clearly enough, and I should say that when I say exploratory code in this context, I'm thinking about trying out new libraries, languages, etc. Certainly if one is on a new project or in a new domain, the code has to be exploratory at first.