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 375,249 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 2,179 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: Mar 2007
Posts: 83
Reputation: rgtaylor is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 2
rgtaylor rgtaylor is offline Offline
Junior Poster in Training

Re: Opinions? javascript/php/etc and programming standards

  #27  
Apr 24th, 2007
Matt, I agree, the most important thing is being conisistent... cool we agree to agree, new one on me there...

About the variable naming though... This goes back to OOP, if you need to change the implementation, you only have to worry about the effected modules, and since code refactoring is a quite common function in IDEs, it is little effort to keep the prefix in line with the actual type... When I , which rarely happens, need to alter the type of a variable, I refactor the names, for example iNum would become dNum or lNum if I changed it to a double or long respectively...
Code refactoring for these rare cases takes like 3 seconds but the benefits of knowing what you are looking at, at first glance, is priceless... kinda like MasterCard...

So I guess there, we will have to agree to disagree ;-) ... sigh ... that's more like it...

But again I reiterate, I use what I find works best for me, and encourage you to use what works best for you!

Some things in this world are obvious right vs wrong, but so many people feel the need to, I don't know, justify their existance or prop-up their self image by forcing others to agree that, A) there is only 1 way and B) it is their own way that is THE one right way...

I tell these people, if you feel the need to enforce your ideas on others, you are usually wrong...
Sharing ideas, learning what other use, what works and what doesn't (and why) for others is a GREAT thing. I encourage ALL my employees to grow, learn and try new things... We set development standards and rules in our teams by concensus within the team. We make accountability a key aspect with this freedom, if something just isn't working, they are expected to recognize it, document it, and fix it BEFORE it is allowed to get out of hand...
Through this we have developed a set of "best practices" which are our own, what has/hasn't worked for us, why and why not... It helps us do the job better, faster, stronger... like Steve Austin (the 6 Million Dollar Man) not the guy from Bakersfield, California... Bionic Coders' Club ... cool name, but not one we actually use... so that is NOT an advertisment... I wonder if that exists somewhere... any I digress...

So for ALL those out there with questions about coding standards, follow these simple rules...
Be Clear
Be Concise
Be Consistent
Be Flexible
Be Open
and
Think Ahead

Most problems are easier to avoid than to fix!
Last edited by rgtaylor : Apr 24th, 2007 at 10:57 pm. Reason: typo
Reply With Quote  
All times are GMT -4. The time now is 4:59 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC