48 points

RSS is what we had before algorithms that just pick adverts and far right fuckery.

permalink
report
reply
6 points

Legit we should go back

permalink
report
parent
reply
27 points

I am so old that I worked with SGML. Compared to that, XML is a lovely language. And sometimes I still miss writing XSLT to quickly transform some XML documents. These days you can do similar things with JSON, of course. But itโ€™s not as easy and standardized as the XML tooling.

permalink
report
reply
25 points

Reddit support to the rescueโ€ฆ

permalink
report
reply

Json is superior and thats a hill im willing to die on

permalink
report
reply
10 points

Thatโ€™s silly, if Json was superior the web would be using HTJson, not HTML.

permalink
report
parent
reply
1 point

it is HTJS now

permalink
report
parent
reply
6 points
*

(YAML has entered the fight!)

(Edit: incidentally, Iโ€™m not saying YAML is the best. JSON is possibly the one I hate thr least. But I do hate them all!)

permalink
report
parent
reply
18 points

All JSON is valid YAML

permalink
report
parent
reply
3 points

Norway

permalink
report
parent
reply
1 point

NO what?

permalink
report
parent
reply
18 points

XML is a superior format to Json or yaml or any of those other trendy formats around today. Itโ€™s the hill Iโ€™m willing to die on because Iโ€™m right.

permalink
report
reply
93 points

XML aims to be both human-readable and machine-readable, but manages neither. Itโ€™s only really worth it if you actually need the complexity or extensibility, otherwise itโ€™s just a major pain to map XML structures to any sensible type representation. Iโ€™ve been forced to work with some of the protocols that people like to present as examples of good XML usage and I hate every single one of them.

Fuck YAML though. That spec is longer and more complex than any other markup language I know of and it doesnโ€™t have a single fully compliant implementation.

permalink
report
parent
reply
25 points

Ye, we like to use toml for configuration files etc.

permalink
report
parent
reply
24 points

Iโ€™m okay with the โ€œhuman-readability,โ€ but Iโ€™ve never been happy with the โ€œmachine-readibilityโ€ of XML. Usually I just want to pull a few values from an API return, yet every XML library assumes I want the entire file in a data structure that I can iterate through. Itโ€™s a waste of resources and a pain in the ass.

Even though itโ€™s not the โ€œrightโ€ way, most of the time I just use regex to grab whatever exists between an opening and closing tag. If Iโ€™m saving/loading data from my own software, I just use a serialization library.

permalink
report
parent
reply
7 points

Yep, itโ€™s a PITA to parse and get the values you want. Much prefer JSON. Recently when I needed to parse XML I ran it through an XML to JSON library. Much easier!

If you need to parse XML just for RSS though, it isnโ€™t so bad as there are RSS specific libraries which take most of the pain away.

permalink
report
parent
reply
4 points

Maybe look into StAX?

permalink
report
parent
reply
0 points

Yeah, I remember when I was trying to parse XML into some lua tables and it forever stumped me how to represent something like

<thing important_param=10 other_param="abracadabra"> stuff </thing>

You just have to have different ways to turn different tags into stuff in your program and thatโ€™s a huge amount of overhead to think about when all I want is a hash map and maybe an array.

permalink
report
parent
reply
23 points

Whatโ€™s better about it?

permalink
report
parent
reply
94 points

It makes you want to die on a hill

permalink
report
parent
reply
9 points

Fact. An unfortunate one, but still a fact.

permalink
report
parent
reply
5 points

From my point of view : it has a hudge ecosystem with tons of robust libraries. This does not make it perfect, but for an industrial point of view, you donโ€™t look for new shiny clean things. (My point of view is 15 years old yetโ€ฆ)

permalink
report
parent
reply
14 points

I think JSON is more robust than XML by now. Mostly due to its simplicity. There are few reasons why anyone would pick XML over JSON these days.

permalink
report
parent
reply
21 points

I can only assume youโ€™ve never tried to parse or read XML.

permalink
report
parent
reply
15 points

JSON, which has been around since 01, is trendy?

permalink
report
parent
reply
14 points

Something being โ€œoldโ€ is totally unrelated to whether itโ€™s trendy. See: virtually every food and fashion trend.

permalink
report
parent
reply
1 point

Trendy also isnโ€™t the same as popular or preferred.

permalink
report
parent
reply
12 points

Uh-huhโ€ฆ ever tried to integrate with a poorly implement WCF service? Like communication from a Java service to a dotnet service through a WSDL?

Iโ€™ll take a json API over XML any day

permalink
report
parent
reply
11 points

Iโ€™m not sure thatโ€™s the fault of XML though.

Itโ€™s more the fault of the implementation and documentation.

We have a WCF service with an odd configuration and nobody has been able to integrate with it that didnโ€™t use Microsoft tools. Itโ€™s definitely not XMLโ€™s fault.

(That service has been replaced with a REST API now)

permalink
report
parent
reply
5 points
*

Itโ€™s more the fault of the implementation and documentation.

Yea sure. Though itโ€™s slightly XMLs fault for allowing that kinda implementations. Every random thing is in itโ€™s own obscure namespace with 20 levels of nested objects in different namespaces, and if you get anything wrong it barely explains whatโ€™s wrong, and just refuses to work.

Itโ€™s mostly WCFs fault. I just automatically associate XML with nightmare flashbacks of implementing WCF stuff

permalink
report
parent
reply
9 points

As someone who works with both, readability is the utmost important thing for me, and XML is cumbersome and has more characters to sift through to find what Iโ€™m lookin for.

permalink
report
parent
reply
5 points

I donโ€™t miss XML, but at least it has support for comments. On the other hand, I wish whitespace in XML wasnโ€™t significant. JSON needs to die in favor of JSON 5.

permalink
report
parent
reply
3 points
permalink
report
parent
reply
1 point
*

Nah, XML is just a slightly older fad. Letโ€™s go back to S Expressions. Theyโ€™ve been in use for over 60 years and have significantly better readability.

permalink
report
parent
reply
1 point
Deleted by creator
permalink
report
parent
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 3K

    Monthly active users

  • 1K

    Posts

  • 38K

    Comments