@mckaywrigley 分享了一个Cursor 技巧:用Cursor 在代码中添加方便 AI 理解的注释。
只需要创建 add-comments.md 文件,在 chat 中引用它。
同理还可以写:
new-component.md
new-api-endpoint.md
fix-bugs.md
refactor.md
提示词示例如下:
add-comments.md
You are tasked with adding comments to a piece of code to make it more understandable for AI systems or human developers. The code will be provided to you, and you should analyze it and add appropriate comments.
To add comments to this code, follow these steps:
1. Analyze the code to understand its structure and functionality.
2. Identify key components, functions, loops, conditionals, and any complex logic.
3. Add comments that explain:
- The purpose of functions or code blocks
- How complex algorithms or logic work
- Any assumptions or limitations in the code
- The meaning of important variables or data structures
- Any potential edge cases or error handling
When adding comments, follow these guidelines:
- Use clear and concise language
- Avoid stating the obvious (e.g., don't just restate what the code does)
- Focus on the "why" and "how" rather than just the "what"
- Use single-line comments for brief explanations
- Use multi-line comments for longer explanations or function/class descriptions
Your output should be the original code with your added comments. Make sure to preserve the original code's formatting and structure.
Remember, the goal is to make the code more understandable without changing its functionality. Your comments should provide insight into the code's purpose, logic, and any important considerations for future developers or AI systems working with this code.
gist:https://gist.github.com/biubiubiu35/e06fe3539ed3c8c498c8a4a3fcfe8bbe
只需要创建 add-comments.md 文件,在 chat 中引用它。
同理还可以写:
new-component.md
new-api-endpoint.md
fix-bugs.md
refactor.md
提示词示例如下:
add-comments.md
You are tasked with adding comments to a piece of code to make it more understandable for AI systems or human developers. The code will be provided to you, and you should analyze it and add appropriate comments.
To add comments to this code, follow these steps:
1. Analyze the code to understand its structure and functionality.
2. Identify key components, functions, loops, conditionals, and any complex logic.
3. Add comments that explain:
- The purpose of functions or code blocks
- How complex algorithms or logic work
- Any assumptions or limitations in the code
- The meaning of important variables or data structures
- Any potential edge cases or error handling
When adding comments, follow these guidelines:
- Use clear and concise language
- Avoid stating the obvious (e.g., don't just restate what the code does)
- Focus on the "why" and "how" rather than just the "what"
- Use single-line comments for brief explanations
- Use multi-line comments for longer explanations or function/class descriptions
Your output should be the original code with your added comments. Make sure to preserve the original code's formatting and structure.
Remember, the goal is to make the code more understandable without changing its functionality. Your comments should provide insight into the code's purpose, logic, and any important considerations for future developers or AI systems working with this code.
gist:https://gist.github.com/biubiubiu35/e06fe3539ed3c8c498c8a4a3fcfe8bbe
👍1
最近一个很直白的观察,国内一般的2C APP招的产品经理实在是太多了,这不是个好事。每个产品经理都在一个tab或一个小区域里负责engagement指标,导致了一个APP的每一处都在争奇斗艳、眼花缭乱,整体性设计特别差。
微信产品功能的设计强收束在张小龙一个人身上,他很一线且强控制(founder mode)来避免了这一点。
设计就是分类,组织里人的分类也是产品设计。
微信产品功能的设计强收束在张小龙一个人身上,他很一线且强控制(founder mode)来避免了这一点。
设计就是分类,组织里人的分类也是产品设计。
通过DnSpy看了很多独立游戏的程序设计,包括:《空洞骑士》、《太吾绘卷》等。我发现他们都是通过硬编码的方式在制作游戏。
举例:他们会写个抽象类BaseActor,然后写个实例类HeroActor。
这么做就会导致设计师想加一个角色时,程序就要新增一个类。
这只是其中一个问题,还有更多的比如:类名没有后缀、类名没有前缀、IoC导致代码执行流程难以阅读等。
一个好的架构设计,能让内容生产变得自由(策划加内容不需要程序员改代码)、静态阅读就能Debug。2年就能做完的游戏,如果程序没设计好就会需要4年制作。
举例:他们会写个抽象类BaseActor,然后写个实例类HeroActor。
这么做就会导致设计师想加一个角色时,程序就要新增一个类。
这只是其中一个问题,还有更多的比如:类名没有后缀、类名没有前缀、IoC导致代码执行流程难以阅读等。
一个好的架构设计,能让内容生产变得自由(策划加内容不需要程序员改代码)、静态阅读就能Debug。2年就能做完的游戏,如果程序没设计好就会需要4年制作。
🤡4
最近很多投资人或者大厂朋友下场创业
问我出海还是国内 ,还是ai
我的建议 除非加入其他成熟团队
统一回复: “首先,ai就先别说赚钱了,快速赚钱在国内,想做大在海外,海外失败率远高于国内,想先国内赚钱,再出海,基本不可能,未来商业逻辑和市场越来越不同。除非第一天,或者很早,就两边一起做,但是失败概率也很高。 另外建议,最好别创业……你还能维持原来生活水平,大不了比原来水准降低一点点.“
问我出海还是国内 ,还是ai
我的建议 除非加入其他成熟团队
统一回复: “首先,ai就先别说赚钱了,快速赚钱在国内,想做大在海外,海外失败率远高于国内,想先国内赚钱,再出海,基本不可能,未来商业逻辑和市场越来越不同。除非第一天,或者很早,就两边一起做,但是失败概率也很高。 另外建议,最好别创业……你还能维持原来生活水平,大不了比原来水准降低一点点.“
持续招有经验、有品味、爱 ACG 的产品经理。年纪大不要紧,心态不能老。
从第一天就盈利的公司,不烧投资,细分垄断,没有上市/对赌压力。上海、广州都有基地。
如果你能力强,上班时间事情做完,打游戏我都不管。
感兴趣的简历至 fanbingx@gmail.com
从第一天就盈利的公司,不烧投资,细分垄断,没有上市/对赌压力。上海、广州都有基地。
如果你能力强,上班时间事情做完,打游戏我都不管。
感兴趣的简历至 fanbingx@gmail.com