C # Programming guidlines

Source: Internet
Author: User

C # Programming guidlines
Source:
Thinking in C #
Larry O 'Brien and Bruce Eckel
Prentice Hall
Upper Saddle River, New Jersey 07458
Www.phptr.com
Begin:
This appendix contains suggestions to help guide you in running Ming low-level program design, and in writing code.
Naturally, these are guidelines and not rules. The idea is to use them as inspirations, and to remember that there are
Occasional situations where you need to bend or break a rule.
Design
0. elegance always pays off. in the short term it might seem like it takes much longer to come up with a truly graceful solution to a problem, but when it works the first time and easily adapts to new situations instead of requiring hours, days, or months of struggle, you'll see the rewards (even if no one can measure them ). not only does it give you a program that's easier to build and debug, but it's also easier to understand maintain, and that's where the financial value lies. this point can take some experience to understand, because it can appear that you're not being productive while you're making a piece of code elegant. resist the urge to hurry; it will only slow you down.
1. first make it work, then make it fast. this is true even if you are certain that a piece of code is really important and that it will be a principal bottleneck in your system. don't do it. get the system going first with as simple a design as possible. then if it isn' t going fast enough, profile it. you'll almost always discover that "your" bottleneck isn' t the problem. save your time for the really important stuff.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.