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?

txbakers

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

WebmasterWorld Senior Member 10+ Year Member



I agree also. HTML is not programming. It is a markup language.

I cringe when I hear people say that they are "coding" a web page. There is no coding, they are adding the markups.

phoenix09

12:21 am on Jan 11, 2004 (gmt 0)

10+ Year Member



How about writing a small program that will respond to a users actions?

Such as a mouseover event. This will be a very boring program.

The job of the program is to do something when the user places their mouse over a certain part of the viewing window, in this case change the background color.

You can write this program with javascript, or create an active x object to deal with it, or you can write this with CSS. The results would be identical, the page is dynamic, it's responding to user input in an active way, even if it's a fairly trivial way, but it is responding based on commands I've written into it, like any program does. Since you all know how to do this with css or javascript I won't put the code here. To me a program does something, I don't care what it is that it does, it just does something.

Anyway, at least we can agree HTML is a language, that's good, that's an improvement over calling it data, which is kind of way off the mark since it's at least a way to organize data, not data itself, except in the broader sense where everything in a computer is data.

As to cringing when someone says they are coding, I don't know, I'm coding when I make HTML, and I'm programming when I do programming, that's how I think of it, although both involve writing code. HTML is code, when I write HTML I'm coding, obviously, since it's code, what else would I be doing? That's why it's called source code. I've made html pages far more complex, by a factor of many times, than many so called 'programs' I've written, that have taken over 80 hours to just create a template for, that's why I think I respect HTML a bit more than some people, at least some programmers, but I doubt this bias will ever go away, which is fine.

[edited by: phoenix09 at 12:35 am (utc) on Jan. 11, 2004]

SethCall

12:28 am on Jan 11, 2004 (gmt 0)

10+ Year Member



Your confusing technologies though Pheonix.

*Pure* HTML does not have javascript, or css. HTML in its purest form is markup: tags, and content.

No one disagrees with you that JS, CSS, php, or what ever else is a programming language.

The first post was referring to bad HTML markup, such as missing end tags, or improper structures.

No one here said that javascript interpretors should try and "fix" bad code or anything like that : )

phoenix09

12:49 am on Jan 11, 2004 (gmt 0)

10+ Year Member



Yeah, this topic didn't belong in this section, sorry about that.


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.

As you can see, there is in fact disagreement here, but I think it's not that important where the line for programming is drawn, personally I don't really draw a line at all, and don't quite understand why people consider the presence of such a line all that important. Personally I've always found it to be a tremendous advantage to draw that line well beyond HTML, since that means I treat it as seriously as any other programming language.

TheWhippinpost

1:00 am on Jan 11, 2004 (gmt 0)

10+ Year Member



This thread is going in 2 different directions!

Browsers:
Back to the friend and his comments... he's right, no two ways about it, and this is why the minor browsers will never attain mass market.

As commendable (and vital) as it is for the FB's and others of this world to (try) to develop strict standard compliant browsers, they really only (generally) appeal to us snobs - some of the replies above only serve to prove this point - Joe Public doesn't give 3 shredded wheat if a browser is "strict", so what? If he can't suddenly view his favourite sites, it's back to the user-friendly browser for him... and he'll probably go on to dissuade others from switching in the future too.

... and I wouldn't in the slightest bit blame him - The web wouldn't be the rich world it is if authors had to learn the A-Z of strict compliance and I'd also tentively wager that the development of the web - and the current "standard" - wouldn't be as far as it is either.

Sometimes I think we (myself included) get so far up our own arses that we let theory and ideals cloud our judgement of reality - The web is not populated by an elite few. IE is the most popular browser. Joe Public has made the web what it is today. Joe Public finances this... all this made possible because of "forgiving" browsers.

Continue to strive for excellence but lets keep a perspective on this - It's only us "elites" that **** about this whilst the rest of the world just think we're boring geeks :p

killroy

1:06 am on Jan 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, since it seems obviously pointless to argue a mostly philosophical point with folks who've never delved deeper into the metter then using it, I'll throw a curve ball here:

CSS is NOT a language, NOR a data format. It is a system. In fact, what most of you consider CSS is in fact jsut ONe of many possible languages used to define a CSS style sheet. Another one is JavaScript CSS. I leave finding it's specification as an excercise to the reader. But mind you, JavaScript CSS allow s variables and references. And personally I've long since longed to be able to say something like foregroundcolor1=#abcdef and then say background-colour: foregroundcolor1 later one. This is impossible in the usualy CSS language, but possible in JavaScript CSS.

Why this STILL doesn't make CSS written in JavaScript programming is also left as an excercise to the reader.

Please note that I don't mean to step on anybodies tone and simply enjoy the lively conversation. I've done my fair share of compling techniques at uni and spend over 4 years developing compilers and interpretters for a variety of languages.

SN

danieljean

1:47 am on Jan 11, 2004 (gmt 0)

