- 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
And that’s why you shouldn’t let Z80 TI-BASIC programmers touch JavaScript (or any other language, for that matter)...
Admin
Surely that's the result of some minification script...
Admin
.. that was then subsequently edited instead of the original?...
Admin
But does that count when it's actually "redefined" in a function in the function? Really, is it? I don't know javascript's scoping loopiness to know. And what's the point of what it's doing? Is it really manipulating the original
a
that's actually in the same scope ask
?Admin
This reminds me of a basic program that controlled an instrument. The "author" took two PAGES of Basic to read the instrument 5 times and take the average of the middle three readings. He used only discrete variables A1 thru Z9 or some combination thereof. Never thought of arrays or loops. I can only imagine the other WTFs the code had, but I didn't look too closely for fear of a brain explosion.
Admin
That's pretty nice formatting for a minifier-- and don't call me Shirley.
Admin
TRWTF is the Daily WTF's website layout that robs the code sample box of a third of its width.
Admin
Looks like this article broke feedly's UI. Some of the javascript got executed presumably?
(New user, can't upload screenshot.)
Admin
Congratulations on fucking up the HTML encoding. Feedly was not amused:
[image]Admin
Aren't functional PL™ nice? Nowhere else can you abuse functions in such a disastrous way.
Admin
I like how he has "DEFAULT" defined twice in succession. I wonder if any of the other 24 letters have similar issues.
Admin
Admin
The single character names reminds me of a developer I worked with about 20 years ago. The man really was super talented, and could squeeze the last bit of performance out of a machine [he owns many of the core gaming engines from that period]...but it code was completely unmaintainable.
The "trick" was to keep him in a small box where the benefits of his talents outweighed the costs of nobody else being able to effectively work with his code....
Admin
Also notice there's a CSS class called JButton. I thought I'd called that one out but it must have been in an earlier draft.
Admin
J Button?
[image]Admin
No.
a
is passed in as an argument to the inner function, so that's thea
that's in scope. There doesn't need to be avar
.Admin
Wrong function. The scope with the parameter is the containing scope that it looks to.
Admin
Ohhh.... it does get passed there too. It was too stupid for me to see it.
Admin
Looks like someone saw some minified code (e.g. Google) and thought that was best practice for source code.