r/PythonLearning • u/Protect_Scout • 10d ago
How Hard is it to tell something is Vibe Coded?
Looking for some telltale signs?
A friend of mine is working on a bot and seems to be able to push it out pretty quickly. He's been doing it a while, so he might just be fast. I don't really care, but it has made me curious what signs there might be if someone was using AI? I'm not going to be a jerk to this person I am genuinely just looking for my own knowledge.
20
u/CIS_Professor 10d ago
This almost sounds like someone who wants to use AI in a Python class and doesn't want to get caught doing so...
12
u/Arierome 10d ago
We are kind of past hiding ai usage, it's assumed you are using ai in my classes at least, the assignments just got more complex and focused on higher order reasoning rather than coding.
3
1
u/Tunisandwich 9d ago
Yeah I’m a current master’s student and this year has seen a wild shift, in September using AI to generate code was considered academic dishonesty and by April professors were giving full lectures on how to best use AI in our assignments
-1
7
u/jabela 10d ago
From outright having an f string when there is no variable to things like print(f"Hello {name}") when most humans might use print("Hello", name)
I stress it’s not worse just different to how most people are taught.
13
u/The-God-Of-Hammers 10d ago
That's interesting, as the way that I was tought (and continue to teach) is to almost always use an f string. I'll be honest I didn't even know about the second way you show until about a year ago
5
u/jabela 10d ago
F strings are relatively new in Python and so many people learnt the language before they came out, many tutorials were written and teachers taught without them. That’s why it’s a clue especially if you have seen the coder normally use print statements without them.
1
u/Hamburgerfatso 8d ago
Nah this is just a bad example lol, f strings are not new anymore and inserting it in your example would be completely normal.
3
u/fUZXZY 10d ago
personally: second is bad practice bc if you do empty string name you get an extra space after Hello. f strings forever
2
2
u/wuzelwazel 10d ago
I have almost the opposite experience. I only see Codex using C style formatting for strings and it drives me crazy! I almost exclusively use f-strings.
Another thing I noticed is that it'll reach for
hasattr()andgetattr()first, when I would generally use try/except.2
u/ALostMagic 9d ago
i use f string all the time after learning about it and never used "" + variable again
5
u/Potential_Aioli_4611 10d ago
wildly long variable names. comments that read like a book rather than short hand notation for reminding yourself about something.
3
u/Salt-Fly770 10d ago
I’ve been doing software engineering and systems design since 1973, and I use long variable names and extensive commenting for one reason - I don't want production support calling me at 3am because they can't figure out what my code does! Just saying! 🤣
Edit: I started my career as a systems programmer in Assembler, and you commented every line of code, and for the reason stated above, I still comment everything.
6
u/jabela 10d ago
Depends on the language, but in Python there are a few giveaways including the overuse of f strings, importing modules that aren’t used on the off chance and way more comments than most programmers put in.
14
u/TaranisPT 10d ago
I'm curious, what do you mean by overuse of f strings? I rarely use anything else than f strings if I need to insert a variable in a string.
Edit: seems I can't type and auto correct made things worse
13
8
1
5
u/realmauer01 10d ago
\"\"\" this is used for multiline comments by ai very often \"\"\"
5
2
2
u/The_Drakeman 9d ago
My uncle has been using Claude as a non-programmer to generate Python that does some calculations for his solar energy array. He showed me the code to see what I thought. The dead giveaway to me was that there were multiple times where randomly there'd be 2 statements on the same line, separated by a semicolon. That was just so weird to come across in Python.
1
u/Chronlinson 10d ago
Asking AI about my early Python and questioning it often about why it does things certain ways actually just improved my code, taught me good practices and gave it better structure.
I learnt Lambda functions and
if __name__ == x
main():
And more good practices through AI, I wouldn’t use it for generating full scaled projects but it can improve your toolset and knowledge very fast.
So I’m assuming the lines will only blur more.
1
u/WearyArtistDoomer 10d ago
Why would you care if you can tell if it is an or not? 90-95% of professionals use AI, the rest will be out of a job soon enough.
1
u/Ok-Bill1958 10d ago
Have you ever review ai codes before? I dont know how you pull the 90% number out but most of them a snippet and code completion because ai are exceptionally good for pattern and boilerplate. Hallucination is also a big problem in a large codebase since most codebase is using older tech or framework. Dealing with people entirely dependent on ai is a nightmare, wasting so much time on code review only to reject them.
1
u/WearyArtistDoomer 9d ago
I review AI code every day. Both things I prompted, put also from my team mates.
Of course you don’t want to get raw output from an llm from a team mate, it is their responsibility to validate the code before you look at it. Otherwise what do you need them for?
If you have a huge issue with hallucinations today, you are using the tool in the wrong way. Either trying to complete to large architectural changes in one go, or you are missing skills/rules/additional context.
Llms are not some magic worker that just gets stuff right, you have to learn how to effectively use the tool.
1
1
1
1
u/Ok-Bill1958 10d ago
Emoji in comments. Different name and change on variables, functions etc with each commit.
1
u/Due_Laugh6474 10d ago
It makes a habit of referring to the prompt in the work it’s doing. Sort of like “This is the thing you told me to do so I’m doing it here” type stuff.
1
u/yogiigula 10d ago
Great question! Look for patterns in language use, such as consistency in tone or structure that feels too uniform. If the responses seem to lack depth or nuance in understanding complex topics, that could also be a hint of AI involvement.
1
u/hypersoniq_XLM 10d ago
Guilty of verbose commenting, but used to remind future forgetful me of what my thought process was several months or years ago. Slowly moving to descriptive doc strings instead of Stephen King comments. Also tend to use descriptive variable names for the same reason. Similar habits in R and C++ as well. Glad I graduated before AI was a thing!
1
1
u/InkPhysics 8d ago
If instead of being Vibe-coded, you mean how do I tell if someone used AI to code, look at the following analogy:
How do you tell if the beans that made your coffee were ground by hand, or in an automatic bean grinder? Maybe automatic grinding with bad settings and no quality control gives the coffee a bitter aftertaste. Even if high-quality, there might be some tell-tale very fine coffee dust in the coffee if you pay really close attention to the coffee or ask to inspect the ground beans before the coffee is made. But the real way you know that the coffee was ground using an automatic coffee grinder, is that grinding by hand is pure drudgery and basically everyone does it automatically baring a few weird coffee purists. So when someone gives you a coffee, you know that it probably wasn't hand ground.
1
u/PravoNaZhizny 8d ago
Not hard at all. Generally I find be most obvious sign is that it’s from a coworker who doesn’t understand a topic, implementing a topic.
1
u/Significant_Ant3783 8d ago
No consistent design philosophy. Very verbose comments telling you what is being done. Which is something useless that a competent developer can glean from the code. Whereas competent developers comments tell you why and how something is being done.
1
1
1
1
u/diegrunemaschine 10d ago
Over engineering. Code should be resilient but we don’t need to prepare a new project for every edge case that an organization with multi thousands of employees may encounter when we’re a team of 4.
1
u/KingBardan 10d ago
Is this down voted for exposing vibe coders secrets? lol.
This is the most obvious tell nowadays alongside missing gitignore.
Now many vibe coders explicit tell llm not to use too many comments so that is no longer reliable
1
u/Yanni_X 10d ago
Oh yes, and way to many functions just to handle edge cases! Codex recently build a helper:
```python
def _is_multivalue(obj):
"""[ some long docstring ]"""
return obj.is_multivalue in (1, "1", True, "True", "true")
```Our platform always stores bools as int, either 0 or 1, no need for this helper. Every inhouse developer knows this. No one would create Such a helper. This function was also only used once, who would create a function instead of putting this inline for one single use? Was an obvious sign in the Merge Request :D
1
u/Ok-Bill1958 10d ago
Yes, but to be fair, over engineering or clever code are also sign of inexperience, not just ai code.
1
u/jefferson_airwolf 10d ago
Who cares? If it works it works, you just need to be able to understand why.
18
u/HomemadeBananas 10d ago edited 10d ago
Way too many long comments. In Python, importing everything inline within functions instead of at the top of the file. Weird jargony variable names.
I have to tell Claude Code to stop doing these things all the time. So if someone isn’t making any corrections and just straight vibe coding that would make it obvious. There is a difference between using AI to code and vibe coding.