{"id":26014823,"url":"https://github.com/steve02081504/programming-exp","last_synced_at":"2026-02-20T22:39:31.730Z","repository":{"id":129772941,"uuid":"190737132","full_name":"steve02081504/programming-exp","owner":"steve02081504","description":"一些老生常谈的错误，总结一下，警醒自己","archived":false,"fork":false,"pushed_at":"2019-06-07T13:55:59.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-24T05:00:46.510Z","etag":null,"topics":["a-topic"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/steve02081504.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-07T12:06:06.000Z","updated_at":"2020-03-03T06:02:42.000Z","dependencies_parsed_at":"2023-05-21T04:30:13.678Z","dependency_job_id":null,"html_url":"https://github.com/steve02081504/programming-exp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/steve02081504/programming-exp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steve02081504%2Fprogramming-exp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steve02081504%2Fprogramming-exp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steve02081504%2Fprogramming-exp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steve02081504%2Fprogramming-exp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steve02081504","download_url":"https://codeload.github.com/steve02081504/programming-exp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steve02081504%2Fprogramming-exp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29667093,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T19:49:36.704Z","status":"ssl_error","status_checked_at":"2026-02-20T19:44:05.372Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["a-topic"],"created_at":"2025-03-06T02:36:26.619Z","updated_at":"2026-02-20T22:39:31.722Z","avatar_url":"https://github.com/steve02081504.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"## 写在前面  \n这是我在高考第一天后闲着没事开的坑  \n因为高考后打算继续写某项目  \n所以打算先总结一下一些曾经犯过的编程上的问题  \n  \n#### 增量式开发，先写测试实例  \n犯错项目：[ELC](https://steve02081504.github.io/ELC/)  \n把所有代码一次性写完再调试会死人的  \n真的会死的  \n为了避免出现没有测试用例，应当把其提前至函数或功能本身之前  \n  \n#### 名称应当明了，其次才是简短  \n犯错项目：[steve.h](https://github.com/steve02081504/steve.h)  \n瞎吉儿起名称或者拿键盘当枕头会让人头大  \n不过steve.h这个项目不准备改了，因为能用  \n  \n#### 代码写完留着别删  \n代表项目：[一个垃圾堆](https://github.com/steve02081504/A-pile-of-groceries)  \n你总会发现有的时候原来的某些代码你可以改改变量名在另一个地方用到，不仅不容易出bug，还省事  \n这就是复读机定理的程序员变体（不  \n就算你不复制粘贴，也可以隔一段时间回过头看看自己曾经是什么样子  \n而曾经写的小工具，你也会有想改动的时候  \n又或是留着做个纪念，也挺不错的  \n  \n#### 避免过早优化  \n犯错项目：[ELC](https://steve02081504.github.io/ELC/)  \n当你写到某处发现可以优化时，留一个注释，注明优化方案，再留一个优化用特殊标记  \n过早优化会导致bug难找、思路混乱、代码难以阅读等问题  \n同时，优化时注释而不是删掉原代码也会在阅读与调试方面留下很多帮助  \n  \n#### 尽量使用标准库  \n犯错项目：[ELC](https://steve02081504.github.io/ELC/)  \n标准库基本没有bug这一特点可以在调试时帮你省下大量精力与时间  \n如果你觉得标准库太难用或是优化时需要造一个轮子之类，请写一个包装类对调用标准库的行为进行封装  \n而不是一开始构建软件时先被各种轮子搅浑了头脑  \n。。头会秃的  \n  \n#### 开自动保存，勤备份代码  \n你永远也不知道命运这该死的婊子在下一秒会带来什么惊吓  \n像可乐味手柄、拉面味麦克风  \n抑或是突然黑屏的winbug10、连小修小改都承受不了的linux  \n或者什么音响爆炸显卡变异主机着火内存进水风扇卡死cpu融化键盘灵异之类  \n又或者你爸突然出现发现你偷藏已久的电脑  \n~~地球online真好玩，呵呵~~  \n    \n目前就想到这么多  \n实际上只是闲着无聊瞎写233  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteve02081504%2Fprogramming-exp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteve02081504%2Fprogramming-exp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteve02081504%2Fprogramming-exp/lists"}