frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

The Fisherman and His Wife

https://sites.pitt.edu/~dash/grimm019.html
1•andsoitis•1m ago•0 comments

Can Video Games Trigger PTSD? What does this teach us about the condition

https://open.spotify.com/episode/1Xr9XGoPNx7j0qLnPC2ZKg
1•gamefeeluk•4m ago•1 comments

AI Spots Hidden Signs of Depression in Students' Facial Expressions

https://www.waseda.jp/top/en/news/85707
1•geox•4m ago•0 comments

Spotify's Free Experience Is Better

https://newsroom.spotify.com/2025-09-15/free-experience-updates-features-tips/
1•corvad•5m ago•0 comments

Fibrous network of plant cell walls enables tunable mechanics for development

https://www.nature.com/articles/s41467-025-62844-1
1•PaulHoule•5m ago•0 comments

Microsoft Favors Anthropic over OpenAI for Visual Studio Code

https://www.theverge.com/report/778641/microsoft-visual-studio-code-anthropic-claude-4
2•corvad•5m ago•0 comments

Show HN: Schema aware AI to build data products

https://www.airbook.io
1•Hoshang07•6m ago•0 comments

S1ngularity/nx attackers strike again

https://www.aikido.dev/blog/s1ngularity-nx-attackers-strike-again
1•ebfe1•6m ago•1 comments

Vibe Coding Survey

https://cooperative-somersault-9ef.notion.site/25aca60065ee80388e90dc22815b1713
1•filopedraz•6m ago•1 comments

What if I tell u I have built the foundation for self evolve AI

1•Ganesg_kute•6m ago•1 comments

Why Silicon Valley Executives Are Studying 500-Year-Old Tarot Cards

https://arcanacalculator.com/arcana-cards/arcana-4-the-emperor-tarot-meaning
2•hailuo_music•6m ago•2 comments

I'm Not a Robot Game

https://neal.fun/not-a-robot/
2•meetpateltech•7m ago•0 comments

Mispriced Talent

https://twitter.com/chrisbarber/status/1967961021685043468
1•jger15•7m ago•0 comments

Using GitHub Pages as a URL shortener / redirection service

https://christianheilmann.com/2025/08/11/using-github-pages-as-a-url-shortener-redirection-service/
1•speckx•7m ago•0 comments

Apollo Explores Sale of Internet Pioneer AOL

https://www.wsj.com/business/deals/apollo-explores-sale-of-internet-pioneer-aol-7185a3e1
1•jmsflknr•8m ago•0 comments

Show HN: I made a gamified iOS habit tracker to quantify relapses

https://apps.apple.com/in/app/habit-tracker-pact/id6748974170
1•abhimanyouknow•8m ago•1 comments

A Survey of Reinforcement Learning for Large Reasoning Models

https://arxiv.org/abs/2509.08827
1•Anon84•10m ago•0 comments

Mango

https://www.google.com/?pli=1&safe=active&ssui=on
1•monkbal•11m ago•0 comments

YouTube Targets Creators and Consumers in Broad Generative AI Push

https://www.bloomberg.com/news/articles/2025-09-16/youtube-targets-creators-and-consumers-in-broa...
1•toomuchtodo•11m ago•1 comments

Pi Fractal [video]

https://www.youtube.com/watch?v=M8BrmqwdgNk
1•sd9•11m ago•0 comments

Workday to acquire AI startup Sana for $1.1B

https://sifted.eu/articles/workday-sana-acquisition
2•felix089•12m ago•0 comments

Trump's deportations divert FBI agents off child predator cases

https://www.msnbc.com/msnbc/news/trumps-deportations-divert-fbi-agents-child-predator-cases-rcna2...
5•throw0101d•13m ago•1 comments

Updated Thoughts on Trust Scaling

https://lucumr.pocoo.org/2019/7/29/dependency-scaling/
1•the_mitsuhiko•14m ago•0 comments

ROCm 7.0

https://rocm.docs.amd.com/en/latest/index.html
3•asparagui•16m ago•0 comments

Google's AI Agent Payments Protocol (AP2)

https://cloud.google.com/blog/products/ai-machine-learning/announcing-agents-to-payments-ap2-prot...
1•schwentkerr•17m ago•1 comments

Daily Startup Newsletter

https://www.minimumviablenl.com/
1•minimumviable•17m ago•0 comments

Fifty Things you can do with a Software Defined Radio

https://blinry.org/50-things-with-sdr/
14•mihau•19m ago•1 comments

Samsung smart fridge displaying advertisements

https://www.reddit.com/r/homeassistant/s/OVP4LqiLAv
3•saeedesmaili•20m ago•1 comments

