As I mentioned before, the post Message-ID:
<
[email protected]> gave me a lot fun and seemed to
not need any comments. But as some kind of discussion still raised, I
may provide a bit more explanations why it's so funny.
The main problem is that my code using VAR tag (Message-ID:
<
[email protected]>) is an *actual*
code I have used for my clients.
Therefore it is not a so frequent in clj "reverberating in its purity
mental composition" but a real code having to deal with the dirt and
sin of the real imperfect world. Each detail has some purpose in that
world - and at the same time not correct / unnecessary on the heavens
The fun effect of the criticism was exactly from this collision when
someone having zero practical knowledge (but a lot of theory) is
commenting on a real world fact.
As I cannot express 8 years of practice in one post (moreover I have no
such intention), just few hints:
1. Color values
#FFF instead of #FFFFFF is possible, but *not* recommended, because for
say #F5F5F5 you still have to use the full form. And one with any
web-design skills will never advise to use color names instead of RGB
values. When Thomas will make at least 1/100th of the pages I've made,
it will become a taboo rule for him either: *one cannot trust color
names, they are not guaranteed to be the same across browsers and
platforms*.
I'm not talking about the most primitive colors like "black" or
"white". But it's again brings the question of uniform coding - and
#FFFFFF format remains the only one which should be used.
You are free to call shit on the demented VK mind, but a friendly
advise: while looking for design job within 300 miles around Silicon
Valley, one "background-color: aqua" may override all your perfect
references. And there is a practical reason for it.
2. eventObject.target vs. eventObject.currentTarget (W3C model)
One will find the purpose of it after several *practical* cases like
this one:
<var onclick="
alert(event.currentTarget.tagName)">aaaaaa<span>oooooooo</span></var>
<var onclick="
alert(event.target.tagName)">aaaaaa<span>oooooooo</span></var>
(Click on "aaa" and "ooo" parts in both cases. So that are we going to
use?)
3. window.onload = someFunction vs. <body onload="someFunction()"
Both variants are perfectly valid, but the second one allows passing
arguments w/o using sweetheart closures. While making an easy to
maintain solution for non-experienced users the second variant is much
better, because with closures you have 10/1 chance that the closure
curliness will be smashed to hell. In any case it is always a
per-solution decision and not a subject of some universal regulations.
4. VAR is not intended for psi-links (thus to execute JavaScript code
while staying on the same page).
Sure A is intended for this!
Oh wait - we are not misusing it, it's
really a link on noscript.html plus some little side effect
<a href="noscript.html" onclick="myFunction();return true;">
Oh common - that's a hypocrisy of the worst kind, really.
P.S.
5. "psi" means something else.
As I already said I cannot control everyone's stream of association.
For someone "Ajax" leads to washing, "Bachelor of Science" to bullsh**,
"Vector data type" to geometry and "psi" I even scared to think to
what.
In one cafe when I was talking with my friend on the check stand, the
checker asked me to "stop that as we have children here" when I used
the word "voluntarism". Now I'm ready to pay to know *what* association
did work for him.
FYI: psi is 23 letter of Greece alphabet, it has a wide and
domain-specific use in math and physics. One should try to build your
association chain from this starting point.