Forum Moderators: open

Message Too Old, No Replies

Firebird should support bad code (?!)

Hold on, don't shoot yet; hear me out! :-)

         

MatthewHSE

8:28 pm on Jan 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I was talking about FireBird the other day with a pretty average Internet user. I was trying to get him to switch to it. Among the other benefits I listed, such as ease of use, security, etc., I made the statement:

"FireBird is just a better browser as well because it doesn't support sloppy code."

I was quite surprised at the response:

"Then that makes it a worse browser than IE. If IE can tell what a designer meant to do and displays the page the way the designer intended, it's the better browser. What about all the non-experts who design webpages and don't know the supposed 'standards'?"

I must admit I didn't have a ready answer for this one. In a way, it's a valid point. On one hand, the Internet is all about average people getting to put their pets and hobbies out for all to see and read about. On the other hand, don't we have enough sloppily-coded pages?

I'll confess to being a little stumped here. I'd hate to see FireBird start interpreting messy code like IE does, but will "Joe Surfer" see it as a downfall of FB that it doesn't intuitively display even a bad page the way the designer intended?

bcolflesh

8:33 pm on Jan 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That other guy is correct in a way - emulating IE and interpreting bad code is exactly what got Netscape/Mozilla back in the browser wars (even at their marginal level).

txbakers

8:39 pm on Jan 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



interesting point!

If the web is the great equalizer for the masses, why should the masses learn how to be computer programmers?

Basic HTML can be good enough for grandma picture sites, etc. and the myriad of templates and WYSIWYG programs can help them write the simplest of pages.

But when it goes beyond that, I can't be sloppy with the VB or Java code in the programming side of things. Yet howmay times have we cursed the computer saying "Do what I want, not what I tell you to do!" I joke about working on a neural interface in place of the keyboard so the computer will figure out what I want to do.

Wasn't that one of the goals of OOP in the first place? To create a more intuitive method of programming?

I've left out </select> tags a plenty and the pages still work beautifully. Only when I throw the final product into the validator do I even notice the "error". If a programming IDE had an automatic syntax corrector - which is essentially what IE is doing when it renders incorrect code - wouldn't that be a useful tool?

Very interesting discussion. I can't wait to hear the arguments from the people who are for correct code all the time to begin bashing IE again.

DrDoc

8:50 pm on Jan 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I definitely agree.

Browsers should be able to render a page, even if the code is sloppy or violating all sorts of standards (the only problem that creates is -- what is the "standard" for nonstandard rendering going to be? ...or are we going to have each browser handle this their own way, causing an endless browser soup?).

However, when fed absolutely valid and correct code, the browser better darn well render the page correctly! This is where IE fails.

tedster

9:21 pm on Jan 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



DrDoc, I think you have nailed the essential point. Making a best guess on bad code is a nice value-added feature. But rendering valid code properly is the CORE COMPETENCY required of a browser.

I might also add that "playing well with others" - that is, not hogging resources or taking down the whole OS when there's a problem - is another feature I loook for in a well-tempered browser.

asquithea

10:47 pm on Jan 7, 2004 (gmt 0)

10+ Year Member



I would actually prefer to use a browser that rendered only strict, 100% valid XHTML and CSS. In return for extra hassle writing content for it, I would expect:

1) A smaller, faster parser
- An XML parser is almost trivial to write. Eliminating parsing of buggy SGML/HTML would vastly improve code speed, memory footprint, and library size.

2) A smaller, faster renderer
- Current parsers do not resolve all coding inconsistencies -- that's usually left up to the renderer. Remove this requirement, and you vastly simplify your rendering code.

3) A more accurate renderer, and more standards support
- A smaller code-base is easier to get right, and easier to rewrite.
- Less time spent on the basics means more time to implement new standards, such as SVG.

4) More features, and better quality
- Standards support aside, a more maintainable codebase releases developers to work on the part of the browser users see most; the interface.

