I'm rewriting my code around 10 times before f

2019-04-06 14:36发布

When i start writing something complex, I find that restart the writing like 10 times before I end up with what I want, often discarding hundreds of lines of code.

Am I doing something wrong, or do others have workflows like this?

EDIT: Right now, I'm working on a modular compiler. The last project I was working on was a server in java. Before that it was some concurrency stuff.

I do a fair bit of planning, and I never start coding before I've got interfaces for everything.

Given that, is it normal to just wipe the slate clean repeatedly?

标签: workflow
13条回答
女痞
2楼-- · 2019-04-06 15:39

If you are learning something with each iteration then there probably isnt a problem. Deadlines and pesky things like that might make your life a little more difficult. :)

When I am working on a new problem I like to pseudocode it out in comments in the actual function handler, as part of generating the stub for my TDD. Then add the code in to each step I had in the comments of the function body.

It helps me to keep focused on what the problem that I am solving is, and not get lost in the details to early.

查看更多
登录 后发表回答