Show HN: ModelKombat – arena-style battles for coding models

https://astra.hackerrank.com/model-kombat
2•rvivek•21m ago•0 comments

Show HN: I wrote a from-scratch OS to serve my blog

https://github.com/thass0/tatix
1•thasso•22m ago•0 comments
Open in hackernews

Just Use HTML

https://gomakethings.com/just-use-html/
97•speckx•2h ago

Comments

renegat0x0•1h ago
I performed some transition from django pure template solution to more javascript oriented.

- my server was running on raspberry PI, now heavy responses are returned via JSON, I think REST-like data. Which makes me offload burden to clients

- javascript makes the page more responsive. Parts can be loaded via separate calls, and it divides something that would be otherwise a monolith into subsequent small calls

- In my experience nearly all simple binary decisions "use only X", and "use only Y" solutions are bad

gwd•1h ago
> Parts can be loaded via separate calls, and it divides something that would be otherwise a monolith into subsequent small calls

He's not saying don't use Javascript; he's saying that instead of having those small calls shipping JSON which is then converted into HTML, just have those small calls ship HTML to begin with.

It's surprising how far you can get with something like HTMX.

naasking•31m ago
> it divides something that would be otherwise a monolith into subsequent small calls

This is often at odds with page responsiveness, and can increase server load considerably.

bell-cot•1h ago
Nice idea - but 10K lines of css and 1M lines of js offer me far more social cred, pay, and job security than some stupid little html stuff that just works.

/s?

indentit•1h ago
> Another area where you can lean a lot more heavily on HTML is API responses

Please no - it is so much nicer and easier when using a website with poor UI/filtering capabilities/whatever, to look at the network requests tab from devtools in the browser and get json output which you can work with however you want locally versus getting html and having to remove the presentation fluff from it only to discover it doesn't include the fields you want anyway because it is assuming it should only be used for the specific table UI... Plus these days internet while out and about isn't necessarily fast, and wasting bandwidth for UI which could be defined once in JS and cached is annoying

gwd•1h ago
> only to discover it doesn't include the fields you want anyway because it is assuming it should only be used for the specific table UI

It sounds like you're complaining that a server isn't shipping bits that it knows the client isn't going to use?

> wasting bandwidth for UI which could be defined once in JS and cached is annoying

How much smaller is the data encoded as JSON than the same data encoded as an HTML table? Particularly if compression is enabled?

ETA: And even more so, if the JSON has fields which the client is just throwing away anyway?

What seems wasteful to me is to have the server spend CPU cycles rendering data into JSON, only to have the front-end decode from JSON into internal JS representation, then back into HTML (which is then decoded back into an internal browser representation before being painted on the screen). Seems better to just render it into HTML on the server side, if you know what it's going to look like.

The main advantage of using JSON would be to allow non-HTML-based clients to use the same API endpoints. But with everyone using electron these days, that's less of an issue.

javcasas•1h ago
> How much smaller is the data encoded as JSON than the same data encoded as an HTML table? Particularly if compression is enabled?

Well, as many things in life, it depends. If the cells are just text, there is no much difference. But, if the cells are components (for example, popover things or custom buttons that redirect to other parts of the site), the difference of not shipping all those components per cell and rendering them on the frontend starts to become noticeable.

swiftcoder•1h ago
How lucky then that WebComponents exist, and we don't actually have to ship the whole DOM for each cell...
javcasas•31m ago
So a backend-focused team that minimizes frontend is going to start fiddling with the DOM and shipping web components.

Sure, tell me more. I always enjoy a cool story.

coneonthefloor•1h ago
> What seems wasteful to me is to have the server spend CPU cycles rendering data into JSON, only to have the front-end decode from JSON into internal JS representation, then back into HTML (which is then decoded back into an internal browser representation before being painted on the screen). Seems better to just render it into HTML on the server side, if you know what it's going to look like.

Well put. I think the main issue is that we have a generation of "front end engineers" who have only ever worked with javascript apps. They have no experience of how easy it is to write html and send it via a server. The same html works now, worked 20 years ago, and will work 20 years from now.

tdeck•56m ago
This is why many websites (even ones light on interactive functionality) now display a progress bar after loading the website. It's a big step backward for user experience and I even see it on blogs.
javcasas•45m ago
Your average veteran "front end engineer" has implemented las month half a dozen features that almost impossible to do server-side only, "just send the HTML, dude".

Progressive enhancement, forms with fields depending on other fields, real time updates, automated retries when the backend is down, advanced date selectors, maps with any kind of interactivity.

Any of the above is an order of magnitude harder to do backend-only vs backend API + any frontend.

