The Daggy Close Taggy
Listening to: Spirit Walker - The Cult
One of the very nasty habits that was prevalent in my early ASP code was this sort of thing:
...
<% Response.Write("<div id=""" + div_id + """>) %>
hello world
</div>
This is very bad because it makes reading the code really difficult. You need to hunt for the opening div tag … you know it’s got to be there somewhere because there is the daggy close taggy. Wading through someone else’s rhtml I found exactly the same behavior. For a moment I smiled, it was like seeing an old and badly behaved friend - and then he threw up on the carpet and I sighed one of those (very rare) *scripting* sighs. Bad habits never die … they just move programmers. For the record the way to do it is:
... <div id="<%= div_id %>"> hello world </div>


