this post was submitted on 15 Oct 2023
400 points (94.4% liked)

Programmer Humor

32050 readers
1602 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
all 45 comments
sorted by: hot top controversial new old
[–] [email protected] 77 points 11 months ago (3 children)

I recently had to work with XSLT (may it's inventor burn in hell for their crimes).

That's pretty much programming in XML. It's probably the worst possible thing.

[–] [email protected] 31 points 11 months ago (2 children)

XSLT is fine

If you have a program generate it

[–] [email protected] 24 points 11 months ago

Sadly, it was done manually. I had to migrate it to this brand new bleeding edge technology, Apache Velocity. That's not great either, but it's much less terrible than XSLT.

For that task I had to learn two templating languages at the same time to port it from one to the other. Wasn't an easy task.

[–] [email protected] 3 points 11 months ago

Pff. I know someone who generated programs using XSLT.

[–] [email protected] 9 points 11 months ago (1 children)

Can't even imagine. I've got fed up by the short time I had to configure Maven in plain xml...

[–] [email protected] 2 points 11 months ago (1 children)
[–] [email protected] 1 points 11 months ago

Yes, there is: https://github.com/takari/polyglot-maven

I am just not sure if that's much better. Maven is just a huge pain in the rear.

[–] [email protected] 63 points 11 months ago (1 children)

This is not HTML. It isn't even XML. It's not as bad as designers putting "code" into ads, but it's close.

Also, ever heard of XSLT?

[–] [email protected] 26 points 11 months ago (1 children)

I mean it's valid XML

It's just not useful

[–] [email protected] 36 points 11 months ago (3 children)

It isn't valid XML. No root node.

[–] [email protected] 24 points 11 months ago (2 children)

We may just not see it but fair point

[–] [email protected] 17 points 11 months ago

The editor would need to start counting lines at zero.

[–] [email protected] 14 points 11 months ago (2 children)

The line numbers show us that we're seeing the whole file.

[–] [email protected] 9 points 11 months ago

Oh ur right

Ew I didn't notice

That's awful

[–] [email protected] 1 points 11 months ago

They only (probably) show us that we are seeing the begining of the file. Also relative line numbing is a thing in vim for example.

[–] [email protected] 1 points 11 months ago

Could it be an xml entity (or whatever it’s called) that you reference from another xml file? Do those require root nodes?

[–] [email protected] 23 points 11 months ago (2 children)

This reminds me of Apple plist files, which appear to have been invented by someone that doesn't know how XML works.

[–] [email protected] 9 points 11 months ago (1 children)

Which is true for the majority of all XML files I've ever come across in the wild.

[–] [email protected] 4 points 11 months ago (1 children)

I think XML only makes sense if your data is heavily tree-like

[–] [email protected] 4 points 11 months ago (2 children)

In that case, why not use JSON?

[–] [email protected] 1 points 11 months ago

because you have a thing against solutions that are both beter and easier

[–] [email protected] 1 points 11 months ago* (last edited 11 months ago)

JSON spreads out tree nodes vertically (with all the attributes), whereas in XML it's usually one node per line, ie. more compact I suppose. This is just my very niche opinion though

[–] [email protected] 8 points 11 months ago

What even are those?

[–] [email protected] 17 points 11 months ago
[–] [email protected] 15 points 11 months ago (1 children)

You should check out this new project, supposed to be twice as fast as HTML. It's called XHTML.

[–] [email protected] 3 points 11 months ago

I thought that was the HTML used by Twitter.

[–] [email protected] 12 points 11 months ago
[–] [email protected] 11 points 11 months ago (1 children)

I will never understand how XML came into being when lisp already existed.

[–] [email protected] 26 points 11 months ago (3 children)
[–] [email protected] 13 points 11 months ago* (last edited 11 months ago)

(reminds (it (of (story me))))

[–] [email protected] 1 points 11 months ago

Would you really rather see <\Foo> than )?

There's a reason why most popular languages use } rather than end if or fi. The added verbosity doesn't actually help people read your code more than e.g. indentation or editors with paren matching or rainbow parens.

[–] [email protected] 10 points 11 months ago

Is it just me, or does the append statement not indicate where you are appending the "number" element to?

[–] [email protected] 9 points 11 months ago

Meanwhile in APL, you just 20 50 60 90, 10

[–] [email protected] 5 points 11 months ago

Who ever designed this deserves to be killed.

[–] [email protected] 3 points 11 months ago (1 children)
[–] [email protected] 2 points 11 months ago

Looks like Vampire.

[–] [email protected] 3 points 11 months ago

someone should make lisp but with html syntax