Live data from Hacker News

Gemini 2.5 Pro Preview

developers.googleblog.com

51–60 of 728 posts

Re: Gemini 2.5 Pro Preview

#52
post #11

I don't know if I'm doing something wrong, but every time I ask gemini 2.5 for code it outputs SO MANY comments. An exaggerated amount of comments. Sections comments, step comments, block comments, inline comments, all the gang.

It also does super defensive coding. Not that it's a bad thing in general, but I write a lot of prototype code.

Production quality code is defensive. Probably trained on a lot of google code.

Re: Gemini 2.5 Pro Preview

#53
post #34
post #11

I don't know if I'm doing something wrong, but every time I ask gemini 2.5 for code it outputs SO MANY comments. An exaggerated amount of comments. Sections comments, step comments, block comments, inline comments, all the gang.

Tell it not to write so many comments then. You have a great deal of flexibility in dictating the coding style and can even include that style in your system prompt or upload a coding style document and have Gemini use it.

Every time I ask an LLM to not write comments, it still litters it with comments. Is Gemini better about that?

Re: Gemini 2.5 Pro Preview

#54
The "video to learning app" feature is a cool concept (see it in AI Studio). I just passed in two separate Stanford lectures to see if it could come up with an interesting interactive app. The apps it generated weren't too useful, but I can see with more focus and development, it'd be a game changer for education.

Re: Gemini 2.5 Pro Preview

#55
post #11

I don't know if I'm doing something wrong, but every time I ask gemini 2.5 for code it outputs SO MANY comments. An exaggerated amount of comments. Sections comments, step comments, block comments, inline comments, all the gang.

I've found that heavily commented code can be better for the LLM to read later, so it pulls in explanatory comments into context at the same time as reading code, similar to pulling in @docs, so maybe it's doing that on purpose?

No, it's just bad. I've been writing a lot of Python code past two days with Gemini 2.5 Pro Preview, and all of its code was like:

```python

def whatever():

  --- SECTION ONE OF THE CODE ---

  ...

  --- SECTION TWO OF THE CODE ---

  try:
    [some "dangerous" code]
  except Exception as e:
     logging.error(f"Failed to save files to {output_path}: {e}")
     # Decide whether to raise the error or just warn
     # raise IOError(f"Failed to save files to {output_path}: {e}")
```

(it adds commented out code like that all the time, "just in case")

It's terrible.

I'm back to Claude Code.

Re: Gemini 2.5 Pro Preview

#56

Is there anything like Claude code for other models such as gemini?

I'm literally working on this particular problem. Locally-run server; browser-based interface instead of TUI/CLI; connects to all the major model APIs; many, many quality of life and feature improvements over other tools that hook into your browser.

Drop me a line (see profile) if you're interested in beta testing it when it's out.

Re: Gemini 2.5 Pro Preview

#57
post #11

I don't know if I'm doing something wrong, but every time I ask gemini 2.5 for code it outputs SO MANY comments. An exaggerated amount of comments. Sections comments, step comments, block comments, inline comments, all the gang.

I have the same issue plus unnecessary refactorings (that break functionality). it doesn't matter if I write a whole paragraph in the chat or the prompt explaining I don't want it to change anything else apart from what is required to fulfill my very specific request. It will just go rogue and massacre the entirety of the file.

Re: Gemini 2.5 Pro Preview

#58
post #40

Earlier quoted context omitted.

I have been asking if AI without hallucination, coding or not is possible but so far with no real concrete answer.

It's already much improved on the early days. But I wonder when we'll be happy? Do we expect colleagues friends and family to be 100% laser-accurate 100% of the time? I'd wager we don't. Should we expect that from an artificial intelligence too?

It's tool not a human so I don't know if the comparison even makes sense?

Re: Gemini 2.5 Pro Preview

#59

My frustration with using these models for programming in the past has largely been around their tendency to hallucinate APIs that simply don't exist. The Gemini 2.5 models, both pro and flash, seem significantly less susceptible to this than any other model I've tried. There are still significant limitations, no amount of prompting will get current models to approach abstraction and architecture the way a person doe…

I've found they do a decent job searching for bugs now as well. Just yesterday I had a bug report on a component/page I wasn't familiar with in our Angular app. I simply described the issue as well as I could to Claude and asked politely for help figuring out the cause. It found the exact issue correctly on the first try and came up with a few different suggestions for how to fix it. The solutions weren't quite what I needed but it still saved me a bunch of time just figuring out the error.
Post reply on HN