Live data from Hacker News

15 years trying to make everyone separate HTML, JavaScript, CSS – and then

twitter.com

1–10 of 177 posts

Re: 15 years trying to make everyone separate HTML, JavaScript, CSS – and then

#3
post #2

It is amazing how much react resembles php and classic asp from 15 years ago. I guess that's what happens when you don't hire anyone over 30.

The same thing lures people in every time. You sit down, open a single file and type for 5 minutes and you've got a baby web app. Whee! The pain comes later. So much pain.

Its like the payday loan of technical debt.

Re: 15 years trying to make everyone separate HTML, JavaScript, CSS – and then

#4
post #2

It is amazing how much react resembles php and classic asp from 15 years ago. I guess that's what happens when you don't hire anyone over 30.

This was exactly my thought, and it's not like I'm even that old. We should know better by now. I went from writing PHP in high school that looked exactly like this, to using Python CGI and then finally Flask to write (I think) very modular, maintainable web applications.

Now several years later I'm inheriting Nodejs and [flavor of the month] Javascript framework projects from coworkers that look like the PHP video sharing site I wrote in 10th grade using XAMPP.

I feel like I have (or everyone else has) contracted some sort of amnesia. Didn't we already hash this out guys?

Re: 15 years trying to make everyone separate HTML, JavaScript, CSS – and then

#5
post #4
post #2

It is amazing how much react resembles php and classic asp from 15 years ago. I guess that's what happens when you don't hire anyone over 30.

This was exactly my thought, and it's not like I'm even that old. We should know better by now. I went from writing PHP in high school that looked exactly like this, to using Python CGI and then finally Flask to write (I think) very modular, maintainable web applications. Now several years later I'm inheriting Nodejs and [flavor of the month] Javascript framework projects from coworkers that look like the PHP video s…

Ah, you think technical design is governed by technical concerns.

It's fashion, like anything else.

Re: 15 years trying to make everyone separate HTML, JavaScript, CSS – and then

#6
What this image doesn't show: Refactor safety.

When I can include my CSS as modules into my components (which, by the way, is still separated, only now it's completely isolated from demonic CSS side-effects), and when I can TEST my HTML (read that again: TEST my HTML, again, easily separatable meaningfully by utilizing a pure-function mechanism), and when I can use something like Flowtype to identify structures in my code DESPITE the type limitations of Javascript, and when I can do it performantly and brainlessly _EVEN IN_ the slapdash "platform" of The Browser (TM), yes, this is a _huge_ step forward. Don't blame the people who decided to do something about the shittiness of Tim Berners-Lee's overly-verbose and unmaintainable HyperText Markup Language for a solution that doesn't look as pretty as Python.

Re: 15 years trying to make everyone separate HTML, JavaScript, CSS – and then

#8
post #4

Earlier quoted context omitted.

This was exactly my thought, and it's not like I'm even that old. We should know better by now. I went from writing PHP in high school that looked exactly like this, to using Python CGI and then finally Flask to write (I think) very modular, maintainable web applications. Now several years later I'm inheriting Nodejs and [flavor of the month] Javascript framework projects from coworkers that look like the PHP video s…

Ah, you think technical design is governed by technical concerns. It's fashion, like anything else.

I've been lucky enough in the general case to either be in charge of system design or have very thoughtful coworkers who are well aware of the burden of technical debt.

Unfortunately I can't babysit every other team and have occasionally inherited some real abominations. Often times it has been worth spending the ~week in man hours to immediately rewrite them to avoid the constant time suck of maintaining spaghetti code down the line.

Often they are a kernel of simple functionality buried in thousands of lines of code smeared across a random assortment of files that can actually be replaced fairly simply once you've sussed out what they're actually supposed to be doing.

Re: 15 years trying to make everyone separate HTML, JavaScript, CSS – and then

#9
post #4
post #2

It is amazing how much react resembles php and classic asp from 15 years ago. I guess that's what happens when you don't hire anyone over 30.

This was exactly my thought, and it's not like I'm even that old. We should know better by now. I went from writing PHP in high school that looked exactly like this, to using Python CGI and then finally Flask to write (I think) very modular, maintainable web applications. Now several years later I'm inheriting Nodejs and [flavor of the month] Javascript framework projects from coworkers that look like the PHP video s…

While old school PHP might look like this it is not the same thing by far. The code in this screenshot is a stateful component and is supposed to encapsulate all the logic on how it should be displayed in one place.

It is close to a view in a MVC framework than true old-school spagetti code.

But unlike a view component in an MVC framework the stateful components can update themselves automatically when data changes much more elegantly than they could in older systems.

Granted some people write React and include business logic in their components but you're not really supposed to do it that way.

Post reply on HN