Codebase for my homepage.
git clone git://vcs.sapka.me/michal-sapka-me
Log | Files | Refs

commit 153a1b039ba142d922a846b634f76acee2841413
parent 13305196cacb114bce20674978408fd5190716fb
Author: Michał M. Sapka <michal@sapka.me>
Date:   Sat, 11 Mar 2023 18:23:40 +0100

feat: article for 2023-03-12

Aassets/content_images/js-old-logo.png | 0
Mcontent/2023/a-new-layout.md | 1+
Mcontent/2023/i-still-run-local-applications.md | 1+
Acontent/2023/its-near-impossible-to-use-noscript-but-the-future-is-bright.md | 37+++++++++++++++++++++++++++++++++++++
Aresources/_gen/images/js-old-logo_hu0126d3e507346ae6c310a789aeb5727a_22348_150x0_resize_q75_h2_box_3.webp | 0
Aresources/_gen/images/js-old-logo_hu0126d3e507346ae6c310a789aeb5727a_22348_300x0_resize_q75_h2_box_3.webp | 0
Aresources/_gen/images/js-old-logo_hu796fe2f85c6293229bda05b26df17713_114818_150x0_resize_q75_h2_box_3.webp | 0
Aresources/_gen/images/js-old-logo_hu796fe2f85c6293229bda05b26df17713_114818_300x0_resize_q75_h2_box_3.webp | 0
8 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/assets/content_images/js-old-logo.png b/assets/content_images/js-old-logo.png Binary files differ. diff --git a/content/2023/a-new-layout.md b/content/2023/a-new-layout.md @@ -10,6 +10,7 @@ tags: - meta - HTML - rubenerd +- javascript --- {{<img-pull-right "version-4.png" "For future generations">}} Iteratively, I've changed how the site looks over the last few weeks. I wanted it to remind me of sites I've grown with, so: no modal windows, no huge fonts, and no mobile-first approach. I am quite satisfied with what I have here now. It's modern and supports dark mode ([sorry for flash banging!](https://github.com/npmaile/blog/blob/main/posts/flashbang.md)), yet no JS is required. No React in site :-). And no hamburger, which is always a nice thing not to have. What it does have are actual columns on wider displays. diff --git a/content/2023/i-still-run-local-applications.md b/content/2023/i-still-run-local-applications.md @@ -17,6 +17,7 @@ tags: - cmus - privacy - Unix +- javascript --- {{<img-pull-right "old-man-yells-at-cloud.webp" "Grumpy Mc Grump">}} Javascript used to be cool. You could have a clock or snow raining on your site, and it was amazing. A small DHTML made it so much more lively. diff --git a/content/2023/its-near-impossible-to-use-noscript-but-the-future-is-bright.md b/content/2023/its-near-impossible-to-use-noscript-but-the-future-is-bright.md @@ -0,0 +1,37 @@ +--- +title: "It's Near Impossible to Use NoScript but the Future Is Bright" +category: software +abstract: My fight against the overuse of JS may not be futile +date: 2023-03-12T06:03:22+01:00 +year: 2023 +draft: false +tags: +- javascript +- privacy +- Hot-Wire +- React +- Next-js +- Hugo +- Internet +- software-engineering +- SSR +- server-side-rendering +--- +{{<img-pull-right "js-old-logo.png" "javascript">}} +Speaking of [Javascript](/tags/javascript), I have tried to use NoScript for the last couple of weeks. My goal was to reduce my internet trail even more, as [PrivacyBadger](https://privacybadger.org/) and a few other extensions still leave a considerable chance to spy on me. In addition, I have a huge issue with allowing my computer to run random code without my consent. It's a security nightmare! + +Turns out, that JS has taken over the internet more than I anticipated. React became the primary building block of most of the internet. It doesn't matter if you see a single paragraph of text - you most like see what JS has rendered. This site uses JS for statistics, but it works based on HTML alone. This was always my goal—JS as a bonus, not a hard requirement. + +JS is great for web applications - I can't disagree with it. It's the language for SASS companies - like the [one](https://zendesk.com) I work in. It has evolved a lot, and it's nice to use now. But it's so overused! + +There are webpages where disabled JS breaks some functionality - mostly search (why are we waging war against ctrl+f?) or menu. It's terrible, but it gets much worse. + +There are now a lot (and I mean A LOT) of web pages where without JS, all you are able to see is a white background. Everything is rendered dynamically. Single Page Applications - very complex systems are used where a static HTML would be sufficient. + +But not all is lost. A few years ago, [Hot Wire](https://hotwired.dev/) came borrowing ideas from older frameworks, and it proposed a solution where you get a full HTML webpage from the backend, and then progressively on subsequent pages, your browser can fetch just the changed parts. It was not a novel idea; we've seen it all before. But it came from Basecamp, so it made a buzz on the interwebs. And the response was tragic. Younger developers raised on React thought of rendering webpages on the backend as something only graybeards would like. The backend is just to return JSON! And for all the dull business logic, of course. + +A few years have passed, and [Next.js](https://nextjs.org/) has a crazy idea of rendering React apps on the backend. And suddenly, it's all the rave. Who could have thought that showing just HTML may be faster than fetching megabytes of Javascript code? It even has a name for it now - Server Side Rendering. So we came full circle, just with the extra layer of complexity needed to make it work seamlessly. The added benefit is that since every subpage can be downloaded in any order, disabled JS doesn't break the entire webpage! + +This site is 80% there, as I use [Hugo](https://gohugo.ihttps://pagespeed.web.dev/report?url=https%3A%2F%2Fd-s.sh%2Fo/) to generate static HTML files. All that's missing is a mechanism to not re-render the entire DOM on each subpage. But who needs it? It's a simple blog. The simpler, the better. Hugo + rsync, that's all. I still get perfect scores on [Google Speed Index](https://pagespeed.web.dev/report?url=https%3A%2F%2Fd-s.sh%2F). + +The future is bright, but today is not. To actually browse the web, I need to constantly allow domains or even temporarily disable blocking in a given tab. And it's hell. diff --git a/resources/_gen/images/js-old-logo_hu0126d3e507346ae6c310a789aeb5727a_22348_150x0_resize_q75_h2_box_3.webp b/resources/_gen/images/js-old-logo_hu0126d3e507346ae6c310a789aeb5727a_22348_150x0_resize_q75_h2_box_3.webp Binary files differ. diff --git a/resources/_gen/images/js-old-logo_hu0126d3e507346ae6c310a789aeb5727a_22348_300x0_resize_q75_h2_box_3.webp b/resources/_gen/images/js-old-logo_hu0126d3e507346ae6c310a789aeb5727a_22348_300x0_resize_q75_h2_box_3.webp Binary files differ. diff --git a/resources/_gen/images/js-old-logo_hu796fe2f85c6293229bda05b26df17713_114818_150x0_resize_q75_h2_box_3.webp b/resources/_gen/images/js-old-logo_hu796fe2f85c6293229bda05b26df17713_114818_150x0_resize_q75_h2_box_3.webp Binary files differ. diff --git a/resources/_gen/images/js-old-logo_hu796fe2f85c6293229bda05b26df17713_114818_300x0_resize_q75_h2_box_3.webp b/resources/_gen/images/js-old-logo_hu796fe2f85c6293229bda05b26df17713_114818_300x0_resize_q75_h2_box_3.webp Binary files differ.