Comment On HTML Programmer

I've always felt that seeing the words HTML Programmer on a resume tell quite a bit about the candidate (for a programmer job). I can somewhat understand inflating your "skillset" with items like HTML, typing, breathing, etc; recruiters like to see those. But for a "programmer" to consider markup using a few angle-brackets as "programming" that ... well ... shows a lot. But after seeing how Mike Jervis' colleague programs HTML, maybe I was thinking about thinking about it the wrong way ... [expand full text]
« PrevPage 1 | Page 2Next »

Re: HTML Programmer

2005-05-12 14:14 • by Jeff S

This one is pretty great ... it takes a while to figure it out but once you realize all the work this "HTML guru" did to avoid using simple <A> tags properly it is pretty hilarious!

Re: HTML Programmer

2005-05-12 14:16 • by rogthefrog

Let me get this straight.


This thing builds hyperlinks?


That's it?


[:|]

Re: HTML Programmer

2005-05-12 14:19 • by Mirandir

Oh my! What a brilliant new way to lock non-IE users out... Probably even non-WIN-IE users...


/Mirandir


 

Re: HTML Programmer

2005-05-12 14:29 • by Lenny
I don't believe that this developer did not know how to use an href
attribute.  It is obvious that he has a grasp of html, he should
know this most basic feature.



Once I worked with developing web pages for a portal which liked to
transform hyperlinks to send their targets through a proxy. 
Solutions like this were a way to work around that feature if you did
not want the target to be sent through a proxy.  It is probable
that this developer was in a similar situation.



Or maybe he is just dumb...



Re: HTML Programmer

2005-05-12 14:41 • by Anonymous

How should we know that Alex is not making these things up?


He is a good intro writer, who knows maybe he is also a good WTF inventor!

Re: HTML Programmer

2005-05-12 15:00 • by Rob
34309 in reply to 34307
Please, PLEASE, PLEASE tell me that this was done with some really bad HTML editor like Frontpage and that nobody is really that bad!



--- Slowly losing hope for humanity... :S

Re: HTML Programmer

2005-05-12 15:10 • by allanc
I see two WTFs in that:

1. Should have used JavaScript for greater compatibility.

2. Possibly should have used the HTML comment hack to comment out the
code blocks for backwards compatibility, too, although I'm not sure
that works with embedded VBscript like it does with JavaScript.



On the other hand, 2 might not be a WTF because you pretty much need
some sort of scripting language to do this, so it's not that
unreasonable to assume that nobody without a scriptable browser is
using it. I mean, I certainly can't think of a way in plain HTML to
make a hyperlink to another page...

Re: HTML Programmer

2005-05-12 15:27 • by philln
34311 in reply to 34310
I have only one thing to say... click here

Re: HTML Programmer

2005-05-12 15:30 • by JT
It HAD to have been generated by some editor, .NET or frontpage or something.

Re: HTML Programmer

2005-05-12 15:32 • by Gonzalo
34313 in reply to 34312
    With frmForm
window.location.href = "editAppraisal.asp?page=5"
End With

i love this part
<:o)

Re: HTML Programmer

2005-05-12 15:51 • by Maurits
This is the first WTF that's really made me want to cry [:'(]

Re: HTML Programmer

2005-05-12 16:01 • by mugs
Well I typed a reply, but the forum software choked on it.  I find it ironic that a site that makes fun of other people's code has such crappy forum software.

Re: HTML Programmer

2005-05-12 16:14 • by t3h invisible man
34316 in reply to 34315
WRT commenting out the script, using JS to ensuer compatability, etc.,
it may well be that this is an in-house project so you can guarantee
that all the browsers will be IE6, in which case it's perfectly
reasonable to have un-hidden VB Script.



Sure, the code is daft, but hardly earth-shatteringly bad.  (Unlike this forum software, which is the shits.)

Re: HTML Programmer

2005-05-12 16:24 • by Gonzalo
34317 in reply to 34315
mugs:
Well I typed a reply, but the forum software choked
on it.  I find it ironic that a site that makes fun of other
people's code has such crappy forum software.




specify your error..may be you have a crappy navigator (like IE), or maybe you have a crappy internet connection

Re: HTML Programmer

2005-05-12 16:27 • by mugs
34318 in reply to 34317

Gonzalo:
mugs:
Well I typed a reply, but the forum software choked on it.  I find it ironic that a site that makes fun of other people's code has such crappy forum software.


specify your error..may be you have a crappy navigator (like IE), or maybe you have a crappy internet connection


