Feed The Geeks - Technology News and Reviews Forum
Feed The Geeks - Technology News and Reviews Forum Register Members List FAQ Search

Go Back   Feed The Geeks - Technology News and Reviews Forum > Web Development > Coding & Development

Coding & Development HTML, Java, XML, Flash, PHP etc..

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 04-26-2007, 01:50 PM
cheater's Avatar
1337
 
Join Date: Apr 2007
Location: Your c:/ drive
Posts: 582
Rep Power: 3
cheater will become famous soon enoughcheater will become famous soon enough
Default Programming Tips to Avoid Breaking Your Site

* If anything can go wrong, it will

* Using defensive programming to avoid things that may go wrong

- 1. Handle unexpected conditions

- 2. Process external systems data properly

- 3. Test your code

- 4. Monitor your site errors and act upon them

- 5. Do not disclose errors to the users

- 6. Damage control

- 7. Backup

- 8. Do what you can as you can never get defensive enough


(PHP Classes - PHP Classes blog: 8 defensive programming best practices to prevent breaking your sites)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-26-2007, 02:02 PM
Robert's Avatar
Benevolent Dictator
 
Join Date: Apr 2007
Location: Australia
Age: 23
Posts: 454
Rep Power: 50
Robert is on a distinguished road
Default

Big tip for HTML,

Always close your div tags.

It's amazing how much damage an unclosed div tag can do.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-26-2007, 02:11 PM
cheater's Avatar
1337
 
Join Date: Apr 2007
Location: Your c:/ drive
Posts: 582
Rep Power: 3
cheater will become famous soon enoughcheater will become famous soon enough
Default

I'll expand on that Robert.
In HTML, close ALL your tags the minute you make them. Then, put the content in between the two tags.
For other languages, remember your closing quotation mark. I can't tell you how many hours of debugging I've had to do because of 1 simple quotation mark. Also, remember the ; at the end of a statement (if it requires one).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-26-2007, 04:08 PM
Aravapalli's Avatar
1337 n00b!
 
Join Date: Apr 2007
Location: Chennai, India.
Posts: 188
Rep Power: 2
Aravapalli is on a distinguished road
Send a message via AIM to Aravapalli Send a message via Yahoo to Aravapalli
Default

along with closing all the tags keep the parent and child relation of the tags...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-26-2007, 04:11 PM
cheater's Avatar
1337
 
Join Date: Apr 2007
Location: Your c:/ drive
Posts: 582
Rep Power: 3
cheater will become famous soon enoughcheater will become famous soon enough
Default

So true. That is why keeping neat, organized, indented, and commented code is so important. Without that, nested tags get extremely confusing.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 05-07-2007, 10:17 PM
n00b!
 
Join Date: May 2007
Posts: 14
Rep Power: 0
armatik is on a distinguished road
Default Re: Programming Tips to Avoid Breaking Your Site

Or alternatively, you could visit The W3C Markup Validation Service to validate your code, since it'll tell you and you're supposed to so it displays correctly in all browsers any way.

Also, for server-side programmers, make sure you've read a LOT about security, because there are just too many ways to exploit unprotected web applications.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 05-07-2007, 10:31 PM
cheater's Avatar
1337
 
Join Date: Apr 2007
Location: Your c:/ drive
Posts: 582
Rep Power: 3
cheater will become famous soon enoughcheater will become famous soon enough
Default Re: Programming Tips to Avoid Breaking Your Site

That's a good point armatik. I recently have done a lot of reading on the topic of security. After doing the reading, I realized that nearly all my scripts were prone to exploits of one type or another. I was lucky that I only had a small scale site. If my site were larger, someone could have easily exploited my scripts. This would have given them access to nearly all the files on my computer.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

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 Off


All times are GMT. The time now is 04:54 AM.

Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0
vBulletin Skin by VBMode.com