A long time ago when I started my career as a developer I had both the unfortunate and fortunate experience of working with existing code - that is...
For further actions, you may consider blocking this person and/or reporting abuse
I stopped there, I believe you 😂
New and shiny code today is the legacy code of tomorrow.
True, but that code sucked back then too.
I once came across a developer that was able to write 'instant legacy' code.
Yep, this.
I once inherited a PHP application in a single index.php that echo'd four or five different HTML pages depending on a post back to itself and whether it was post or get and then the contents of the post or get.
All of the business logic looked exactly like this.
I once wrote an application like this. I guess we all have dark pages of our history )
That's a pretty cool way of seeing things. Of course, it wouldn't always work on a large scale, where the requirements can change much later on. But when working on something isolated, some specific functionality, I think it's a good mantra.
i'd have to say this actually looks clean? you have to take into context the time frame it was created and what was available then. "front end" development didn't exist in the slightest.
i inherited asp (classic) legacy code and grew through php that looks much like this and couldn't go past certain versions because of the "zend" restrictions/legacy connections. it is the reality of being a developer.
thanks for posting something so raw. it really gives people a grasp of what code is actually out there!
It was in 2013, at least we had Angular.js
this HURTS. what hurts worse is that when i first got into web development and backend development by screwing around on php5 when i was 13, i did exactly this.
hurr, whats an API??? MVC??? :thinking:
I know the feeling! I inhereted a HTML4 site that was based on a Wiki Site. Had to strip that all out and bring it into HTML5!
Always fun to see the Gilded Rose in production! ❤️
In that case, it's more than a stripped Corpse flower. The gilded rose can be refactored easier.
Gilded Rose is as logically as gnarly as this, the reason this is harder to refactor is b/c it's (presumably) untested and it depends on web requests and a database.
And just like people, it rots.
:D