More whining...

Started by Destina Faroda, April 14, 2007, 09:32:38 PM

Previous topic - Next topic

Destina Faroda

I may have expressed this complaint before, but I REALLY hate using CSS.

What I hate about it is that it's more like an object-oriented program language than an actual markup language.  Object-oriented programming is fine...if you have the mind for that thing.  The problem is that it's needlessly complicated, and while CSS has turned the World Wide Web into a visual work of art rather than a functional system of links, this has come at the sacrifice of the accessibility of actually learning how to do things, and it decreases experimentation because nothing is kept simple, and you have classes upon classes of stuff that you don't know what does what instead of trial and error.

HTML was just fine, dammit.
Sig coming...whenever...

Reese Tora

CSS is broken anyway, since noone seems to implement it properly... I always just stick to HTML and have done with.

Then again, my work isn't pretty.  :blush
<-Reese yaps by Silverfox and Animation by Tiger_T->
correlation =/= causation

Cvstos

Well, OO-programming can make very complex things actually substantially less complicated.  This is particularly true when reusing the same code over and over.  For an awesome explanation of OO programming, I highly recommend "Head First Java".  I've never seen a programming book teach a language so well.  It was actually entertaining!  More tech and textbooks need to be written like that.

As for CSS, well, I'm no web programmer (yet).  I don't know that much about it.  For my website needs I just use Rapidweaver.  I think that uses CSS, too, but I'm just happy it makes good looking stuff with minimal effort.  Go lazyness!
"The problems that exist in the world today cannot be solved by the level of thinking that created them." - Albert Einstein

"Great spirits have always found violent opposition from mediocrities. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." -Albert Einstein

superluser

My first (and to date, only) OO programming language was (pre-ANSI) C++.  Scared me right back to ISO C.  One of these days, I'll learn Common LISP, but I don't think I'll touch another OO language until I'm cleansed by the pure light of LISP.


Would you like a googolplex (gzipped 57 times)?

Cvstos

#4
You people are nuts.  :P  C is annoyingly restrictive once you get used to the OO goodness of C++ and Java.  It can really simplify your main programs.  I've written more than one program where main basically handled user IO and nothing else.  The objects took care of everything that needed to be done.   :boogie
"The problems that exist in the world today cannot be solved by the level of thinking that created them." - Albert Einstein

"Great spirits have always found violent opposition from mediocrities. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." -Albert Einstein

Tapewolf

#5
Quote from: Cvstos on April 15, 2007, 03:39:36 AM
You people are nuts.  :P  C is annoyingly restrictive once you get used to the OO goodness of C++ and Java.  It can really simplify your main programs.  I've written more than one program where main basically handled user IO and nothing else.  The objects took care of everything that needed to be done.   :boogie

Lucky you  >:3 
I need it to work on several platforms, most of which do not support Java.  The only one which does - the (G)RIM Blackberry - has it's own f--ked up version of Java which is different and strange and most of the useful stuff like zlib etc is either unsupported or broken.  Normal Java apps do not work on the Blackberry and Blackberry apps do not work on normal Java - write once run anywhere my foot  :rolleyes

I must admit I've never really got into C++, and the Win32 API is C anyway, so we started out with C++-being-used-as-C.  Windows Crap Edition didn't support MFC on all targets until after the project was well underway.

Now, the switch to use classes for the widgets made the program smaller and easier to understand.  That was wonderful, and we've done the same kind of thing elsewhere too, so it's not like I just hate C++, but we don't use all of it.
I've never really liked exceptions, for example.  The try-catch thing appalls me - it feels like you're trying to work around the problem after it's happened instead of preventing it from happening in the first place, so we don't use them.  Palm doesn't support them anyway, and Symbian has its own different and strange exception handling system so we simply don't use them at all.

As for "the objects took care of everything that needed to be done" it sounds like you've got a decent set of libraries.  I assure you this is not simply because it's C++ or indeed object oriented at all.  Most of the work in the Blackberry Java port was implementing libraries which were missing and the ones that were there but didn't work or couldn't support what we needed to do.

Symbian is interesting.  They decided to make the perfect object-oriented operating system.  It looks wonderful on paper, but the reality is that their obsession with OO - even in places where it would not be appropriate - has resulted in something that is very aggravating to use.

In short, use the right tool for the right job :P

**EDIT**
And the mellotron softsynth thing I made has to be as small and as fast as possible so it was done in C and assembler...

J.P. Morris, Chief Engineer DMFA Radio Project * IT-HE * D-T-E


Darkmoon

Quote from: Destina Faroda on April 14, 2007, 09:32:38 PM
I may have expressed this complaint before, but I REALLY hate using CSS.