10+ Year Member



Ok, this may not be popular, but I consider PHP to be more of a scripting than a true programming language. But at least you can have an IF THEN statement.

To call CSS mouseovers programming is grossly overstating it. Saying the same for HTML markup is absurd. No loops, conditionals... it's NOT PROGRAMMING.

That's not to say that getting a page to validate and work in several different browsers is easy. That work is essential, always valuable and occasionally very difficult.

SethCall

2:31 am on Jan 11, 2004 (gmt 0)

10+ Year Member



*sputters* php isnt a programming language? It most certianly is!

It may not have as much "out of the box" functionality as c# or java, for instance, and may not get as down and dirty as c++, but as it has variables, control structures, OOP support, and very extensible through the Zend engine, I want you to TAKE THAT BACK :)

Css is on some level programming, as it has the concept of variables (and yes, loops :) )

grahamstewart

3:03 am on Jan 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Getting back to Firebird not rendering invalid HTML... prompted by this discussion I downloaded it the other day to check it out and I tried a few popular sites:

BBC News website: 36 validation errors: renders fine.
eBay UK: No doctype and 121 validation errors for HTML4.01: renders fine.
MSN.com: No doctype and 42 validation errors for HTML4.01: renders fine

So its not like it just throws up when it sees invalid HTML, like most browsers it seems to take a reasonable stab. But I agree that this fear is what holds back minority browsers. I happily use Opera but I wouldn't recommend it to my old mum in case it barfs at a 'Best experienced with Internet Explorer' site (God how I hate that phrase!)

As for the "the web is supposed to be for everyone, so browsers should attempt to render any old cr*p" argument: I have to disagree. Surely if ALL browsers always stuck rigidly to the standards and refused to even display invalid code then it would actually be a lot easier to learn HTML, since you'd only have to learn it once and you wouldn't have to worry about browser differences.

Aaah.. what a lovely world that would be... though we'd all be out of a job of course :)

And yeah.. PHP definitely qualifies as a programming language

grahamstewart

3:06 am on Jan 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



SethCall said:
Css is on some level programming, as it has the concept of variables (and yes, loops :))

It does? News to me! Care to elaborate?

txbakers

3:20 am on Jan 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



loops and variables in CSS? never heard of such a thing.

SethCall

5:18 am on Jan 11, 2004 (gmt 0)

10+ Year Member



Ok, so I took some liberties with css :)

I should really say, CSS-3, (and just sorta css2), has, as I did say, just some elements of programming (simple ones, admittedly)

Taken from the css3 spec:

P {counter-increment: par-num}
H1 {counter-reset: par-num}
P:before {content: counter(par-num, upper-roman) ". "}

which should
"...numbers paragraphs (P) for each chapter (H1). The paragraphs are numbered with roman numerals, followed by a period and a space:"

Long live css programming!
(hit below the belt, dont I?)

PCInk

11:06 am on Jan 11, 2004 (gmt 0)

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



That's not a loop. It's just a counter.

And it's not really a variable either. If you can reset it, and increment it, you don't have much access to it. I want you to show how in CSS you would increment the number by 2096 for the first <p> tag, then by 2097 for the second, then increment by 2098..., starting at 108,657.

That's the power of a programming language which would be simple to achieve the above, whereas CSS just could not do the simplest of tasks.

HTML and CSS are not programming. You don't get syntax error reports and code 500 errors when you have markup errors. CSS is trying to do programming activities (such as roll-overs) by making it simpler for the user to provide the data in order to do this activity.

HTML and CSS are not dynamic. Perl/PHP/JavaScript etc... are dynamic. I can get on file to write 10 completely different pages depending on a parameter sent to it. You can't do that with HTML and CSS. You can't even detect the browser type and serve a different HTML page using HTML and CSS. You need a programming language - such a JavaScript to do this.

You write HTML/CSS and program/code Perl/PHP/ASP. Writing HTML/CSS is a skill, much like an artist and copy writer, but programming is a different beast altogether - although programming can be used to write data to the screen, such as: HTML and CSS!.

(PHP is definately a programming language - so is JavaScript and that is a scripting language too!)

killroy

11:23 am on Jan 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'd also like to add that the definition is what is a programming language isn't the easiest of tasks. In fact if you study IT at university level, you will soon learn that tehre is no easy and clear cut definition. For example, assembly has no loops, just jumps. I've developed langauges (for genetic programming) completely without variables or block based syntax, entirely stack based.

I'Ve seen minimal languages that consisted simply of a line drawn in a 2d plane, and of just 4 or 5 instructions represented by single letters.

The edge is pretty fuzzy, but luckily CSS and html are far enough to one side to identify as markup, and PHP and JS are far enough to the other to identify as programming.

