• 0 Posts
  • 8 Comments
Joined 2 months ago
cake
Cake day: June 23rd, 2026

help-circle


  • I found a Stack Overflow thread where people discuss this and actually test it. Further down the page is a 2026 test. The results are it’s basically the same, very little practical difference in normal usage. If you’re auto saving a file every 30 seconds you will not notice any difference between XML and JSON.

    Personally, I like XML more for data files like this. I would not reach for JSON as my first thought for deserealizing a complex object hierarchy. Stuff like, a polygon can have a drawing of type vector which can have n paths which each have exactly 2 points… easy to store and validate in XML. Quite messy and complicated in JSON.

    <Drawing type="polygon">
      <Line color="#fed1aa">
        <Point x="6" y="7" />
        <Point x="69" y="420" />
      </Line>
    </Drawing>
    



  • Nothing is wrong with that, but it will give you different output. I tend to like using capture groups just out of habit, it makes it more flexible and useful in future. Most of my co-workers hated Regex so I tried to make it easy for them.

    I also wanted the letters to be as close together as possible. In this example it doesn’t matter, but in other texts it might. Yours will find the first y, then the furthest possible e, then the furthest possible s. So you might get output where there’s a y on line 1 and the e s at the very end of the text. Nothing wrong with that, it’s just not what I was envisioning.

    Also it’s funnier in this context to have a complicated regex.


  • When I was leaving a previous job, I watched my replacement put in a bloated as fuck .svg file embedded directly into the HTML… within that, was multiple base64 encoded uncompressed .png images. All to do a spinny animation you can whip up in 1 second with CSS transform transition. When I said that, they were confused because they didn’t even know what CSS is, they just use tailwind. Apparently writing your own CSS is firmly old school nowadays.

    There is zero cares about performance anymore, nobody gives a fuck. Phones are powerful, internet is fast. Yeah sure let’s dump in this 80mb bloated nesting doll abomination above the fold directly in the HTML so it’s never cached and downloaded every time and bloat the images by 33% because base64 does that. When I raised my concerns I was dismissed because it looked good. That attitude was part of the reason I was leaving. Most websites are awful div soup nowadays with 10 frameworks up their asses. The first thing I do when I help people with their code is delete 60% of it.

    Sorry, I still am upset by the direction the web dev industry was going.