Casual Articles
#1 in Business Subscribe Email Print

You are here: Home > Computers and Technology > Personal Tech > 15 Good Programming Habits

Tags

  • success
  • compiled
  • readme
  • corresponding opening
  • multiple source

  • Links

  • How to Hone Your Creative Writing Skills
  • Emergency Savings Account: Save More than Just Money
  • Managing The Boss Is Essential To Career Success
  • Casual Articles - 15 Good Programming Habits

    Cowboys Make Good Affiliate Marketers!
    …because Cowboys aren’t afraid to go out on a limb to achieve success. They dare to challenge the very system in which they work…to make a positive difference!Cowboys relish hard work and long hours because they know they’re building towards the future. Riding fences, branding doggies and horse wrangling all add up to long-term success and financial security.The same goes for a successful, work from home Affiliate Marketing web business!Adding content, creating positi
    So, your condition should read something like this:

    if ( 10==i) .... So, if you put single equal sign by mistake then it will be detected at compilation time only as an error.

    6. While using loops and conditional statements, always first put closing braces corresponding opening braces and then write the inner statements i.e.

    1) for(int i=0;i<10;i++)

    2) {

    4) printf("i

    A Few Words about Writing and Perfection
    Recently I watched my 16-year-old son practicing martial arts. I stood amazed, as with steady composure he navigated a long series of complex movements in one fluid dance. Why amazed? Probably for the same reason I was stunned to behold the arc of his head just moments after his birth. Because perfection--real perfection, not the gnarly kind that nags you until you get it right, but the pure-flowing kind--always comes as a delightful surprise. Why can't we make perfection happen when we want it to
    1. Before sitting down for coding, you must have formal or a paper-napkin design of the solution to be coded. Never start coding without any design unless the code is trivial one.

    2. Good code documentation is as important as good knowledge of a programming language. Write brief logic for each major block of your code as comments in source code file itself. Its good to mention creation and modification dates of your program along-with why modification was required.

    3. Maintaining versions of your program is another important task. Some present-day programming tools already have a built-in version management. Whenever you make any change to your program, they save its copy as .bak file.

    My approach is to maintain 3 versions of a program. Say, I have a file program.c which is used by other project team members also. I copy this file as program.c.old as backup and make another copy as program.c.wrk where I do modifications. When modifications are successfully compiled, replace program.c with .wrk file.

    You can also append a date or some explanation phrase to your program versions like program260505.c or programReadFnWrking.c .

    4. If your project contains multiple source files then maintain a README file stating purpose of each source files, data files, intermediate and log files (if any). You may also mention the compilation and execution steps.

    5. Ever wondered why your IF statement is not working as it should do. May be your are using single equal i.e. "=" instead of "==" in the condition check. A good approach is to write condition in reverse order. So, your condition should read something like this:

    if ( 10==i) .... So, if you put single equal sign by mistake then it will be detected at compilation time only as an error.

    6. While using loops and conditional statements, always first put closing braces corresponding opening braces and then write the inner statements i.e.

    1) for(int i=0;i<10;i++)

    2) {

    4) printf("i=

    The Advantages of An Online Presence
    You may ask yourself, why do I need a website … I already have a good customer brochure or a good book of photos. With an internet site, your product or service is accessible globally, to prospective customers 24 hours, 365 days a year. For a model, your customers are the photographers, casting agents, magazine editors.More and more people these days are using the internet as a first post of call because of its convenience and to save time. Customers and the general public almost expect tha
    ification dates of your program along-with why modification was required.

    3. Maintaining versions of your program is another important task. Some present-day programming tools already have a built-in version management. Whenever you make any change to your program, they save its copy as .bak file.

    My approach is to maintain 3 versions of a program. Say, I have a file program.c which is used by other project team members also. I copy this file as program.c.old as backup and make another copy as program.c.wrk where I do modifications. When modifications are successfully compiled, replace program.c with .wrk file.

    You can also append a date or some explanation phrase to your program versions like program260505.c or programReadFnWrking.c .

    4. If your project contains multiple source files then maintain a README file stating purpose of each source files, data files, intermediate and log files (if any). You may also mention the compilation and execution steps.

    5. Ever wondered why your IF statement is not working as it should do. May be your are using single equal i.e. "=" instead of "==" in the condition check. A good approach is to write condition in reverse order. So, your condition should read something like this:

    if ( 10==i) .... So, if you put single equal sign by mistake then it will be detected at compilation time only as an error.

    6. While using loops and conditional statements, always first put closing braces corresponding opening braces and then write the inner statements i.e.

    1) for(int i=0;i<10;i++)

    2) {

    4) printf("i

    Coaching
    The first use of the word “coach” in English occurred in the 1500s to refer to a kind of carriage. “Hence,” say Witherspoon and White, “the root meaning of the verb to coach is to convey a valued person from where he or she was to where he or she wants to be.” Coaching is a process that helps executives learn, grow, and change. Although what coaching involves depends on the specific executive and situation, executive coaching falls into four categories:Coaching for Skills Coaching
    ed by other project team members also. I copy this file as program.c.old as backup and make another copy as program.c.wrk where I do modifications. When modifications are successfully compiled, replace program.c with .wrk file.

    You can also append a date or some explanation phrase to your program versions like program260505.c or programReadFnWrking.c .

    4. If your project contains multiple source files then maintain a README file stating purpose of each source files, data files, intermediate and log files (if any). You may also mention the compilation and execution steps.

    5. Ever wondered why your IF statement is not working as it should do. May be your are using single equal i.e. "=" instead of "==" in the condition check. A good approach is to write condition in reverse order. So, your condition should read something like this:

    if ( 10==i) .... So, if you put single equal sign by mistake then it will be detected at compilation time only as an error.

    6. While using loops and conditional statements, always first put closing braces corresponding opening braces and then write the inner statements i.e.

    1) for(int i=0;i<10;i++)

    2) {

    4) printf("i

    Franchising Colonies in Space; A 100-Year Plan
    Should we be looking at a 100-year plan to unite the Human Colonies in Space? What if we set up the Federation Colonies or the Space Franchise System (SFS)? Would that be a plan? Isaac Asimov, Arthur C. Clarke, Ben Bova and many well known SciFi authors have indeed written about such things over the years.Indeed as a Franchisor Founder I too have considered this way-out idea and the thought of setting up Franchises in Space. I have considered the Space Colony Franchise System, as it does ma
    source files then maintain a README file stating purpose of each source files, data files, intermediate and log files (if any). You may also mention the compilation and execution steps.

    5. Ever wondered why your IF statement is not working as it should do. May be your are using single equal i.e. "=" instead of "==" in the condition check. A good approach is to write condition in reverse order. So, your condition should read something like this:

    if ( 10==i) .... So, if you put single equal sign by mistake then it will be detected at compilation time only as an error.

    6. While using loops and conditional statements, always first put closing braces corresponding opening braces and then write the inner statements i.e.

    1) for(int i=0;i<10;i++)

    2) {

    4) printf("i

    Low Cost Life Insurance
    Insurance is means of risk coverage by contract whereby one party agrees to guarantee another against a specified loss. Life insurance guarantees the financial status of the insured’s family after his death. A life insurance plan can protect your assets and your family's financial security.In low-cost life insurance, an insured person has to pay a monthly premium, and in return his family gets compensated upon his death. His family gets some financial support by the insurance company and ne
    So, your condition should read something like this:

    if ( 10==i) .... So, if you put single equal sign by mistake then it will be detected at compilation time only as an error.

    6. While using loops and conditional statements, always first put closing braces corresponding opening braces and then write the inner statements i.e.

    1) for(int i=0;i<10;i++)

    2) {

    4) printf("i=%d\n",i);

    3) }

    The numbers at the starting of each line indicate sequence of writing loop code.

    7. Avoid using magic numbers. For example, instead of writing

    circleArea = 3.14 * pow(radius,2);

    use following code:

    #define PI 3.14

    circleArea = PI * pow(radius,2);

    8. Use meaningful variable and function names. For e.g. instead of using 'r' use 'radius' to represent radius of a circle. Similarly, function name 'calculateArea' is better than any cryptic short name. In a hurry, we may use short variable names but the time saved leads to double wastage of time later when you guess for what that short variable name stands for.

    9. Using print statements for later debugging is a good habit. But, removing them when final code is ready is, sometimes, a risky task. So, make a function that displays debugging information passed to it. When your final version is ready, simply comment the internals of this function. So, this requires changes only at one place.

    10. Once you are done with coding, start optimizing your code. Some of the variables you declared earlier may not be of use at this stage. Similarly, statements which are not loop dependent can be moved out of loop block. Sound knowledge of compiler can also help in optimizing the code further.

    11. With good knowledge of your operating system and hardware, you can improve performance of your program in terms of resource requirements etc.

    12. Always indent your code for clarity and easy readability.

    13. You will also like the idea of organizing project files in into va

    HTTP = HTML link (for blogs, profiles,phorums):
    <a href="http://www.casualarticles.com/article/177210/casualarticles-15-Good-Programming-Habits.html">15 Good Programming Habits</a>

    BB link (for phorums):
    [url=http://www.casualarticles.com/article/177210/casualarticles-15-Good-Programming-Habits.html]15 Good Programming Habits[/url]

    Related Articles:

    Do You Have What it Takes to Be a Franchisee Success?

    A Healthy Approach to the Pursuit of Creating Wealth

    Discover How Easy It Is For Anyone to Write Quality Articles

    Bookmark it: del.icio.us digg.com reddit.com netvouz.com google.com yahoo.com technorati.com furl.net bloglines.com socialdust.com ma.gnolia.com newsvine.com slashdot.org simpy.com shadows.com blinklist.com