How do you ensure that you as programmer have written quality C code?
c, software-quality
Solution
Someone mentioned some compiler switches, but having syntactically smooth code is not going to ensure a quality end-product, because there's more to software quality than that.
There are several classifications of software qualities, but here's a list that you can use as a checklist:
- Correctness (does it work according to spec?)
- Reliability (can de user depend on it?)
- Robustness (does it work in unexpected situations?)
- Performance (does it do the job fast enough for the user?)
- Usability (is it user-friendly?)
- Verifiability (can its properties be verfified easily?)
- Maintainability (can modifications be made easily?)
- Repairability (can defects be fixed within reasonable time?)
- Evolvability (can new functionality be added simply?)
- Reusability (can the code easily be used in other projects?)
- Portability (can it run easily in different environments?)
- Understandability (can maintainers easily understand it?)
- Interoperatability (how well does it cooperate?)
- Productivity (efficienct and performant delivery)
- Timeliness (ability to deliver on time)
- Visibility (are all steps documented clearly?)
Problem
I m looking to write some quality C code. Can someone point me to some articles , websites..whatever I need something with examples. I have already seen and read K&R C book. But times have changed, some one must have more to say on quality C Code. and another important thing is How do you ensure that you as programmer have written quality C code??