Giver of skulls

Verified icon

  • 0 Posts
  • 95 Comments
Joined 102 years ago
cake
Cake day: June 6th, 1923

help-circle



  • The thing with Windows is that the three magical commands (sfc, that DISM tool, fixboot) will usually fix most weird OS problems. To the point where any Windows troubleshooting session should include either the results of the first two, or instructions to use them.

    Once SFC and DISM can’t fix your install, you reinstall Windows. There are alternatives, but if you’d know them you wouldn’t be asking random Windows users on a forum. You can figure out a lot by enabling various tracing and logging features, listing open file handles and tracking file system calls, but the moment you need to take out sysmon you’re either in for a weekend of troubleshooting or wasting your time.

    Similarly, there are oneliners for Linux that’ll reinstall every package installed on the system and that has helped me recover my broken systems several times.




  • SOAP requires reading a manual before you get started, but so do the frameworks that try to replace it. APIs are APIs, you rarely need to manually access any of the endpoints unless the backend doesn’t stick to the rules (and what good do any alternatives provide if that happens?) or your language of choice somehow still lacks code generators for WSDL files.

    OpenAPI/Swagger is just SOAP reincarnate. The code generators seem to be a bit more modern, but that’s about it really.


  • Of course you can use XML that way, but it is unnecessarily verbose and complex because you have to make decisions, like, whether to store things as attributes or as nested elements.

    That’s a rather annoying shortcoming of XML, I agree. Then again, the choice is pretty inconsequential and the XSD for your data exchange format will lift any ambiguity anyway.

    The choice between XML and JSON are a matter of preference, nothing more. XML is much more powerful than JSON and it’s usually a better choice in my opinion, but if you’re writing your applications well, you may as well be sending your data as pixels in a PNG because your serialiser/deserialiser should be dealing with the file format anyway.





  • Most web frameworks contain code to exchange JSON over XMLHttpRequest for a reason. XML is and always has been a data transfer format as well as a file format. JSON is, too. The amount of config.jsons I’ve had to mess with…

    but using XML to communicate between your app’s frontend and backend wouldn’t be either

    I don’t see why not? The entrypoint of web frontends is sent as HTML already. I guess that’s based on SGML, XML’s weird and broken cousin. Outputting XML is just a matter of configuring whatever model serialiser from JSON to XML.

    There are a few good arguments against XML, but those also work against JSON.


  • Don’t drink the JSON coolaid. XML is fine. Better, in many cases, because XML files actually support comments.

    In the modern programming world, XML is just JSON before JSON was cool. There was a whole hype about XML for a few years, which is why old programming tools are full of XML.

    It’s funny but sad to see the JSON ecosystem scramble to invent all of the features that XML already had. Even ActivityPub runs on “external entities but stored as general purpose strings”, and don’t get me started on the incompatible, incomplete standards for describing a JSON schema.

    It’s not just XML either, now there’s cap’n proto and protobuf and bson which are all just ASN.1 but “cool”.


  • I think Microsoft saw how pointless their efforts were and dropped it. I think they may still lock your desktop background?

    It’s so easy to set up vlmcsd that I don’t even leave temporary virtual machine unregistered, but last time I used a pirated copy on another person’s laptop I had no idea until I noticed the text in the bottom right. Even stuff like backgrounds are easy to change by just downloading third party background software, like back in the good ol’ Windows 7 days.






  • Same is true for JavaScript’s namesake, Java; Object has a toString method, so everything but primitives (int, long, etc.) must have a toString method (and primitives sort of have one too in a roundabout way).

    I think JavaScript’s toString also serves another function, namely to have some form of fallback when doing operations on what should be incompatible types. [] + "", for instance; JavaScript will call toString() to do type conversion when the nearest matching type is a String.


  • Java would be "test string".toString(). C# has "test string".ToString(). Python has str("test string") (as str() is Python’s toString equivalent). Rust has String::from("test string").to_string().

    That’s just from the top of my head. I’m sure there’s more.

    Edit: actually, I think Rust’s to_string() may not be entirely useless, I think it may be used as a consuming placeholder for clone()? Not sure how that would be useful, but it’s not a complete no-op at least.