- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I spent a whole semester wondering what "Creamer Row" was before the Chinese prof finally wrote Cramer's Rule on the board.
Admin
Admin
Admin
This reminds me of several incidents at 2 different technical colleges I attended.
For my Oracle class, the schools IT department had installed Oracle incorrectly on our computers. The first half of the class went fine. The second half, nothing worked. The teacher didn't know anything about Oracle, we just basically were given the books and told to do the chapter while he sat in his office and played solitaire. Another classmate and I spent weeks figuring out the problem and fixing all the computers in the classroom... And after turning in all of the homework, getting A's on the tests, I got a B- in the class due to "lack of participation"...
Another school the head of the computer department asked me "what are you doing here? would you be interested in helping me rewrite the computer careers curriculum?", although to his credit, it was his first year there and he was totally appalled at the shape of their program.
Admin
This is correct, according to my understanding. However, it is still not the case that you can begin a valid HTML document with a <body> tag. The reason:
- Although the <head> tag is optional, there will be a head element whether you put it explicitly in or not.
- The title element is a required part of the head element.
- The <title> tag, unlike the <head> tag, is NOT optional.
So a document starting with <body> has skipped the mandatory <title> tag.Admin
While we're talking standards then, from XHTML Media Types: "the use of 'text/html' SHOULD be limited to HTML-compatible XHTML 1.0 documents"
That is, text/html in the context of XHTML is only for documents using the XHTML 1.0 HTML Compatibility Guidelines: XHTML 1.1 has changes which make it incompatible with HTML, and lacks any guidelines about avoiding such issues. Assuming you're not transforming it or you're otherwise not serving it to the likes of IE, what's so wonderful about 1.1 which outweighs the SHOULD NOT on serving it to most clients?
Admin
More dumber is right!!
Admin
Dave Chappelle did a bit about this in one of his stand-up comedy shows. They have to use fake phone numbers, because there is always some idiot who will try to call the number and try to talk to the character - "Hi, can I speak to Indiana Jones?"
Admin
LOL! I've been scrolling past most of the approx. 2 million comments about what constitutes valid HTML, but I'm glad I stopped on this one.
Admin
Granted, not at the collegiate level, but I had a teacher who was this bad in high school. He was the Computer Science teacher / Wrestling coach, and he taught us that the primary difference between C and C++ was that in C++ you could use the "++" operator as an iterator. Unfortunately, I am not making this up. We also got through the whole year without touching objects or classes (which probably isn't surprising, given his lack of knowledge).
I had an experience like this in High School. I was in my Senior year, taking a Trig class. The teacher we had had just given birth a few days before the school year, and was on convolecent leave. The substitute teacher we had didn't know any trig, and spent the first class of the day sitting in on the Honors Trig class, then tring to teach all the other classes of the day....
Very funny....
Patches
Admin
OMG, this is quite extreme... but perhaps the more subtle WTFs are even worse, because most of the strudents will not notice them and just incorporate the WTF in their "knowledge"...
I remember one prof doing a C++ course who did not grasp the concept of passing objects by value vs. by reference.
e.g., one example was a class implementing complex numbers. In the "divide()" method he needed a helper instance of a complex number (division of complex numbers can be simply done by multiplying with the complex conjugate of the denominator) and therefore created one with "new" and also used this instance for storing the result. So far, so good. Then, after being done with it, he left the method by immediately passing this result back by value in the return statement and could obviously not call "delete" on the object's reference inside the method after returning from it. Unfortunately, passing the object by value does not pass the reference back to the caller, so the caller can't delete the object either. This is a quite popular form of a subtle memory leak, which is - not surprisingly - created by many students all the time (especially in the beginning), but seeing this "pattern" being presented by a prof as "best practice" did hurt a little.
But the real WTF was still to come: When I pointed out the problem, he simply refused to believe me and - to proof his point - compiled and ran the program with one single division operation! Of course, this being a memory leak that only kills memory two floats' worth each time (8 byte on the system in question) it worked flawlessly (even despite the fact that this was an Intel 386 with 1024k of memory ;o)
It took me 10 minutes to talk him into surrounding the calculation with a loop that repeated it for a significant number of times. I'll never forget his face when this time his ingenious creation crashed ingloriously with an "out of memory error"... ;oP
Nevertheless he still failed to see the point.....
Admin
Quoting from http://en.wikipedia.org/wiki/Domain_Specific_Language (italics are mine):
A domain-specific programming language (domain-specific language, DSL) is a programming language designed to be useful for a specific set of tasks. This is in contrast to general-purpose programming language (general-purpose language, GPL), such as C or Java...
and also:
A DSL is created specifically to solve problems in a particular domain and is not intended to be able to solve problems outside of it. In contrast, General-purpose programming languages are created to solve problems in many domains. General Purpose Languages are necessarily Turing Complete.
HTML seems to fit the definition of a DSL. Funny though, they say a DSL is a programming language, but the acronym doesn't include a "P". :)
Admin
I've seen similar sad examples of "educators" delivering flawed information, though this story most certainly takes the case. I just wrapped up an exam today for a certification course in CSS with a rather well-established training organization, and I was extremely frustrated with the number of questions and multiple choice "answers" that were completely and utterly flawed to the point of being outright wrong. Things that went completely against the W3C spec, like one question that basically asserted that pixels are an absolute length unit of measure - they are explicitly defined as relative units by the W3C. Or like the earlier comments that assert you don't need the html element for a valid document. What's a standards geek to do?
Admin
I couldn't be bothered to check through 260 odd comments, but:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<title>foo</title>
<p>foo</p>
IS completely valid. Copy and paste the code into
http://validator.w3.org/
Admin
It looks to me that the situation cannot adequately be explained by stupidity. I suggest that:
Just be grateful that she's not setting the exams.
Admin
I should know better than to drink anything while reading this site...
Admin
What last point? That it's a buzzword? It IS a buzzword. I didn't say that that makes it a bad language, though. It's just difficult to find someone who knows what it actually is and doesn't just paste it on their resume in home that future employers will not know any better.
XHTML itself is usually not considered harmful. As I said, abusing XHTML is harmful. Verily so. Sending XHTML as text/html IS harmful. It's not XHTML if you do that, it's HTML tag soup that happens to look like XHTML, too. Sending XHTML as text/html to incompatible browsers is troublesome because you are sending tagsoup instead of standards compliant HTML -- as a result you'll have to cope with your (presumably otherwise standards compliant) code being treated as such.
If you are sending non-compliant browsers tag soup, you might just as well disregard the XHTML specs for creating that tag soup. Changing the extension of a Word Document to RTF doesn't magically make it an RTF file -- regardless of whether your word processor manages to make something useful out of it when you try to open the file.
Google for the reasons XHTML is "considered harmful" before throwing a fit and calling bullshit. It's not the language that makes it harmful, it's the people who misuse the language, which, if you send XHTML as text/html, includes you, too.
Oh, and of course the W3C's XHTML 1.0 spec suggests a way to write XHTML 1.0 documents which pass as slightly tag-soupy HTML 4.01 (with all the slashes in self-closing elements and such XML-y goodness), but those techniques rely on an incomplete adherence to the HTML specs (if browsers would support all of SGML, they would render the slash in empty elements after the element -- this is a peculiar thing about SGML most people are not aware of and which browsers prefer not to implement; they're not supposed to be full-fledged SGML browsers anyway) and the W3C openly acknowledges that these techniques don't make XHTML documents real HTML documents.
Also note that for an XHTML document to be written that way you need to stick to a subset of XHTML rather than using its full power (such as including other namespaces, e.g. MathML or SVG, in the same document). xml:lang is invalid in HTML 4.01, but lang is redundant in XHTML 1.0.
CAPTCHA: photogenic -- the hell I am
Admin
Reminds me of a course I took at the University of Oslo a few years ago (1999). It was a System development course (Books: "Ian Sommerville: Software Engineering" and "Craig Larman: Applying UML and Patterns"). We had to learn most of the theory in those books and had to do a lot of practical work too.
We were given a huge task that we had to work on as a project in groups of 6. It was an existing C++ project, so we got one week to learn enough C++ to do the job. There was a single lecture named "How to program C++ when you know Simula", and we had to figure the rest out on our own.
In the project we also had to learn on our own how to make bash-scripts, makefiles, use CVS, write project reports in Latex and lots of other stuff. One of our tasks was to modify the program to output data in in HTML format, which we also had to learn on our own. It was assumed that we should be able to find some documentation on the web. There were no practical questions in the exams, just theoretical ones (waterfall method vs other methods etc.), so this was just to get a feel over how stuff works in the real life. Of course we divided the work between us, so that we didn't have to learn everything, but that was one of the points of this project. We were overwhelmed with work and had to learn how to work together and share the load :-)
And that was just one of the two courses I took that semester...
Admin
Sorry, the second book came later, but it was a similar type of book :-)
Admin
My AI class instructor once asked us how to mount her local hard drive when she logged into the UNIX server. No sexism here. She even has PHD degree in CS.
Admin
Admin
You're right. Sorry... :-(
Captcha: clueless
Admin
Which would be relevant if the W3 spec was written for web developers. Even though it is used by them, the specs are actually written for programmers developing user-agents (eg browsers) that support the spec. User-agents have to accept HTML that may not have the tags (hence they are optional) and act as though the elements were implied, however that isn't how HTML is supposed to be written (though a user-agent that supports the spec will still render improper HTML).
Admin
No, in W3 speak "Web developers should use HTML, HEAD and BODY elements..."
In any case it ought to read "Web developers should use <html>, <head> and <body> tags" as all the elements are implied. Using the tags just makes it more structured, which could be considered as easier to maintain.
Admin
Sadly I've met such a bad teacher myself once.
It was on a course where my colleagues and I were preparing to become Java Certified Progammer a number of years ago.
The teacher was a girl who had done some COBOL programming before. She had never used Java in a real-world project. She didn't even know that Java is case-sensitive, so she wondered why her program didn't compile when she wrote "True" instead if "true".
The course was a waste of time and money...
Admin
This sounds very familiar. Once upon a time I attended a BTEC in I.T. (UK) and when being interviewed for the course I mentioned that I'd done some website development, at which the course head remarked "Looks like I'll be picking your brains, as I'm to be teaching Web Development this year.".
Lets just say I didn't stay past 1 month.
Admin
I take it you graduated.
Admin
Agreed. No argument here. A formal definition is pretty hard to come by, but I think a list of essential attributes is reasonable and fairly easy.
Miscommunication/misunderstanding: I meant the language must define operations, not that the user must be able to define new operators.
Maybe I should have put "support", as I did for the other two examples. "Programming Languages must support the concept of operators (whether user-defined or system-defined)" - better? You don't have to be able to define your own operators, but a programming language without operators is basically a programming language without operations, I don't see how you can have "programming" without "operations".
Again, I'm talking in general terms - is or is not "the stack" a place where you can put arbitrary values, and reacquire those values from later? Then it's a "variable" of some type or another. Maybe I should have used the precise terminology, but apart from "variable" what other word is there in the English language for "somewhere you can put something with an arbitrary value and re-read it back in later"?
"Proven equivalent to" != "Is identical to". I'm also suspicious about the "to my understanding" part. Maybe you can express many of the same concepts in "math" and "programming", but I doubt you're trying to suggest they're exactly the same thing.
I wouldn't call math a programming language, either. It has variables (in algebra) and operators, but no flow control.
Again, I never mentioned Turing-completeness once. I would expect that Turing-completeness was essential for any really useful general-purpose programming language, but not necessarily essential for "a programming language" of any type.
Prolog is a difficult case, and I'll freely admit I'm not familiar with it. Nevertheless, Wikipedia handily offers the factoid: "Unlike other programming languages, Prolog does not provide loop constructions. Iterations, however, can be achieved through the use of recursion. Two kinds of recursion exist: tail recursion and non-tail recursion".
So while it may not offer flow-control "loops" as a language construct, it clearly offers the functionality of "looping", irrespective of how it's expressed. Again, perhaps my terminology could have been more precise, but the functionality is there.
I stick to my previous definition:
Variables ("a method of storing arbitrary values and using them again later") - including stacks, registers, references, pointers or variables)
Flow Control ("a method or methods of changing the sequence of instructions executed") - includes loops, if-then-elses, recursion and functions.
Operations ("a way of changing one thing into another") - includes arithmetic, joins, splits, comparisons, etc.
I never mentioned Turing-completeness as a requirement. And your quote only says what general-purpose programming languages necessarily do... it says nothing about whether DSLs must also conform to these restrictions.
Nevertheless, to qualify as a programming language I believe one must implement (at least) some form of variable-value-storage, some form of flow control, and operations of some sort.
Otherwise why isn't English a domain-specific programming language? Or chess notation?
Admin
what, u never heard of affirmative action? it's illegal 2 discriminate on the basis of...wtf???
Admin
Actually, the difference between the two isn't quite clear. Since HTML mixes document information and layout you could state that it is a scripting language and thus Internet Explorer is an interpreter for it. It might come across as non-sensical since HTML is a 'programming language' that mixes a lot of data with its "commands" and is probably not turing complete but she was technically correct. Contrast it for instance with ps, another document description language, but one that allows for pretty ingenious programming.
Admin
I would say that in order to be a programming language, it needs to be capable of producing different results from different input. But even that seems too exclusive, as it requires things be able to accept input. A lot of stupid day-one CS assignments don't take any input, but I wouldnt say there's any threshold to cross whereby "okay, now yer doin' you some programmin".
Though I wouldnt call it an absolute qualifier, any decent programming language is going to have some type of conditional statement. However:
GO UP
GO LEFT
GO RIGHT
GO DOWN
it seems that might constitute a "programming language", though an extremely limited one.
A programming language tells a system what actions to take, while a markup language helps to describe data which another system was going to take action with regardless.
The line may be blurry at times, but HTML is far from the blur.
Admin
Not having read all the comments, I'm sure both have been mentioned, but I can think of two possible reasons for this:
1) If tought by a CS department at a decent university, a class this simple was not only for non-majors, it was probably for 'non-sentients'. As such, the departmental budget was probably $0, and they just randomly picked a registered student and offered the credits for free if that student tought instead of studenting.
2) It could have been tought by one of those brilliant grad students that are only interested in the theory of computation, or some other esoteric level of CS. Really, nothing in the article is CS. At my University, half of the CS professors couldn't have installed windows or turned off spellcheck in Word, for the same reason I can't sew my own clothes - other people can do it, why waste my time on it?
I am a bit confused why someone that reads the thedailywtf would be spending money and time on a course this basic. It's like someone on chemicalwtf.com posting an idiocy from their C034 chemical science for scholarship athletes course.
Admin
It does validate if you add a content-type meta tag:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>foo</title>
<p>foo</p>
Admin
Hahahahah owned
Admin
Must have been University Of Phoenix.
Admin
Admin
I don't know about that. I'd be actually happy to use a language that lets you write several complete nontrivial programs during one test. Try that with C, C++ or Pascal. Let me know when you finish writing the #includes ;)
A quote from http://www.trollope.org/scheme.html, which I can't agree more with:
You may argue that someone who can't grasp something 'as trivial' as C or Pascal's syntax is not fit to learn any CS. To this I only say: reality check -- it just isn't so.
Admin
So, ITT Tech then?
Admin
The irony of this article is that, with the advent of HTML5, it is indeed now legal to omit the HTML tag.
Admin
How the hell did she get a job? Terrible recruiters? Diversity quota? Bribes? Relatives? Sexual favors?
Admin
Забота о жилье - это забота о приятности. Теплоизоляция стен - это не только модный облик, но и обеспечение сохранения тепла в вашем уединенном уголке. Специалисты, команда профессионалов, предлагаем вам переделать ваш дом в прекрасное место для жизни. Наши работы - это не просто тепловая обработка, это творческое воплощение с каждым шагом. Мы п&
Admin
Переутомились промерзать зимой и излишне выплачивать за отопление? Утепление фасада – решение проблемы! Компания "Тепло и уют" с 2010 года предлагает профессиональные услуги по утеплению фасадов зданий любой сложности. За это время мы зарекомендовали себя как надежный и обязательный партнер, о чем свидетельствуют разнообразные отзывы наш&
Admin
Переутомились замерзать зимой и переплатить за отопление? Обтепление фасада – решение проблемы! Компания "Тепло и уют" с 2010 года предлагает квалифицированные услуги по теплообеспечению фасадов зданий любой сложности. За это время мы зарекомендовали себя как прочный и обязательный партнер, о чем свидетельствуют многие отзывы наших клиен&
Admin
Наша бригада опытных исполнителей приготовлена предоставлять вам инновационные системы, которые не только обеспечивают надежную охрану от холода, но и подарят вашему дому изысканный вид. Мы занимаемся с современными компонентами, утверждая долгий срок эксплуатации и превосходные итоги. Теплоизоляция наружных стен – это не только эк