Archived

This topic is now archived and is closed to further replies.

Russell

Programming indecision

Recommended Posts

Does anyone else have this problem of programming indecision? Or maybe it is design indecision. I get to writing some piece of code, then I think, "I really don''t like the way this is turning out," and I go back and rework my "big picture" ideas, and start coding that. Then I get some of it done, and I think, "I really don''t like the way this is turning out..." And repeat. An example, I think to myself... "I''ll use C++, because C++ is clearly better than C. But C++ gives me so many options. Do I go all out object oriented, or are some things classes and other structs? Hmmm, there are so many options when using C++. I can arrange things in a class hierarchy, or I can make individual classes, or I can just use structs, or I can just use plain old data. I really like std::vector, and I want my program to be robust so to avoid overrunning any buffers, so I''ll just use a vector. But then that''s too slow, so I''ll try to figure out how to use vector efficiently. Making I''ll just write my own! Sheesh, this is all getting out of hand. I should really just get to coding something and stop overanalyzing. You know what? I''ll just use C so I don''t have to worry about all of these options in C++... Gee, doing some of these things in C is a real pain in the ass. It sure would be nice if I had std::string and std::vector. C sucks, I''ll do it in C++. I''ll just do it more or less how I would in C but use STL and the other nice things C++ has to offer." And, repeat. I''m such an overanalyzer.

Share this post


Link to post
Share on other sites
The only way to answer many of these questions is to try things out. Eventually, you will get a feel for which sorts of decisions are easy to change down the line (and thus should just be tried), and which need to be mulled over. Moreover, you''ll get better at making things in such a way that these sorts of decisions can more often be changed easily.

For now, just be gung-ho. Life''s too long to worry about screwing up programming projects.


"Sneftel is correct, if rather vulgar." --Flarelocke

Share this post


Link to post
Share on other sites
quote:
Original post by Russell
Does anyone else have this problem of programming indecision?
Lots of people have it. They''re the ones who never get anything written.

quote:
I''m such an overanalyzer.
Yes, you are, and there''s only one cure: getting to work.

We do not (yet) have perfect tools. So, in the meantime, pick a toolset and tough it out. Code looks ugly? Refactor (look it up). Making good fundamental design decisions is an acquired skill, earned through making mistakes and working through them. If you keep starting over once things start to get hairy, imagine how many later mistakes you''re never getting to...

Share this post


Link to post
Share on other sites

I don''t know, I think this sort of thing is good, within limits.

One thing that''s worth asking is: "is the change I''m considering something that I need to do right now, or can I postpone it for almost no cost?"

For example, let''s say you have a vector class, and you have an idea for a faster implementation. Assuming the API is the same, you can just put the new implementation of the vector class on the back burner, and come back to it later if you feel like it. Usually, you never end up coming back to it.

Share this post


Link to post
Share on other sites