cenamus•26m ago
Who says you can't use any JS when doing server side rendering?

And why would you even want progressive enhancement if you can just send the proper full version right away, without waiting for MBs of JS to "hydrate" and "enhance" the page

javcasas•13m ago
You know, you went direct for the "bait" case, while ignoring all the others.

Progressive enhancement is often done to mask the fact that fetching the data takes an unacceptable amount of time, otherwise no effort would be done to mask it.

Your plan is to take that same unacceptable time, and add the server side render-to-html time on top of it, and that will improve it via...

tdeck•58m ago
As someone else who does this, I think we're a pretty small audience. People shouldn't be building web apps with our reverse engineering experience in mind.
niux•1h ago
This article is an oversimplification describing basic forms, but as soon as you try to implement any sort of advanced validation using just HTML, the whole paradigm falls apart. Browsers support JavaScript for a reason.
dreadnip•1h ago
How can you ever trust validation on the client side though? The user can just mess with it and submit anything they want anyway.

Why not validate on the server and return a response or error as HTML?

I’m not trying to argue in bad faith here. I know client side validation is necessary in some cases, but IMO it’s only an augmentation for UX purposes on top of server side validation.

Tade0•1h ago
> Why not validate on the server and return a response or error as HTML?

If your form has files you'd want to at least check it before sending data unnecessarily to the server.

Also it's always better to have a tighter feedback loop. That is really the main reason why there's validation on the frontend and backend, not just the latter.

palmfacehn•41m ago
Typically for fetch() I return the error as "text/plain" with the appropriate status code. It is still necessary to give a preflight validation in Vanilla JS, apply an error style and helpful feedback.

HTML has come a long way since the bad old days. General constraints can be applied directly to the input element. It still makes sense add additional explanations for the invalid input with JS though.

https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...

e12e•31m ago
You're answering yourself here: client side feedback/validation is essential ux for any complex form. Even for simple signup forms with a few required fields.
jonkoops•21m ago
Just use a generic data structure for your validation rules that you can apply on the front-end, and validate on the back-end. Using JavaScript and doing validation on a server are not mutually exclusive.
leftyspook•1h ago
I think a part of the point is to question the need for things like that. Do your users actually need all of these bells and whistles?
graemep•1h ago
You can use JS to provide validation and still submit the form from HTML.
skydhash•37m ago
That’s not validation. It’s more like helpful hints.
fkyoureadthedoc•34m ago
A pointless distinction when we all know what we're talking about.
skydhash•31m ago
Is it? I’ve seen devs bring complicated code to the frontend when a required attribute on the tag would have done the job just as well. Preventing user mistakes is not the same as ensuring correct input.
fkyoureadthedoc•23m ago
We've all seen bad implementations of any given thing I'd imagine. Ever submit a form that triggers a full page refresh after about 8 seconds of hanging, only to lose half the data and reveal some arcane requirement to you that wasn't stated up front? Of course this isn't the proper way to do it, but it happens.
cenamus•30m ago
Neither is it validation when you use JS if the server doesn't check it. You can always send requests with postman, curl or your tool of choice.
naasking•28m ago
Helpful hints are all you can rely on from client-side. Client-side validation doesn't really exist, true validation only happens server-side.
graemep•14m ago
What is the difference?

The same is true for any JS "validation" and I was using common terminology.

From a user point of view as long as you keep the feedback loop short what difference can they see?

norman784•1h ago
You can have a minimal library like HTMX or if you have access to a solution Phoenix LiveView, you need minimal JS to have an interactive page, the only downside is that you could introduce some latency because of the network trip.
saulhenrick•1h ago
Isn't this server-side rendering?
sam0x17•1h ago
or maybe we could do this revolutionary thing where we use code on the server side to generate different HTML for different requests!!!

we've come full circle <3

brianmcc•57m ago
Perl CGI FTW! :-D
jonwinstanley•39m ago
Rails and Laravel devs happily still live in this world a lot of the time :-)
remark5396•1h ago
> Another area where you can lean a lot more heavily on HTML is API responses

Then you just gotta write the same HTML generating code on the server, isn't it? It looks like just the difference of the code being on frontend or backend, then I'd prefer it to be on the frontend side.

NikxDa•1h ago
The suggestion to have the server return the table directly starts bringing presentational concerns into the backend, which I am not a big fan of.

Having the server return plain JSON means the APIs can be reused across products effortlessly and also means that all style changes can be done in the same codebase.

I get reminded of how important this is every time I get to work on an old project that has APIs return HTML that is then being inserted into the DOM by something like jQuery. Figuring it out and updating it is typically a huge mess.

