• 1 Post
  • 71 Comments
Joined 8M ago
cake
Cake day: Jan 05, 2024

help-circle
rss

Wherever is reading this, this article is worth looking at. Just trust me.



I don’t know the system in question, but it’s definitely a bad design when comments need to be written with care. Either you set this up in a really wonky way, or the system you’re using did and it should be fixed ASAP.

What code is in charge of injecting things into a shell script?


Oh, and if you really want a tough language, try Malbolge. The ratio of structured code to spaghetti code in that one is 0:1 - there are 0 instances of non-spaghetti code, and 1 instance of spaghetti code. I refuse to believe there’s any more code other than the Hello World example.


I think we’re going to have to agree to disagree. If any project in any language has well-organized code, it’s down to a ton of effort.

Assembly is harder to code in, period. It’s even harder when your code is a total mess and you didn’t plan ahead. For a large assembly project to survive at all, some structure is as necessary as oxygen. And not to mention, there are far fewer projects written in assembly anyway.


Okay, I’ll grant you brainfuck… As for assembly, I don’t think it’s inherently spaghetti. You can split it up into functions just like you can with an actual programming language. It’s not impossible to make structured code.

That said, I never coded assembly outside of a mandatory university course, so I don’t feel super confident in saying that. But I don’t think of it as a programming language anyway - it’s a 1:1 translation to/from machine code, and machine code isn’t meant to make programming easy or scalable.


I firmly believe that every language has an equal proportion of spaghetti code to clean code. The only factor that might screw with this is how much a language is used in industry, which I’d expect raises the ratio. However, there’s plenty of hobbyists writing spaghetti code too so I don’t think even that factor has much effect.


This may be true, but it’s equally true in any programming language, so not really relevant.



You’re wrong. Amazon mixes inventory between themselves and any other seller that’s fulfilled by Amazon, meaning if one random seller has fake product, then even the “sold by Amazon” option can send you that other seller’s fake product. And vice versa, of course.


You have to get your electronics from somewhere, retailers’ supply chain has a helluva lot more quality control than Amazon. Just because you can’t get to 100% doesn’t mean you shouldn’t strive for, well, anything more than the worst chances anyone can offer.


Don’t buy electronics through amazon. This is precisely why.


Ooh, I did guess wrong! That is an interesting specimen.

My suspicion is that they are experts in ergonomics, not in electrical engineering, so they probably aren’t aware of how silly and possibly dangerous what they did is. Or perhaps they simply don’t care because “it gets the job done”, standards and specifications be damned.

Anyway, in this case I’m happy to be proven wrong. Thanks.


It makes sense, if I remember correctly the older USB cable (i.e. everything before Type-C) are passive, so as long as the pins are wired symmetrically it wouldn’t matter which side is which. But whoever made your keyboard really blundered, there is no reason in the world why anyone would do this. There’s so many options: the B connector, mini USB, micro USB. All would make sense to put in the keyboard. A just doesn’t.

Let me guess: you got it from an ultra cheap online store? AliExpress/Wish/Temu?


I think the biggest problem I see with A to A is: who’s delivering power, and who’s receiving it? Maybe if you use it only with the device it came with then it’ll be fine, but if anyone tries to just hook up that cable to two random computers, it might actually cause a short circuit and fry something.

Whereas Type-C was explicitly made to handle such situations.

Or a shorter reason: Type-C cable is allowed by the spec while Type-A is not.


That ... at the end made me think there was more code and my client was refusing to show it to me no matter what I did.



I take issue with “everything”, as most things are not. But it is a common trick when a developer wants to make a “new” file format that encapsulates a bunch of different files.


No, that’s Dreadnought. Deadlock is a Batman villain who is an expert in firearms.




Welp, Ars Technica has another theory:

Microsoft’s Azure status page outlines several fixes. The first and easiest is simply to try to reboot affected machines over and over, which gives affected machines multiple chances to try to grab CrowdStrike’s non-broken update before the bad driver can cause the BSOD. Microsoft says that some of its customers have had to reboot their systems as many as 15 times to pull down the update.

https://arstechnica.com/information-technology/2024/07/crowdstrike-fixes-start-at-reboot-up-to-15-times-and-get-more-complex-from-there/




I don’t think that PS1 model of a car will ever look acceptable to me. It’s not a design that grows on you or you get accustomed to. It’s just bad.


Yup, the .text “file” is binary, and I assume it’s exactly that - the executable machine code - but I did not try opening it with any hex editor or disassembler. I tried with a text editor, knowing in advance that it’s going to fail, and it did - there were a bunch of null or error characters shown and the editor crashed soon after.

