I forgot about that!
The first time I got that animation of the dog actually walking away...
I screamed!
Don't remember exactly WHAT I screamed, but it was something not polite.
I forgot about that!
The first time I got that animation of the dog actually walking away...
I screamed!
Don't remember exactly WHAT I screamed, but it was something not polite.
Assembly background... I have no doubt about it.
IIRC, the primary use of the PASCAL macro was to have the compiler use a Pascal byte order and method of passing parameters so the function could be called from Pascal-based languages. It was pretty common in the 90's.
The use of the 'register' keyword is also a good clue for the age of the code.
@Zylon said:
Now I'm feeling a bit paranoid. This is (more or less) the code I currently use to test minimal browser support. Any WTFery abound?
Quite a bit. Well, not WTF worthy, but bad practices all around.@Zylon said:
<!--
@Zylon said:
<script type="text/javascript">
Ok, that is good. You do have the right script tag.
@Zylon said:
<!--
Lose this. It hasn't been neede since Netscape version 3 something and it CAN cause trouble in XHTML, if we ever switch to that. (Please don't switch to XHTML now -- the world isn't ready.)
The rest of what you are doing is referred to as 'feature inference.' You check for one thing and assume that if that exists, everything else you need does too.
Please google for 'javascript FEATURE testing' where you'll find a number of ways to test for just the features you are using.
I assume that the Javascript is just an enhancement and that if I browse your page using my ancient javascript but no DHTML features, that the fall backs will still let me use your page properly.
Being in the moped (two wheels, 50cc engine and *pedals*) I understand why you would have to give up a regular shopping cart in favor of "try to tell us what you need."
There are only a few brands out there who give any sort of part manuals or service manuals. For those companies, I have the interactive parts catalogue on my site and you can browse and buy right from there.
For MOST bikes, however, not only is there no documentation or references, there is no regularity either. What coil is used on this bike? Whatever coil was cheapest when THAT particular bike was made. Within the same year they can switch out dozens of major pieces, none of them interchangeable and none of them having part numbers, etc.
Most of the time I ask people to take pictures and email them to me. Oft times we can recogonize what it is, or at least tell you if we've seen one before. If we haven't, you're screwed.
Not that that excuses that website -- but it does defend the business model.
While cruising on one of my favorite haunts, alt.html, I found an advertisement for a WONDERFUL service that would encrypt your HTML pages and keep them free from prying eyes. The Javascript dependency is thrown in for FREE, even though it wouldn't too too hard to remove that "issue."
Suspecting something slightly less than advertised, I had to wander over and go look. Bored and curious, I stayed and decided to wander around their site even further.
First, allow me to present our guest for this evening,
Please, take a few moments to get to know our guest and make them feel suitable welcomed.
Then, wander over to the How it works and marvel at the secrets of Ascii to Hex conversions. If you'd like, copy the secret-encrypted message and change all of the '%' to ':' then visit a quick to Our friendly Hex-to-Ascii True, the hex-to-ascii site doesn't handle line feeds, but that hardly keeps us from seeing the secret password.
In our next WTF, the order page gives us the next WTF. $49.97. Need I say more?
Finally, for those of you who enjoy going into the world of WTF's, please continue as we get into the actual code of the deal. I'll short-cut you to the Member's Only page where you can click cancel to skip the password. Here, we take a quick look at some of the actual code used.
function hexfromdec(num) { if (num > 65535) { return ("err!") } first = Math.round(num/4096 - .5); temp1 = num - first * 4096; second = Math.round(temp1/256 -.5); temp2 = temp1 - second * 256; third = Math.round(temp2/16 - .5); fourth = temp2 - third * 16; return (""+getletter(third)+getletter(fourth)); } function getletter(num) { if (num < 10) { return num; } else { if (num == 10) { return "A" } if (num == 11) { return "B" } if (num == 12) { return "C" } if (num == 13) { return "D" } if (num == 14) { return "E" } if (num == 15) { return "F" } } }
Compare that to these functions for converting hex and dec.
function d2h(d) {return d.toString(16);} function h2d(h) {return parseInt(h,16);}
Then finally, our last WTF of the night.
// Courtesy of SimplytheBest.net (http://simplythebest.net/info/dhtml_scripts.html)
Though I do suppose that begins to explain a lot.
For the non-javascript, not-html people, let me explain simply. You can't protect your HTML pages. You can't protect your images. You can slow down some people a tiny, tiny bit -- and cause problems for everyone else.
@morbiuswilters said:
XHTML is not usable? Uh oh, looks like I have to go port the past 50 websites or so I developed to HTML!
XHTML is wonderful, if you know how to keep styles out of your markup and in your CSS.
(Hope I'm quoting the right person)
XHTML is not usable as a general purpose markup language for web design, mostly due to IE's broken handling.
Short story: IE requires XHTML to be served with an html mime-type. This puts IE into "quirks-mode" and turns on the tag-soup browser, which manages to mostly extract usable HTML, but cancels out most of the positive benefits of using XHTML.
In addition, in-line Javascript requires being wrapped in a CDATA construct, as well as the unary -- operator causing its own set of grief.
See Sending XHTML as text/html Considered Harmful for a much more detailed explanation. I really don't understand WHY people insist upon trying to use XHTML before the world (and User Agents) are truly ready for it.
@djork said:
My money is on some coding-by-phone situations where the genius at the keyboard heard "document dot write" and took it a little too literally.
Ya know, that "feels" right. Best explanation yet.
@shadowman said:
That was pointed at the forum software ... forgot to mention. We used to get a sideways scrollbar for posts like this. Now we have to buy a bigger monitor. OR the image could have been cropped.
Or, hover over the image, bring up the context menu and chose 'View Image' or your UAs equiv.
@ActionMan said:
Hasn't anyone heard of Prototype? It makes JavaScript 50 easy...
Yup, heard of it.
I will admit I did steal the $() function from an early version of prototype, but then as I got better I realized I needed it less and less. (Not gone, don't get me wrong, but document.forms.myform.myelement often works better.
Prototype has a number of issues one should be aware of before deploying on a business site. If you aren't sure you can fix it WHEN it breaks, don't use it. (It does a fair amount of browser sniffing and doesn't play well with "non-standard" user-agents including cellphones and PDAs. Search comp.lang.javascript for more than you'll ever want to hear on the subject.)
@MarcB said:
IE's particularly borked and refuses to let you change or set attributes on elements, usually at random. Doing x.setAttribute('attribute', 'value') works for some, but fails for others, while doing "x[attribute] = 'value'" works/doesn't work for yet another set. Sometimes it's just easier to rebuild the tag using innerHTML, even if it isn't "best practices".
And sometimes IE can break innerHTML in some very creative ways. For a non-standard that MS came up with, its fun.
<table> is broken rather badly, though <tbody> works. IIRC, <select> doesn't work well either.
<title> has some weird issues.
A handful of tags have problems with event handlers not working...
Always amazes me the odd things I find in Javascript.
Yes, I know that 80% of the crap can be explained by cluelessness, and another 19.99% can be explained by being trying to bypass add-blocking systems, but what on EARTH could have prompted this?
http://rmd.atdmt.com/tl/DocumentDotWrite.js - Entire contents. function DocumentDotWrite(s){document.write(s);}