Originally posted by: BoberFett
Originally posted by: troytime
i once inherited a php website, roughly 100,000 lines of code, most of which was echoing html
echo '<br>';
echo '<a href="page.php">link</a>';
echo '<br>';
I inherited a system back in the day where the original developer - a highly paid consultant - created a VB DLL and put a shit ton of HTML in it in the same way. The idiot then created an ASP frontend that essentially said
<%=dllobject.WriteCustomerPage()%>
Changing the text of an email or web page (which happened quite frequently) took a long time and required a recompile and then of course because the IIS server was using the DLL it required downing the web service to update it. It took me months to extract everything and put it into a proper ASP format. It's bizarre, because the guy almost had it right. He already had public objects that exposed all the properties and methods required to create the page using a mix of ASP and VB objects, only he put the HTML right in the DLL and used the objects from there.
That was really only a part of the problem though, because the guy had also used a BAS file in the DLL project and used it to create a global instance of the DLLs main object. I learned an awful lot about the threading model of VB6 and IIS/ASP trying to track down bugs. Turned out every session was sharing a single copy of the object. As long as traffic was low things wouldn't step on each other, but as soon as the number of users outnumbered the active asp threads, sessions would start overwriting each others data.
And this was the same consultant who wrote the companies relatively complex billing system as his first VB project ever, about which he said "When you're learning a new language, it's important to do it on an unimportant project because you're going to make mistakes."
*cry*