I honestly didn’t look any further into it, because I just don’t care. Archive Manager apparently just splits up the sections of the .exe and exposes them as if they were files in an archive. Seems as useful an approach as any.


I’m assuming Unicode anyway, and UTF-8 is by far the most natural because most files will be in ASCII. A “normal form” (see link above), you might think of it as a canonical form, is a way to check if two strings are equivalent, even if they encoded the text differently. Like the example mentioned on Wikipedia:

For example, the distinct Unicode strings “U+212B” (the angstrom sign “Å”) and “U+00C5” (the Swedish letter “Å”) are both expanded by NFD (or NFKD) into the sequence “U+0041 U+030A” (Latin letter “A” and combining ring above “°”) which is then reduced by NFC (or NFKC) to “U+00C5” (the Swedish letter “Å”).


Well, I did get my hands on an exe file (some game on Steam) and opened it with Archive Manager. It does show some files, but the file properties say Type: application/x-ms-dos-executable (as opposed to application/zip). So it’s not an actual archive file, the archive manager is just displaying it as such to be helpful.

The “files” I can see are:

/.text
/.reloc
/.rsrc/version.txt
/.rsrc/ICON/2.ico
/.rsrc/ICON/3.ico
/.rsrc/ICON/4.ico
/.rsrc/GROUP_ICON/32512.ico

I tried to create a zip file and rename it to .exe, but Archive Manager failed to open it at all which I found strange. You’d think it would look at the actual file contents to figure out what type of archive it is, and not rely on the extension.



Good point. Do filesystems use a normal form to at least prevent having two files with effectively the same name?

I should point out the flip side though, that there’s no avoiding Unicode in filenames. Users in languages that don’t use the Latin alphabet (such as Japanese, Chinese, Korean, Hebrew, Arabic, Greek and Russian, and the list could go on) can reasonably expect to be able to give a file a name they can read and understand with no extra effort. All the software woes that come with it - too bad, software needs to deal with it.


I’m not on Windows.

Let me know when you have the screenshot!


It’s a zip file that includes a bunch of things, including embedded images and a bunch of other junk, but yes - the most important and central files in the zip are XML-based.


I don’t think that’s true for .exe or .dll files, but it’s definitely true for .docx files and other Office files ending with x. Some .exe’s are self-extracting archives or have other files embedded in them, so maybe that’s what you’ve been seeing.


Unicode in filenames? Are you crazy?!

Okay that was /s to some extent but I gotta rant, I’m totally convinced that there’s still new software today that completely trip over themselves when files or paths have non-ASCII characters, or sometimes even a space. Incompetence didn’t go anywhere.




For generic contactless payments at shops? Or some closed system that only works with other PayPal users?


Until earlier this year, I could make NFC payments with the app of my credit card company. AFAIK contactless payments on Android were never locked to Google Pay/Wallet. But I have no idea why there’s no competition in this space. I’d expect e.g. PayPal to have something, but if they do I never heard of it - and I did look once, briefly.


I suppose it’s conceivable that there’s a bug in converting between different representations of Unicode, but I’m not buying and of this “detected which language is being spoken” nonsense or the use of character sets. It would just use Unicode.

The modulo idea makes absolutely no sense, as LLMs use tokens, not characters, and there’s soooooo many tokens. It would make no sense to make those tokens ambiguous.


As a daily reader of SMBC, I can confidently tell you this rule is a suggestion at best.


You might know Robert Miles from his appearances in Computerphile. When it comes to AI safety, his videos are the best explainers out there. In this video, he talks about the developments of the past year (since his last video) and how AI safety plays into it. For example, he shows how GPT 4 shows understanding of "theory of other minds" where GPT 3.5 did not. This is where the AI can keep track of what other people know and don't know. He explains the [Sally-Anne test](https://en.wikipedia.org/wiki/Sally%E2%80%93Anne_test) used to show this. He covers an experiment where GPT-4 used TaskRabbit to get a human to complete a CAPTCHA, and when the human questioned whether it was actually a robot, GPT-4 decided to lie and said that it needs help because it's blind. He talks about how many researchers, including high-profile ones, are trying to slow down or stop the development of AI models until the safety research can catch up and ensure that the risks associated with it are mitigated. And he talks about how suddenly what he's been doing became really important, where before it was mostly a fun and interesting hobby. He now has an influential role in how this plays out and he talks about how scary that is. If you're interested at all in this topic, I can't recommend this video enough.
fedilink