swiftcoder•1h ago
> Having the server return plain JSON means the APIs can be reused across products effortlessly and also means that all style changes can be done in the same codebase.

How many products actually share the same server backend? Do they all organise the same data on the same pages? If no, then you already need per-product APIs to avoid making O(N) fetches from the client side Having your backend be aware of what is being presented is rarely a bad thing

actionfromafar•41m ago
If you control the full stack like in the article, you could have a server backend server the JSON, and another backend taking that and serving HTML, if you wanted.

Edit: This could still be way simpler than the "hydration" approach which is so popular.

jonkoops•20m ago
Yes, the backend-for-frontend (BFF) architecture is an excellent fit for this purpose.
devnull3•1h ago
I am backend dev and dipping my toes in frontend dev for my side hustle.

It is a typical CRUD app (like most of them). I like the idea behind HTMX or datastar. I built a prototype in it as well. But then I pivoted to solidjs.

Some reasons for this:

1. Single backend API for web, mobile and any other platform

2. Some UI patterns which are suited for JSON REST APIs [#patterns]

3. Ability to support partial functionality offline.

#patterns

1. Showing a subset of columns in a table but have an option to view & edit each record in detail. In my case a dialog opens with editable checkbox. So it doubles-up as "view" and "edit". These actions render just another view of existing data. A round-trip to server is not desirable IMO.

2. Filtering, sorting on columns. HTML based solution becomes tedious if some of the cells are not plain text but instead a complex component like a <div>. Sorting json and rendering is much better experience IMO.

Edit: About solidjs & datastar

1. It has fine-grained reactivity which I find it appealing and it uses signals which hopefully will be standardized.

2. The compiled bundle size is much smaller than I expected. I have 24KB compressed js which is serves quite a lot of views, pages.

3. Datastar is amazing and I have added it in my toolbox.

urbandw311er•1h ago
For anybody over the age of about 35, this entire article is utterly baffling because it's just extremely obvious things that we already know because this is how the Internet used to be about 20 years ago. Reading this just makes me feel very old.
fkyoureadthedoc•27m ago
It's not even 20 years ago, and literally nothing is stopping anyone from doing this now. All the tech is still there, and still works. Choose it. Be the change you want to see in the world. Hell you can even have the fancy version of it like Phoenix LiveViews.

I would if I was working on anything that was just a page of text and shitty flat forms like these examples always assume.

secstate•25m ago
The last company I worked for it honestly took me about two months to actually grok what they were doing with their forms because I couldn't fathom why you'd do this input-listener business on the FE while the backend was all Django APIs. They had re-engineered a form wizard flow and scattered the state management into three places (some in the API calls, some in third party API calls in the middle of the flow, and a decent chunk in the React flow via cookies/sessions). It was madness trying to debug it.
mmcromp•1h ago
This isn't scalable for any kind environment with multiple services and teams. Can you imagine "actually the table display will be handled by the User service BE, we'll just inject it". The reason why people reach for react and js for simple projects is because that's what theyre familiar with at work (that or they're training in hopes of work), even when theoretically they could of used something way more stripped down
loloquwowndueo•1h ago
* could have
webstrand•2m ago
If your going to be a pedant at least get the substitution right, it's "could've"
loloquwowndueo•2m ago
*you’re
RUnconcerned•39m ago
There's nothing stopping an HTTP API from returning both HTML and JSON from the same endpoint. Just have the client send "text/html" or "application/json" in the Accept header, depending on what it needs.
cenamus•32m ago
However it would make sense to have a separate json api for other applications. That way the html endpoints can change without without api versioning, perfectly matching whatever the gui needs.
jonkoops•23m ago
There absolutely is, this is just extra cruft you need to maintain, and who says that the HTML is universal enough to be used everywhere? This is exactly where a front-end or a backend-for-frontend (BFF) makes sense.
zffr•1m ago
One challenge is that JSON is for data and HTML is for UI. When a client gets JSON it can transform the data to make it ready for the UI. With HTML, the client is locked into the UI chosen by the server.

What if the client wants to render the output of an API in different ways depending on what screen is visible? If the server API outputs JSON, this is trivial. If it outputs HTML the client is stuck into rendering what the server gives it.

zdragnar•3m ago
It's not scalable to a small team either. The amount of copy/paste of markup I had to clean up on a site that didn't actually contribute to style, presentation or information was insane. Just divs and divs of tailwind classes all overriding each other or having no effect copy pasted everywhere.

Far better to have a tool that lets you define small, reusable, composable building blocks and let your team just use those.

p2detar•47m ago
I’ve done a couple of side gigs doing exactly that. I’m not really proficient in React, but I still had to do web development. For one project I used jQuery, and for the latest one I tried htmx — but it wasn’t quite enough, so I had to mix in some vanilla JS as well. Arguably, that’s not really a best-practice recommendation when working in a team, and I’d only consider it justifiable for smaller projects. Still, I got paid, so it worked out.
emacsen•8m ago
I'm in a similar boat of using HTMX and finding it's 85% there, but then being stuck with another 15% that's not fulfilled.

I'm looking at Alpine.js for that last 15%.

LNSY•40m ago
A feature of ES6 I really like are custom HTML components: https://lindseymysse.com/blog/2025/04/23/custom-html-element...

For a lot of internal and personal projects I use a combination of custom HTML elements with XSLT: https://lindseymysse.com/x-s-l-t/

Still requires Javascript, but makes writing HTML a lot more fun.

eithed•32m ago
I'm not a fan of React (and not use it at work), but imagine that you have multiple login forms, either to same service or to different ones. With React (or any similar JSX framework) you can embed such form component in your application = it will behave the same way in any place you put it in (or can be customised dependent on the parameters). Then it can also be tested that it behaves in a certain way and conforms to business rules.

How would I do the same with plain HTML?

OutOfHere•27m ago
I avoid JS whenever I can. Those who advocate for JS typically do it because they're drawing a large salary from it.

Server-side rendering of HTML is really fast if an efficient compiled language is used. If you are using Node/PHP/Python/Ruby on the server, you will feel the pain. Server rendered HTML is also scraper friendly because the scraper then doesn't need to use a virtual browser.

jonkoops•25m ago
These 'just use HTML' shitposts really miss the mark. Every time I see this stuff it is a form with two fields, come on. Realistically, a lot of applications are forms, but they are much more complex. E.g. fields that can be added and removed, conditional logic depending on selected state, and most importantly a non-flat data structure.

Once you start bolting on all this stuff to HTML, congratulations, you have built a web framework.

I am not advocating that everyone should start using React. But HTML forms are severely underpowered, and you cannot escape JavaScript at some point. I would love it if forms could consume and POST JSON data, that would make this all a lot easier in a declarative manner.

bgarbiak•10m ago
Well, nowadays, you can implement a lot of logic for forms using HTML and pure CSS, without JS at all. Example:

  form:has(.conditional-checkbox:not(:checked)) .optional-part-of-form {
    display: none;
  }
I’m not saying it’s better (it’s not). Just saying there’s a lot of space between “just HTML” and “a web framework”. It’s worth considering these other options instead of going “full React” from the get-go.
bigbezet•23m ago
I don't think having the server render the table HTML and you injecting it is a good idea. You rely on the server returning valid HTML. What if the server has downtime, and returns a 200 response but with a "maintenance mode" page, or something similar? Having it render only on a successful response and correct parsing of JSON data is more reliable. You also start complicating things in terms of separation of concerns. You potentially have to adapt any styling considerations in your API, for instance if the table needs a class adding to it. Overall, not a good idea, imho.
mhitza•18m ago
We should be opening a bug report on any server that returns status 200 Ok for what would be a proper 408 Request timeout or a 503 Service unavailable.

If this happens, it sounds like a syndrome of API first endpoints that return 200 with a json error field.

emacsen•15m ago
Let's break this down a bit.

> I don't think having the server render the table HTML and you injecting it is a good idea.

HTMX, Alpine AJAX and other similar progressive web frameworks work exactly this way, as do server side rendered React.js and friends.

> What if the server has downtime, and returns a 200 response but with a "maintenance mode" page

If the server is in maintence mode, it should not display the web application/web page, but instead show a "We're in maintenance mode" messages.

> Having it render only on a successful response and correct parsing of JSON data is more reliable.

You're comparing making a simple web page with either no secondary calls or a single secondary call using a few lines of code to writing a client side web application. It's a bit like comparing a car with a bicycle.

> You also start complicating things in terms of separation of concerns. You potentially have to adapt any styling considerations in your API, for instance if the table needs a class adding to it. Overall, not a good idea, imho.

This is certainly an opinion and that works for you, but HTMX and similar actually make much of my life easier, rather than harder since all that styling, etc. can live alongside my server logic, rather than being in an entirely separate second application.

faku812•57s ago
HTMX is extremely bad idea.
gaoshan•10m ago
The first point is about using an onSubmit event that is triggered by an onClick of a button. Why? Just add type="submit" to the button and the onSubmit event will be triggered by a click or by hitting the enter key. I'm confused as I feel like this is so simple that I must be missing somethng?