What I hate about it is that it's more like an object-oriented program language than an actual markup language.  Object-oriented programming is fine...if you have the mind for that thing.  The problem is that it's needlessly complicated, and while CSS has turned the World Wide Web into a visual work of art rather than a functional system of links, this has come at the sacrifice of the accessibility of actually learning how to do things, and it decreases experimentation because nothing is kept simple, and you have classes upon classes of stuff that you don't know what does what instead of trial and error.

HTML was just fine, dammit.

HTML became needlessly complicated as they tried to make it do more and more layout. HTML was never meant to do layout. It was meant to handle content.The joy of CSS is that it removes the layout from the content. You can, in fact, change the layout in one file without having to reprogram all the content.

HTML programmed with CSS in mind is also more accessible for screen readers and webspiders. There's a lot that's great about what CSS has done for HTML.

As for how difficult it is, I don't agree at all.
In Brightest Day. In Blackest Night...

Damaris

If he was being nice, Darkmoon would also suggest you get Firefox's Web Developer Toolbar, which allows you to edit your CSS in real time, as see what it does.  You still have to check it in IE, which doesn't always work correctly, but it makes things easier.

You're used to flame wars with flames... this is more like EZ-Bake Oven wars.   ~Amber
If you want me to play favorites, keep wanking. I'll choose which hand to favour when I pimpslap you down.   ~Amber

Destina Faroda

#8
Quote from: Darkmoon on April 15, 2007, 09:35:13 AM
HTML became needlessly complicated as they tried to make it do more and more layout. HTML was never meant to do layout. It was meant to handle content.The joy of CSS is that it removes the layout from the content. You can, in fact, change the layout in one file without having to reprogram all the content.

HTML programmed with CSS in mind is also more accessible for screen readers and webspiders. There's a lot that's great about what CSS has done for HTML.

As for how difficult it is, I don't agree at all.

I guess we're going to butt heads on this one.

I understand that HTML was meant to handly content and some of the most often used aspects, like using tables for layout, broke its intended usage.  But at the same time the actual "code" used to do things was far easier to understand.  If you want to do anything in a page, surround it with the appropriate tags.  You don't have to include or omit a statement in a class to make the entire page work.

Separating the content from the layout may widen the ability to customize the latter, but that the same time it makes it completely impossible for an inxeperienced person to figure out how to modiify, let alone create something that is functional.  You don't merely create lines of statements set the all parameters for the page that call the stylesheet; you actually have to tell the tags how to behave.  But all the layout and formatting is not completely contained within the CSS.  You still have to tell the content what to do sometimes, so instead of updating in one area to affect text, you have to update in at least two files -- once to affect the content and once in the appropriate class.  And forget it if because of all the subclasses available that you forget which one it is.

To make matters worse, like any language (programming or markup), CSS is very fault intolerant.  This is a problem with HTML as well, but HTML is more linear and less structured, which means there's less you have to look out for if there's something wrong.  Furthermore, an HTML error can be localized to a single page, so if you upload a site, you can find the error and fix it, because you can see what's different in one page than in another page.   On the other hand, if you mess things up with a style sheet, you could mess up your entire site, and since there's nothing to compare it to, you have to go LINE BY LINE and see what's causing the logical errors in your code...and hope you don't make an any syntax errors at the same time.

As far as layout CSS still can't give reliable footers.  Reliable and customized headers and side menus, yes.  But the only way you getting a reliable footer is if you add PHP to the mix, and that's an entirely whole new can of worms.

The bright side to CSS is that you don't have to repeat as much code for layout.  The downside is you have to know what that code will do, and given that every class has waaay more potential attributes than HTML, that's a lot of knowing.
Sig coming...whenever...

Reese Tora

Quote from: Destina Faroda on April 15, 2007, 11:48:15 AMyou actually have to tell the tags how to behave.

This is supposed to be a feature, not a drawback; you can design custom tags.

It's a lot like XML.  You have a language that is fairly light, but powerful enough to allow you to define any effect you want.  You build your libraries to specialize the more general stuff so you have verry specifically the effects you want.  The problem is that the simple language isn't entierly simple, and it isn't identically implemented on every browser (nor is anything with a sufficiently large command set properly implemented.... HTML, SQL, Java ) so you have to learn what is universal and what isn't.

Now, me, I took some java and some C++ in college, but I was never shown how to do object oriented.  We went over it in a cursory manner in Java, but the OO was reserved for more advanced sections of each language that I never took.
<-Reese yaps by Silverfox and Animation by Tiger_T->
correlation =/= causation

Darkmoon

Quote from: Destina Faroda on April 15, 2007, 11:48:15 AM
I understand that HTML was meant to handle content and some of the most often used aspects, like using tables for layout, broke its intended usage.  But at the same time the actual "code" used to do things was far easier to understand.  If you want to do anything in a page, surround it with the appropriate tags.  You don't have to include or omit a statement in a class to make the entire page work.

