• 0 Posts
  • 35 Comments
Joined 1 year ago
cake
Cake day: June 14th, 2023

help-circle


  • Because if you disable browser autocomplete, what’s obviously going to happen is that everyone will have a text file open with every single one of their passwords in so that they can copy-paste them in. So prevent that. But what happens if you prevent that is that everyone will choose terrible, weak passwords instead. Something like September2025! probably meets the ‘complexity’ requirement…


  • addie@feddit.uktoProgrammer Humor@programming.devPsychopath Dev
    link
    fedilink
    arrow-up
    49
    arrow-down
    4
    ·
    edit-2
    27 days ago

    A bit like when we renamed all the master/slave terminology using different phrasing that’s frankly more useful a lot of the time, I think it’s about time we got rid of this “child” task nonsense. I suggest “subtask”. Then we can reword these books into something that no-one can make stupid jokes about any more, like “how to keep your subs in line” and “how to punish your subs when they’ve misbehaved”.


  • Well now. When we’ve been enforcing password requirements at work, we’ve had to enforce a bizarre combination of “you must have a certain level of complexity”, but also, “you must be slightly vague about what the requirements actually are, because otherwise it lets an attacker tune a dictionary attack against you”. Which just strikes me as a way to piss off our users, but security team say it’s a requirement, therefore, it’s a requirement, no arguing.

    “One” special character is crazy; I’d have guessed that was a catch-all for the other strange password requirements:

    • can’t have the same character more than twice in a row
    • can’t be one of the ten-thousand most popular passwords (which is mostly a big list of swears in russian)
    • all whitespace must be condensed into a single character before checking against the other rules

    We’ve had customers’ own security teams asking us if we can enforce “no right click” / “no autocomplete” to stop their users in-house doing such things; I’ve been trying to push back on that as a security misfeature, but you can’t question the cult thinking.




  • It’s a simple alphabet for computing because most of the early developers of computing developed using it and therefore it’s supported everywhere. If the Vikings had developed early computers then we could use the 24 futhark runes, wouldn’t have upper and lower case to worry about, and you wouldn’t need to render curves in fonts because it’s all straight lines.

    But yeah, agreed. Very widely spoken. But don’t translate programming languages automatically; VBA does that for keywords and it’s an utter nightmare.


  • If you move past the ‘brute force’ method of solving into the ‘constraints’ level, it’s fairly easy to check whether there are multiple possible valid solutions. Using a programming language with a good sets implementation (Python!) makes this easy - for each cell, generate a set of all the values that could possibly go there. If there’s only one, fill it in and remove that value from all the sets in the same row/column/block. If there’s no cells left that only take a unique value, choose the cell with the fewest possibilities and evaluate all of them, recursively. Even a fairly dumb implementation will do the whole problem space in milliseconds. This is a very easy problem to parallelize, too, but it’s hardly worth it for 9x9 sodokus - maybe if you’re generating 16x16 or 25x25 ‘alphabet’ puzzles, but you’ll quickly generate problems beyond the ability of humans to solve.

    The method in the article for generating ‘difficult’ puzzles seems mighty inefficient to me - generate a valid solution, and then randomly remove numbers until the puzzle is no longer ‘unique’. That’s a very calculation-heavy way of doing it, need to evaluate the whole puzzle at every step. It must be the case that a ‘unique’ sodoku has at least 8 unique numbers in the starting puzzle, because otherwise there will be at least two solutions, with the missing numbers swapped over. Preferring to remove numbers equal to values that you’ve already removed ought to get you to a hard puzzle faster?



  • You can write an unmaintainable fucking mess in any language. Rust won’t save you from cryptic variable naming, copy-paste code, a complete absence of design patterns, dreadful algorithms, large classes of security issues, unfathomable UX, or a hundred other things. “Clean code” is (mostly) a separate issue from choice of language.

    Don’t get me wrong - I don’t like this book. It manages to be both long-winded and facile at the same time. A lot of people seem to read it and take the exact wrong lessons about maintainability from it. I think that it would mostly benefit from being written in pseudocode - concentrating on any particular language might distract from the message. But having a few examples of what a shitfest looks like in a few specific languages might help



  • My old job had a lot of embedded programming - hard real-time Z80 programming, for processors like Z800s and eZ80s to control industrial devices. Actually quite pleasant languages to do bit-twiddling in, and it’s great to be able to step through the debugger and see that what the CPU is running is literally your source code, opcode by opcode.

    Back when a computers were very simple things - I’m thinking a ZX Spectrum, where you can read directly from the input ports and write directly into the framebuffer, no OS in your way just code, then assembly made a lot of sense, was even fun. On modem computers, it is not so fun:

    • x64 is just a fucking mess

    • you cannot just read and write what you want, the kernel won’t let you. So you’re going to be spending a lot of your time calling system routines.

    • 99% of your code will just be arranging data to suit the calling convention of your OS, and doing pointless busywork like stack pointer alignment. Writing some macros to do it for you makes your code look like C. Might as well just use C, in that case.

    Writing assembly makes some sense sometimes - required for embedded, you might be writing something very security conscious where timing is essential, or you might be lining up some data for vectorisation where higher-level languages don’t have the constructs to get it right - but these are very small bits of code. You would be mad to consider “making the whole apple pie” in assembly.


  • Genesis is a different style of game tho, isn’t it? Diablo-like rather than third-person hack and slash?

    Love the series. Personally prefer 3 due to its more limited scope; the other two are great, but to on for a very long time, and I really can’t be bothered playing through the Portal-like bits again. Happy if 4 is the same length as 3.


  • Yeah. Unless they’ve some ulterior motive for porting their RE engine to iOS, then this is insane. That kind of cash will barely fund a senior engineer for a month once you’ve paid out overheads as well.

    If they’re planning to have some kind of phone tie-in to the next Resi game, then maybe it might have made sense to work the compatibility issues out. An app that runs on your phone that makes it “your phone in game”, so you can receive texts from the president’s daughter while shooting some definitely-not-Spaniards on your Playstation, bit of an augmented-reality thing. Could be a laugh to have your phone be in control of a drone so that you can see round corners, while juggling the other things you’re doing? But probably mostly so that you can get dinged for microtransactions.


  • addie@feddit.uktoRPGMemes @ttrpg.networkEarth divided
    link
    fedilink
    arrow-up
    39
    arrow-down
    1
    ·
    3 months ago

    There’s three regions missing here - region 0 is “worldwide”, region 7 is “special purpose”, Oscar screening DVDs and the like, and region 8 is “international waters” for cruise ships and things. You can set several regions on the same disk, to make a 2/4/5 and the like. Set each region as a bit, and you can store that in a single byte - that makes it very easy to flash the firmware on DVD players to decide which disks they can play. Aus/NZ will want content in English and Latin America will want Spanish or Portuguese, so the DVD consortium can still get up to their often-illegal, certainly immoral, price fixing and bullshit.

    Really, fuck DVDs. So much potential in the increased capacity, and then it was mired in crap like this and “disabled user operations” so that you can’t skip trailers. Time to raise the black flag and set sail for prosperous waters, me hearties.


  • Agreed. JSON solves:

    • the ‘versioning’ problem, where the data fields change after an update. That’s a nightmare on packed binary; need to write so much code to handle it.
    • makes debugging persistence issues easy for developers
    • very fast libraries exist for reading and writing it
    • actually compresses pretty damn well; you can pass the compress + write to a background thread once you’ve done the fast serialisation, anyway.

    For saving games, JSON+gzip is such a good combination that I’d probably never consider anything else.


  • One of the things that got me to change my gaming desktop from Mint to Arch was the fact that you get the cutting-edge version of everything; kernel and amdgpu being the most important, but also getting the latest version of Lutris and things is nice too. Brought me from “usually about 50 fps outdoors in Elden Ring” to “usually about 60 fps” on the same machine.

    Makes sense for a gaming machine to only include the services you actually want, which Arch enables. Supports my hardware better too - my audio gear works perfectly in Pipewire but is ropey in ALSA, so rather than “install Mint -> install Pipewire -> remove ALSA -> hope ALSA is gone”, the sequence is “install Arch -> install Pipewire”, which make more sense.

    Other cutting-edge rolling release distros are available, of course, but once you learn Arch, it makes a lot of sense for gaming.


  • We’ve a few rescue cats - we got them all when they were about three / four years old. We kept them inside initially for six weeks or so, made sure that they’d got used to living in a new house before we let them outside.

    The one which had been abandoned and had been living outside for a few weeks (a boy) stopped using his litter tray completely, as soon as he was allowed outside again.

    The other two, both girls but a ‘smooth’ changeover, took a bit more time to get used to being outside. One transitioned off of her litter tray after a couple of months by herself; the other took more like four months, and she was a bit of a fair-weather pooper for a while as well.

    My take-home message would be that cats generally prefer to do their business as far away from where they live as possible. Only possible bit of advice would be to wait until the weather’s getting better in case your cats dislike the wind and the rain. I believe forest cats love the frosty weather anyway, though?