All of these should add up to a faster, leaner browser that is easy to maintain and use.

Were this browser to become the Web's defacto standard, there would be no need to stop using WYSIWYG tools. The tools would just aquire validators of their own, working silently in the background, and would not /allow/ users to mismatch tags or scatter FONT tags willy-nilly. Aunt Sandra can continue to write about her cats, but this time Fluffy's antics are described in predictable XHTML.

It's not going to happen -- it can't whilst the leading browsers (and even the would-bes) pander to the lowest common denominator. Validation is not a panacea -- sites can still use infinitely complex layouts, contain contradictory CSS, and assault the user with cleverly crafted ECMAScript attacks -- but it does make writing web content much easier. Why is that so hard to grasp?

Firebird is a step in the right direction. Its standards support allows designers to use modern, correct code. But until browsers become more rigid about what they'll accept, all we can expect is the same bloat and bugginess that have plagued us since Mosaic.

RammsteinNicCage

10:49 pm on Jan 7, 2004 (gmt 0)

10+ Year Member



Maybe if IE didn't render these problems, the webmaster will realize there's an error and learn how to fix it. People can't learn from their mistakes if they don't know they're making them.

It would be unfortunate if a company does not receive any orders because one missing tag screws up a form - but at least the site looks great! ;)

Jennifer

grahamstewart

11:50 pm on Jan 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What I'd like to see is a browser that would take a resonable stab at rendering a dodgy page - but would also pop up a little warning dialog or display an icon on the status bar to indicate that the page syntax is invalid.

Or maybe it could play a nice raspberry noise :)

TGecho

12:02 am on Jan 8, 2004 (gmt 0)

10+ Year Member



However, when fed absolutely valid and correct code, the browser better darn well render the page correctly! This is where IE fails.

Making a best guess on bad code is a nice value-added feature. But rendering valid code properly is the CORE COMPETENCY required of a browser.

I think that says it all. Couldn't agree more.

Or maybe it could play a nice raspberry noise
Hehe, sounds like a nice piece of spyware to tack onto IE *evil laugh*

txbakers

12:31 am on Jan 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Or maybe it could play a nice raspberry noise :)

I actually have a small wav file with Yosemite Sam yelling: "No, no,no. You're doing it all wrong!"

It's hysterical to play in a meeting. I'd like to put it somewhere in my web apps.

mbauser2

5:07 am on Jan 8, 2004 (gmt 0)

10+ Year Member



If the web is the great equalizer for the masses, why should the masses learn how to be computer programmers?

If the masses don't want to "learn", they shouldn't be doing anything even remotely approximating "programming". They should be using authoring tools that hide the markup and code from them. More, importantly, they should be using authoring tools that produce good markup and code.

If "designers" don't want to learn standards or use standards-based tools, they should just jump off a cliff now, before someone like me pushes them off. The "what the designer wants" school of design is just a cover for lazy, inaccessible, non-backwards/forewards-compatible, non-bot-parsable designs.

txbakers

5:27 am on Jan 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



they shouldn't be doing anything even remotely approximating "programming".

That's my point. writing HTML is not programming. there's no logic involved. It's just a set of tags to markup some text and images for display.

thehittmann

8:33 am on Jan 8, 2004 (gmt 0)

10+ Year Member



That's my point. writing HTML is not programming. there's no logic involved. It's just a set of tags to markup some text and images for display.

Doesnt all programming consist of set parameters and variables? Does this mean that all programming is just editing pre defined tags?

hartlandcat

10:15 am on Jan 8, 2004 (gmt 0)

10+ Year Member



If Mozilla and other non-IE browsers supported "bad code", they would all do it in their own way. You couldn't set a standard for how "bad code" ought to be rendered, and the result would be even worse cross-browser compatibility problems than what we see already. I've never really understood why some people seem to believe that a large amount of websites don't work properly in non-IE browsers. I can't say I've ever had any major problems since I started using non-IE browsers over a year ago.

