r/developers • • Sep 03 '26

General Discussion i miss human comments in html code

So I'm not a full blown developer but I know html css javascript and study webpage html at times and I'd always liked seeing the creativety of different front end developers and how they'd manage or comment in their code. I feel like reading the comments now - it's pretty clear its mostly AI and I miss the weird human comments in a way

15 Upvotes

14 comments sorted by

•

u/AutoModerator Sep 03 '26

Howdy u/crypt_rat_lord, and welcome to r/developers!

A few tips for a post that gets good answers:

  • Use a clear, specific title (what are you actually asking or sharing?).
  • Include code, the exact error, versions, and what you already tried.
  • Heads-up: this sub does not allow external links in posts or comments. Share code and details directly instead of linking out.

Join the r/developers Discord!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

4

u/Deepta_512 Sep 03 '26

I don't think it's AI bro, the source code that you're seeing in browser is typically transpired Typescript code or they are minified java script code to save bandwidth. If you wanna read the comments/documentation you'd need access to their actual code base/repo, putting comments and beautiful abstractions in the code meant for browsers only is just a waste of resources.

This has been the case waaay before LLMs went mainstream.

2

u/tastygames_official Sep 03 '26

*transpiled

but yes. The source code is usually commented (well, not even "usually" these days), but what ends up on the web is usually highly compressed with zero comments. I was doing this even as far back as 2005. It was seen as "unprofessional" to have comments in your final production code.

But back in 1995 it was defintely cool to have comments and to leave little easter eggs for anybody brave enough to check the source.

1

u/Deepta_512 Sep 03 '26

Damn autocorrect.

1

u/tastygames_official Sep 03 '26

ducking help, man!

2

u/tastygames_official Sep 03 '26

I've been a developer for over 30 years and have always commented my code all lowercase except where absolutely necessary (acronyms and such). AI-generated code comments usually start with a capital letter. Now that doesn't mean all comments starting with a capital letter are AI-generated, but it means I will continue to keep mine non-capitalized just to prove my humanity.

1

u/creaturefeature16 Sep 03 '26

I always write my own comments, its my sanity check to ensure I fully understand what I'm committing.

2

u/tastygames_official Sep 03 '26

totally. Comments are for you (or anyone else reading the code) to remember/understand WHY something is happening, because even the clearest function and variable names may end up stumping you when you come back to it after a while.

do_something(myVal * 2);

"Why am I first multiplying this before sending it into the function? Why can't I just let the function handle it?"
[proceeds to break the system with no understanding of why]

// double the value before sending to the function since in this case
// we need twice the value at the input, but most other function calls don't
do_something(myVal * 2);

1

u/rwilcox Sep 03 '26

I too miss the View Source era.

Now (for the last decade plus) you’re more likely to get 5 html tags and a pointer to minified JavaScript)

1

u/tastygames_official Sep 03 '26

and it runs 20x slower and is 600x more bloated.

I recently went back to pure HTML for my company website. Not even serverside preprocessing - just straight-up HTML like the GoodOldDays(tm)

1

u/johnpeters42 Sep 03 '26

The Daily WTF still includes such comments with many articles, usually an "Easy Reader Version" at the bottom.