Post

seems conspicuous that programmer commentary on genAI is split between "oh yeah i use claude all the time now. the 10× programmer is real and he's me. i am a god" and "yeah my coworkers use claude all the time. they keep committing crap that doesn't work and now i spend half my time fixing it"

One of my coworkers wrote some Python code in a weird, roundabout way. I asked him why he didn't do it the obvious way. "ChatGPT said it wouldn't work." The obvious way works in the Python 3 version we're using. It works in Python 2.7. Apparently, "Just try it and see what happens." is a lost art.

Not only did I have to try it for him, but I ended up distracted by the question of how the hell this misinformation got synthesized, because I couldn't find any instance of anyone or anything making such a claim by just searching the web.

The task in question was "define a property on a NamedTuple". Somehow the Statistically Average Coder had generated the assertion that the property has to be patched onto the class after it's created.

lmao what technically it has to be on a subclass, but basically everyone just inline-subclasses namedtuples anyway

0 reposts6 likes

Starting in 3.6, typing.NamedTuple is doing some kind of metaprogramming stuff so you can subclass it directly and use the attribute annotation feature to name the tuple fields. I just looked at the implementation, and, um, if it works...