<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="https://shaozk.xyz/feed_style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <tabi:metadata xmlns:tabi="https://github.com/welpo/tabi">
        <tabi:base_url>https:&#x2F;&#x2F;shaozk.xyz</tabi:base_url>
        <tabi:separator>
            •
        </tabi:separator>
        <tabi:about_feeds>This is a web feed, also known as an Atom feed. Subscribe by copying the URL from the address bar into your newsreader. Visit About Feeds to learn more and get started. It&#x27;s free.</tabi:about_feeds>
        <tabi:visit_the_site>Visit website</tabi:visit_the_site>
        <tabi:recent_posts>Recent posts</tabi:recent_posts>
        <tabi:last_updated_on>Updated on $DATE</tabi:last_updated_on>
        <tabi:default_theme></tabi:default_theme>
        <tabi:post_listing_date>date</tabi:post_listing_date>
        <tabi:current_section>vibe coding</tabi:current_section>
    </tabi:metadata><title>shaozk - vibe coding</title>
    <link href="https://shaozk.xyz/tags/vibe-coding/atom.xml" rel="self" type="application/atom+xml"/>
    <link href="https://shaozk.xyz/tags/vibe-coding/" rel="alternate" type="text/html"/>
    <generator uri="https://www.getzola.org/">Zola</generator><updated>2026-09-04T00:00:00+00:00</updated><id>https://shaozk.xyz/tags/vibe-coding/atom.xml</id><entry xml:lang="en">
        <title>code-piece: 代码片段记录工具</title>
        <published>2026-09-04T00:00:00+00:00</published>
        <updated>2026-09-04T00:00:00+00:00</updated>
        <author>
            <name>shaozk</name>
        </author>
        <link rel="alternate" href="https://shaozk.xyz/blog/022-code-pieces/" type="text/html"/>
        <id>https://shaozk.xyz/blog/022-code-pieces/</id>
        
            <content type="html">&lt;blockquote&gt;
&lt;p&gt;注意：个人代码片段记录工具。&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h2 id=&quot;you-guo-zhe-yang-yi-ge-xiang-fa&quot;&gt;有过这样一个想法&lt;&#x2F;h2&gt;
&lt;p&gt;一种类似单词卡片的代码卡片工具，支持在 PC 端记录代码片段，然后在手机端查看。可以随时随地查看这些代码片段了（即使在上厕所，当然需要网络）。&lt;&#x2F;p&gt;
&lt;p&gt;当时还启动了一个名为 pocket-code（朋友帮忙，意指口袋代码）的个人项目，不过最后不了了之了。其中很重要的一个原因是：我要想后端内容——用户管理和代码数据库设计，还要做前端实现—— Web 网页和手机端 App。&lt;&#x2F;p&gt;
&lt;p&gt;这需要的技术栈太多了，我的兴趣还不足以支撑去完成全部内容。&lt;&#x2F;p&gt;
&lt;h2 id=&quot;you-zhe-yang-yi-ge-xi-guan&quot;&gt;有这样一个习惯&lt;&#x2F;h2&gt;
&lt;p&gt;我会写一些小代码测试片段，用于验证某个函数或特性。不管是第一份 C 语言的工作，还是后面学习 C++、Qt、Python 等。&lt;&#x2F;p&gt;
&lt;p&gt;不过当时没有将其进行管理，永远保存在了公司电脑上（对我来说是如此，但实际上被清空成 0x00000）。&lt;&#x2F;p&gt;
&lt;p&gt;于是我痛定思痛，专门 Create 了一个用于存放我示例代码的仓库 &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;shaozk&#x2F;pieces&quot;&gt;pieces&lt;&#x2F;a&gt;，放在 GitHub 上还能防止本地误删（血与泪的教训）。&lt;&#x2F;p&gt;
&lt;h2 id=&quot;deng-deng&quot;&gt;等等？&lt;&#x2F;h2&gt;
&lt;p&gt;GitHub 仓库支持部署静态网页，在 PC 和手机都可以访问。代码数据即源代码内容，只要让其以卡片形式显示，我的需求不就实现了么。&lt;&#x2F;p&gt;
&lt;p&gt;并且当我在仓库中添加代码并上传到远程仓库时，能自动触发 GitHub Action 完成静态页面更新，不需要我做任何多余动作。&lt;&#x2F;p&gt;
&lt;p&gt;简直不要太完美。有了想法，接下来就只剩实现了。&lt;&#x2F;p&gt;
&lt;h2 id=&quot;shui-lai-shi-xian&quot;&gt;谁来实现？&lt;&#x2F;h2&gt;
&lt;p&gt;没有 Coding，只有 Vibing。&lt;&#x2F;p&gt;
&lt;p&gt;感谢 AI 的开发者们，你们创造了 Eazy 生活。&lt;&#x2F;p&gt;
&lt;h2 id=&quot;guan-yu-kai-yuan&quot;&gt;关于开源&lt;&#x2F;h2&gt;
&lt;p&gt;我本意是不打算开源的（也没必要），因为这不是一个通用的工具，只对我自己有用。&lt;&#x2F;p&gt;
&lt;p&gt;但奈何 GitHub 仓库不设置成 Public 可见的话，无法正常发布网页，要怪就怪 GitHub。&lt;&#x2F;p&gt;
&lt;h2 id=&quot;hou-xu-wen-ti&quot;&gt;后续问题&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;代码量太多导致无法仓库无法存储？&lt;&#x2F;p&gt;
&lt;p&gt;我想不可能。&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;分类太少不便于查找？&lt;&#x2F;p&gt;
&lt;p&gt;确实有这个问题，目前只按照源代码文件夹（是编程语言名）进行分类，未来或许可以增加更强大的标签管理。&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;交互？&lt;&#x2F;p&gt;
&lt;p&gt;目前只有最简单的交互，看上去够用，根据后续的体验再看要不要修改吧。&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;以上是全部内容，再次感叹 AI 真是给我这种普通程序员巨大的能力，能将一些想法快速实现。&lt;&#x2F;p&gt;
&lt;p&gt;PS: 这是网页地址：&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;shaozk.github.io&#x2F;pieces&#x2F;&quot;&gt;code-piece&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
</content>
        </entry>
</feed>
