编程与软件工程sanctum.geek.nz编辑精选
Unix 作为 IDE
Unix as IDE
2016 — 2020,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
《Unix as IDE》是一篇系列文章,主张 Unix 本身就是一个完整的编程环境:用 shell、编辑器、版本控制、编译器和管道等小工具组合,可以替代传统图形化 IDE 的功能。文章多次登上 HN 首页,引发了 Unix 工具哲学与现代 IDE 集成体验之间的经典争论。
为什么经久不衰:它把“Unix 即开发环境”的理念讲得系统透彻,无论你偏好终端工具链还是重型 IDE,都能从中重新思考开发工具的本质。
HN 评论精选
Unix 像工业机械,为内行设计、高效而危险,这正是好工具的特质
我初学 Unix 时,别人就是这样向我介绍它的:像工业机械——为懂它的人而设计,高效,不小心使用会很危险。而这正是一个好工具该有的样子。当 GUI 式的 IDE 开始流行时,我完全无法理解:那就像在设备齐全的车间工作台上搭一个玩具模型车间。我承认也许用久了会改变看法,但到目前为止 vi + shell + 标准工具一直很好用。
__jal查看英文原文
This was how Unix was presented to me when I was first introduced to me. I was told it was like industrial machinery - designed for those who know how to use it, efficient, dangerous if you aren't careful. Which is exactly what a good tool should be. When IDEs (the kind that comes as a GUI'ed bundle of things thought to be the most appropriate for the purpose by committee of someones, somewhere) started becoming popular, I didn't get it, at all. Put aside tool tips (which annoy me far more than is rational); it seemed to me that the idea was to build a toy model workshop on the work bench of a fully outfitted workshop. Why would anyone want to use that? Why bother in the first place? I mean, I do get it. And who knows, maybe if I used one of those long enough to break muscle memory and the conceptual assumptions that don't map, I'd change my mind. But so far, vi + shell + standard utilities + what I build have served me just fine, and if for some reason I were to need "more power", whatever that means, I'd probably move to emacs. And I still maintain that tool tips/balloon help/obscuring the very thing you're pointing at is a stupidly rude anti-pattern. Even worse is not making it possible to turn off.
反方观点:Unix 工具缺乏 IDE 的核心优势——深度集成
它缺少 IDE 中的 I(集成)。这些工具并没有整合在一起。在 Java IDE 里,调试器就在你编辑代码的同一个视图里单步执行;悬停即可看到文档;边输入边增量计算编译错误;内容辅助对光标处的类型了如指掌;调试时保存文件会自动编译、跑测试并热替换进运行中的虚拟机,还能显示相对最近一次 VCS 提交改了哪些行。
the8472查看英文原文
It lacks the I in IDE. Those different tools are not integrated. In a java IDE the debugger steps through your source in the same editor view that you just used for editing. You can hover over each identifier while you code or debug to get the docs in a floating panel. Editing incrementally computes compilation errors while you type. Content assist has complete knowledge of the types at your caret position and thus can make accurate suggestions what can be inserted there. Saving the file while debugging automatically compiles the code, runs tests and splices it into the running VM so you can continue debugging the running process with the new code while also showing you which lines you changed relative to the most recent VCS commit. And of course there's more.
Unix 从诞生之初就被定位为编程环境,有经典著作为证
这让我立刻想起 1984 年 Kernighan 和 Pike 的经典著作《Unix 编程环境》。注意书名说的是“编程环境”而非“操作系统”——这本书表明 Unix 的初衷就是作为编写软件的工具。
polpo查看英文原文
This instantly brought to mind the classic 1984 book, The Unix Programming Environment, by Brian Kernighan and Rob Pike [1]. Note that they call Unix a programming environment, not an operating system. This book shows that the original purpose of Unix is to be a tool for writing software. [1] https://en.wikipedia.org/wiki/The_Unix_Programming_Environment
补充建议:tmux 多窗格组合是 Unix 式 IDE 的关键一环
也许这是默认前提,但像 tmux 这样的终端复用器也是把 Unix 当 IDE 用的重要工具:可以一个窗格放 vim 里的代码,旁边一个窗格跑测试,再来一个交互式 shell。在缺少一致本地开发环境时,tmux 对我 ssh 到远程开发环境来说不可或缺。
smadge查看英文原文
Maybe this is implicitly assumed, but a terminal multiplexer such as tmux is also a useful utility for using unix as an IDE. For example, you can have a pane for your code in an editor like vim, and a pane for running your tests next to it, and maybe another pane for an interactive shell of your language. Lacking a consistent local development environment, tmux is indispensable when I ssh into into my remote development environment.
历次讨论
同类还值得读
开源应用架构
The Architecture of Open Source Applications
《开源软件架构》(AOSA)是一本在线免费书,邀请知名开源项目的作者亲自剖析其内部设计,涵盖 SQLAlchemy、LLVM、Audacity、Apache、Bash 等系统。
编程与软件工程上首页 9 次 · 2011–2024aosabook.org编辑精选编程语言简史:简短、不完整且多半错误
A Brief, Incomplete, and Mostly Wrong History of Programming Languages
一篇以戏谑、故意不准确的方式回顾编程语言史的博客文章,用夸张轶事和讽刺定义串起 Lisp、C、C++、Java、JavaScript、PHP 等语言。
编程与软件工程上首页 8 次 · 2009–2021james-iry.blogspot.comSQLite 是如何测试的
How SQLite is tested
SQLite 官方文档页,系统介绍 SQLite 的测试体系:多种测试方法(TCL 测试、模糊测试、回归测试、静态分析等)和海量测试用例,展示了这个小型开源项目如何靠极致测试获得…
编程与软件工程上首页 8 次 · 2009–2025sqlite.org编辑精选高级编程语言(2009)
Advanced programming languages (2009)
Matt Might 的经典文章,按用途推荐“高级编程语言”:如果追求就业就选主流语言,如果追求表达力、学术研究或创业,则推荐 Haskell、OCaml、Scala 等函数式语…
编程与软件工程上首页 8 次 · 2009–2022matt.might.net我的 Forth 与栈机器经历
Yosefk - My history with Forth & stack machines
作者以亲身经历回顾了使用 Forth 语言和栈式机器的历程:既赞叹其简洁优雅、代码量小、可自举的优点,也坦率指出栈操作在实际编程中的痛苦,以及 Forth 社区文化中的问题。
编程与软件工程上首页 8 次 · 2010–2024yosefk.com编辑精选