Link Details

Link 99365 thumbnail
User 285573 avatar

By alashcraft
via blogs.msdn.com
Published: Jul 30 2008 / 22:13

What does it mean to make code more maintainable? Certainly obfuscated code is hard to understand, by definition. A big part of maintainability is making it easier for others to read and understand what the code is doing. Your code may have been working for years, but then somebody comes along and wants to add a feature, which might break your code.
  • 9
  • 0
  • 1387
  • 490

Comments

Add your comment
User 209464 avatar

willcode4beer replied ago:

0 votes Vote down Vote up Reply

Every few months I switch between the idea of early returns wen appropriate and being strict about a single return......

User 187306 avatar

chaves replied ago:

0 votes Vote down Vote up Reply

I got over the single exit point a long time ago and never went back...
,

User 211643 avatar

zynasis replied ago:

0 votes Vote down Vote up Reply

single return point ftw
especially with a final value on the return, so that u know there is only ever going to be one setting of the return

User 206943 avatar

mvonballmo replied ago:

0 votes Vote down Vote up Reply

I use a single return point for longer, more complex methods; however, most of my methods are short enough that you can easily see all the return points immediately. I generally code for readability and ease-of-entry, splitting things up for the debugger only if necessary.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (9)



Voters Against This Link (0)