As for the scripting VS programmingdebate, I don't hink tehre is one. It's just a matter of execution. A scripting langauge simply doesn't store the object code. It would be a trivial excercise to store the machine code of a PHP program during execution. So truly compiling a PHP program (or pearl or JS) into a win32 .exe or unix executable is a trivial excercise. Only where the source itself is referenced such as in polymorphic code do you get trouble with that aproach.

Anway, I believe this debate is as old as computing, and not clearly decided. But to call HTML programming, well let's jjsut say it lacks even the most basic features of a programming language.

SN

<ADDED>
Just for extra spice, source code is of course data too, and so is object code. In fact I've written programmes in a language I invented, interpretted in an interpretter written in a mainstream lang, writing out JS code which in turn writes HTML....
</ADDED>

IeuanJ

10:26 am on Jan 12, 2004 (gmt 0)

10+ Year Member



Is HTML Programming?

No of course not, it is Markup.

For me there are three parts to most programming projects.

1) The Data(base)
2) The Engine
3) The GUI/Interface

Now I admit not all programs have 1 and 3 but all have 2. Markup however consists of two parts.

1) The Data
3) The Interface.

There is no engine in HTML, it is equal to a *.ini file that is then used to set up a program. HTML files are used to set up the display in your browser (a program).

Thus to code a HTML page, really you need little more than knowledge of how to format a word document. In effect that is all HTML is, text with formatting and semantics, just the same as a proper word document.

That is how it was meant to be, so that Auntie Ethel can put up her web page and share her croche knitting patters with the world. It is just a system for displaying information.

Now in my opinion browsers should support poor HTML code. Most WYSIWYG editors churn out non-compliant code so how can you blame the unwitting user for that?

Besides which I think anyone who claims a browser should only display 100% correct code should take a course in business studies and marketing. Less than 10% of the web is complient, meaning that 90% of web pages would be displayed incorrectly. Would you buy a TV that only properly displayed 10% of the TV programs available to you?

If Firbird want to go down that route then good luck to them, but I certainly wouldnt use them as my main browser. Although I would gratefully download and use it as a test environment.

Yes your friend is right, IE is a better and more intelligent browser for being able to approximate bad code, the main problem with Ie is that it doesnt properly render correcxt code in the first place!

IeuanJ

10:33 am on Jan 12, 2004 (gmt 0)

10+ Year Member



Oh yes, that little face idea in the browser status bar would be a godsend to me, I don't see why it couldnt happen as it works for scripting already, even telling you the error when you select it.

Plus to the bloke who said CSS is programming - RUBBISH.

CSS is simply a way of defining how markup tags are displayed, even when CSS3 is introduced it will still be just that. And besides, CSS3 DOES NOT EXIST YET!

hartlandcat

7:14 pm on Jan 12, 2004 (gmt 0)

10+ Year Member



People, this thread isn't about whether or not HTML is a programming language.

It would be great if other browsers also implimented the face idea, but it's probably copyrighted by iCab.

balam

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

10+ Year Member



(Not "picking" on mbauser2, but her/his comments put mine in the best context...)

> If the masses don't want to "learn [proper lighting & framing techniques]", they shouldn't be doing anything even remotely approximating "[film-making]".

Please turn in your camcorders, folks. Your home movies stink... ;)

> 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.

I think part of the problem may be that we expect our grandmothers - who only want to offer their knitting patterns & pics of the new grandkid to far-off relatives - to know just which authoring software produces valid markup. Shoot, say "markup" to a grandparent, and they'll probably figure you're talking about a price increase at WalMart.

Is there anything, once it's in the hands of the masses, that hasn't suffered a drop in quality?

As for the markup/programming debate, all I care to add is a quote from Learning Perl (Second edition, page 61):

"No programming language would be complete without some form of iteration* (repeated execution of a block of statements).

*That's why HTML is not a programming language."

mbauser2

5:46 am on Jan 13, 2004 (gmt 0)

10+ Year Member



(Not "picking" on mbauser2, but her/his comments put mine in the best context...)

> If the masses don't want to "learn [proper lighting & framing techniques]", they shouldn't be doing anything even remotely approximating "[film-making]".

Please turn in your camcorders, folks. Your home movies stink... ;)

I used to sell cameras and camcorders for a living, actually. I have a whole series of now otherwise-useless "five minute camera lessons" memorized because I'm exactly this uptight in real life, too.

Most people need good tools before they can learn good techniques. There are a lot of crappy cameras on the market, just like there are a lot of crappy authoring programs. I don't encourage sales or use of either.

(Most home movies do stink. I've had to sit through a lot of the lately, because both of my brothers had kids last year. Good God, how many times can you videotape a baby staring at the camera, anyway?)

operafan

7:02 am on Jan 13, 2004 (gmt 0)

10+ Year Member



With regards to this, Irecently noticed that my Firebird couldnt process the scripts that was recently put into my hosting provider control panel..
This 50 message thread spans 2 pages: 50