关于光标的思考
我相信Cursor刚刚推出了两个主要功能:调试和设计。
我对IDE的需求有一定的了解,但在发布之前我无法完全表达出来。现在它已经上线,所有的一切都变得非常清晰。
在我看来,编程的未来将是实时的:调试、编码、设计等等。虽然这个想法并不新颖,但不同之处在于,现在这一切将是完全自主的。
最近,我在一个功能上工作,需要重新设计我们用Django模板和普通JavaScript构建的遗留流程的一部分。理论上,对于当前的模型来说,这不应该是一个困难的任务。但它们在生成正确的输出时遇到了困难,我认为有两个原因:
设计本质上很难仅用文本表达。
模型在生成新代码方面表现出色,但在修改大型现有代码库时却不那么理想。
老实说,我发现更新遗留用户界面的最佳工作流程是直接基于截图操作。我只需截取现有用户界面和预期更改的截图,然后要求模型编写与该设计相匹配的代码,考虑到现有设计的上下文。通过这种方式,模型能够更快地理解上下文。
有了这个新的设计功能,我想象这个整个过程会变得更快,因为我可以直接在浏览器上进行编辑,模型只需编写出预期的结果。这正是我一直想要的——一个在后台运行的自定义无头Puppeteer,实时观察我所做的事情,并帮助我进行设计。
然后就是调试。我一直更喜欢日志而不是传统的调试器。我真正想要的是在运行时像ELK解析器那样的东西,能够理解我的日志,并在系统运行时指出何时偏离预期路径。
查看原文
I believe Cursor just rolled out its two major features: Debug and Design.<p>I had an understanding of what I wanted from the IDEs, but I could not fully articulate it before the launch. Now that it’s here, it makes complete sense.<p>The way I see the future of programming, everything is going to be live: debugging, coding, designing, etc. Not that the idea is new, but the difference is that now it will be fully autonomous.<p>Recently, I worked on a feature that required redesigning part of our legacy flow built with Django templates and plain JavaScript for interactivity. In theory, this should not be a difficult task for current models. But they struggled to produce the right output, and I think there are two reasons for that:<p>Design is inherently hard to express purely in text.<p>Models are great at generating new code, but not so great at modifying large, existing codebases.<p>Honestly, the best workflow I found for updating the legacy UI was to operate directly off screenshots. I simply take the screenshots of the existing UI and the expected change, and ask the model to write code that matches that design, given the context of existing design. Models understand the context way faster this way.<p>With this new Design feature, I imagine this whole process become faster because I can make the edits directly on the browser, and model simply codes the expected outcome. Its what I always wanted - a custom headless Puppeteer running in the background, watching what I am doing, and helping with the design in real time.<p>And then there’s debugging. I have always preferred logs over a traditional debugger. What I have really wanted is something like an ELK parser at runtime something that just understands my logs as the system runs, and can point out when things drift off the expected path.