You surround bits of code in divs or spans, paragraph tags, list items, et all. Nothing has changed there. Instead of using a table to control the layout, you're using a div. The only real difference is that you aren't limited to having to line the content up with the cells of the table.
QuoteSeparating the content from the layout may widen the ability to customize the latter, but that the same time it makes it completely impossible for an inxeperienced person to figure out how to modiify, let alone create something that is functional.

If you're having issues with seeing what will do what in CSS, go download the Web Developer Toolbar for Firefox.

QuoteYou don't merely create lines of statements set the all parameters for the page that call the stylesheet; you actually have to tell the tags how to behave.

Well, if you're still using bold tags, that's an issue all into itself. However, I don't see a big issue in creating a class named "bold" and using that. It's more versatile that just using the bold tag. You can apply the "bold" class to all kinds of different elements. You want a series of paragraphs to all have bolding, wrap all those paragraphs in a div marked "bold". Voila. What could have taken 5 bold tags for 5 paragraphs takes only one. Plus, if you later realize you want the "bold" class to not only bold, but make the text a bright blue, well you can easily add that in. No harm, no foul.

QuoteBut all the layout and formatting is not completely contained within the CSS.  You still have to tell the content what to do sometimes, so instead of updating in one area to affect text, you have to update in at least two files -- once to affect the content and once in the appropriate class.  And forget it if because of all the subclasses available that you forget which one it is.

Well, if you organize your CSS code, that shouldn't be an issue. I tend to go down the HTML elements one by one in my CSS. Everything lines up for major layout items. Any specialty items I make that are used in multiple areas, like a "bold" class, I put at the bottom of my CSS sheet for easy viewing.

QuoteTo make matters worse, like any language (programming or markup), CSS is very fault intolerant.  This is a problem with HTML as well, but HTML is more linear and less structured, which means there's less you have to look out for if there's something wrong.  Furthermore, an HTML error can be localized to a single page, so if you upload a site, you can find the error and fix it, because you can see what's different in one page than in another page.   On the other hand, if you mess things up with a style sheet, you could mess up your entire site, and since there's nothing to compare it to, you have to go LINE BY LINE and see what's causing the logical errors in your code...and hope you don't make an any syntax errors at the same time.

Again, if you organize your CSS code, you won't have that big an issue if something breaks. It's generally quite simple to find any errors because the first thing to break is usually fairly obvious.

In the cases where it's not, yes, you'll have to comment out chunks of code until you find the right error, but heck, you have to do that when you have major HTML errors too. Being able to compare one section of code on two pages doesn't always make the issues obvious.

QuoteAs far as layout, CSS still can't give reliable footers.  Reliable and customized headers and side menus, yes.  But the only way you getting a reliable footer is if you add PHP to the mix, and that's an entirely whole new can of worms.

"clear: both" is a magical bit of code. Makes my footers reliable, thank you.

QuoteThe bright side to CSS is that you don't have to repeat as much code for layout.  The downside is you have to know what that code will do, and given that every class has waaay more potential attributes than HTML, that's a lot of knowing.

I'll take having more to work with over having to change 500 pages when I make a major revision any day. And before you think I'm over exaggerating, ICVD had 535 pages at last count.
In Brightest Day. In Blackest Night...

Cvstos

Tapewolf: There are tasks for which OO isn't appropriate.  There are also platforms that don't really support Java or C++ that well.  C++ isn't a true OO language, anyway.  Neither is Java, but Java is a hell of a lot closer.  C++ is an expanded version of C that pretends to be OO.

Now, for desktop operating systems like Windows, Linux, and Mac OS X, Java, C# and C++ can cover you for a good 90% of the tasks most people do.  Also, most things that one can do, the other can do, too.  Java is uniquely great for getting cross-compatibility and, in my opinion, is easier to work with. 

However, for stuff that needs very fast performance (like graphics) C++ and C# are better bets.

For Mac OS X, Obj-C and Java are the better languages to work with, especially when considering Obj-C's Cocoa libraries.
"The problems that exist in the world today cannot be solved by the level of thinking that created them." - Albert Einstein

"Great spirits have always found violent opposition from mediocrities. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." -Albert Einstein

Destina Faroda

I think I'd better use an example to illustrate my point.

I was playing around with widely-known Suckerfish Drowpdown layout, because I thought about using it to format a once-existing site of mine (no, not the comic) and make it pretty..  I particularly like the enhanced format]http://www.htmldog.com/articles/suckerfish/dropdowns/example/]enhanced format the author provides, and I sought to combine it with the vertical menu.   Since both versions were compatible with most browsers, I thought that with a little tweaking, I could combine both.  Although I first attempted to modify the horizontal layout to make it vertical, that didn't work, so I attempted to modify the vertical layout to make it more like the pretty horizontal one.

This is as far as I've gotten, in case you didn't see it in the link above.

