this post was submitted on 27 May 2025
2073 points (99.5% liked)

Programmer Humor

24450 readers
55 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 12 points 4 weeks ago (13 children)

Honest question: I haven't used AI much. Are there any AIs or IDEs that can reliably rename a variable across all instances in a medium sized Python project? I don't mean easy stuff that an editor can do (e.g. rename QQQ in all instances and get lucky that there are no conflicts). I mean be able to differentiate between local and/or library variables so it doesn't change them, only the correct versions.

[–] [email protected] 11 points 4 weeks ago (1 children)

I use pycharm for this and in general it does a great job. At work we've got some massive repos and it'll handle it fine.

The "find" tab shows where it'll make changes and you can click "don't change anything in this directory"

[–] [email protected] 3 points 4 weeks ago (1 children)

Yes, all of JetBrains' tools handle project-wide renames practically perfectly, even in weirder things like Angular projects where templates may reference variables.

[–] [email protected] 2 points 3 weeks ago

Just be carerul when refactoring variable names in doc comments, I've seen some weird stuff happen there

load more comments (11 replies)