Nah, it brought me to a new page with an error message on it.  I didn't take note of the exact text of the error, but it was something to the effect of "Unknown" or "Unspecified."  I can rest assured that the error WAS logged though. :)

Re: HTML Programmer

2005-05-12 16:31 • by Maurits
34319 in reply to 34316
Anonymous:
Sure, the code is daft, but hardly earth-shatteringly bad.




Reverse-engineering <a href=""> is earth-shatteringly bad in my book.



The only far-out justification I can think of would be that there was a
rogue spider hitting the site (like Google's Web Accelerator) and they
were trying to obfuscate the links.

Re: HTML Programmer

2005-05-12 16:42 • by christoofar
1.  Ok, WTF didn't he just use <a
href="homepage_whatever"><img .... ></a>??? 
Wouldn't that have accomplished the same thing?



2.  Why does the IMG tag have value="Submit" and type="button"?  It's not even inside a <FORM> tag



3.  OMG a map the same size as the image... a boxed rectangle 30x30 pixels...   how useless.



4.  The only anchor tag on this page has a useless call to the inline VBScript, executing script code unnecessarily.

Re: HTML Programmer

2005-05-12 17:26 • by fluffy
Sadly, I've seen a lot of websites built this way in the wild. EXTREMELY annoying.

Re: HTML Programmer

2005-05-12 18:06 • by foxyshadis
34322 in reply to 34321
I got that error too, it's probably a database error (too many
connections). That's the most common reason for intermittent failure on
a web forum, with cpu overload leading to script or database timeouts
being the more common for a net reset that shows no page.



The only thing this script's missing is right-click protection and
anti-leech referrer code. I mean, if you're going to shackle your user
into following your script, you might as well go all the way.



(By the way, this forum software hates IE and FF equally. It's the
great equalizer, it breaks everything. =D I've always maintained that
it's here to lend us a proper appreciation of the wtfs, by immersing us
in one. It might be time to get rid of a few of the more expensive
lookups since the forum gets pretty slow sometimes, though.)

Re: HTML Programmer

2005-05-12 18:46 • by v3ct0r_m4yh3m
Nice, an image map, simply to cover the entire image. Sweet.

Re: HTML Programmer

2005-05-12 18:48 • by cowbert
34324 in reply to 34320
christoofar:


2.  Why does the IMG tag have value="Submit" and type="button"?  It's not even inside a


tag


Because you don't need a form to merely catch the onClick() event. And
I don't believe the img tag supports the onClick event so you have to
use a button object.

Re: HTML Programmer

2005-05-12 19:24 • by discobean
Mike Jervis' colleague must have been Peter Moulding

Re: HTML Programmer

2005-05-12 21:09 • by Mike
34328 in reply to 34324
Or instead of using an image map that covers the entire image you could
wrap the img tag inside of an a href tag.  Just a thought...



BTW - this is pretty shitty forum software :-)

Re: HTML Programmer

2005-05-12 23:35 • by Matt Ryall

Sub lnkBackToHome_OnClick
With frmForm
...
End With
End Sub

This guy must be used to wrapping a With block around every subroutine he writes in VB. Argh!

Re: HTML Programmer

2005-05-12 23:42 • by Mr. brain
Seeing the code, I can think of multiple reasons


1. The programmer wanted to override the default properties related to
href (for tags with href, the browser contextmenu on right click will
be different).


2. The programmer was trying to simulate the href feature to fool some parsing softwares for web pages.


Re: HTML Programmer

2005-05-13 02:56 • by Tallies
34335 in reply to 34312
I don't think even a generator can be this dumb.

Re: HTML Programmer

2005-05-13 04:39 • by Rik Hemsley
34341 in reply to 34316
Anonymous:
WRT commenting out the script, using JS to ensuer compatability, etc.,
it may well be that this is an in-house project so you can guarantee
that all the browsers will be IE6, in which case it's perfectly
reasonable to have un-hidden VB Script.




Until the company decides to use Firefox because IE is a security
liability. Oh, but they can't, because their in-house apps require
VBScript.

Re: HTML Programmer

2005-05-13 05:00 • by darrenb
34343 in reply to 34331
>
This guy must be used to wrapping a With block around every

> subroutine he writes in VB. Argh!

Quite ... it is especially WTF as he doesn't even use the With reference inside the With block - doh.



Re: HTML Programmer

2005-05-13 05:44 • by DZ-Jay
Holy mother of gaaaawd!



If it wasn't for the bad code techniques (like using a completely
useless WITH block), I would have thought it to be a clever attempt to
impress his colleagues by writing his own HREF link handler.



Well, I guess the fact that he picked VBScript to do it negates any inherent cleverness. :)



    dZ.



