• Forum
  • Lounge
  • Do you ever personally make your code im

 
Do you ever personally make your code imperfect?

I know it's an odd question, but is it really possible to be satisfied with everything you develop when considering how large and complicated it can get?
Last edited on
So, the real question is "do you ever leave you code imperfect?"
Yes, occasionally I come across the odd boundary condition that would make me jump through many hoops to consider in the code, but wouldn't really add that much functionality. Also, some times accepting every technically valid or even reasonable input can extend the scope of the project well beyond what was originally expected. A good example of this is WAV which, is pretty simple if you only care about uncompressed 16-bit mono or stereo PCM, but if you aim for true, complete support for the format, is actually absurdly complex
A good example of this is WAV which, is pretty simple if you only care about uncompressed 16-bit mono or stereo PCM, but if you aim for true, complete support for the format, is actually absurdly complex

If you use a library then it becomes absurdly simply to support almost any sound file format.
Yes, sometimes I look at the existing code and see that it could be improved. Sometimes I leave it as it is: currently it works, bug-free and have adequate perfomance. I do not want to waste several hours and probably add bugs in pursuit of perfection.

Another example when the winter deadline is coming: main philosophy of these days is "Write in now, refactor later. Probably.".

helios wrote:
A good example of this is WAV which, is pretty simple if you only care about uncompressed 16-bit mono or stereo PCM, but if you aim for true, complete support for the format, is actually absurdly complex
Same could be said about every file format which bears burden of backward compatibility. For example XLS. And probably the most famous comment on PSD file format: http://stackoverflow.com/a/769443
@DeXecipher

That's why there's test-driven developement.
If you use a library then it becomes absurdly simply to support almost any sound file format.
For the sake of the example, assume that there are valid reasons why no libraries can be used.
In any case, WAV support even from specialized libraries was spotty last time I checked.

Same could be said about every file format which bears burden of backward compatibility. For example XLS. And probably the most famous comment on PSD file format
Yup. WAV was just the first thing that came to mind.
@IWishIKnew
I know :).
I said "good bye" to the idea if "perfect" code years ago. There's no such thing as perfection. (Except maybe some woman are ;)

Other than that it depends on what you write and what you're writing for.

At work, I write in a language called ABAP. That's the language of the SAP system. (SAP, as in: big german software company)
ABAP is probably the most convoluted language I've seen. And I have to write code with that all day long :(
So I don't even try to write good programs.

However, when I write C/C++ programs, I try hard to get them as clean and tidy as possible. But still, perfection is impossible.
Topic archived. No new replies allowed.