Live data from Hacker News

30 years of tags

artmann.co

31–40 of 103 posts

Re: 30 years of <br> tags

#32

> Every page on your site needed the same header, the same navigation, the same footer. But there was no way to share these elements. No includes, no components. That's not completely true. Webservers have Server Side Includes (SSI) [0]. Also if you don't want to rely on that, 'cat header body > file' isn't really that hard. [0] https://web.archive.org/web/19970303194503/http://hoohoo.ncs...

HTML was invented as an SGML vocabulary, and SGML and thus also XML has entities/text macros you can use to reference shared documents or fragments such as shared headers, footers, and site nav, among other things.

Re: 30 years of <br> tags

#34
post #19

Earlier quoted context omitted.

> Your code will match the first parameter that has as a suffix, no necessarily exactly Depending on your requirements, that might be a feature. > It also doesn't handle any percent encoding. This does literal matches, so yes you would need to pass the param already percent encoded. This is a trade off I did, not for that case, but for similar issues. I don't like non-ASCII in my source code, so I would want to encod…

This exact mindset is why so much software is irreparably broken and riddled with CVEs. Written standard be damned; I’ll just bang out something that vaguely looks like it handles the main cases I can remember off the top of my head. What could go wrong?

Most commenters seem to miss that this is the throwaway code for HN, with a maximum allocated time of five minutes. I wouldn't commit it like this. The final code did cope with percent-encoding even though the project didn't took any user generated values at all. And I did read the RFCs, which honestly most developers I meet don't care to do. I also made sure the percent-decodation function did not rely on the ASCII ordering (it only relies on A-Z being continuous), because of portability (EBCDIC) and I have some professional honor.

Re: 30 years of <br> tags

#36

> Every page on your site needed the same header, the same navigation, the same footer. But there was no way to share these elements. No includes, no components. That's not completely true. Webservers have Server Side Includes (SSI) [0]. Also if you don't want to rely on that, 'cat header body > file' isn't really that hard. [0] https://web.archive.org/web/19970303194503/http://hoohoo.ncs...

I think they meant that from a vanilla HTML standpoint

If they insist on only using vanilla HTML then the problem is unsolved to this day. I think it is actually less solved now, since back then HTML was an SGML application, so you could supply another DTD and have macro-expansion on the client.

Re: 30 years of <br> tags

#37
Very nice article.

However, some very heavy firepower was glossed over.. TLS/HTTPS gave us the power to actually buy things and share secrets. The WWW would not be anywhere near this level of commercialized if we didn't have that in place.

Re: 30 years of <br> tags

#38

> At one company I worked at, we had a system where each deploy got its own folder, and we'd update a symlink to point to the active one. It worked, but it was all manual, all custom, and all fragile. The first time I saw this I thought it was one of the most elegant solutions I'd ever seen working in technology. Safe to deploy the files, atomic switch over per machine, and trivial to rollback. It may have been manua…

> It may have been manual

It's pretty easy to automate a system that pushes directories and changes symlinks. I've used and built automation around the basic pattern.

Re: 30 years of <br> tags

#40
post #19

Earlier quoted context omitted.

This exact mindset is why so much software is irreparably broken and riddled with CVEs. Written standard be damned; I’ll just bang out something that vaguely looks like it handles the main cases I can remember off the top of my head. What could go wrong?

Most commenters seem to miss that this is the throwaway code for HN, with a maximum allocated time of five minutes. I wouldn't commit it like this. The final code did cope with percent-encoding even though the project didn't took any user generated values at all. And I did read the RFCs, which honestly most developers I meet don't care to do. I also made sure the percent-decodation function did not rely on the ASCII…

I get that, but your initial comment implied you were about to showcase a counter to "Hundreds of lines just to grab a query parameter from a URL", but instead you showed "Poorly and incompletely parsing a single parameter can be done in less than 100 lines".

You said you allocated 5 minutes max to this snippet, well in php this would be 5 seconds and 1 line. And it would be a proper solution.

    $name = $_GET['name'] ?? SOME_DEFAULT;
Post reply on HN