Replying to Avatar Chris Trottier

One thing I hate about the Web? You need to know three separate programming languages, each with wildly different syntax, just to build something relatively simple: a webpage.

"But Chris, you don't need to know CSS or JavaScript! HTML will do just fine!"

Okay, how many times do you visit a website that only uses HTML? Almost never! It's almost always -- always! -- made in HTML, CSS, and JavaScript.

And about that JavaScript, I guarantee a good portion of it is made with a framework like React or Node.js. Why? Because JavaScript is such a pain, it now requires pre-written code just to build a structured foundation of that website.

I can already hear you piping up, "But Chris, the modern web is built on highly complex apps, not the static webpages made in the early 90s! Its complexity is a feature, not a bug. We've evolved better scalability and interactivity as a result"

All right, you know what else can output simple *text* to a file -- but also give you coloured backgrounds, and build you apps? BASIC. Here you go:

```

10 CLS

20 COLOR 15, 1

30 PRINT "Hello world!"

40 END

```

You see that? I just accomplished all that in four lines of BASIC code.

And you know what else is interactive? BASIC again:

```

10 SCREEN 12

20 CLS

30 PRINT "Do you want to see a bouncing ball? (Y/N)"

40 INPUT A$

50 IF UCASE$(A$) <> "Y" THEN END

60

70 X = 160: Y = 100

80 DX = 0: DY = 5

90

100 DO

110 CLS

120 CIRCLE (X, Y), 10, 14

130 Y = Y + DY

140 IF Y > 180 OR Y < 20 THEN DY = -DY

150 SLEEP 1

160 LOOP UNTIL INKEY$ <> ""

170 END

```

Wow! Just now I made a simple interactive program -- with graphical elements too -- with 17 lines of BASIC code.

Yet think about all the many, *many* lines of code that modern web devs use to make something as simple as that -- because I guarantee that a good many people would just use React to make something as simple as "Hello world!" or a basic interactive bouncing ball, and then use 100MB of RAM in the process.

Is JavaScript more scalable than BASIC? Well, I question how scalable something is when it requires *more* lines of code, even with a framework, and guzzles system resources like its Barney Gumble sitting by a barrel of beer.

Am I suggesting that the entire Web be built on some flavour of BASIC? No, not at all. BASIC is built for a local machine, whereas HTML, CSS, and JavaScript are made with a distributed environment in mind -- sending data to a variety of devices with differing screen sizes and resolutions, all with differing accessibility requirements. And even then, you have to consider security.

Believe me, I get it.

Nevertheless, what's simply ridiculous about the modern Web is that it requires so much overhead for what should be a simple thing, and the inefficiency is staggering. Why do we need to overengineer a basic project?

Why do we have this culture of excessive abstraction, bloated dependencies, and unnecessary complexity for something so *simple*?

And it should be a simple thing to build a basic functioning website. You should be able to learn it in one afternoon. You should also be able to accomplish this with one language, not three.

Now I have a lot of hope for WebAssembly. I also think HTMX is pretty darn cool. But what also needs to change is the *culture* of Web development: *everyone* and *anyone* should be able to build a webpage.

Abstraction gives you re-usability. Separation of concerns is a good thing. With modern computers getting more and more RAM, processing power, etc, overhead is becoming less and less of an option.

Reply to this note

Please Login to reply.

Discussion

You can have separation of concerns with *one* generalist programming language.

And overhead will never not be a concern because with, more RAM, devs become less concerned with optimization.

There will come a day when “Hello world” in a web browser requires 64 GB of RAM.

All I know is I've been developing software fir close to 20 years already and development got easier, not harder over time. I love html, css, JavaScript for UI. Each is brilliant at what they do.