home.social

Search

7 results for “develwithoutacause”

  1. 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
  2. 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
  3. 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.

  4. 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.

  5. 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.

  6. 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.