User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 427,811 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,800 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

Opinions? javascript/php/etc and programming standards

Join Date: Nov 2006
Posts: 17
Reputation: chewbacca810 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
chewbacca810 chewbacca810 is offline Offline
Newbie Poster

Question Opinions? javascript/php/etc and programming standards

  #1  
Mar 22nd, 2007
i having been programming for 10+ years now, so I always try to adhere to good programming practices (variable naming, spacing, etc). Yet, almost every snippet of code for JS or PHP that you can pull up goes against those practices.

even when writing JS or PHP, where var type isn't nearly as strict as, say, Java, I'll write:
objDiv = document.getElementById( "thediv" );
or
$strName = $objUser->name();

but even examples on sun.com or php.net look like
 o = document.getElementById("thediv");
or
$name = $user->name();

I understand they're both scripting languages, but I don't feel that is any reason to deviate from good programming practices.

Anyone else feel this way still, or has the whole world gone insane and I'm just wasting precious keystrokes?
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 2:28 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC