Tagged Questions

20
votes
3answers
641 views

Is use of finally clause for doing work after return bad style/dangerous?

As part of writing an Iterator, I found myself writing the following piece of code (stripping error handling) public T next() { try { return next; } finally { next = ...
41
votes
17answers
3k views

How would you know if you've written readable and easily maintainable code?

How would one know if the code he created is easily maintainable and readable? Of course in your point of view (the one who written the code) your code is readable and maintainable, but we should be ...
10
votes
6answers
795 views

Need to make my code more readable to the other programers in my team

I am working a project in delphi 7 and I am creating a installer for the application, there are Three main parts. PostgreSQL installation/uninstallation myapplication ( setup of myapplication is ...
23
votes
15answers
1k views

Does simplicity always improve Readability?

Recently, I was developing a set of coding standards for our company. (We're a new team branching out into a new language for the company.) On my first draft, I set the purpose of our coding ...
17
votes
14answers
1k views

Why do so many developers believe performance, readability, and maintainability cannot coexist?

While responding to this question, I began to wonder why so many developers believe a good design should not account for performance because doing so would affect readability and/or maintainability. ...
6
votes
6answers
265 views

Formatting 'Complex' Math

Note: by 'complex' math I mean an equation with many steps involved and a wide mix of operators. A programmer should know the order that operators are evaluated in an equation. However it can be a ...
8
votes
5answers
258 views

When developing on an old code base, should I use Best Practices or go for Consistency [closed]

Possible Duplicate: Code maintenance: keeping a bad pattern when extending new code for being consistent, or not ? As my experience in programming increases with each project, I look back ...
11
votes
4answers
516 views

Good use of try catch-blocks?

I always find myself wrestling with this... trying to find the right balance between try/catching and the code not becoming this obscene mess of tabs, brackets, and exceptions being thrown back up ...
25
votes
20answers
1k views

Should you sacrifice code readability with how efficient code is?

Should you sacrifice code readability with how efficient code is? e.g. 3 lines of code into 1 line. I read in Code Craft by Pete Goodliffe that readability is key. Your thoughts?
14
votes
8answers
563 views

Do you prefer conciseness or readability in your code?

Language shortcuts can often be used to make code more concise. For example, ternary and null coalescing operators can reduce the amount of code, but arguably to the detriment of readability: In C#: ...