HTML doesn't have to validate to display correctly in Mozilla. Actually, I believe only around 10% of website do validate properly, if that. Mine certainly doesn't (primarily because it's designed to display correctly in Netscape 4).

However, there is no excuse for errors in HTML (and worse, CSS). You might make mistakes, but the browser should be able to pick out these mistakes, thus enabling you to go back and correct them. I even heard someone recently say that the reason as to why IE is the most popular browser is because it allows the designer to express their creativity (implying that he believed that Netscape et al didn't). That sounds as if he believed badly written code to be some sort of innovation, and and if a browser didn't support it, it was "hindering your creativity". Bah.

The main genre of websites that never seem to display correctly in non-IE browsers are what I call "girly blog sites". These are primarily owned by people(mainly girls) aged from around 13 to early 20s, and when you've seen one, you've seen the lot. These are the sort of people that will create a "picture" (usually of some sort of celebrity with a colour filter over the top and a few extra random swirls), make excessive use of iframes (without giving content for those people using browsers that don't support them) and ping! they're a web designer! These types of sites usually include a blog, a few random HTML tutorials (most of which are either wrong, or for things that only work in IE), "advice" for how to run a website and a few free graphics.

I've looked at the sources of some of these sites, and the HTML and CSS behind it is totally horrendous most of the time. Often the iframes missing closing tags (which prevents all iframes other than the first one being displayed in most non-IE browsers), more than one body tag etc. etc. One person was recommending on her site not to use head tags because she believed them to be pointless. This is unacceptable. So the point is, while most sites will work fine in non-IE browsers, there will always be certain genres that don't. The reason as to why "girly blog sites" don't generally fair too well in non-IE browsers because bad code is encouraged (unknowingly) by the content of the websites that fit into that category. If you visit that type of website a lot (and believe me, I know some people that do), then it will seem as though a lot sites don't work in Mozilla etc.

txbakers

1:45 pm on Jan 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Doesnt all programming consist of set parameters and variables? Does this mean that all programming is just editing pre defined tags?

No, programming involves creating a logic flow to solve a task. this does involve parameters and variables, and the calculations to use them and populate them. Plus the logic to check for values and do something based on them.

When I teach programming to non-programmers I always come back to the basic tenet: IF it's raining, THEN bring an umbrella ELSE get wet.

HTML doesn't meet any of these criteria. There is no logic in HTML. All HTML does is display text and images.

The logic in web pages comes from the addition of scripting languages, and that's where the programming begins.

hartlandcat

2:21 pm on Jan 8, 2004 (gmt 0)

10+ Year Member



To add to the note about having a rasberry noise above... do you know about the iCab browser for Mac OS? It has this little face that smiles green if the page's code is 100% correct and frowns red if there are mistakes.

MatthewHSE

2:40 pm on Jan 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey, cool! FB should have an extension for that; maybe it could go in the throbber area?

danieljean

3:22 pm on Jan 8, 2004 (gmt 0)

10+ Year Member



I do not want the FB team to be spending time trying to make FB render junk code in the same quirky way as IE. There are still usability, speed, memory and stability issues to work out.

As long as a browser tries to make a reasonnable attempt to render junk, we should be happy. It would be absurd to worry that these browsers do not all render junk code the same way.

If you care about X-browser compatibility, you'll just code to standards.

NB: I've made FB my main browser. Being able to override font sizes is crucial for me (high-resolution screen), and I like the pop-up blocker, tabbed browsing, etc... The only reason I still use IE is because of the Google PR display.

grahamstewart

3:27 pm on Jan 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sweet.. that is exactly what I'm talking about. If all browsers (including IE) did that then maybe people would be more inclined to validate their work.

After all, can you imagine trying to explain to your client/boss/marketroid why the company website makes a sad face appear but the competitors site has a smiley one?

phoenix09

3:04 pm on Jan 9, 2004 (gmt 0)

10+ Year Member



No, programming involves creating a logic flow to solve a task. this does involve parameters and variables, and the calculations to use them and populate them. Plus the logic to check for values and do something based on them...

HTML doesn't meet any of these criteria. There is no logic in HTML. All HTML does is display text and images.

I've always been interested in this claim, it's not something I would agree with, especially when you bring in css to the picture. To me programming involves dealing with bugs, fixing bugs, figuring out why the information flow is not working (html has information flow, data flow, logic, it's just not as advanced a logic as a programming language per se has).

For example, if you forget the closing table tag on a web page it will display as blank in netscape 4. The logic flow interpreted by the programs runtime environment did not terminate correctly. HTML structure is a logic flow, it's created by programmers so what else would it be? It's not a very flexible logic flow, but it is a logic flow, but the bulk of the interpretation of that logic happens in the browser, so it's easy to forget this fact.

I find this interpretation of HTML to be held by programmers as a rule, I've never held it myself, which is one reason I think that I learned HTML fairly well, same goes for CSS, which to me is even closer to a programming language than css (forget ';'and code doesn't run correctly in some runtime environments [aka browsers])

TheDoctor

5:53 pm on Jan 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



HTML isn't a programming language, it's data. Internet Explorer is a program, Firebird is a program, Opera is a program...

The confusion is caused by people incorrectly seeing a parallel between web design and classical distributed computing (eg CICS applications).

In the latter case, users have data and the designer provides a program to process it. However, with the web, the situation is reversed: users have programs (IE, Firebird, Opera, etc) and designers provide them with data (HTML). Confusing...

SethCall

6:30 pm on Jan 10, 2004 (gmt 0)

10+ Year Member



I HAVE to chime in :)

Personally, I believe there is no excuse for bad HTML code.

HTML is a well-defined specification. The data, to be HTML, should conform to the standard.

What if every industry involving the transmittal of data had this issue? Think of the ramifications, and the belly-ache associated with making any sort of "player". (i.e., IE, Windows Media Player, Monitors, TVs, cable boxes, and so on)

And even the argument that it is for the masses does not justify sloppy code (excuse me, markup : )). Its much like being a writer: Anyone can be a writer, and their work is for the masses, but a book is still supposed to be without something as basic as grammatical errors! Now, the writer's *style* may suck (the parallel continues!), but that isnt what we are harping on.

Finally, there are easy to use tools (validators) to determine if your code isn't right, and it aint that hard anyway!

PCInk

7:43 pm on Jan 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



...and just because the current version of IE displays your bugs correctly, does not mean that the next version will display them the same. The standard of displaying erroneous code is undefined.

What a nightmare for a company to find that there 'perfectly' working site suddenly does not work in IE7 (or whatever it will be). They probably will not even find out until a customer complains.

killroy

7:48 pm on Jan 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is silly.. so you call a .txt a program? a WORD .doc? and if not how is it different, besides mere syntax and levels of complexity (txt has a character set and formattign codes such as line feed, a .DOC has tags VERY similar to HTML but stored in a binary format)

A web page doesn't DO anything, except if it involves server side, or client side script programs.

And arguing that because something can go wrong ("forget a ;...") it's a program, would make driving car akin to programming... take a wrong turn and you hit a tree... No offense, but utterly rediculous.

CSS is just a storage form. If we'd store the same info in XML or in pinary, or using morsecode or pins in a wooden board wouldn't change it, cos it's data. What it looks like in "stored" form has NO influence on something being a program or not.

SN

phoenix09

7:57 pm on Jan 10, 2004 (gmt 0)

10+ Year Member



HTML isn't a programming language, it's data. Internet Explorer is a program, Firebird is a program, Opera is a program...

Everything a computer deals with is data using this definition. The if x statement y; is data too, once compiled it's a bunch of zeros and ones like anything else. So this wouldn't be an adequate definition to distinguish HTML from anything at all found in the digital world.

For example, following this logic Javascript is not a programming language, since it needs a program to run it, a browser that is. And the browser needs a program to run it (your OS), a bunch actually, so it must not be a program either.

Some data moves other data around, some is moved around. HTML moves data around and manipulates it, and creates pathways for that data to move in, the browser isn't deciding where to place that div element, the built in rules of HTML and CSS are telling it where to place it, just like the built in rules of C++ in the compiler end up telling the processor what to do with that 'if' statement you typed in. Both are defined by a set of rules that you have to follow if you want the stuff to work, although of course HTML is phenomenally forgiving of error.

That's why I can't see any substantial difference in a qualitative sense between HTML and any other programming language beyond the difference in syntax.

CSS and HTML manipulate data, they tell the runtime environment what to do with the data contained within the HTML tags, where to place something on your screen, how to make it look, and so on, just like Windows for example does when you create a new window instance. If you use some VB.net object to create a new window there's not really much difference to me between that and using HTML to create a table.

It's kind of a syntax thing as far as I can see, you establish a certain syntax and work within that syntax, governed by the rules of that syntax, whether those rules are defined as the syntax of C++ or the syntax of HTML, it's just higher or lower level, closer to assembly language or further away.

That's why I don't see these things as black or white, to me it's more of shades of gray. When I write a PHP script it's just text, exactly the same ASCII text as an HTML page, which means it's just data, so I guess PHP isn't a programming language by this definition, since PHP needs an interpreter to run, a program that is.

If I was going to define HTML in terms of data I'd say it's the container for the data, and the data is what is contained by the HTML. Which makes it not data, just like a programming language is a way to work with and manipulate data.

Anyway, this drifted off the forum topic, sorry about that.

SethCall

8:20 pm on Jan 10, 2004 (gmt 0)

10+ Year Member



I bet this topic is divided largely by programmers and non-programmers, by profession.

I program all day basically, and code pages for fun in spare time, so maybe that decides my viewpoint. I see HTML as a strongly defined specification, with a set of rules to be adhered to. And, the specification is there for everyone to see, and adhering to rigid rules increases development time and code reuse, as well as reducing the amount of "user error" that must be considered when programming a web browser.

What is *gained* by allowing sloppy code? Nothing but sloppy habits and unpredictable markup (the example of how will IE7 handle your page was quite apt), which is not acceptable in the strong rules of HTML.

mattur

8:47 pm on Jan 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What is *gained* by allowing sloppy code?

In the context of this thread, a /browser/ allowing sloppy code "gains" access to about 95% of the web ;)

