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 428,578 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 4,708 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

  #10  
Mar 25th, 2007
Well, looks my comments struck a few nerves. First, I want to say, that I worked on a very bandwidth sensitive project, and I wrote the code, then ran it through a filter which I made too, the filder just removed the superfluous whitespace and made the html 1 long line of code...the scripts too... but, again that was just an EXTREME example...

The problem with html indentation is NOT the indents, it the misuse of tables to control layout.

First, tables should never be used for anything other than tabular data, though I will admit there are times when a quick table to format a small area may be helpful and fast... I won't banter anyone for taking that way out... BUT since most "web developers" are really just macromedia "users" they don't really count as "developers" in my book... At least this is the situation in Japan, where I live and work...

Macromedia can be set to use tables or CSS to control layout, tables is the default... the problem with using macromedia is that it does NOT create clean code, so a developer needs to manually edit the code later... this can be rediculously time consumming... I would just rather recommend using a design tool to prototype a page or site and then doing the right way, yourself...

If people learned good coding habits, as you mention, I believe it must include design concepts as well, not just variable naming and code indentation...

I indent ALL my code, C, C++, vba, js, html, java, perl etc. I just make OOP easier to understand... things indented are "contained" within something else.... this is also a visual indication of scope, as mentioned above, and was the whole reason people started indenting in the first place...

When linear code predominated, no indentation was used, no one even thought of it... But we had line numbers to content with ....

<code>
10 ? rgtaylor rocks!
20 goto 10
</code>

Then we started to see OOP concepts, this made larger project MUCH easier, but it introduced scope, which didn't really exist in linear programing...

<code>
function rgtaylorMess(strMess){
document.write(strMess);
}

while(true){
rgtaylorMess("rgtaylor rocks! ");
}
</code>

Then as OOP matured we saw programming styles catchup to the design concepts, which were all about making the code easier to read and understand, since larger projects meant, usually, more people in a collaborative effort...

I am sure you all know and understand these concepts, but it just makes the current discuss have more meaning... thus my comments previously... If you are working alone or in small groups, you should be able to be more flexible, because not everyone codes the same way, and to suggest 1 way is right is simply arogant..

I live in Japan, where the physical similarities have led the culture, government and society in general to "act" like everyone is the same... not equal... just the same... So people with special needs, like handicap and mentally challenged are complete ignored in law and social services, etc. Schools teach to the lowest level of student ability, because to have basic, intermediate and advanced level course curriculum would mean admitting that some students are better at math, science, reading, etc. than others...

Japan, despite what people in the West generally think, has a horrible education system and the heart of the problem is their attitude that "one size fits all"... in all things...

I don't think the programming world would be a better place if we start trying to act similarly...
Reply With Quote  
All times are GMT -4. The time now is 11:25 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC