Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Single-programmer project. I'm constantly having to rewrite my own code on an on-going project. It's not buggy, but every time I expand my program (which previously-planned features), I keep having to expand previous classes, which cause me to re-write code that worked fine before.

I have unit-tests, so bugs aren't introduced but it still seems counter-productive and seems to be wasting time. I'm constantly adding features that weren't originally needed, but become needed as project grows in complexity.

Should I continue with this iterative development? It seems with every iteration I keep having to re-write more and more of old code as new features are added.

Is there a better way to manage my project? I know (approximately) what I want my program to do, and how to do it.
Also, what tools / development-philosophies should I use to manage one-man projects? I have a running to-do list (and that's all) has been doing a fine job so far. Maybe some kind of abstract class-outlining program?

share|improve this question
1  
UML was supposed to be an "abstract class-outlining" language. I suppose it would depend on what kind of features you're adding, in theory you shouldn't be rewriting as much as building on top of stuff or adding to stuff. –  R0MANARMY Jul 6 '11 at 18:19
    
Are those making requests aware that your time is not free? They may not care unless they are the person paying your salary. –  JeffO Jul 6 '11 at 18:31
    
You've just realized why agile development and YAGNI aren't silver bullets; in other words they aren't any better or worse than any other approach for all applications. While agile might work great for some projects, it can be an utter disaster on other projects. The same goes for waterfallish methods. There is no 1 right way. In your case, you should attempt to discern whether it is the process or your design skills that are the problem. I'm not a believer in YAGNI because while it might not be possible to know ALL of the new features that might be needed... –  Dunk Jul 6 '11 at 19:36
    
It is certainly possible to have a very good feel for what areas of your application are most likely to change so you can design your system to accomodate for those changes. Thus, I design for new features that are likely to change even though I don't need it now. I've never had reason to regret doing things that way. It sounds too me that you should be taking that approach. –  Dunk Jul 6 '11 at 19:36

3 Answers 3

up vote 2 down vote accepted

Since you know what you want your project to do (for the most part), and there's no constant interaction with a "customer", using an iterative approach may introduce unnecessary overhead. I feel that iterative approaches are best suited to small teams that can communicate frequently with a customer that may change requirements on the fly. Seems like you might benefit from planning everything out more in advance to enhance generalization and reduce repetition. Maybe do a search for some plan based approaches? Of course, the strategies of generating formal documentation and all that should not be followed (very informal should suffice...consider Doxygen if possible).

If you want to model everything (which seems like a good idea given your issues), you could use something formal like UML diagrams. That does seem a little excessive for a one-man project but it will help you keep track of everything at a high level of abstraction.

share|improve this answer
    
+1, but no need to model everything (or in proper UML). Only model the complicated parts which most likely will be built upon in the future. Try adjusting the design to support a wide range of scenarios, but while maintaining the necessary simplicity. –  Steven Jeuris Jul 6 '11 at 18:41
    
I like this suggestion. I hadn't really thought about my word choice when I said "everything". –  Casey Patton Jul 6 '11 at 19:01

it still seems counter-productive and seems to be wasting time. I'm constantly adding features that weren't originally needed, but become needed as project grows in complexity.

So?

How else can software grow?

Are you expecting that you could somehow be a genius and foresee the future?

Should I continue with this iterative development?

What choice is there? Other than perfect foresight?

Is there a better way to manage my project?

Yes. Perfect foresight.

I have a running to-do list (and that's all) has been doing a fine job so far. Maybe some kind of abstract class-outlining program?

That's what we call "design". It's quite difficult and nothing makes it easier.

It seems with every iteration I keep having to re-write more and more of old code as new features are added.

Welcome to software development.

share|improve this answer
    
+1 Just because there are ways to make things easier doesn't mean they become easy. –  JeffO Jul 6 '11 at 18:30

Should I continue with this iterative development?

Yes

Most likely you are rewriting/expanding previously written code because you have to support new features which you couldn't anticipate before. Taking the time (especially when you are allowed to) to do this will greatly benefit you in the long run.

However, when you find yourself constantly having to implement new unexpected behavior, this might be an indication you should take some more time nailing down your features. Deciding on the correct abstractions is mainly done by assessing required features.

Being a programmer is more than just 'writing code', it is also finding the right balance in the design of your system between 'getting things done', and 'support for extensibility'.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.