i'm logged on and ready to go


i just had an experience where i had to write some code, and i really couldn't be bothered to understand the problem and the tools at my disposal, and then i went onto ChatGPT & asked and it gave me a sensible answer and i didn't have to think. incredible! i am normally a LLM hater when it comes to coding, based on trying out Copilot for a bit when it was first announced.

-- sidebar for the actual problem! --
the problem was "can you write a query that will get all of the user_ids from the featured_users table, except the ones that are being blocked by a particular user?", it gave me

SELECT fu.user_id
FROM featured_users fu
LEFT JOIN blocks b ON fu.user_id = b.blocked_user AND b.blocking_user = 'specific_user_id'
WHERE b.blocking_user IS NULL;

i am slowly building up my knowledge of SQL with this project, but... fits and starts. in this case the bit i was missing was applying conditions to the ON of a LEFT JOIN that aren't actually related to the join itself. and, tbh, just confidence in which join is which.

-- sidebar ends --

so, okay, now updated my mental model to say that LLMs are sometimes good for code. but only code when you think "ugh, i know this is straightforward, i just can't be bothered to learn it myself"


so, some thoughts on this: i think one reason i generally don't like Copilot is that i already code in a way that is a dynamic back and forth with the editor, except the relationship i'm used to is one where the editor is almost always right & i'm trying to satisfy it. i like a type system for that reason - it makes it so that by the time i run the code, i have a good amount of faith it's correct, or at least sensible. i write Rust! i don't even hate the borrow checker! and even when i write JS for little one page things, i scatter little JSDoc comments around so that the IDE can tell me something about what i'm writing.

but when i tried out Copilot, the integration ended up replacing my reliable feedback with unreliable feedback. i would make an offering, and the editor would run with it and produce a bunch of stuff in that vein, but not quite right. it swapped the roles! suddenly it was the one producing possibilities, and i was now taking on the role of accepting or rejecting them. does this make sense? does this variable actually exist? does this actually do the thing i want it to?

which also frustrated me, because a bunch of the time the suggestions it would propose would be suggestions the editor was then capable of rejecting. i kind of wanted it to go have a talk with the language server and do a few rounds of iteration to get something that actually compiled before showing me what it had. and also the nice muscle memory i had for interacting with the language server instead interacted with Copilot instead.

(and maybe this particular example is notable because writing SQL is a case where i'm usually writing it in a embedded string within a different language or else interactively into a command prompt, and so i have no editor support for writing it)

but maybe if i had a different relationship to the editor, to coding, i would be having a better time? i wonder how it feels to people used to working with an interpreter in that kind of LISPy way, or to people who use text editors without that kind of autocomplete, where they have to actually learn the syntax and methods they're using & not iteratively explore them as they go. or just someone who likes more dynamic languages (which, i confess: i can intellectually understand that those people exist, but i can't really understand being one of those people)


You must log in to comment.
Pinned Tags