SethCall

8:59 pm on Jan 10, 2004 (gmt 0)

10+ Year Member



A browser prepackaged by the OS used by 95% of home users does the same : )

PCInk

10:46 pm on Jan 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Programming debate:

A program has an interpreter follow each line one by one processing the information. In the case of assembler/machine code, this is the chip. It does not have to be interpreted in order and can be repeated or jumped about.

HTML is data. Nothing follows it line by line, following instructions which allow it to jump from line 45 to line 12. (Except JavaScript - which is programming). There are no variables.

HTML is data, but like database data. Just like a database, it should follow a particular order. In a date field you should enter a date. In a <a> tag, you should follow it with a </a> tag.

You write HTML/CSS/XML, but program in Perl/PHP/ASP/ColdFusion/C++/Assembler/BASIC/JavaScript.

EG: If anyone can show me how to print "Hello World" 200 times - printing the line number next to each (using a loop) and then calculate 1+1, saving the result to a TXT file, using only a HTML page without programming, I would be very interested and would begin to call HTML a 'programming language' (JavaScript is excluded - that is programming). If you can't do the above in HTML only, then it is not either a programming language, nor very powerful.

SethCall

11:33 pm on Jan 10, 2004 (gmt 0)

10+ Year Member



I agree with you, it is not programming. You may hand code it in some cases, but that does not make it programming.
This 50 message thread spans 2 pages: 50