http://www.cvrpg.com/destina/sucker/sucker.html

It looks fine in Firefox and Netscape (and I'd guess Opera and Safari as well), although I haven't actually tested the links, but in IE  (and presumably Konqueror) the submenus go too far to the right, rendering the site unable to be navigated.  Now I know IE has CSS issues, but I didn't modify the code that much, and after going over it change by change, I cannot determine the cause of this.  Searching for the answer gives me nothing, as most people who actually plan to implement the layout know enough about CSS not to encounter this problem.  And that's what I consider the drawback of CSS.  Because it requires such specialized knowledge (much like Javascript), you can't really even "look" up the answer if you have a clue of what you're doing, in comparison to a comparable problem in HTML, in which case it's due to not closing a tag correctly or something.  LIke a programming language, if you don't get it, you don't "get" it and someone providing an answer won't give you a greater understanding of what needs to happen.
Sig coming...whenever...

Darkmoon

It's not that it's specialized, it's that sadly, the suckerfish dropdowns have been around for so long, most of the "help" that was written about it has long since fallen off the face of the planet.

Before you go "that's just an example", there are sites dedicated to helping people but showcasing the stupidity of browser errors. Go hit "Position is Everything". If you can't find the reason there, you might try just * hacking some extra, IE specific code in.
In Brightest Day. In Blackest Night...

Destina Faroda

#14
Excuse me for being behind the curve, then!

Specialization is apart of the problem, because you have to know what precisely is wrong with a bunch of statements that really don't make sense.  With HTML, you could pretty much just bang away at it and if there were an effect that you wanted and couldn't do, well you just couldn't do it with HTML and neither could anyone else.  With CSS far more is possible, but actually working with it effectively requires knowledge beforehand. It's not as though you can go to a sytle sheet, tinker with it and create the effect you want by trial and error, because there are too many variables for that.

There's help out there, but it's for people who are doing more extensive edits and who know what they are doing.  For people like me who have no clue, no one actually identifies the problem and how to fix it.

By the way, for something even older in HTML how about the Blink tag that wouldn't work in IE?  Or background fixed property?  You can find clear information on that today more easily, and those have been issues since the 90's.

Edit: Yes, I finally figured out the problem.  The problem is the "pretty" example is dependent on the container class.  As a result, the only way to make the ugly format pretty in IE is to include the container class.  Then it will work decently.
Sig coming...whenever...

Darkmoon

Heh, usually something like that in IE. I've run into more issues than I can possibly go into when it comes to IE. I seriously hate IE.

As far as CSS is concerned, I just don't share your viewpoint. Yes, you can do extensive stuff in it that boggles the mind, but for the average person, you never NEED to touch that stuff. It's like your major gripe is that there's all these things that are possible, and you hate it, even though all you really want to do with it is simple layouts.

Why not just make simple layouts until you're comfortable, and grow out from there.

Oh, and btw, "A List Apart" is the bible.
In Brightest Day. In Blackest Night...

Destina Faroda

#16
It turns out that container fix was a false alarm.  The page is broken in IE again!  I give up.

While I agree the average person doesn't need to touch that stuff, that's my main gripe about CSS -- it's designed to be inaccessible to the average person.  True, I might want to save the world with CSS, but if I an average person, can't grasp a simple layout (this is simple in terms of CSS) after working on it not for a few hours, not for days, but for weeks and months off and on, that signals that there's something wrong with the language.  (There's something wrong with me too, of course, but that's another matter.)  The language itself is elitist instead of being simple to learn, and for someone who likes to learn, it turns the activity into something I hate.  It has helped turn the Web from an interactive experience as determined by the users into something far more passive, where only the "gifted" create things that are functional and everyone else must depend on the talented few.

You really can't practice at CSS haphazardly.  You can't copy and paste and a portion of what makes a layout work right.  You have to practically copy the entire thing then work from there, and if one piece is misaligned...BAM.  End of story.
Sig coming...whenever...

Darkmoon

(blinks) Or you're making things too complicated and need to back some parts off until you'er more comfortable with the language.

It's not elitist, Destina. Not any more so than HTML is, which it certainly isn't. It is, in my experience, just as easy to pick up as HTML. You are the first person I've talked to that has had trouble learning it when they alerady have a base knowledge of HTML.
In Brightest Day. In Blackest Night...

Nimrods Son

I like other people whining, so yeah, Destina: It's elitist, and the world has turned into a big ball of crap in the last 500 years!

lucas marcone

i really would'nt try to argue with some one one how "hard" something is because it's all relitive. if you find drawing with pen and paper hard and sprites easy i may find sprites to be hard and pen and paper easy. it all hinges on how createive you are at trying to understand it.

Aridas

congrats on the pointless bump.

lucas marcone

*looks at dates*  :B my bad this week hasn't been my week.