|
|
|
|
|
by Me1000
856 days ago
|
|
One thing I've found Gemini Advanced (Ultra) is actually good at is sustaining a conversation to work towards a goal that requires some back and forth. I've been calling it "putting it in collaboration mode", which isn't super accurate since it's not technically a "mode" but whatever. But in my experience ChatGPT (and a lot of instruction tuned LLMs) tend to try to get to the end of the conversation as quickly as possible. (To the point where GPT4 will regularly just end the "and if that doesn't work, go read the documentation" ... which is very frustrating.) Gemini on the other hand will ask several follow-up questions and behaves more like a conversation you might have with a coworker on a pair-programming topic. It's kind of changed the way I think about the utility of LLMs. |
|
Front-end web development with HTML, CSS and JavaScript is not one of my strengths, so I've been trying to go back-and-forth with GPT-4 to get a working prototype.
Before asking GPT-4 to generate any code, I try to have a conversation to explore the pros and cons of various approaches. Is it better to put separate click events on every object, or listen for events at a higher level of the DOM? Is it better to use callbacks for this or async/await?
But GPT-4 rushes to write code before requirements are defined, and then it struggles to modify that code later after I've decided what approach to take. It forgets what it did before, provides partial results, alters variable names between chat turns, contradicts itself.
Just tried the same dialogues with Gemini Advanced and it's night-and-day better. It seems to remember contexts from 10+ conversation turns ago, it provides a more thorough rationale for its suggestions, doesn't prematurely spit out code, and keeps variable names constant throughout the dialogue.
After the approach and requirements are defined, it can then generate large blocks of code with intelligent modularization into separate functions, more similar to how I would write it by hand than what I get from GPT-4.
Gemini Advanced also seems to prefer the more modern ES6 coding style (arrow functions, destructuring, const/let variable declaration). GPT-4 defaults to the 15-year-old style (string concatenation for building strings instead of template literals, heavy use of var for variable declaration, function expressions instead of arrow functions, etc.). GPT-4 routinely mixes styles even when I explicitly request ES6.