News for hackers. Stuff that matters.
Re:My daughter (7 years old) used HTML to make a website by dchest on Thursday July 18, 2024 @04:43AM (#40993681)

   <img src="catcute.jpg" width="500px" height="400px" ></img>
Width and height must be specified without units (although looks like browsers accept it, probably by ignoring the unit). IMG tags are self-closing, so you can omit </img>

   <img src="wool.jpg" width="500px" height="400px" ></img>
The dog picture has wrong aspect ratio. The dog is squeezed! It should be 620 × 349 or, if 500 width or 400 height is needed, there's a good mathematical task to calculate the size of the other side.

   <br/>
No need for / in HTML.

   unicorn.html
   unicorncopy.html
Page for cats is named unicorn.html! and for computers it's unicorncopy!!!

PS I don't like that CloudFlare Pages strips .html. Too magical.

Re:My daughter (7 years old) used HTML to make a website by isoprophlex on Thursday July 18, 2024 @04:46AM (#40993706)
Is this code review of HTML written by a 7 year old too hackernews, or just hackernews enough? Who can tell!
Re:My daughter (7 years old) used HTML to make a website by latexr on Thursday July 18, 2024 @07:26AM (#40994566)
Don’t 7 year olds deserve to learn how to improve too? The comment doesn’t appear to be done aggressively or in bad faith, so what’s the issue? Presumably it will be the parent who’ll read the comment, and they can pass it on or not depending on what they think the kid would prefer and/or would let them grow.

Ironically, I find the most HN comments of all to be the ones who complain about something being too HN.

Which is not to say your comment wasn’t humorous, but let’s not be too quick to cast stones.

Re:My daughter (7 years old) used HTML to make a website by jnsie on Thursday July 18, 2024 @09:33AM (#40995444)
Unsolicited critique is almost always unwelcome critique, in my experience. Especially where someone else's 7 year old is concerned.
Re:My daughter (7 years old) used HTML to make a website by latexr on Thursday July 18, 2024 @10:08AM (#40995716)
Respectfully, if you see the comment as critique, that’s on you. It could just as easily be described as “unsolicited advice” or “unsolicited tips”.

The communicator does have responsibility on how their message comes across, thought not all of it. It’s on the receiver to also make an effort to understand what was meant and not take unnecessary offence. The comment reads pretty much neutral, apart from a post scriptum which is explicitly about the author’s preference. It’s up to you to inject the writer’s feelings as either “this code sucks, here’s how you do it” or “congratulations on making something cool, here are a few suggestions”.

My experience is that life is much better if you take the latter approach. Default to empathy.

Consider listening to “This is Water” from David From Wallace.

https://www.youtube.com/watch?v=eC7xzavzEKY

Re:My daughter (7 years old) used HTML to make a website by jnsie on Thursday July 18, 2024 @11:35AM (#40996614)
Let's agree to disagree. I most certainly didn't take offense. I just disagreed (and continue to disagree) with the (your) comment that I responded to. I'm sure the parent of the 7 year old in question was aware of the shortcomings of the code. The fact that a (presumed) grown-up read the post/thread and their reaction was to provide a code review is odd to me and more than a little hackernews-ish which the poster you responded to poked fun at and which you seemed to take exception to.
Re:My daughter (7 years old) used HTML to make a website by cowsaymoo on Thursday July 18, 2024 @06:13AM (#40994140)
When the Trump assassination attempt happened last week and every single post on here was still about computers that's when I realized this place is different
Re:My daughter (7 years old) used HTML to make a website by latexr on Thursday July 18, 2024 @07:06AM (#40994455)
It’s not a secret HN is not a site for general news. That’s the first item in the guidelines:

> What to Submit

> (…)

> Off-Topic: Most stories about politics, or crime, or sports, or celebrities, unless they're evidence of some interesting new phenomenon. Videos of pratfalls or disasters, or cute animal pictures. If they'd cover it on TV news, it's probably off-topic.

https://news.ycombinator.com/newsguidelines.html

It is because you’d hear about that anywhere and everywhere else that it doesn’t belong here. Would you complain that a forum about cooking or sharing wallpapers didn’t cover the news as well?

Though it was submitted and discussed anyway, which always happens. That can be confirmed with your own keywords.

https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...

Re:My daughter (7 years old) used HTML to make a website by echoangle on Thursday July 18, 2024 @06:40AM (#40994291)
Isn’t that kind of on purpose though? I think you will get flagged if you just post general news articles. It looks like political posts are only accepted if they have some relation to technology.
Re:My daughter (7 years old) used HTML to make a website by halfmatthalfcat on Thursday July 18, 2024 @06:20AM (#40994182)
We need our safe space.
Re:My daughter (7 years old) used HTML to make a website by j45 on Thursday July 18, 2024 @08:51AM (#40995100)
There do seem to be posts.

I’m not sure of the activity level of HN at the time it occurred.

https://hn.algolia.com/?dateRange=pastWeek&page=0&prefix=fal...

Re:My daughter (7 years old) used HTML to make a website by throwaway3306a on Thursday July 18, 2024 @08:57AM (#40995155)
That's why I come here instead of other places.
Re:My daughter (7 years old) used HTML to make a website by orwin on Thursday July 18, 2024 @01:39PM (#40997978)
I wouldn't mind reading about it here in like 2 weeks to a month tbh, but clearly I don't come here to read 'worldly news'.
Re:My daughter (7 years old) used HTML to make a website by xigoi on Friday July 19, 2024 @08:03AM (#41005460)
I’m glad that my attempts at removing USA politics from my content feeds have been so successful thao this is the first time I hear about the Trump assassination attempt.
Re:My daughter (7 years old) used HTML to make a website by dchest on Thursday July 18, 2024 @04:49AM (#40993729)
Yes.
Re:My daughter (7 years old) used HTML to make a website by KwanEsq on Thursday July 18, 2024 @02:42PM (#40998515)
Without n-gate around anymore there's literally no one who can
Re:My daughter (7 years old) used HTML to make a website by fintler on Thursday July 18, 2024 @05:00AM (#40993784)
> The dog is squeezed!

We talked about that, and she thought it looked better that way.

Re:My daughter (7 years old) used HTML to make a website by dchest on Thursday July 18, 2024 @05:03AM (#40993798)
I agree.
Re:My daughter (7 years old) used HTML to make a website by fsckboy on Thursday July 18, 2024 @11:39PM (#41001867)
could you replace it with a picture of her hugging a dog, and caption it "the dog is squeezed"?
Re:My daughter (7 years old) used HTML to make a website by piperswe on Thursday July 18, 2024 @05:04AM (#40993802)
> No need for / in HTML

I personally prefer having the /> even though it's not necessary, so that I can tell at-a-glance whether a tag is self-closing or not. It doesn't hurt, does it?

(plus I'm just used to it because the book I learned HTML from was confident that XHTML was the future)

Re:My daughter (7 years old) used HTML to make a website by chrismorgan on Thursday July 18, 2024 @06:48AM (#40994346)
I reckon it does hurt, beyond the negligible cost of the extra transferred and parsed bytes: it teaches something that’s simply incorrect, and doesn’t do what people often think it does.

① The trailing slash doesn’t make a tag self-closing. All it does is get ignored, emitting a parse error (which in common compiler terms is just a warning) if you use it on a non-void tag.

You can’t use <div/>. You can’t use <custom-tag/>. The only tags you’re allowed to use the trailing slash on are the defined void tags like <img> and <br>.

It’s not “not necessary”, it’s “completely useless, by definition”.

I’ve seen people presume they can close tags this way. JSX probably helps cause this, because you can there. But because self-closing tags aren’t a thing in HTML syntax, I think it’s harmful to use the spelling at all in HTML syntax.

② I wouldn’t mind so much if people used it consistently, and I wouldn’t mind at all if it was being used to support both HTML and XML syntax, but if you see sites that use trailing slashes on void tags in their head, practically every time there will be at least one tag that isn’t using it:

  <link … />
  <meta … />
  <link …>
  <link … />
③ I also dislike it because it’s fairly common for syntax highlighters or other casual parsers to get it wrong. Most commonly, I’ve seen tools misinterpret an unquoted last attribute, treating <a href=/example/> as <a href="/example" /> rather than <a href="/example/"> before. (Same with the likes of <img src=/example/>, but anchor hrefs are more commonly going to look like that.)
Re:My daughter (7 years old) used HTML to make a website by thehesiod on Thursday July 18, 2024 @09:06AM (#40995223)
IIRC, that's not necessarily true, some parsers "upgrade" html to xhtml and then process the xhtml since its more regular. html in general is a mess due to backwards compatibility requirements so trying to follow these kind of definitions imo is kinda pointless. you can optimize for size if you want but the decrease from these kind of optimizations with modern speeds is rather minimal
Re:My daughter (7 years old) used HTML to make a website by chrismorgan on Thursday July 18, 2024 @12:27PM (#40997238)
> some parsers "upgrade" html to xhtml and then process the xhtml since its more regular.

I have never heard of anything even vaguely matching your description, and it would be wildly wrong. HTML parsing is exhaustively defined, and the only way of correctly parsing HTML is to use the defined HTML parser.

Re:My daughter (7 years old) used HTML to make a website by dchest on Thursday July 18, 2024 @05:17AM (#40993864)
I strongly believe that the harm we experienced from XHTML should not be passed down to future generations.
Re:My daughter (7 years old) used HTML to make a website by Sander_Marechal on Thursday July 18, 2024 @05:48AM (#40994005)
You didn't love the strict and unhelpful generic XML exception you got when you accidentally forgot to close a tag?
Re:My daughter (7 years old) used HTML to make a website by throwaway3306a on Thursday July 18, 2024 @06:27AM (#40994219)
Don't blame bad tools on the language.
Re:My daughter (7 years old) used HTML to make a website by tempfile on Thursday July 18, 2024 @06:22AM (#40994192)
I thought the whole point of XML tags coming in named pairs was so you could be helpfully told which tag wasn't closed?
Re:My daughter (7 years old) used HTML to make a website by dchest on Thursday July 18, 2024 @06:36AM (#40994265)
XHTML was a move by Big CMS to make edit-and-FTP error prone. Before that you rarely had to care whether the tag was closed.
Re:My daughter (7 years old) used HTML to make a website by tempfile on Thursday July 18, 2024 @06:55AM (#40994383)
Is this a joke? I genuinely can't tell.
Re:My daughter (7 years old) used HTML to make a website by throwaway3306a on Thursday July 18, 2024 @08:59AM (#40995169)
Tell me you weren't there without telling me you weren't there. Big CMS hated it.
Re:My daughter (7 years old) used HTML to make a website by ndriscoll on Thursday July 18, 2024 @09:24AM (#40995345)
I've always been completely baffled by the rejection of xhtml. It gave a way to extend html with new elements and a simple, powerful client side templating language with xslt. The "reason" for which I remember it being rejected was that allegedly web devs couldn't wrap their heads around closing tags and explicit attribute values, which seems crazy to me. Then a few years later typescript took off (which is way more complicated) and react gave a pretend way to write xml except now you need a compiler/build pipeline, and everyone loved it.

xhtml still works in modern browsers btw. It's still probably the easiest way to do page templates. XSLT shows its age without the ability to modify the page after load (unless you run it via javascript), but we could've just added that and it'd be almost perfect.

Re:My daughter (7 years old) used HTML to make a website by gravpuse on Thursday July 18, 2024 @04:52AM (#40993740)
The concept of "Connection Before Correction" emphasizes creating a positive relationship and safe learning environment before addressing mistakes.
Re:My daughter (7 years old) used HTML to make a website by KronisLV on Thursday July 18, 2024 @05:55AM (#40994051)
> The concept of "Connection Before Correction"

Oh hey, I learnt a new thing today!

It always felt apt to offer a few words of praise for the things that are good, or to establish common ground in code review before offering constructive critique.

Wouldn’t call it a must, but makes putting one’s own ego aside when receiving critique that much easier and lets me focus on improvement, I try to do that for others as well now!

Re:My daughter (7 years old) used HTML to make a website by dchest on Thursday July 18, 2024 @05:10AM (#40993827)
Connection and Correction - pair programming

Connection before Correction - code review

Re:My daughter (7 years old) used HTML to make a website by nick__m on Thursday July 18, 2024 @06:52AM (#40994364)

  the dog is squeezed!
Her page, her squeezed dog !
Re:My daughter (7 years old) used HTML to make a website by _def on Thursday July 18, 2024 @04:49AM (#40993724)
And still with all of that it completely serves its purpose
Re:My daughter (7 years old) used HTML to make a website by dchest on Thursday July 18, 2024 @04:53AM (#40993753)
The dog page should be banned in the EU because it doesn’t disclose that the picture has been digitally altered, promoting impossible beauty standards for pets.
Re:My daughter (7 years old) used HTML to make a website by j45 on Thursday July 18, 2024 @08:44AM (#40995053)
Is this code review indicating a 7 year old will be put on a PIP?

While most of th 7 year olds contemporaries are busy consuming content instead of creating it like this?

Re:My daughter (7 years old) used HTML to make a website by verbalstoner on Thursday July 18, 2024 @02:31PM (#40998421)
You are either autistic or just plain retarded.