Live data from Hacker News

Claude Code 2.0

npmjs.com

191–200 of 431 posts

Re: Claude Code 2.0

#191

Earlier quoted context omitted.

That is nice, but it makes me wonder how little people actually know and use git nowadays. This is after all, something git really shines at. Still good to see! (It's not like I can't still just use git for that, which I fully intend to do)

If you're building a feature, you don’t want to commit every single line of code. Instead, you commit complete chunks of work. That’s why the ability to go back with Esc-Esc and revert code changes when Claude goes off the rails is a very welcome improvement.

If you're using AI like this, it seems to me that it would be perfectly reasonable to make a separate branch, allow for micro-commits, and squash once a "complete chunk of work" is done.

That said, having a single option that rewinds LLM context and code state is better than having to do both separately.

Re: Claude Code 2.0

#194

Earlier quoted context omitted.

I am guessing this is an attempt to save computing resources/tokens?

Comments in code are instant technical debt. They need to be maintained alongside the code, so you are *programming" twice. Avoid comments, except when they really explain some obscure, incomprehensible section of code or to prevent explorers from the future getting smacked on the face twice by the same stick. I find myself using the latter often to tell future agents what not to do in the next few lines.

This is why, when you do have comments, they should generally be in the DocBlock and discuss the code in domain-problem terms.

Re: Claude Code 2.0

#195
I was already using jj (jujutsu) to do my own rewinds (it saves every change to every file as an unlabeled commit, assuming you set up its daemon). Would sort of prefer to continue to do that since it's far more flexible than checkpoints

Re: Claude Code 2.0

#196

Earlier quoted context omitted.

I am guessing this is an attempt to save computing resources/tokens?

Comments in code are instant technical debt. They need to be maintained alongside the code, so you are *programming" twice. Avoid comments, except when they really explain some obscure, incomprehensible section of code or to prevent explorers from the future getting smacked on the face twice by the same stick. I find myself using the latter often to tell future agents what not to do in the next few lines.

I bet you that if you let it comment code, it would produce better code as it acts like an inline rubber-duck basically

Re: Claude Code 2.0

#197

Earlier quoted context omitted.

imo, comments are quite good for junior developers. docstrings are much preferred though.

Avoiding comments is an exercise in thinking how to rename or refactor a function, or a variable in such a way that a junior developer will be able to read it like prose, and immediately understand what's going on. It's cognitively stressing, but is beneficial for juniors, and developers new to the codebase, just as it is for senior developers to reduce the mental overhead for the reader. It's always good to spend an…

This is awfully purist.

I think a happy medium of "comment brevity, and try thinking of a clearer way to do something instead of documenting the potentially unnecessary complexity with a comment" would be good.

I don't know where this "comments are instant technical debt" meme came from, because it's frankly fucking stupid, especially in the age of being able to ask the LLM "please find any out-of-date comments in this code and update them" since even the AI-averse would probably not object to it commenting code more correctly than the human did

Re: Claude Code 2.0

#198
post #89

I really like these tools. Yesterday I gave it a filename for a video of my infant daughter eating which I took while I had my phone on the charger. The top of the charger slightly obscured the video. I told it to crop the video to just her and remove the obscured portion and that I had ffmpeg and imagemagick installed and it looked at the video, found the crop dimensions, then ran ffmpeg and I had a video of her all…

Cline extension can use Grok, in fact I think it's free at the moment. I tried Claude Code and Cline for similar tasks and found Claude Code incredibly expensive but not better, so I've been sticking with Cline and switching between APIs depending on what model currently has the vest price/performance going on.

Re: Claude Code 2.0

#199

Earlier quoted context omitted.

Isn't cropping a video something you can do in the photos app in 2 seconds?

yeah, removing the unwanted item and keeping the video uncropped is surely more desirable, but far beyond the capabilities of "ai"

Maybe I'm misunderstanding, but it seems like you're just talking about AI inpainting. That's like one of the first things people did with image diffusion technology. NVIDIA published a research paper on it back in 2018: https://arxiv.org/abs/1804.07723

Inpainting is harder on videos than on images, but there are plenty of models that can do it. Google's Veo 3 can remove objects from videos: https://deepmind.google/models/veo/

Post reply on HN