Re: HTML Programmer

2005-05-13 07:00 • by fatgeekuk
34349 in reply to 34331

"WITH" blocks are the spawn of satan...


 


all the books talk about them...


 


None of the books say you should never use them.


 


For instance, when using WITH blocks in excel VBA work, it promotes memory leaks that eventually (or not so eventually) bring down excel in an exception error.


VBA -> WITH generates memory leaks.


trusting Microsofts GC also creates memory leaks. you MUST clean up your object references before exiting routines if you want a stable (haha) environment.

Re: HTML Programmer

2005-05-13 08:55 • by travisowens

This is genius, now all his web links are secure as "untrusted" browsers like the hacker tool Firefox or the rogue Opera cannot click, heck they can't even see web links!

Re: HTML Programmer

2005-05-13 08:57 • by travisowens
34353 in reply to 34352
Oh, plus think of all the CPU time you are offloading from the server.  Now your IE client can generate the HTML markup instead of the high end, dual cpu, 2gig memory, hyper bus server with caching enabled.

Re: HTML Programmer

2005-05-13 09:12 • by Aristotle
34354 in reply to 34315
mugs:
Well I typed a reply, but the forum software choked
on it.  I find it ironic that a site that makes fun of other people's code has such crappy forum software.

Not only is the forum crappy... it has that very same WTF. Just go to any thread, like If ++ Increments ..., which has multiple pages, and look at the links to the other pages of the thread. They're all Javascript links.


Great, no?

Re: HTML Programmer

2005-05-13 09:42 • by smitty_one_each
The query criteria form I saw where the JavaScript BFH (Big, Friendly
Hammer) had been used on radio buttons to make them function as
checkboxes.

It's a cautionary tale, really; I went to the project manager (who only
allowed himself to code on Fridays) and ask who was responsible for
this homesick abortion.

The offending WTF was quickly blamed on a consultant, who had
apparently left calling cards throughout the source code of the
application, not just this report interface.

Later, replaying the body language in my head, I reached a different
conclusion.  After that, I realized, no matter the magnitude of
the WTF, diplomacy and an innocent, curious approach is far better.

Re: HTML Programmer

2005-05-13 10:00 • by Rick Scott
They name "frmForm" just tickled me :)

Re: HTML Programmer

2005-05-13 10:06 • by dubstub
34357 in reply to 34354
Anonymous:


Not only is the forum crappy... it has that very same WTF. Just go to any thread, like If ++ Increments ..., which has multiple pages, and look at the links to the other pages of the thread. They're all Javascript links.




That's because this forum software was written in ASP.NET which uses
Javascript for postbacks to the server when it detects that your
browser supports it. If you use a downlevel browser then it doesn't do
this. But the forum software does suck though...

Re: HTML Programmer

2005-05-13 10:07 • by dubstub
34358 in reply to 34354
Anonymous:


Not only is the forum crappy... it has that very same WTF. Just go to any thread, like If ++ Increments ..., which has multiple pages, and look at the links to the other pages of the thread. They're all Javascript links.




That's because this forum software was written in ASP.NET which uses
Javascript for postbacks to the server when it detects that your
browser supports it. If you use a downlevel browser then it doesn't do
this. But the forum software does suck though...

Re: HTML Programmer

2005-05-13 10:17 • by dubstub
34359 in reply to 34358
See what I mean! Obviously "Unknown Error" means "Thanks for your post, everything is ok!" round here...

Re: HTML Programmer

2005-05-13 11:22 • by Alex Papadimoulis
34361 in reply to 34358

Anonymous:
Anonymous:

Not only is the forum crappy... it has that very same WTF. Just go to any thread, like If ++ Increments ..., which has multiple pages, and look at the links to the other pages of the thread. They're all Javascript links.


That's because this forum software was written in ASP.NET which uses Javascript for postbacks to the server when it detects that your browser supports it. If you use a downlevel browser then it doesn't do this. But the forum software does suck though...


That's a really stupid use for Postback IMO -- kinda defeats what the querystring is used for -- /forums/showpost?id=123123&page=4. What's nice about QS is that it's cacheable at the page-level and by ISA -- when everything is a form post, they have to implement this complex post caching mechanism. Now who wants to commission me to write my own forum software ;-).


On another note, I've done things like <span style="cursor:pointer" onclick="location=..."> to prevent spiders from following links. If you notice, the poster name "link" uses this too ...

Re: HTML Programmer

2005-05-13 11:54 • by Maurits
34362 in reply to 34361
Alex Papadimoulis:


