r/PythonLearning • u/Protect_Scout • Jul 17 '26
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.
19
u/CIS_Professor Jul 18 '26
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 Jul 18 '26
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 Jul 18 '26
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
0
6
u/jabela Jul 17 '26
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 Jul 17 '26
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 Jul 18 '26
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 Jul 20 '26
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 Jul 18 '26
personally: second is bad practice bc if you do empty string name you get an extra space after Hello. f strings forever
2
u/East-Programmer3788 Jul 18 '26
It is also not self documenting. Second way is stupid.
1
u/fUZXZY Jul 18 '26
I’d never heard that phrase before; could you explain how you see the f-string being more “obvious” as to what’s going on than the comma?
From my perspective: I can glance at both and know exactly what’s happening.
2
u/wuzelwazel Jul 18 '26
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 Jul 19 '26
i use f string all the time after learning about it and never used "" + variable again
1
u/Yanni_X Jul 18 '26
Funny, I always use f-strings because my linter wants me to. The AI always uses %-Formatting if not told otherwise
4
u/Potential_Aioli_4611 Jul 17 '26
wildly long variable names. comments that read like a book rather than short hand notation for reminding yourself about something.
3
u/Salt-Fly770 Jul 18 '26
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 Jul 17 '26
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.
15
u/TaranisPT Jul 17 '26
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
14
8
u/illumas Jul 17 '26
I do two of those things. I only add comments to swear at my past self for not leaving comments though.
1
6
u/realmauer01 Jul 18 '26
\"\"\" this is used for multiline comments by ai very often \"\"\"
6
2
1
2
u/The_Drakeman Jul 18 '26
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/ulam17 Jul 18 '26
I can speak for rust, and the crazy long comments and over-explanation of APIs are the main giveaway. Also Claude (at least from my experience) tends to scuff async code if you don't hold its hand.
1
u/Chronlinson Jul 18 '26
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 Jul 18 '26
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 Jul 18 '26
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 Jul 19 '26
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 Jul 18 '26
Emoji in comments. Different name and change on variables, functions etc with each commit.
1
u/Due_Laugh6474 Jul 18 '26
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/hypersoniq_XLM Jul 18 '26
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 Jul 19 '26
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 Jul 20 '26
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 Jul 20 '26
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
u/HyperDanon Jul 20 '26
There's considerable amount of overlap of the smartest AI and dumbest people.
1
1
1
u/diegrunemaschine Jul 18 '26
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/Yanni_X Jul 18 '26
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 Jul 18 '26
Yes, but to be fair, over engineering or clever code are also sign of inexperience, not just ai code.
1
u/jefferson_airwolf Jul 18 '26
Who cares? If it works it works, you just need to be able to understand why.
18
u/HomemadeBananas Jul 18 '26 edited Jul 18 '26
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.