you build it,you run it

本文探讨了软件开发中反馈循环的重要性及如何缩短这一过程。通过实施DevOps文化和采用微服务架构,可以显著减少从开发到部署的时间,并提高产品质量。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

this article is almostly about  a book named Migrating_to_Microservices_Databases, and it's just the part of DevOps.  I read this book , now I make some summary!

tips: in fact , i took a lot time to think shall I use Chinese or English to write it, but i found a truth after i try use chinese that i must translate it although i  can understand it by myself. and this article is write for myself, so english, i don't want waste time to translate, sorry !  but maybe  i just want to copy something form this book, maybe i just make nosence in this article......I don't know.....

 

 一、the Feedback loop

i think whatever we do , the feedback in time is so important. we must know we are on a right track, right?  in software , the longer the feedback loop , the worse the results are. but usually we get a long feedback loop. to think our development lifecycle, after we developed it , we must apply for test, then if it can run correctly, we gonna merge code to production. (wait ,wait ,wait , we must have three environment here and must ensure all of them is right) i don't know what happed in your brain. but for me, sometimes  when the test department return me a bug list, i usually forgot something in detail about what i did about the code, what is the logic about the code, how i think it at the moment. sometimes i event don't know why it's a bug. i lost something important in my brain, so maybe i will need more time to solve the problem.

 

ok , we know we do not need a long feedback loop , but how to do it?

 

二、DevOps

DevOps:Developer and Operator

who have the problem: but i am sure it run perfectly in my machine, i can show you.   i have the problem and usually.  when  i developed ITOO basic system, it makes me crazy. i don't know what happened in productiom even in test, but i am hundred percent sure it run perfectly in my machine. but , there are some bugs, this is a truth too. as  a developer i must fix it even i don't know what's wrong with it. at the moment, i have a hope or just a impulse let me to config the environment about test and production, i want to delivery my own code, i don't need a operator, even i don't need other people help me test my code. i can do it all by myself !  and i am so confused why we need three environment, it's ideal if my develop environment is the production environment at the same time.

 

OK ,come back to our topic, how to reduce the feedback loop?

number1:DevOps

number2:Microservice

why and how to do in detail?

at the first, why we have a long feedback loop? test\ fix bugs\so on. but why it took so much time to test(i ever had a question: why i test by myself on my machine, then other people do it again on their machine.and finally,we submit the code to another environment named production)? why we have so much bugs in production? because the code changed, more code chaned, more bugs we have.

 

DevOps is to make us i mean developer recliam the ownership of our work. we don't need other people to delivery our application for us, we don't want to tell them how to config the environment again and again but didn't work. we don't want to waste time,so we must do it by ourselves, we must rescue ourselves by using tools.  and how about microservice? i don't wanna write this article, i finished the book, i gonna get home for a sweet dream!

### 解决 VSCode 中“可执行文件尚不存在”的错误 当在 Visual Studio Code (VSCode) 中运行程序时遇到“The executable you want to run does not (yet) exist” 错误,通常是因为构建过程未成功完成或者目标二进制文件路径配置不正确。以下是可能的原因以及解决方案: #### 可能原因分析 1. **编译器未安装或未正确配置** 如果开发环境中缺少必要的编译工具链(例如 GCC 或 Clang),则无法生成可执行文件[^4]。 2. **tasks.json 配置错误** `tasks.json` 文件用于定义如何通过终端命令来构建项目。如果该文件中的命令未能正确指向源代码并生成目标文件,则可能导致此问题[^5]。 3. **launch.json 路径设置不当** 在调试配置文件 `launch.json` 中,“program” 字段应指定要启动的可执行文件的位置。如果路径有误或尚未创建对应的二进制文件,就会触发上述错误消息[^6]。 4. **C/C++ 扩展插件缺失** Microsoft 提供了一个官方扩展包——C/C++ Extension Pack,它包含了 IntelliSense 和其他功能支持。如果没有启用这些组件,可能会干扰正常的工作流程[^7]。 #### 推荐修复措施 为了消除这个报错提示,请按照下面的方法逐一排查问题所在,并采取相应行动加以修正: ##### 步骤一:验证环境变量与工具链状态 确认已安装适合操作系统的 GNU Compiler Collection (GCC),并通过命令行测试其可用性: ```bash gcc --version g++ --version ``` 对于 Windows 用户来说,MinGW-w64 是一种常见的选择;而对于 macOS/Linux 平台而言,默认自带的基础版本即可满足需求[^8]。 ##### 步骤二:调整 tasks.json 的内容结构 打开 `.vscode/tasks.json` ,确保存在类似于以下片段的部分: ```json { "label": "build", "type": "shell", "command": "/usr/bin/g++", "args": [ "-g", "${file}", "-o", "${workspaceFolder}/bin/${fileBasenameNoExtension}" ], ... } ``` 这里的关键在于 `"${workspaceFolder}/bin/"` 这一段代表输出目录位置。请根据实际情况修改为你期望保存最终产物的地方[^9]。 ##### 步骤三:同步更新 launch.json 参数 接着编辑同级目录下的另一个重要配置文档 ——`.vscode/launch.json` 。特别关注其中关于 “preLaunchTask” 和 “program” 属性部分是否匹配前面提到的任务名称及实际生成物地址: ```json { "name": "(gdb) Launch", "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/bin/${fileBasenameNoExtension}", "miDebuggerPath": "/usr/bin/gdb", "setupCommands": [...], "preLaunchTask": "build" }, ... ``` 注意此处 `${workspaceFolder}` 动态解析为当前工作区根路径字符串表达式[^10]。 ##### 步骤四:重新加载窗口并尝试再次运行 最后一步就是关闭再重启整个 IDE 实例之后重试刚才失败的操作序列。这样可以强制刷新内部缓存数据从而反映最新改动效果[^11]。 --- ### 示例代码展示 假设我们正在处理一个简单的 C++ 应用案例,那么完整的两个核心 JSON 设置如下所示: #### Task Definition Example (`tasks.json`) ```json { "version": "2.0.0", "tasks": [ { "label": "compile_cpp_program", "type": "process", "command": "g++", "args": ["-std=c++17","main.cpp","-o","./out/main"], "group": { "kind": "build", "isDefault": true }, "problemMatcher": [] } ] } ``` #### Debug Configuration Snippet(`launch.json`) ```json { "configurations": [{ "name": "Debug Main Program", "type": "cppdbg", "request": "launch", "program": "./out/main", "args": [], "stopAtEntry": false, "cwd": "${workspaceRoot}", "environment": [], "externalConsole": false, "MIMode": "lldb", "preLaunchTask": "compile_cpp_program" }] } ``` 以上例子展示了如何利用 GDB/Lldb 来实现本地断点跟踪调试体验的同时解决了原初提出的找不到对应 exe 文件难题[^12]. ---
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值