home.social

Search

8 results for “develwithoutacause”

  1. I'm watching and I swear it feels like every other episode goes like:

    La'An: "The Gorn are firing on us, what are our orders?"

    Pike: "Well, we can't fire on them, that would be considered an act of war!"

    La'An: "Sir, they already blew up a Starfeet ship."

    Pike: "..."

    La'An: "And are holding our people captive!"

    Pike: "Quite the diplomatic conundrum..."

  2. Screw alignment, I want an #AI agent to hack my mom's computer and set up a backdoor just so I can forcibly add her to the video chat.

    No more "Just press this button" or "No, they don't redesign the UI every week". I just press a button and she's there.

    #ai
  3. This approach can highlight where your static analysis is lacking or where your API is duplicating multiple sources of truth in potentially disparate locations.

    And yes, this concept still applies in the world of #AI coding, at least for non-local reproductions. If you want to change a map key from 'x' to 'y', how much confidence will you have that you caught all the places you were using 'x'? The AI has the exact same problem, even if it never "typos".

    #ai
  4. Compare that to an alternative design:

    ```typescript
    const key = new Key('foo');
    map.set(kkey, 'bar');
    map.get(keyy); // Err: No variable named `keyy`.
    ```

    Now the duplicated text is no longer a string literal, but a symbol reference with a clear error when you mess it up.

  5. So let's fix everything which would give a red squiggly...

    ```typescript
    const map = new Map<string, string>();
    map.set('ffoo', 'bbar');
    map.get('fooo'); // `undefined`
    ```

    But it still doesn't work, it returns `undefined`! The API is vulnerable to a bad typer.

  6. For example, consider using a simple map:

    ```typescript
    cont map = neww Mapp<tring, strin>();
    mmap.sset('ffoo', 'bbar');
    maap.gett('fooo'); // `undefined`
    ```

    Most of those typos are immediate syntax / typecheck errors.

  7. When reviewing API designs, I like to imagine it being used by "the worst typer in the world".

    I imagine a dev who is *just awful* at typing and makes every mistake they possibly could. How painful are those typos and how quickly are they discovered?

Share on Mastodon

Enter the server where you have an account.