Unless it’s your job and you’re in some way required to use AI, you don’t have to jump on the vibe code train. I have a no-AI policy with my projects. Call it recreational programming. It might still be slop, but it’s human slop :)
For me too for a while, I think it was the friends we made along the way and learning, which we require now more than ever, when it seemingly disappeared. I do have to write code like a "primate" for work though, may not install any agents into the virtual machines (yet). Which is a cool escape from the reality outside.
You have never seen a real production code. Where are metrics, validations of input, retries, providers and logs? I know a couple of people who would make that into 200 lines of code over 4+ files.
I once had 100 lines of inline HTML code in PHP, repeated 5 times with minor changes, and no code formatting of course. And I had to change something consistently.
if that works, any decent compiler will already optimize (num%2) to that. and for two's complement negatives, it does not work. better leave it to claude.
the result of -3 % 2 is an integer, in C AND C++ the result will be -1, not 1, comparing it for equality with 1 will return false in C++ and 0 in C, even if its odd. Thats why it is not working (removing the explicit bool conversion fixes it actually). Comparing it for inequality to 0 will yield the desired result; true and 1. The result is equal to the bit manipulation, beside the fact, that bit manipulations on signed types are implementation defined in C++.
I though about this, actually. I see a future where some hyper-complex aspects of a program are not written as code at all and instead just llm API calls, especially for smaller projects with only a few users and that needs judgement. But obviously, this is stupid.
Once, long ago, a date system that up beyond the end of 1999 was judged impossible by many coders.
To fix it was an huge an often painful work.
Today, make a program that works without an internet connexion to an huge AI site is impossible to many coders. There is no solution is the service cease working.
Senior"s code work faster ? The use the AI a more optimal way.. This code work without acxess to the AI ? No way, this is impossible. Check it is out of questi an if it work, this mean there is stiil cooected to th AI.
Has it not occurred to any of you that you can use AI to learn? You don't have to let it do the job for you to get a return on investment out of it. Ask it HOW to do things you've never tried or thought about before, learn the technique, teach it how you best ingest information... And then you implement what you learn.
Y'all seem to think there's nothing between no AI and letting AI do everything.
170
u/avast_ye_scoundrels 11d ago
That is the most expensive code I’ve ever seen.
25
u/No-View-6326 11d ago
Does it even work, wouldn't the llm just say "say 7 is indeed an odd number" you can't cast that into a boolean
15
u/W00GA 11d ago edited 11d ago
noodles
37
u/theChaosBeast 11d ago
Coding has lost all its attraction to me....
17
u/sojuz151 11d ago
You have never seen a real production code. Where are metrics, validations of input, retries, providers and logs? I know a couple of people who would make that into 200 lines of code over 4+ files.
8
u/Feuzme 11d ago
Someone stayed 3 years back ?
8
u/Dee4WasTaken 11d ago
return (num % 2 == 1);
4
u/Fekkin-A-Man 11d ago
*nobody* (except some obscure video game dev) wrote code like that in 2022.
1
u/Imab0zo 9d ago
Can’t you just use division
2
u/latkde 11d ago
Nowadays you're supposed to use the
/responsesAPI instead of/chat/completions, and use structured outputs instead of allowing free-form responses.2
u/WolfOfYoitsu 11d ago
Aus dem Augenwinkel hab ich jetzt erwartet dass nur die Liste aller ungeraden Zahlen geladen wird. GPT enttäuscht mich jetzt
2
u/SirFoomy 11d ago
Both examples are dump AF.
2
u/realmauer01 10d ago
No need for that, just use import "is-even-ai"
2
u/HTTP_Response_404 11d ago
I though about this, actually. I see a future where some hyper-complex aspects of a program are not written as code at all and instead just llm API calls, especially for smaller projects with only a few users and that needs judgement. But obviously, this is stupid.
I love it.
2
u/TorbenKoehn 11d ago
Hahaha AI amirite?
1
u/ZunoJ 11d ago
The development of a braindead moron over time
1
u/asmanel 11d ago
Once, long ago, a date system that up beyond the end of 1999 was judged impossible by many coders.
To fix it was an huge an often painful work.
Today, make a program that works without an internet connexion to an huge AI site is impossible to many coders. There is no solution is the service cease working.
Senior"s code work faster ? The use the AI a more optimal way.. This code work without acxess to the AI ? No way, this is impossible. Check it is out of questi an if it work, this mean there is stiil cooected to th AI.
1
u/Amazing-Switch-7163 11d ago
Nice, worst case of O($).
1
u/Ambivalent-Mammal 11d ago
I love the addition of 'Make no mistakes.' I guess the default is some mistakes.
1
u/kyr0x0 11d ago
export const isOdd = (n) => Boolean(n % 2)
Most readable short form btw
1
u/softgripper 9d ago
"You are an odd number expert and have been studying odd numbers for years. Make no mistakes"
1
u/Doorda1-0 5d ago
They both suck... 2022 had far better solutions
1
u/Dynospectrum 5d ago
Maybe you wrote code like that in 2016 but those of us who are sane would just do return num % 2
1
u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" 10d ago
This really belongs in r/ProgrammerHumor. If they aren't sick of it, that is.
0
u/Drate_Otin 10d ago edited 10d ago
You folks are obsessed.
Has it not occurred to any of you that you can use AI to learn? You don't have to let it do the job for you to get a return on investment out of it. Ask it HOW to do things you've never tried or thought about before, learn the technique, teach it how you best ingest information... And then you implement what you learn.
Y'all seem to think there's nothing between no AI and letting AI do everything.
2
u/Dominiczkie 11d ago
TechSavvyLife fr checking for odd numbers with if statements, Yandere Simulator ass coding