On another note, I've done things like [ span style="cursor:pointer" onclick="location=..." ] to prevent spiders from following links. If you notice, the poster name "link" uses this too ...




Sure, there's all kinds of better ways to handle spiders, if this is really what the intention was for the original code.

onclick="location=..." as Alex suggests

robots.txt

[ meta name="robots" value="..." ]

[ a rel="nofollow" ]

Sniff the useragent and don't serve the tags in the first place

Restrict by IP

Add authorization

Require a human-interactive-proof

... and the list goes on ...

Re: HTML Programmer

2005-05-13 12:38 • by Ron

I think there are 3 wtf's here:


1) why is everybody crying about the forum software?


2) why am I so dumb I clicked "report" before I clicked "reply"?


3) why isn't the html program syntax highlighted?


 


 

Re: HTML Programmer

2005-05-13 12:42 • by Ron

I haven't tested his code, but I want to add another possible explanation: to defeat the use of the browser's "back"button.


I think an alternative is to use POSTs instead of GETs (assuming your reason for defeating the back button is a good one I guess)


I'd be surprised that if this were machine generated because it uses inline cursor:hand styles instead of classnames

Re: HTML Programmer

2005-05-13 13:25 • by Alex Papadimoulis
34368 in reply to 34365

Anonymous:
I'd be surprised that if this were machine generated because it uses inline cursor:hand styles instead of classnames


The code was undoubtly a case of write-only coding: excessive copy/pasting without ever reading what your writing. The unused "With thisForm" is a dead giveaway I think.

Re: HTML Programmer

2005-05-13 15:45 • by Cg
34401 in reply to 34332
Also, you would want to do the spoofing/regenerating of anchor tags if
you were wanting to obfuscate the end results/destination from casual
observers.  Still is silly, but there have been legitimate
business reasons in the past to add OTHER functionality to the catch of
these links. 



HOWEVER: using vbscript to do this is just bad, putting a single
statement in a with block is absurd, and not using a parameterized
global function to do this IF NEEDED by each link is even worse.

Re: HTML Programmer

2005-05-14 00:18 • by thetorpedodog
34419 in reply to 34324
Anonymous:
christoofar:


2.  Why does the IMG tag have value="Submit" and type="button"?  It's not even inside a


tag


Because you don't need a form to merely catch the onClick() event. And
I don't believe the img tag supports the onClick event so you have to
use a button object.

All elements support all events: The W3C says so. (But since when has Microsoft listened to the W3C?)

Re: HTML Programmer

2005-05-14 10:27 • by rsynnott
Ah, I recently had the fun task of moving something like this from
Access to SQL Server, and making it usable to non-IE browsers... That
system was full of WTFs; in particular, the original programmer seemed
to think that indexes were something that happended to other people.

Re: HTML Programmer

2005-05-14 12:07 • by rsynnott
34434 in reply to 34358
Is there some fundamental flaw in ASP and ASP.NET which prevents anyone
from ever writing usable forum systems? Or do ASP developers just have
a mental block in this area? I've seen lots of semi-okay PHP forums,
lots of okay tho basic JSP and PERL-CGI forums, but all the ASP ones
seem to be a little mad.

Re: HTML Programmer

2005-05-15 06:25 • by Xepol

a) Nice way to pad yer workload.


b) the with command can be used for optimization since the compiler knows it can cache a pointer in a record for a bit without having to think about it too hard.  Dumb programmers obviously defeat the purpose with spurious with statements.


c) asp.net uses links as javascript so that you can use them to submit forms, so that you can do something USEFUL without having to have a button.


d) looks more like demented code I've seen out of coldfusion, but even its not that dumb


e) Bragging about firefox's superiour security right now is a wtf all to itself. Firefox has the bugs and holes, but not the users and therefore not the wild exploit base.  If it ever gets the users, the wild exploits 'll grow too, and then we'll see if amateur hobbiests working for free in their spare time pitted against pernacious spammers, trojan, and virus writers hunting for zombies while peddling porn are really up the challenge.  It ought to be interesting.

Re: HTML Programmer

2005-05-15 18:47 • by dhromed
34446 in reply to 34443
Testing...



<a href="http://">This a link?</a>

Re: HTML Programmer

2005-05-15 18:50 • by dhromed
34447 in reply to 34446
Good. Now I know HTML just displays.



One of our interns once write this bit:



<a href="BLOCKED SCRIPTlogoff()">Link</a>



<script type="text/javascript'>

function logoff()

{

location.href = '../logoff.asp';

}

</script>



So I called him, and sat him down next to me, and showed him this, and I said absolutely nothing.



He got it.

« PrevPage 1 | Page 2Next »

Add Comment