When you ask if your code is good and the senior dev's soul leaves his body, but the intern still tryna be supportive. 😂
Honestly, I am a medior dev and giving tasks to a junior dev. The code she writes is quite messy and I sometimes feel like it would need to be completely rewritten. I don't want to discourage her though, because she's very bright and eager. I struggle with how to handle this tbh.
Pick one thing to focus upon and advise on how to improve it. Don't go wholesale into every little detail as that's overwhelming. It's all about small guidances to make code more readable and giving confidence in their abilities. Confident coding is half the battle.
I started developing 25 years ago and this is how the lead developer handled me. Little things that give you a lightbulb moment and I fully appreciated how he nurtured me. I was a terrible coder back then, but those gentle nudges in the right direction set me on a path to being a decent one.
Cut to today and I'm now working with him again for the last 7 years. I'm now highlighting things to him to make his code more readable and we're now producing great stuff. It's almost symbiotic now as we can read each others code without even thinking about it. Makes code reviews a doddle.
Think of yourself as a mentor, rather than a critic.
Thanks, that's good advice!
In the past the compiler would tell me that my code was perfect
If compiles no bugs
Just unintended features
LLM is a new intern. You tell him 20 times what to do and he still produces garbage.
But then the intern becomes a senior dev after working for a long time, whereas the llm... well, doesn't.
BuT mUh AI wiLl gEt eXpOnenTialLy bEtTer iN dA fuTuRe!!! It wIlL taKe uR cOdInG jOB!!!!!
Management doesn't care... until.
And unlike a new intern, it NEVER learns.
Of course he thinks it looks good, he wrote it
LLM trick: does my code look good? Give me a review in the tone of Linus Torvald reviewing a PR
*proceeds to reject every piece of code you give it*
The best answer I ever got was "please read a book on concurrent computing from AFTER the Berlin Wall fell"... Broke my heart a little
But that’s not exactly on LLM. Any code that I haven’t written myself doesn’t look good to me.
Amen
Don’t let an LLM exclusively review your code, BUT I have actually gotten some really great advice when I’m not sure about a small snippet of code by asking “what’s wrong with this code” or even better “wouldn’t this cause X issue”. As usual, the more experience you have (to judge whether the LLMs answer is full of shit) the better. I’ve even learned gotchas that I didn’t know about (that I googled in depth to confirm the LLMs veracity).
Same. It’s helpful for when I know the code I’ve written is bad (I mean like… more than usual) but I don’t have the mental capacity for figuring out a better way to do things.
Senior Devs give you truth. LLMs give you confidence.
seems to exploting with devs that is buthurt on AI in here lately..
All these colours, it's so pretty !
They are both wrong
Take the median. Since the median can be any number in the middle, it can be any number in the interval (0, 1). Then, take the biggest number you can think of. With enough precision, that number approaches 1. Therefore, 1 is the answer both parties can agree on
Rhetorical question for an LLM.
It will always find something wrong. Like a toxic partner.
LLM: yes because I wrote it.
The one with real intelligence who will be writing your performance review.
Sr LLM
Does my code look good? LLM: Yes, but there are some flaws: [Hallucinates errors]
Your code sucks it will never be good enough. Excuse me; I need to go cry about something unrelated.
The code in question:
``` import math
def flipsign(o): if math.abs(o) > o: return o + o*2 else: return o ```
We have an LLM (not even sure which one) hooked up to "review" our PRs. And it's OUTRAGEOUSLY bad and time wasting. In the best case scenario what it comments is an obvious BS, and can be ignored without looking. But sometimes it looks real, i actually think for a moment "wow, seriously, did i really miss this?" I look there, and the case is actually handled properly, but i've wasted the time to actually look. I have yet to see it catch a real issue ONCE🤬
With all the AI craze out there, i really only found it to be useful as an advanced auto complete. Or to generate snippets of mostly boilerplate code. Or spit up cmake syntax i never remember. Stuff like that. But never serious stuff.
Mine is bad that even AI don't like it.
LLM is biased towards validating the user. Sr. Dev is biased towards their own opinions about how code should be written. The career move is to listen to what your senior has to say.
If you want to keep that work, right?
I suppose one has to differentiate between general good practices and preferences.
Even if you’re unhappy with the current work/tech stack/priorities it’s still the career move to accept your senior’s feedback.
I have personally made the mistake of telling my senior and manager that not using a code formatter leads to poor code readability and maintainability. They disagreed. I have not worked on a project without a code formatter since, but my life would have been easier if I embraced a more flexible mindset in that role. And yes I moved on from that role quickly because of numerous issues I took with the development strategy.
The word you're looking for is Sycophant. AIs are Sycophants inherently.
I fucking hate the dictionary sometimes
It's not that hard, fucking hell
Nah LLM will always fix something even if nothing needs fixing.
It's biased towards producing an output other than Yes/No.
Depends on how you ask the LLM, if you just ask it "does it look good?" It will validate you. If you ask it "pinpoint areas where the code can be improved" you might get some good answers*
* you have to understand what your code does or needs to achieve in order to understand if the suggestions even make sense.
Glazing language models GLM