Septanet Forum  

Go Back   Septanet Forum > Computers, Software, Harware, Information Technology > PHP Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 05-08-2011, 03:28 PM   #1
Senior Member
 
kaman's Avatar
 
Join Date: Aug 2011
Posts: 111
Smile Five Important Things To Be Remembered While Programming

While developing larger software application, there will be multiple programmers involved. And every programmer has different style of coding. Due this fact, the application developed will be inconsistent in terms of Readability, Integrity, Maintenance, etc. Also, it will take much time to new programmers to understand the code, functionality flow fully.

To overcome with such problems, everyone needs to be on the same page before jumping into programming. And all the programmers must follow common coding standards which we refer as 'best coding practices'. The best coding practices ensure the use of common standards and uniform coding, reducing errors and the time spent in code review.

Here are 5 important coding practices which every programmer should follow:

1. Start with a plan
First make a plan on what to do and how you do, then only start coding. Prepare algorithms (steps) for the functionality and then implement same through coding.

2. Proper Naming Convention
Follow proper naming convention while creating files, classes, functions, objects, variables, etc.

3. Make the codes readable
Use proper comments, Code Indentation and Placement of braces.

4. Apply security measures
Protect from SQL Injection, Allow only valid input, Keep the structure/flow simple.

5. Validation of users input
- Trim (remove all white-spaces from the beginning and the ending of a string)
- Empty Check (Check for mandatory inputs)
- Special Characters Check(Single and Double quotes, slash, Tilt [~])
- Checking format of input [see below.]
- Duplicate Check

Input Formats
Numeric (Integer, Decimal)
Alpha Only
Valid Email
Date Format
Time Format
Valid IP

That's All.

Thank you for reading. If you have any feedback or suggestion to improve this thread, plz do not hesitate to post. Your valuable comments/feedback are always welcome.
kaman is offline  
Digg this Post!Bookmark Post in Technorati
Reply With Quote
Old 05-08-2011, 04:02 PM   #2
Senior Member
 
sachin's Avatar
 
Join Date: Aug 2011
Posts: 131
Thumbs up Really informative

Thanks kaman, for the informative article. Please keep it up
sachin is offline  
Digg this Post!Bookmark Post in Technorati
Reply With Quote
Old 05-08-2011, 04:08 PM   #3
Senior Member
 
kaman's Avatar
 
Join Date: Aug 2011
Posts: 111
Default

Thank you, Sir
kaman is offline  
Digg this Post!Bookmark Post in Technorati
Reply With Quote
Old 20-08-2011, 01:31 PM   #4
Senior Member
 
sharma.s.prakash's Avatar
 
Join Date: Aug 2011
Posts: 110
Default

Nice this help for us how to start programming good!
sharma.s.prakash is offline  
Digg this Post!Bookmark Post in Technorati
Reply With Quote
Reply

Tags
best coding practices, best practices, coding tips

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +5.5. The time now is 12:58 PM.


Content Relevant URLs by vBSEO 3.5.0 RC2