mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-21 02:10:11 +08:00
Merge branch 'master' of https://github.com/LCTT/TranslateProject into translating
This commit is contained in:
commit
762d4435a5
179
published/20180902 Learning BASIC Like It-s 1983.md
Normal file
179
published/20180902 Learning BASIC Like It-s 1983.md
Normal file
@ -0,0 +1,179 @@
|
||||
穿越到 1983 年学习 BASIC
|
||||
======
|
||||
|
||||

|
||||
|
||||
1983 年时我还没出生,这让我略有一些遗憾。但我特别遗憾的是,是我没有经历过 8 位计算机时代的到来,因为我认为那些初次接触到还相对简单和受限的计算机的人们,拥有超过如今的我们的巨大优势。
|
||||
|
||||
今天,(几乎)每个人知道如何使用计算机,但是即使是在计算机行业当中,也很少有人能明白任何一台计算机内部的所有内容。现在软件分为[如此多的层次][1],做的是如此不同的事情,没有哪个人能知道哪些是必不可少的。而在 1983 年,家用电脑足够傻大粗,努力一些的人就能了解到一台特定的计算机是如何工作的。那样的一个人可能不会像今天的我觉得操作系统那么神秘,因为如今的操作系统已经在硬件上叠加了太多的抽象层。我希望这些抽象层逐一引入以易于理解;而今天,新的程序员们不得不自上而下、按时间回溯地尝试理解它们。
|
||||
|
||||
很多著名的程序员,尤其在计算机游戏行业,孩童时期就在苹果 II 和 Commodore 64 这样的 8 位计算机上开始编写游戏,John Romero、Richard Garriott 和 Chris Roberts 都是这样的例子。这好理解。在 8 位计算机时代,很多游戏只能在计算机杂志和[书籍][2]中以印刷的 BASIC 程序清单方式得到。如果你想玩其中一款游戏,就必须手工键入整个程序。不可避免的,你可能遇到一些问题,所以你就得调试你的程序。等到你让它可以工作起来了,你就已经对程序是如何运行的有了足够的了解,你就可以开始自己修改它了。如果你是一个狂热的游戏玩家,你几乎必然会成为一名优秀的程序员。
|
||||
|
||||
在我的童年时期我也玩电脑游戏。但是我玩的游戏是在 CD-ROM 上的。我有时发现我自己必须得搜索一下如何修复崩溃的安装程序,这可能涉及编辑 Windows 注册表之类的东西。可能是这种小故障的排除让我感觉很棒,所以我才考虑在大学里学习计算机科学。但是在大学中从不教我一些计算机如何工作的或如何控制它们的关键性的东西。
|
||||
|
||||
当然,现在我可以告诉计算机去干什么。尽管如此,我还是不禁感到,我缺少一些根本的见解 —— 只有那些伴随着更简单的计算机编程而成长的人才有的深刻见解。我不禁在想,如果在上世纪 80 年代初就接触到计算机会是什么样子?它们与今天使用计算机的体验相比有何不同?
|
||||
|
||||
这篇文章将与通常的 Two-Bit History 的文章有一点不同,因为我将为这些问题尝试设想一个答案。
|
||||
|
||||
### 1983
|
||||
|
||||
就在上周,你在电视上看到了 [Commodore 64 的广告][3] ,现在 M\*A\*S\*H 播完了(LCTT 译注: 这是一部上世纪 70 年代初的电视剧),星期一晚上你可以找点新的事情做了。这个 Commodore 64 甚至看起来比鲁迪(LCTT 译注:应该是下文中拥有 Apple II 的人)的家人放在他们家地下室的 Apple II 更好。而且,广告中吹嘘说新的计算机会让你的朋友们“挤破”你家的大门。你知道学校里的几个家伙宁愿在你家闲逛,也不愿去鲁迪家里,只要他们能玩 Zork 就行。
|
||||
|
||||
所以,你得说服你的父母去买一台。你的母亲说,这事可以考虑,只要你不去游戏厅玩街机就给你买一台家庭电脑。虽然不太情愿,但是你还是同意了。而你的父亲则想,他可以用 MultiPlan (LCTT 译注:电子表格程序)跟踪家庭的资金状况,MultiPlan 是他曾听说过的一个电子表格程序,这就是为什么这台计算机被放在客厅的原因。然而,一年后,你仍然是唯一使用它的人。最终,他们同意你把它搬到了你的卧室的桌子上,正好位于你的警察海报下方。
|
||||
|
||||
(你的姐姐对这个决定表示抗议,但是,在 1983 年电脑这种东西[并不适合女孩][4]。)
|
||||
|
||||
你的父亲在下班路上从 [ComputerLand][5] 那里把它捎了回来。你俩把盒子放置在电视机的旁边,并打开了它。外包装上说“欢迎来到友好的计算机世界”。而二十分钟以后你就不再信这句话了 —— 你俩仍然在尝试把 Commodore 连接到电视机上,并在想电视机的天线电缆到底是 75 欧姆还是 300 欧姆的同轴电缆。但是,最终你把电视机调到了频道 3,看到了一个颗粒状的、紫色的图像。
|
||||
|
||||
![Commodore 64 启动屏幕][6]
|
||||
|
||||
计算机显示了一个 `READY`。你的爸爸把计算机推向了你,这意思是你是第一个尝试它的人。你小心翼翼地敲击每个字母,键入了 `HELLO`。然而计算机的回应是令人困惑的。
|
||||
|
||||
![Commodore 64 语法错误][7]
|
||||
|
||||
你尝试输入了一些稍有不同的单词,然而回应总是一样的。你父亲说,你最好仔细读一下手册的其它部分。这绝非易事,[随 Commodore 64 一起提供的手册][8] 是一本小一些的书。但是这不会困住你,因为手册的介绍预示着奇迹。
|
||||
|
||||
它声称,Commodore 64 有“微型计算机行业中最先进的图画制作器”,能允许“你设计拥有四种不同颜色的图画,就像你在街机视频游戏里看到的一样”。Commodore 64 也有“内置的音乐和声音效果,可以与很多著名的音乐合成器相媲美”。所有的这些工具都置身于你的手边,手册会引导你完成所有这些:
|
||||
|
||||
> 与所有提供的硬件一样重要的是,这本用户指南将提高你对计算机的理解。它无法在这里告诉你有关计算机的所有信息,但是它会向你推荐各种出版物,以获取有关所提出主题的更多详细信息。Commodore 希望你真正喜欢你的新 COMMODORE 64。要想真正得到乐趣,请记住:编程不是一种一天就能学会的东西。通读这个用户指南你要有耐心。
|
||||
|
||||
那一夜,你在床上通读了整整前三个章节:“安装”、“入门”和“BASIC 编程入门”,在你最终睡着时,手册还打开着放在了胸前。
|
||||
|
||||
### Commodore BASIC
|
||||
|
||||
现在是星期六早上,你渴望尝试你所学到的新东西。手册里教给你的第一件事是如何更改在显示器上的颜色。你按照操作说明,按下 `CTRL-9` 来进入反色输入模式,然后按住空格键来创建了一个长长的空行。你可以使用 `CTRL-1` 到 `CTRL-8` 在不同的颜色之间交换,这让你的电视机屏幕焕发出了新的力量。
|
||||
|
||||
![Commodore 64 颜色带][9]
|
||||
|
||||
尽管这很酷,但你觉得这不能算是编程。要对计算机编程,你昨晚已经学会了如何做,你必须以一种称为 BASIC 的语言与计算机交谈。对你来说,BASIC 看起来就像星球大战中的东西一样科幻,但是,到 1983 年时,其实 BASIC 已经快有二十岁了。它是由两位达特茅斯教授 John Kemeny 和 Tom Kurtz 发明的,他们想让社会科学和人文科学中的本科生也可以使用计算机。它被广泛使用在微型计算机上,在大学的数学课上很受欢迎。在比尔盖茨和保罗艾伦为 Altair 编写了微软 BASIC 解释器后,它就成为了微型计算机上的标准。但是这本手册对此没有任何解释,那么多年你都没学过它。
|
||||
|
||||
手册中建议你尝试的第一个 BASIC 命令是 `PRINT` 命令。你输入了 `PRINT "COMMODORE 64"`,很慢,因为你需要花费一点时间才能在按键 `2` 上面找到引号符号。你单击 `RETURN`,这一次,计算机没有抱怨,完全是按照你告诉它做的,在下一行中显示了 “COMMODORE 64” 。
|
||||
|
||||
现在你尝试对各种不同的东西使用 `PRINT` 命令:两个数字加在一起,两个数字乘在一起,甚至几个十进制数字。你不再输入 `PRINT` ,而是使用 `?` 代替,因为手册中告诉你 `?` 是 `PRINT` 的一个缩写,通常专业程序员都这么使用。你感觉自己已经像是一个专家了,不过你想起你还没有进行到第三章“BASIC 编程入门”。
|
||||
|
||||
你很快就开始了。该章节提示你编写你的第一个真正的 BASIC 程序。你输入 `NEW` 并单击 `RETURN`,它给了你一个干净的<ruby>黑板<rt>slate</rt></ruby>。然后你在其中输入你的程序:
|
||||
|
||||
```
|
||||
10 ?"COMMODORE 64"
|
||||
20 GOTO 10
|
||||
```
|
||||
|
||||
手册里解释说 10 和 20 是行号。它们为计算机排序了语句。它们也允许程序员在某些命令中引用程序的其它行,正像你在这里使用的 `GOTO` 命令一样,它将程序指回到行 10。“这是一个很好的编程习惯”,手册认为,“以 10 的增量来编号行,可以防止你以后需要插入一些语句”。
|
||||
|
||||
你输入 `RUN`,并凝视充满了 “COMMODORE 64” 的屏幕,它一遍又一遍的重复。
|
||||
|
||||
![Commodore 64 显示反复打印 "Commodore 64" 的结果][10]
|
||||
|
||||
你不确定这不会引爆你的计算机,过了一秒钟你才想起来应该单击 `RUN/STOP` 按键来打断循环。
|
||||
|
||||
手册接下来的一些部分向你介绍了变量,它告诉你变量像“在计算机中许多的盒子,它们每个可以容纳一个数字或一个文本字符串”。以一个 `%` 符号结尾的变量是一个整数,与此同时,以一个 `$` 符号结尾的变量是一个字符串。其余的所有变量是一些称为“浮点”变量的东西。手册警告你要小心变量名称,因为计算机仅会识别变量名称的前两个字母,尽管它不限制你想创建的名称有多长。(这并没有特别让你困扰,但是要是在 30 年后来看,这可能会让人们感到太疯狂了)
|
||||
|
||||
你接着学习 `IF... THEN...` 和 `FOR... NEXT...` 结构体。有了这些新的工具,你感觉有能力来解决接下来手册丢给你的重大挑战。“如果你是个有野心的人”,没错,“输入下面的程序,并查看会发生什么。”该程序比你目前为止看到的程序更长、更复杂,但是,你很想知道它做了什么:
|
||||
|
||||
```
|
||||
10 REM BOUNCING BALL
|
||||
20 PRINT "{CLR/HOME}"
|
||||
25 FOR X = 1 TO 10 : PRINT "{CRSR/DOWN}" : NEXT
|
||||
30 FOR BL = 1 TO 40
|
||||
40 PRINT " ●{CRSR LEFT}";:REM (● is a Shift-Q)
|
||||
50 FOR TM = 1 TO 5
|
||||
60 NEXT TM
|
||||
70 NEXT BL
|
||||
75 REM MOVE BALL RIGHT TO LEFT
|
||||
80 FOR BL = 40 TO 1 STEP -1
|
||||
90 PRINT " {CRSR LEFT}{CRSR LEFT}●{CRSR LEFT}";
|
||||
100 FOR TM = 1 TO 5
|
||||
110 NEXT TM
|
||||
120 NEXT BL
|
||||
130 GOTO 20
|
||||
```
|
||||
|
||||
上面的程序充分利用了 Commodore 64 最酷的功能之一。当把不可打印的命令字符作为字符串的一部分传递到 `PRINT` 命令时,它们会执行其操作,而不是被打印到屏幕上。这允许你重新摆放你程序中打印的字符串。(LCTT 译注:上述程序中如 `{CRSR LEFT}` 之类的控制字符执行类似 “在行中向左移动一个位置” 的操作,因此上述程序中利用这些字符操作了一个圆点字符四处移动,如下图。)
|
||||
|
||||
输入上面的程序你花费了很长时间。你犯一些错误,并不得不重新输入一些行。但是,你最终能够按下 `RUN`,并看到了一幅杰作:
|
||||
|
||||
![Commodore 64 反弹球][11]
|
||||
|
||||
你觉得这恐怕是你见过的最酷的事了。不过你几乎转头就忘记了它,因为马上你就学到了 BASIC 的内置函数,像 `RND`(它返回一个随机数字)和 `CHR$`(它返回与一个给定数字代码匹配的字符),这个手册向你展示一个程序,这个程序有名到什么程度呢?直到许多年后,它仍然被当成了一个[短文选集][12]的标题:
|
||||
|
||||
```
|
||||
10 PRINT "{CLR/HOME}"
|
||||
20 PRINT CHR$(205.5 + RND(1));
|
||||
40 GOTO 20
|
||||
```
|
||||
|
||||
当运行时,上面的程序会生成一个随机的迷宫:
|
||||
|
||||
![Commodore 64 迷宫程序][13]
|
||||
|
||||
这绝对是你曾经见过最酷的事。
|
||||
|
||||
### PEEK 和 POKE
|
||||
|
||||
现在你已经看过了 Commodore 64 手册的前四章节,包含那篇 “高级的 BASIC” 的章节,所以你感到十分自豪。在这个星期六早上,你学习到了很多东西。但是这个下午(在赶快吃了点午饭后),你将继续学习一些使这个放在你的客厅中的奇妙机器变得不再神秘的东西。
|
||||
|
||||
手册中的下一个章节标题是“高级颜色和图像命令”。它从回顾你今天早上首先键入的彩色条开始,并向你展示了如何在一个程序中做同样的事。然后它教给了你如何更改屏幕的背景颜色。
|
||||
|
||||
为此,你需要使用 BASIC 的 `PEEK` 和 `POKE` 命令。这些命令分别允许你检查和写入一个存储器地址。Commodore 64 有一个主背景颜色和一个边框背景颜色。每个都通过一个特定的内存地址控制。你可以把你喜欢的任何颜色值写入到这些地址,以使用这些背景颜色和边框颜色。
|
||||
|
||||
手册中解释:
|
||||
|
||||
> 正像变量可以被认为机器中你放置信息的“盒子”一样,你也可以认为在计算机中代表特定内存位置的是一些特殊定义的“盒子”。
|
||||
>
|
||||
> Commodore 64 会查看这些内存位置来了解屏幕的背景和边框应该是什么样的颜色,什么样的字符应该被显示在屏幕上,以及显示在哪里,等等其它任务。
|
||||
|
||||
你编写了一个程序来遍历所有可用的背景和边界的颜色的组合:
|
||||
|
||||
```
|
||||
10 FOR BA = 0 TO 15
|
||||
20 FOR BO = 0 TO 15
|
||||
30 POKE 53280, BA
|
||||
40 POKE 53281, BO
|
||||
50 FOR X = 1 TO 500 : NEXT X
|
||||
60 NEXT BO : NEXT BA
|
||||
```
|
||||
|
||||
虽然 `POKE` 命令以及它的大操作数一开始时看起来很吓人,现在你看到那个数字的实际值其实不是很要紧。显然,你必须得到正确的数字,但是所有的数字代表的是一个“盒子”,Commodore 只是正好存储在地址 53280 处而已。这个盒子有一个特殊的用途:Commodore 使用它来确定屏幕背景应该是什么颜色。
|
||||
|
||||
![Commodore 64 更改背景颜色][14]
|
||||
|
||||
你认为这简直棒极了。只需要写入到内存中一个专用的盒子,你可以控制一台计算机的基础属性。你不确定 Commodore 64 的电路系统如何读取你写入在内存中的值并更改屏幕的颜色的,但是,你不知道这些也没事。至少你知道结果是怎么样的。
|
||||
|
||||
### 特殊容器
|
||||
|
||||
在那个周六,你没有读完整本手册,因为你现在有点精疲力尽了。但是你最终会全部读完它。在这个过程中,你学到更多的 Commodore 64 专用的盒子。有一些盒子你可以写入来控制在屏幕上显示什么——这也是一个盒子,事实上,是控制每一个位置出现的字符。在第六章节 “精灵图形” 中,你学到可以让你定义可以移动和甚至缩放图像的特殊盒子。在第七章节 “创造声音” 中,你学到能写入以便使你的 Commodore 64 歌唱 “Michael Row the Boat Ashore” 的盒子。Commodore 64,事实证明,它和你可能以后学习到的一个称为 API 的关系甚少。控制 Commodore 64 大多涉及写入到电路系统赋予特殊意义的内存地址。
|
||||
|
||||
多年来,你花费在这些特殊盒子的时光一直伴随着你。甚至几十年后,当你在一个拥有大量的图形或声音 API 的机器上编程时,你知道,隐藏于其背后的,这些 API 最终是写入到这些盒子之类的东西里面的。你有时会好奇那些只使用过 API 的年轻程序员,他们肯定是觉得 API 为他们做到的这一切。可能他们认为这些 API 调用了一些其它隐藏的 API。但是,那些隐藏的 API 调用了什么?你不由得同情这些年轻的程序员们,因为他们一定会非常迷惑。
|
||||
|
||||
如果你喜欢这篇文章,也喜欢它每两周发布的一篇新文章的话,那么请在 Twitter 上关注 [@TwoBitHistory][15] 或订阅 [RSS 源][16]来确保你知道新的文章发布出来。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via:https://twobithistory.org/2018/09/02/learning-basic.html
|
||||
|
||||
作者:[Two-Bit History][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[robsean](https://github.com/robsean)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://twobithistory.org
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.youtube.com/watch?v=kZRE7HIO3vk
|
||||
[2]: https://en.wikipedia.org/wiki/BASIC_Computer_Games
|
||||
[3]: https://www.youtube.com/watch?v=ZekAbt2o6Ms
|
||||
[4]: https://www.npr.org/sections/money/2014/10/21/357629765/when-women-stopped-coding
|
||||
[5]: https://www.youtube.com/watch?v=MA_XtT3VAVM
|
||||
[6]: https://twobithistory.org/images/c64_startup.png
|
||||
[7]: https://twobithistory.org/images/c64_error.png
|
||||
[8]: ftp://www.zimmers.net/pub/cbm/c64/manuals/C64_Users_Guide.pdf
|
||||
[9]: https://twobithistory.org/images/c64_colors.png
|
||||
[10]: https://twobithistory.org/images/c64_print_loop.png
|
||||
[11]: https://twobithistory.org/images/c64_ball.gif
|
||||
[12]: http://10print.org/
|
||||
[13]: https://twobithistory.org/images/c64_maze.gif
|
||||
[14]: https://twobithistory.org/images/c64_background.gif
|
||||
[15]: https://twitter.com/TwoBitHistory
|
||||
[16]: https://twobithistory.org/feed.xml
|
||||
[17]: https://twitter.com/TwoBitHistory/status/1030974776821665793?ref_src=twsrc%5Etfw
|
97
published/20190604 5G will augment Wi-Fi, not replace it.md
Normal file
97
published/20190604 5G will augment Wi-Fi, not replace it.md
Normal file
@ -0,0 +1,97 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (GraveAccent)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-11098-1.html)
|
||||
[#]: subject: (5G will augment Wi-Fi, not replace it)
|
||||
[#]: via: (https://www.networkworld.com/article/3399978/5g-will-augment-wi-fi-not-replace-it.html)
|
||||
[#]: author: (Zeus Kerravala https://www.networkworld.com/author/Zeus-Kerravala/)
|
||||
|
||||
|
||||
5G 会增强 Wi-Fi,而不是取代它
|
||||
======
|
||||
> Aruba 战略和企业发展副总裁 Jeff Lipton 为 5G 炒作增添了一些干货,讨论了它和 Wi-Fi 如何协同工作以及如何最大化两者的价值。
|
||||
|
||||
![Thinkstock][1]
|
||||
|
||||
如今可以说没有技术主题比 [5G][2] 更热。这是最近 [移动世界大会][3] 节目的一个主题,并且已经在其他活动中占据了主导地位,例如 Enterprise Connect 和我参加的几乎所有供应商活动。
|
||||
|
||||
一些供应商将 5G 定位为解决所有网络问题的灵丹妙药,并预测它将消除所有其他形式的网络。像这样的观点显然是极端的,但我相信 5G 会对网络行业产生影响,网络工程师应该意识到这一点。
|
||||
|
||||
为了帮助为 5G 炒作带来一些现实感,我最近采访了一家惠普公司旗下的 Aruba 公司的战略和企业发展副总裁 Jeff Lipton,因为我知道惠普已经深入参与了 5G 和 Wi-Fi 的发展。
|
||||
|
||||
![Jeff Lipton, VP of strategy and corporate development, Aruba][4]
|
||||
|
||||
### Zeus Kerravala: 5G 被吹捧为“明日之星”。你是这样看的吗?
|
||||
|
||||
**Jeff Lipton:** 接下来的重点是连接“事物”并从这些事物中产生可操作的见解和背景。5G 是服务于这一趋势的技术之一。Wi-Fi 6 是另一个,还有边缘计算、蓝牙低功耗(BLE)、人工智能(AI)和机器学习(ML)。这一切都很重要,全都有自己的用武之地。
|
||||
|
||||
### 你是否在企业中看到 5G 的风头盖过 Wi-Fi?
|
||||
|
||||
**Lipton:** 与所有蜂窝接入一样,如果你需要<ruby>宏观区域覆盖<rt>macro area coverage</rt></ruby>和高速切换,使用 5G 是合适的。但对于大多数企业级应用程序而言,它通常不需要这些功能。从性能角度来看,[Wi-Fi 6][5] 和 5G 在大多数指标上大致相等,包括吞吐量、延迟、可靠性和连接密度。它们并不相似的地方在经济方面,Wi-Fi 要好得多。我不认为很多客户愿意用 Wi-Fi 交换 5G,除非他们需要宏观覆盖或高速切换。
|
||||
|
||||
### Wi-Fi 和 5G 可以共存吗? 企业如何一起使用 5G 和 Wi-Fi?
|
||||
|
||||
**Lipton:** Wi-Fi 和 5G 可以共存并且应该是互补的。5G 架构将蜂窝核心和无线接入网络(RAN)分离。因此,Wi-Fi 可以是企业无线电前端,并与 5G 核心紧密连接。由于 Wi-Fi(特别是 Wi-Fi 6)的经济有利,并且性能非常好,我们设想许多服务提供商会使用 Wi-Fi 作为其 5G 系统的无线电前端,充当其分布式天线(DAS)和小型蜂窝系统的替代方案。
|
||||
|
||||
> “Wi-Fi 和 5G 可以并且应该是互补的。” — Jeff Lipton
|
||||
|
||||
### 如果一个企业打算完全转向 5G,那将如何实现以及它的实用性如何?
|
||||
|
||||
**Lipton:** 为了将 5G 用于主要的室内访问方式,客户需要升级其网络和几乎所有设备。5G 在室外提供良好的覆盖,但蜂窝信号不能可靠地穿透建筑物,5G 会使这个问题变得更糟,因为它部分依赖于更高频率的无线电。因此,服务提供商需要一种提供室内覆盖的方法。为了提供这种覆盖,他们会部署 DAS 或小型蜂窝系统 —— 由终端客户支付费用。然后,客户将他们的设备直连到这些蜂窝系统,并为每个设备支付服务合同。
|
||||
|
||||
这种方法存在一些问题。首先,DAS 和小型蜂窝系统比 Wi-Fi 网络贵得多。并且成本不会仅限于网络。每台设备都需要一台 5G 蜂窝调制解调器,批量价格高达数十美元,而终端用户通常需要花费一百多美元。由于目前很少或者没有 MacBook、PC、打印机、AppleTV 有 5G 调制解调器,因此需要对这些设备进行升级。我不相信很多企业会愿意支付这笔额外费用并升级他们的大部分设备以获得尚不明确的好处。
|
||||
|
||||
### 经济性是 5G 与 Wi-Fi 之争的一个要素吗?
|
||||
|
||||
**Lipton:** 经济性始终是一个要素。让我们将对话集中在室内企业级应用程序上,因为这是一些运营商打算用 5G 定位的用例。我们已经提到升级到 5G 将要求企业部署昂贵的 DAS 或小型蜂窝系统用于室内覆盖,几乎将所有设备升级到包含 5G 调制解调器,并为每个设备支付服务合同。理解 5G 蜂窝网络和 DAS 系统在许可频谱上运行也很重要,这类似于一条私人高速公路。服务提供商为此频谱支付了数十亿美元,这笔费用需要货币化并嵌入服务成本中。因此,从部署和生命周期的角度来看,Wi-Fi 在经济上比 5G 有利。
|
||||
|
||||
### 5G 与 Wi-Fi 相比有任何安全隐患吗?
|
||||
|
||||
**Lipton:** 一些人认为蜂窝技术比 Wi-Fi 更安全,但事实并非如此。LTE 相对安全,但也有弱点。例如,普渡大学和爱荷华大学的研究人员表示,LTE 容易受到一系列攻击,包括数据拦截和设备跟踪。5G 通过多种认证方法和更好的密钥管理改进了 LTE 安全性。
|
||||
|
||||
Wi-Fi 的安全性也没有停滞不前而是在继续发展。当然,不遵循最佳实践的 Wi-Fi 实现,例如那些甚至没有基本密码保护的实现,并不是最佳的。但那些配置了适当的访问控制和密码的则是非常安全的。随着新标准 —— 特别是 WPA3 和<ruby>增强开放<rt>Enhanced Open</rt></ruby> —— Wi-Fi 网络安全性进一步提高。
|
||||
|
||||
同样重要的是要记住,企业已根据其特定需求对安全性和合规性解决方案进行了大量投资。对于包括 5G 在内的蜂窝网络,企业将失去部署所选安全性和合规性解决方案的能力,以及对流量流的大多数可见性。虽然 5G 的未来版本将通过称为网络切片的功能提供高级别的自定义,但企业仍将失去他们目前需要的和拥有的安全性和合规性定制级别。
|
||||
|
||||
### 关于 5G 与 Wi-Fi 之间的讨论的补充想法
|
||||
|
||||
**Lipton:** 围绕 Wi-Fi 与 5G 的争论忽略了这一点。它们都有自己的用武之地,而且它们在很多方面都是互补的。由于需要连接和分析越来越多的东西,Wi-Fi 和 5G 市场都将增长。如果客户需要宏观覆盖或高速切换,并且可以为这些功能支付额外成本,那么 5G 是可行的。
|
||||
|
||||
5G 也适用于客户需要物理网络分段的某些工业用例。但对于绝大多数企业客户而言,Wi-Fi 将继续像现在一样证明自己作为可靠、安全且经济高效的无线接入技术的价值。
|
||||
|
||||
**更多关于 802.11ax (Wi-Fi 6):**
|
||||
|
||||
* [为什么 802.11ax 是无线网络的下一件大事][7]
|
||||
* [FAQ:802.11ax Wi-Fi][8]
|
||||
* [Wi-Fi 6 (802.11ax) 正在来到你附近的路由器][9]
|
||||
* [带有 OFDMA 的 Wi-Fi 6 打开了一个全新的无线可能性世界][10]
|
||||
* [802.11ax 预览:支持 Wi-Fi 6 的接入点和路由器随时可用][11]
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.networkworld.com/article/3399978/5g-will-augment-wi-fi-not-replace-it.html
|
||||
|
||||
作者:[Zeus Kerravala][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[GraveAccent](https://github.com/graveaccent)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.networkworld.com/author/Zeus-Kerravala/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://images.idgesg.net/images/article/2019/05/wireless_connection_speed_connectivity_bars_cell_tower_5g_by_thinkstock-100796921-large.jpg
|
||||
[2]: https://www.networkworld.com/article/3203489/what-is-5g-how-is-it-better-than-4g.html
|
||||
[3]: https://www.networkworld.com/article/3354477/mobile-world-congress-the-time-of-5g-is-almost-here.html
|
||||
[4]: https://images.idgesg.net/images/article/2019/06/headshot_jlipton_aruba-100798360-small.jpg
|
||||
[5]: https://www.networkworld.com/article/3215907/why-80211ax-is-the-next-big-thing-in-wi-fi.html
|
||||
[6]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fmobile-device-management-big-picture
|
||||
[7]: https://www.networkworld.com/article/3215907/mobile-wireless/why-80211ax-is-the-next-big-thing-in-wi-fi.html
|
||||
[8]: https://%20https//www.networkworld.com/article/3048196/mobile-wireless/faq-802-11ax-wi-fi.html
|
||||
[9]: https://www.networkworld.com/article/3311921/mobile-wireless/wi-fi-6-is-coming-to-a-router-near-you.html
|
||||
[10]: https://www.networkworld.com/article/3332018/wi-fi/wi-fi-6-with-ofdma-opens-a-world-of-new-wireless-possibilities.html
|
||||
[11]: https://www.networkworld.com/article/3309439/mobile-wireless/80211ax-preview-access-points-and-routers-that-support-the-wi-fi-6-protocol-on-tap.html
|
||||
[12]: https://www.facebook.com/NetworkWorld/
|
||||
[13]: https://www.linkedin.com/company/network-world
|
@ -0,0 +1,51 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-11092-1.html)
|
||||
[#]: subject: (Donald Trump Now Wants to Ban End-to-End Encryption)
|
||||
[#]: via: (https://news.softpedia.com/news/donald-trump-now-wants-to-ban-end-to-end-encryption-526567.shtml)
|
||||
[#]: author: (Bogdan Popa https://news.softpedia.com/editors/browse/bogdan-popa)
|
||||
|
||||
美国总统特朗普要禁用端到端加密
|
||||
======
|
||||
|
||||
> 美国官方在开会讨论端到端加密。
|
||||
|
||||
在[禁止][1]和[解禁][2]华为之后,美国总统唐纳德特朗普现在将目光盯上了端到端加密,据一份新的报告声称,白宫高级官员本周会面讨论了政府可以在这方面采取的第一项动作。
|
||||
|
||||
[Politico][3] 援引了三位知情人士的话指出,来自几个关键机构的二号官员讨论了针对端到端加密的潜在攻击。
|
||||
|
||||
“这两条路径是,要么就加密问题发表声明或一般立场,并且[说]他们将继续致力于解决方案,或者要求国会立法,”Politico 援引一位消息人士的话说。
|
||||
|
||||
虽然美国政府希望终止美国公司开发的软件中的端到端加密功能,但这一提议却招致了美国各机构代表的不同反应。
|
||||
|
||||
Politico 指出,例如,国土安全部 “内部存在分歧”,因为该机构意识到禁止端到端加密可能产生的安全隐患。
|
||||
|
||||
### 加密争议
|
||||
|
||||
推动制定这项针对端到端加密的规定,被视为美国情报机构和执法部门努力获取属于犯罪分子和恐怖分子的设备和数据的决定性步骤。
|
||||
|
||||
大多数美国公司已经将加密捆绑到他们的产品当中,这包括苹果和谷歌,它阻止了调查人员访问嫌疑人的数据。科技公司将端到端加密定位为一项关键的隐私功能,其中一些人警告说,任何针对它的监管都可能影响到国家安全。
|
||||
|
||||
特别是苹果公司,它是反对加密监管的最大公司之一。该公司[拒绝解锁圣贝纳迪诺恐怖分子使用的 iPhone][4],解释说侵入该设备会损害所有客户的安全。
|
||||
|
||||
FBI 最终使用了第三方开发的软件解锁了该设备。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.softpedia.com/news/donald-trump-now-wants-to-ban-end-to-end-encryption-526567.shtml
|
||||
|
||||
作者:[Bogdan Popa][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.softpedia.com/editors/browse/bogdan-popa
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://news.softpedia.com/news/google-bans-huawei-from-using-android-google-play-gmail-other-services-526083.shtml
|
||||
[2]: https://news.softpedia.com/news/breaking-donald-trump-says-huawei-can-buy-american-products-again-526564.shtml
|
||||
[3]: https://www.politico.com/story/2019/06/27/trump-officials-weigh-encryption-crackdown-1385306
|
||||
[4]: https://news.softpedia.com/news/judge-orders-apple-to-help-the-fbi-hack-san-bernardino-shooter-s-iphone-500517.shtml
|
@ -1,16 +1,17 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (chen-ni)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-11093-1.html)
|
||||
[#]: subject: (Make Linux stronger with firewalls)
|
||||
[#]: via: (https://opensource.com/article/19/7/make-linux-stronger-firewalls)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
使用防火墙让你的 Linux 更加强大
|
||||
======
|
||||
掌握防火墙的工作原理,以及如何设置防火墙来提高 Linux 的安全性
|
||||
![People working together to build ][1]
|
||||
> 掌握防火墙的工作原理,以及如何设置防火墙来提高 Linux 的安全性
|
||||
|
||||

|
||||
|
||||
所有人都听说过防火墙(哪怕仅仅是在网络犯罪片里看到过相关的情节设定),很多人也知道他们的计算机里很可能正运行着防火墙,但是很少有人明白在必要的时候如何驾驭防火墙。
|
||||
|
||||
@ -18,23 +19,21 @@
|
||||
|
||||
### 防火墙的工作原理
|
||||
|
||||
网络里不同设备之间的通信是通过一种叫做 **端口** 的网关实现的。这里的端口指的并不是像 USB 端口 或者 HDMI 端口这样的物理连接。在网络术语中,端口是一个纯粹的虚拟概念,用来表示某种类型的数据到达或离开一台计算机时候所走的路径。其实也可以换个名字来称呼,比如叫“连接”或者“门道”,不过 [早在 1981 年的时候][2] 它们就被称作端口了,这个叫法也沿用至今。其实端口这个东西没有任何特别之处,只是一种用来指代一个可能会发生数据传输的地址的方式。
|
||||
|
||||
1972 年,一份 [端口数字清单][3](那时候的端口被称为“套接字”)被发布了,并且从此演化为一组众所周知的标准端口号,帮助管理特定类型的网络流量。比如说,你每天访问网站的时候都会使用 80 和 443 端口,因为互联网上的绝大多数人都同意(或者是默认)数据从 web 服务器上传输的时候是通过这两个端口的。如果想要验证这一点,你可以在使用浏览器访问网站的时候在 URL 后面加上一个非标准的端口号码。比如说,访问 **example.com:42** 的请求会被拒绝,因为 example.com 在 42 端口上并不提供网站服务。
|
||||
网络里不同设备之间的通信是通过一种叫做<ruby>端口<rt>port</rt></ruby>的网关实现的。这里的端口指的并不是像 USB 端口 或者 HDMI 端口这样的物理连接。在网络术语中,端口是一个纯粹的虚拟概念,用来表示某种类型的数据到达或离开一台计算机时候所走的路径。其实也可以换个名字来称呼,比如叫“连接”或者“门口”,不过 [早在 1981 年的时候][2] 它们就被称作端口了,这个叫法也沿用至今。其实端口这个东西没有任何特别之处,只是一种用来指代一个可能会发生数据传输的地址的方式。
|
||||
|
||||
1972 年,发布了一份 [端口号列表][3](那时候的端口被称为“<ruby>套接字<rt>socket</rt></ruby>”),并且从此演化为一组众所周知的标准端口号,帮助管理特定类型的网络流量。比如说,你每天访问网站的时候都会使用 80 和 443 端口,因为互联网上的绝大多数人都同意(或者是默认)数据从 web 服务器上传输的时候是通过这两个端口的。如果想要验证这一点,你可以在使用浏览器访问网站的时候在 URL 后面加上一个非标准的端口号码。比如说,访问 `example.com:42` 的请求会被拒绝,因为 example.com 在 42 端口上并不提供网站服务。
|
||||
|
||||
![Navigating to a nonstandard port produces an error][4]
|
||||
|
||||
如果你是通过 80 端口访问同一个网站,就可以(不出所料地)正常访问了。你可以在 URL 后面加上 **:80** 来指定使用 80 端口,不过由于 80 端口是 HTTP 访问的标准端口,所以你的浏览器其实已经默认在使用 80 端口了。
|
||||
如果你是通过 80 端口访问同一个网站,就可以(不出所料地)正常访问了。你可以在 URL 后面加上 `:80` 来指定使用 80 端口,不过由于 80 端口是 HTTP 访问的标准端口,所以你的浏览器其实已经默认在使用 80 端口了。
|
||||
|
||||
当一台计算机(比如说 web 服务器)准备在指定端口接收网络流量的时候,保持该端口向网络流量开放是一种可以接受的(也是必要的)行为。但是不需要接收流量的端口如果也处在开放状态就比较危险了,这就是需要用防火墙解决的问题。
|
||||
|
||||
#### 安装 firewalld
|
||||
|
||||
有很多种配置防火墙的方式,这篇文章介绍 [**firewalld**][5]。在桌面环境下它被集成在网络管理器(Network Manager)里,在终端里则是集成在 **firewall-cmd** 里。很多 Linux 发行版都预装了这些工具。如果你的发行版里没有,你可以把这篇文章当成是管理防火墙的通用性建议,在你所使用的防火墙软件里使用类似的方法,或者你也可以选择安装 **firewalld**。
|
||||
|
||||
比如说在 Ubuntu 上,你必须启用 **universe** 软件仓库,关闭默认的 **ufw** 防火墙,然后再安装 **firewalld**:
|
||||
有很多种配置防火墙的方式,这篇文章介绍 [firewalld][5]。在桌面环境下它被集成在<ruby>网络管理器<rt>Network Manager</rt></ruby>里,在终端里则是集成在 `firewall-cmd` 里。很多 Linux 发行版都预装了这些工具。如果你的发行版里没有,你可以把这篇文章当成是管理防火墙的通用性建议,在你所使用的防火墙软件里使用类似的方法,或者你也可以选择安装 `firewalld`。
|
||||
|
||||
比如说在 Ubuntu 上,你必须启用 universe 软件仓库,关闭默认的 `ufw` 防火墙,然后再安装 `firewalld`:
|
||||
|
||||
```
|
||||
$ sudo systemctl disable ufw
|
||||
@ -42,21 +41,21 @@ $ sudo add-apt-repository universe
|
||||
$ sudo apt install firewalld
|
||||
```
|
||||
|
||||
Fedora、CentOS、RHEL、OpenSUSE,以及其它很多发行版默认就包含了 **firewalld**。
|
||||
Fedora、CentOS、RHEL、OpenSUSE,以及其它很多发行版默认就包含了 `firewalld`。
|
||||
|
||||
无论你使用哪个发行版,如果希望防火墙发挥作用,就必须保持它在开启状态,并且设置成开机自动加载。你应该尽可能减少在防火墙维护工作上所花费的精力。
|
||||
|
||||
```
|
||||
`$ sudo systemctl enable --now firewalld`
|
||||
$ sudo systemctl enable --now firewalld
|
||||
```
|
||||
|
||||
### 使用网络管理器选择区域
|
||||
|
||||
或许你每天都会连接到很多不同的网络。在工作的时候使用的是一个网络,在咖啡馆里是另一个,在家里又是另一个。你的计算机可以判断出哪一个网络的使用频率比较高,但是它并不知道哪一个是你信任的网络。
|
||||
|
||||
一个防火墙的 **区域** 里包含了端口开放和关闭的预设规则。你可以通过使用区域来选择一个对当前网络最适用的策略。
|
||||
一个防火墙的<ruby>区域<rt>zone</rt></ruby>里包含了端口开放和关闭的预设规则。你可以通过使用区域来选择一个对当前网络最适用的策略。
|
||||
|
||||
你可以打开网络管理器里的连接编辑器(可以在应用菜单里找到),或者是使用 **nm-connection-editor &** 命令以获取所有可用区域的列表。
|
||||
你可以打开网络管理器里的连接编辑器(可以在应用菜单里找到),或者是使用 `nm-connection-editor &` 命令以获取所有可用区域的列表。
|
||||
|
||||
![Network Manager Connection Editor][6]
|
||||
|
||||
@ -71,7 +70,7 @@ Fedora、CentOS、RHEL、OpenSUSE,以及其它很多发行版默认就包含
|
||||
也可以使用下面的终端命令以获取同样的列表:
|
||||
|
||||
```
|
||||
`$ sudo firewall-cmd --get-zones`
|
||||
$ sudo firewall-cmd --get-zones
|
||||
```
|
||||
|
||||
每个区域的名称已经可以透露出设计者创建这个区域的意图,不过你也可以使用下面这个终端命令获取任何一个区域的详细信息:
|
||||
@ -89,18 +88,17 @@ work
|
||||
[...]
|
||||
```
|
||||
|
||||
在这个例子中,**工作**区域的配置是允许接收 SSH 和 DHCPv6-client 的流量,但是拒绝接收其他任何用户没有明确请求的流量。(换句话说,**工作**区域并不会在你浏览网站的时候拦截 HTTP 响应流量,但是 **会** 拦截一个针对你计算机上 80 端口的 HTTP 请求。)
|
||||
在这个例子中,`work` 区域的配置是允许接收 SSH 和 DHCPv6-client 的流量,但是拒绝接收其他任何用户没有明确请求的流量。(换句话说,`work` 区域并不会在你浏览网站的时候拦截 HTTP 响应流量,但是 **会** 拦截一个针对你计算机上 80 端口的 HTTP 请求。)
|
||||
|
||||
你可以依次查看每一个区域,弄清楚它们分别都允许什么样的流量。比较常见的有:
|
||||
|
||||
* **工作:** 这个区域应该在你非常信任的网络上使用。它允许 SSH、DHCPv6 和 mDNS,并且还可以添加更多允许的项目。该区域非常适合作为一个基础配置,然后在此之上根据日常办公的需求自定义一个工作环境。
|
||||
* **公共:** 用在你不信任的网络上。这个区域的配置和工作区域是一样的,但是你不应该再继续添加其它任何允许项目。
|
||||
* **丢弃:** 所有传入连接都会被丢弃,并且不会有任何响应。在不彻底关闭网络的条件下,这已经是最接近隐形模式的配置了,因为只允许传出网络连接(不过随便一个端口扫描器就可以通过传出流量检测到你的计算机,所以这个区域并不是一个隐形装置)。如果你在使用公共 WiFi,这个区域可以说是最安全的选择;如果你觉得当前的网络比较危险,这个区域也一定是最好的选择。
|
||||
* **拦截:** 所有传入连接都会被拒绝,但是会返回一个消息说明所请求的端口被禁用了。只有你主动发起的网络连接是被允许的。这是一个友好版的 **丢弃** 区域,因为虽然还是没有任何一个端口允许传入流量,但是说明了会拒绝接收任何不是本机主动发起的连接。
|
||||
* **家庭:** 在你信任网络里的其它计算机的情况下使用这个区域。该区域只会允许你所选择的传入连接,但是你可以根据需求添加更多的允许项目。
|
||||
* **内部:** 和工作区域类似,该区域适用于内部网络,你应该在基本信任网络里的计算机的情况下使用。你可以根据需求开放更多的端口和服务,同时保持和工作区域不同的一套规则。
|
||||
* **信任:** 接受所有的网络连接。适合在故障排除的情况下或者是在你绝对信任的网络上使用。
|
||||
|
||||
* `work`:这个区域应该在你非常信任的网络上使用。它允许 SSH、DHCPv6 和 mDNS,并且还可以添加更多允许的项目。该区域非常适合作为一个基础配置,然后在此之上根据日常办公的需求自定义一个工作环境。
|
||||
* `public`: 用在你不信任的网络上。这个区域的配置和工作区域是一样的,但是你不应该再继续添加其它任何允许项目。
|
||||
* `drop`: 所有传入连接都会被丢弃,并且不会有任何响应。在不彻底关闭网络的条件下,这已经是最接近隐形模式的配置了,因为只允许传出网络连接(不过随便一个端口扫描器就可以通过传出流量检测到你的计算机,所以这个区域并不是一个隐形装置)。如果你在使用公共 WiFi,这个区域可以说是最安全的选择;如果你觉得当前的网络比较危险,这个区域也一定是最好的选择。
|
||||
* `block`: 所有传入连接都会被拒绝,但是会返回一个消息说明所请求的端口被禁用了。只有你主动发起的网络连接是被允许的。这是一个友好版的 `drop` 区域,因为虽然还是没有任何一个端口允许传入流量,但是说明了会拒绝接收任何不是本机主动发起的连接。
|
||||
* `home`: 在你信任网络里的其它计算机的情况下使用这个区域。该区域只会允许你所选择的传入连接,但是你可以根据需求添加更多的允许项目。
|
||||
* `internal`: 和工作区域类似,该区域适用于内部网络,你应该在基本信任网络里的计算机的情况下使用。你可以根据需求开放更多的端口和服务,同时保持和工作区域不同的一套规则。
|
||||
* `trusted`: 接受所有的网络连接。适合在故障排除的情况下或者是在你绝对信任的网络上使用。
|
||||
|
||||
### 为网络指定一个区域
|
||||
|
||||
@ -116,14 +114,14 @@ work
|
||||
|
||||
### 默认区域
|
||||
|
||||
每次你加入一个新的网络的时候,firewalld 并不会提示你进行选择,而是会指定一个默认区域。你可以在终端里输入下面这个命令来获取你的默认区域:
|
||||
每次你加入一个新的网络的时候,`firewalld` 并不会提示你进行选择,而是会指定一个默认区域。你可以在终端里输入下面这个命令来获取你的默认区域:
|
||||
|
||||
```
|
||||
$ sudo firewall-cmd --get-default
|
||||
public
|
||||
```
|
||||
|
||||
在这个例子里,默认区域是公共区域。你应该保证公共区域有非常严格的限制规则,这样在将它指定到未知网络中的时候才比较安全。或者你也可以设置你自己的默认区域。
|
||||
在这个例子里,默认区域是 `public` 区域。你应该保证该区域有非常严格的限制规则,这样在将它指定到未知网络中的时候才比较安全。或者你也可以设置你自己的默认区域。
|
||||
|
||||
比如说,如果你是一个比较多疑的人,或者需要经常接触不可信任的网络的话,你可以设置一个非常严格的默认区域:
|
||||
|
||||
@ -134,7 +132,7 @@ $ sudo firewall-cmd --get-default
|
||||
drop
|
||||
```
|
||||
|
||||
这样一来,任何你新加入的网络都会被指定使用丢弃区域,除非你手动将它制定为另一个没有这么严格的区域。
|
||||
这样一来,任何你新加入的网络都会被指定使用 `drop` 区域,除非你手动将它制定为另一个没有这么严格的区域。
|
||||
|
||||
### 通过开放端口和服务实现自定义区域
|
||||
|
||||
@ -146,81 +144,81 @@ Firewalld 的开发者们并不是想让他们设定的区域能够适应世界
|
||||
|
||||
在你的防火墙上添加许可的最简单的方式就是添加预设服务。严格来讲,你的防火墙并不懂什么是“服务”,因为它只知道端口号码和使用协议的类型。不过在标准和传统的基础之上,防火墙可以为你提供一套端口和协议的组合。
|
||||
|
||||
比如说,如果你是一个 web 开发者并且希望你的计算机对本地网络开放(这样你的同事就可以看到你正在搭建的网站了),可以添加 **http** 和 **https** 服务。如果你是一名游戏玩家,并且在为你的游戏公会运行开源的 [murmur][9] 语音聊天服务器,那么你可以添加 **murmur** 服务。还有其它很多可用的服务,你可以使用下面这个命令查看:
|
||||
比如说,如果你是一个 web 开发者并且希望你的计算机对本地网络开放(这样你的同事就可以看到你正在搭建的网站了),可以添加 `http` 和 `https` 服务。如果你是一名游戏玩家,并且在为你的游戏公会运行开源的 [murmur][9] 语音聊天服务器,那么你可以添加 `murmur` 服务。还有其它很多可用的服务,你可以使用下面这个命令查看:
|
||||
|
||||
```
|
||||
$ sudo firewall-cmd --get-services
|
||||
amanda-client amanda-k5-client bacula bacula-client \
|
||||
bgp bitcoin bitcoin-rpc ceph cfengine condor-collector \
|
||||
ctdb dhcp dhcpv6 dhcpv6-client dns elasticsearch \
|
||||
freeipa-ldap freeipa-ldaps ftp [...]
|
||||
amanda-client amanda-k5-client bacula bacula-client \
|
||||
bgp bitcoin bitcoin-rpc ceph cfengine condor-collector \
|
||||
ctdb dhcp dhcpv6 dhcpv6-client dns elasticsearch \
|
||||
freeipa-ldap freeipa-ldaps ftp [...]
|
||||
```
|
||||
|
||||
如果你找到了一个自己需要的服务,可以将它添加到当前的防火墙配置中,比如说:
|
||||
|
||||
```
|
||||
`$ sudo firewall-cmd --add-service murmur`
|
||||
$ sudo firewall-cmd --add-service murmur
|
||||
```
|
||||
|
||||
这个命令 **在你的默认区域里** 添加了指定服务所需要的所有端口和协议,不过在重启计算机或者防火墙之后就会失效。如果想让你的修改永久有效,可以使用 **\--permanent** 标志:
|
||||
这个命令 **在你的默认区域里** 添加了指定服务所需要的所有端口和协议,不过在重启计算机或者防火墙之后就会失效。如果想让你的修改永久有效,可以使用 `--permanent` 标志:
|
||||
|
||||
```
|
||||
`$ sudo firewall-cmd --add-service murmur --permanent`
|
||||
$ sudo firewall-cmd --add-service murmur --permanent
|
||||
```
|
||||
|
||||
你也可以将这个命令用于一个非默认区域:
|
||||
|
||||
```
|
||||
`$ sudo firewall-cmd --add-service murmur --permanent --zone home`
|
||||
$ sudo firewall-cmd --add-service murmur --permanent --zone home
|
||||
```
|
||||
|
||||
#### 端口
|
||||
|
||||
有时候你希望允许的流量并不在 firewalld 定义的服务之中。也许你想在一个非标准的端口上运行一个常规服务,或者就是想随意开放一个端口。
|
||||
有时候你希望允许的流量并不在 `firewalld` 定义的服务之中。也许你想在一个非标准的端口上运行一个常规服务,或者就是想随意开放一个端口。
|
||||
|
||||
举例来说,也许你正在运行开源的 [虚拟桌游][10] 软件 [MapTool][11]。由于 MapTool 服务器应该使用哪个端口这件事情并没有一个行业标准,所以你可以自行决定使用哪个端口,然后在防火墙上“开一个洞”,让它允许该端口上的流量。
|
||||
|
||||
实现方式和添加服务差不多:
|
||||
|
||||
```
|
||||
`$ sudo firewall-cmd --add-port 51234/tcp`
|
||||
$ sudo firewall-cmd --add-port 51234/tcp
|
||||
```
|
||||
|
||||
这个命令 **在你的默认区域** 里将 51234 端口向 TCP 传入连接开放,不过在重启计算机或者防火墙之后就会失效。如果想让你的修改永久有效,可以使用 **\--permanent** 标志:
|
||||
这个命令 **在你的默认区域** 里将 51234 端口向 TCP 传入连接开放,不过在重启计算机或者防火墙之后就会失效。如果想让你的修改永久有效,可以使用 `--permanent` 标志:
|
||||
|
||||
```
|
||||
`$ sudo firewall-cmd --add-port 51234/tcp --permanent`
|
||||
$ sudo firewall-cmd --add-port 51234/tcp --permanent
|
||||
```
|
||||
|
||||
你也可以将这个命令用于一个非默认区域:
|
||||
|
||||
```
|
||||
`$ sudo firewall-cmd --add-port 51234/tcp --permanent --zone home`
|
||||
$ sudo firewall-cmd --add-port 51234/tcp --permanent --zone home
|
||||
```
|
||||
|
||||
在路由器的防火墙上设置允许流量和在本机上设置的方式是不同的。你的路由器可能会为它的内嵌防火墙提供一个不同的配置界面(原理上是相同的),不过这就超出本文范围了。
|
||||
|
||||
### 移除端口和服务
|
||||
|
||||
如果你不再需要某项服务或者某个端口了,并且设置的时候没有使用 **\--permanent** 标志的话,那么可以通过重启防火墙来清除修改。
|
||||
如果你不再需要某项服务或者某个端口了,并且设置的时候没有使用 `--permanent` 标志的话,那么可以通过重启防火墙来清除修改。
|
||||
|
||||
如果你已经将修改设置为永久生效了,可以使用 **\--remove-port** 或者 **\--remove-service** 标志来清除:
|
||||
如果你已经将修改设置为永久生效了,可以使用 `--remove-port` 或者 `--remove-service` 标志来清除:
|
||||
|
||||
```
|
||||
`$ sudo firewall-cmd --remove-port 51234/tcp --permanent`
|
||||
$ sudo firewall-cmd --remove-port 51234/tcp --permanent
|
||||
```
|
||||
|
||||
你可以通过在命令中指定一个区域以将端口或者服务从一个非默认区域中移除。
|
||||
|
||||
```
|
||||
`$ sudo firewall-cmd --remove-service murmur --permanent --zone home`
|
||||
$ sudo firewall-cmd --remove-service murmur --permanent --zone home
|
||||
```
|
||||
|
||||
### 自定义区域
|
||||
|
||||
你可以随意使用 firewalld 默认提供的这些区域,不过也完全可以创建自己的区域。比如如果希望有一个针对游戏的特别区域,你可以创建一个,然后只有在玩儿游戏的时候切换到该区域。
|
||||
你可以随意使用 `firewalld` 默认提供的这些区域,不过也完全可以创建自己的区域。比如如果希望有一个针对游戏的特别区域,你可以创建一个,然后只有在玩儿游戏的时候切换到该区域。
|
||||
|
||||
如果想要创建一个新的空白区域,你可以创建一个名为 **game** 的新区域,然后重新加载 firewall 规则,这样你的新区域就启用了:
|
||||
如果想要创建一个新的空白区域,你可以创建一个名为 `game` 的新区域,然后重新加载防火墙规则,这样你的新区域就启用了:
|
||||
|
||||
```
|
||||
$ sudo firewall-cmd --new-zone game --permanent
|
||||
@ -242,7 +240,7 @@ via: https://opensource.com/article/19/7/make-linux-stronger-firewalls
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[chen-ni](https://github.com/chen-ni)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -1,79 +1,76 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-11089-1.html)
|
||||
[#]: subject: (Copy and paste at the Linux command line with xclip)
|
||||
[#]: via: (https://opensource.com/article/19/7/xclip)
|
||||
[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt)
|
||||
|
||||
使用 xclip 在 Linux 命令行中复制粘贴
|
||||
======
|
||||
了解如何在 Linux 中使用 xclip。
|
||||
> 了解如何在 Linux 中使用 xclip。
|
||||
|
||||
![Green paperclips][1]
|
||||
|
||||
在使用 Linux 桌面工作时,你通常如何复制全部或部分文本?你可能会在文本编辑器中打开文件,选择全部或仅选择要复制的文本,然后将其粘贴到其他位置。
|
||||
|
||||
这样没问题。但是你可以使用 [xclip][2] 在命令行中更有效地完成工作。xclip 提供了在终端窗口中运行的命令与 Linux 图形桌面环境中的剪贴板之间的管道。
|
||||
这样没问题。但是你可以使用 [xclip][2] 在命令行中更有效地完成工作。`xclip` 提供了在终端窗口中运行的命令与 Linux 图形桌面环境中的剪贴板之间的管道。
|
||||
|
||||
### 安装 xclip
|
||||
|
||||
xclip 并不是许多 Linux 发行版的标准套件。要查看它是否已安装在你的计算机上,请打开终端窗口并输入 **which xclip**。如果该命令返回像 _/usr/bin/xclip_ 这样的输出,那么你可以开始使用了。否则,你需要安装 xclip。
|
||||
`xclip` 并不是许多 Linux 发行版的标准套件。要查看它是否已安装在你的计算机上,请打开终端窗口并输入 `which xclip`。如果该命令返回像 `/usr/bin/xclip` 这样的输出,那么你可以开始使用了。否则,你需要安装 `xclip`。
|
||||
|
||||
为此,请使用你的发行版的包管理器。如果你喜欢冒险,你可以[从 GitHub 获取源代码][2]并自己编译。
|
||||
|
||||
### 基础使用
|
||||
|
||||
假设你要将文件的内容复制到剪贴板。在 xclip 中可以使用两种方法。输入:
|
||||
|
||||
假设你要将文件的内容复制到剪贴板。在 `xclip` 中可以使用两种方法。输入:
|
||||
|
||||
```
|
||||
`xclip file_name`
|
||||
xclip file_name
|
||||
```
|
||||
|
||||
或者
|
||||
|
||||
|
||||
```
|
||||
`xclip -sel clip file_name`
|
||||
xclip -sel clip file_name
|
||||
```
|
||||
|
||||
两个命令之间有什么区别(除了第二个命令更长)?第一个命令在你如果使用鼠标中键粘贴的情况下有效。但是,不是每个人都这样做。许多人习惯使用右键单击菜单或按 Ctrl+V 粘贴文本。如果你时其中之一(我就是!),使用 **-sel clip** 选项可确保你可以粘贴要粘贴的内容。
|
||||
两个命令之间有什么区别(除了第二个命令更长)?第一个命令在你使用鼠标中键粘贴的情况下有效。但是,不是每个人都这样做。许多人习惯使用右键单击菜单或按 `Ctrl+V` 粘贴文本。如果你时其中之一(我就是!),使用 `-sel clip` 选项可确保你可以粘贴要粘贴的内容。
|
||||
|
||||
### 将 xclip 与其他应用一起使用
|
||||
|
||||
将文件内容直接复制到剪贴板是个巧妙的技巧。很可能你不会经常这样做。还有其他方法可以使用 xclip,其中包括将其与另一个命令行程序结合。
|
||||
将文件内容直接复制到剪贴板是个巧妙的技巧。很可能你不会经常这样做。还有其他方法可以使用 `xclip`,其中包括将其与另一个命令行程序结合。
|
||||
|
||||
结合是用_管道_(|)完成的。管道将一个命令行程序的输出重定向到另一个命令行程序。这样我们就会有更多的可能性,我们来看看其中的三个。
|
||||
结合是用管道(`|`)完成的。管道将一个命令行程序的输出重定向到另一个命令行程序。这样我们就会有更多的可能性,我们来看看其中的三个。
|
||||
|
||||
假设你是系统管理员,你需要将日志文件的最后 30 行复制到 bug 报告中。在文本编辑器中打开文件,向下滚动到最后,复制和粘贴有一点工作量。为什么不使用 xclip 和 [tail][3] 来快速轻松地完成?运行此命令以复制最后 30 行:
|
||||
假设你是系统管理员,你需要将日志文件的最后 30 行复制到 bug 报告中。在文本编辑器中打开文件,向下滚动到最后,复制和粘贴有一点工作量。为什么不使用 `xclip` 和 [tail][3] 来快速轻松地完成?运行此命令以复制最后 30 行:
|
||||
|
||||
|
||||
```
|
||||
`tail -n 30 logfile.log | xclip -sel clip`
|
||||
tail -n 30 logfile.log | xclip -sel clip
|
||||
```
|
||||
|
||||
我的写作有相当一部分用于内容管理系统 (CMS) 或者在其他网络中发布。但是,我从不使用 CMS 的 WYSIWYG 编辑器来编写 - 我离线采用 [Markdown][5] 格式编写[纯文本][4]。也就是说,许多编辑器都有 HTML 模式。通过使用此命令,我可以使用 [Pandoc][6] 将 Markdown 格式的文件转换为 HTML 并将其一次性复制到剪贴板:
|
||||
|
||||
我的写作有相当一部分用于内容管理系统 (CMS) 或者在其他网络中发布。但是,我从不使用 CMS 的 WYSIWYG 编辑器来编写 - 我采用 [Markdown][5] 格式离线编写[纯文本][4]。也就是说,许多编辑器都有 HTML 模式。通过使用此命令,我可以使用 [Pandoc][6] 将 Markdown 格式的文件转换为 HTML 并将其一次性复制到剪贴板:
|
||||
|
||||
```
|
||||
`pandoc -t html file.md | xclip -sel clip`
|
||||
pandoc -t html file.md | xclip -sel clip
|
||||
```
|
||||
|
||||
在其他地方,我粘贴完成。
|
||||
|
||||
我的两个网站使用 [GitLab Pages][7 ]托管。我使用名为 [Certbot][8] 的工具为这些站点生成 HTTPS 证书,每当我更新它时,我需要将每个站点的证书复制到 GitLab。结合 [cat][9] 命令和 xclip 比使用编辑器更快,更有效。例如:
|
||||
在其他地方,粘贴完成。
|
||||
|
||||
我的两个网站使用 [GitLab Pages][7] 托管。我使用名为 [Certbot][8] 的工具为这些站点生成 HTTPS 证书,每当我更新它时,我需要将每个站点的证书复制到 GitLab。结合 [cat][9] 命令和 xclip 比使用编辑器更快,更有效。例如:
|
||||
|
||||
```
|
||||
`cat /etc/letsencrypt/live/website/fullchain.pem | xclip -sel clip`
|
||||
cat /etc/letsencrypt/live/website/fullchain.pem | xclip -sel clip
|
||||
```
|
||||
|
||||
这就是全部可以用 xclip 做的事么?当然不是。我相信你可以找到更多用途来满足你的需求。
|
||||
|
||||
### 最后总结
|
||||
|
||||
不是每个人都会使用 xclip。没关系。然而,它是一个在你需要它时非常方便的一个小工具。而且,正如我几次发现的那样,你不知道什么时候需要它。等到时候,你会很高兴 xclip 在那里。
|
||||
不是每个人都会使用 `xclip`。没关系。然而,它是一个在你需要它时非常方便的一个小工具。而且,正如我几次发现的那样,你不知道什么时候需要它。等到时候,你会很高兴能用上 `xclip`。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -82,7 +79,7 @@ via: https://opensource.com/article/19/7/xclip
|
||||
作者:[Scott Nesbitt][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -1,8 +1,8 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-11095-1.html)
|
||||
[#]: subject: (Manage your shell environment)
|
||||
[#]: via: (https://fedoramagazine.org/manage-your-shell-environment/)
|
||||
[#]: author: (Eduard Lucena https://fedoramagazine.org/author/x3mboy/)
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
![][1]
|
||||
|
||||
段时间,Fedora Magazine 发表了一篇 [ZSH 介绍][2]的文章,它是 Fedora 默认的 bash shell 的替代。这一次,我们将着重定制它来更有效地使用它。本文中显示的所有概念也适用于其他 shell,例如 bash。
|
||||
前段时间,Fedora Magazine 发表了一篇 [介绍 ZSH][2] 的文章,它是 Fedora 默认的 bash shell 的替代品。这一次,我们将着重定制它来更有效地使用它。本文中显示的所有概念也适用于其他 shell,例如 bash。
|
||||
|
||||
### 别名
|
||||
|
||||
@ -24,20 +24,19 @@ $ alias yourAlias='complex command with arguments'
|
||||
|
||||
它们并不总是用来缩短长命令。重要的是,你将它们用于你经常执行的任务。可能的例子:
|
||||
|
||||
|
||||
```
|
||||
$ alias dnfUpgrade='dnf -y upgrade'
|
||||
```
|
||||
|
||||
这样,为了进行系统升级,我只需输入 dnfUpgrade 而不用输入完整的 dnf 命令。
|
||||
这样,为了进行系统升级,我只需输入 `dnfUpgrade` 而不用输入完整的 `dnf` 命令。
|
||||
|
||||
在终端中设置别名的问题是,一旦终端会话关闭,别名就会丢失。要永久设置它们,请使用资源文件。
|
||||
|
||||
### 资源文件
|
||||
|
||||
资源文件(或 rc 文件)是在会话或进程开始时(每个用户在开启新终端窗口或启动 vim 等新程序时)加载的配置文件。对于 ZSH,资源文件是 _.zshrc_,对于 bash,它是 _.bashrc_。
|
||||
资源文件(即 rc 文件)是在会话或进程开始时(每个用户在开启新终端窗口或启动 vim 等新程序时)加载的配置文件。对于 ZSH,资源文件是 `.zshrc`,对于 bash,它是 `.bashrc`。
|
||||
|
||||
要使别名成为永久别名,你可以将它们放入资源中。你可以使用你选择的文本编辑器编辑资源文件。这里使用 vim:
|
||||
要使别名成为永久别名,你可以将它们放入资源文件中。你可以使用你选择的文本编辑器编辑资源文件。这里使用 vim:
|
||||
|
||||
```
|
||||
$ vim $HOME/.zshrc
|
||||
@ -49,7 +48,7 @@ $ vim $HOME/.zshrc
|
||||
$ vim $HOME/.bashrc
|
||||
```
|
||||
|
||||
请注意,资源文件的位置是相对于家目录指定的。这是 ZSH(或 bash)默认为每个用户查找文件的位置。
|
||||
请注意,资源文件的位置是相对于家目录指定的。这是 ZSH(或 bash)默认为每个用户查找该文件的位置。
|
||||
|
||||
还有一种是将你的配置放在任何其他文件中,然后读取它:
|
||||
|
||||
@ -57,11 +56,11 @@ $ vim $HOME/.bashrc
|
||||
$ source /path/to/your/rc/file
|
||||
```
|
||||
|
||||
同样,在会话中直接读取它只会将其应用于会话,因此要使其永久化,请将 source 命令添加到资源文件中。将文件放在不同位置的优点是你可以随时读取它。这在共享环境中很有用。
|
||||
同样,在会话中直接读取它只会将其应用于会话,因此要使其永久化,请将 `source` 命令添加到资源文件中。将文件放在不同位置的优点是你可以随时读取它。这在共享环境中很有用。
|
||||
|
||||
### 环境变量
|
||||
|
||||
环境变量是分配给特定名称的值,你可以在脚本和命令中调用它们。它们以美元符号开始。其中最常见的是引用主目录的 $HOME。
|
||||
环境变量是分配了特定名称的值,你可以在脚本和命令中调用它们。它们以美元符号(`$`)开始。其中最常见的是指向主目录的 `$HOME`。
|
||||
|
||||
顾名思义,环境变量是你环境的一部分。使用以下语法设置变量:
|
||||
|
||||
@ -75,13 +74,13 @@ $ http_proxy="http://your.proxy"
|
||||
$ export $http_proxy
|
||||
```
|
||||
|
||||
要查看当前设置的所有环境变量,请使用 _env_ 命令:
|
||||
要查看当前设置的所有环境变量,请使用 `env` 命令:
|
||||
|
||||
```
|
||||
$ env
|
||||
```
|
||||
|
||||
该命令输出会话中可用的所有变量。要演示如何在命令中使用它们,请尝试运行以下 echo 命令:
|
||||
该命令输出会话中可用的所有变量。要演示如何在命令中使用它们,请尝试运行以下 `echo` 命令:
|
||||
|
||||
```
|
||||
$ echo $PWD
|
||||
@ -92,11 +91,11 @@ fedora
|
||||
|
||||
这里发生了变量扩展,即存储在变量中的值在命令中使用。
|
||||
|
||||
另一个有用的变量是 _$PATH_,它定义了 shell 查找二进制文件的目录。
|
||||
另一个有用的变量是 `$PATH`,它定义了 shell 查找二进制文件的目录。
|
||||
|
||||
### $PATH 变量
|
||||
|
||||
有许多对于操作系统很重要的目录或文件夹(在图形环境中调用它们的方式)。某些目录设置为保存可直接在 shell 中使用的二进制文件。这些目录在 $PATH 变量中定义。
|
||||
有许多对于操作系统很重要的目录或文件夹(在图形环境中调用它们的方式)。某些目录设置为保存可直接在 shell 中使用的二进制文件。这些目录在 `$PATH` 变量中定义。
|
||||
|
||||
```
|
||||
$ echo $PATH
|
||||
@ -112,7 +111,7 @@ via: https://fedoramagazine.org/manage-your-shell-environment/
|
||||
作者:[Eduard Lucena][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -0,0 +1,57 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-11097-1.html)
|
||||
[#]: subject: (From BASIC to Ruby: Life lessons from first programming languages on Command Line Heroes)
|
||||
[#]: via: (https://opensource.com/19/7/command-line-heroes-ruby-basic)
|
||||
[#]: author: (Matthew Broberg https://opensource.com/users/mbbroberg)
|
||||
|
||||
从 BASIC 到 Ruby:入门编程语言的体悟
|
||||
======
|
||||
|
||||
> 为什么 BASIC 是一种备受喜爱的入门语言?下一代该如何学习编程?
|
||||
|
||||
![Listen to the Command Line Heroes Podcast][1]
|
||||
|
||||
《[Command Line Heroes][2]》 第三季的第二集今天抵达了,它对我的入门编程的怀旧让我回到了过去。
|
||||
|
||||
(LCTT 译注:《Command Line Heroes》 是红帽公司制作的播客,讲述了开发人员、程序员、黑客、极客和开源反叛者如何彻底改变技术前景的真实史诗。其第一季制作于 2017 年,邀请到了谷歌、NASA 等重量级企业的技术专家担当嘉宾,讲述操作系统战争风云、美国航天局如何开源等等,涉及开源、操作系统、容器、DevOps、云计算等话题。)
|
||||
|
||||
### 语言会影响可访问性
|
||||
|
||||
这一集告诉我,BASIC 是计算机的理解力民主化的一次巨大飞跃。我很难想象,在一个不太遥远的、计算机尚且是稀罕之物的时代,是 BASIC 改变了世界。正如 [Saron Yitbarek][3] 提到的那样,“在早些年编程,你几乎得有个博士学位才行。”BASIC 是一个巨大的飞跃,它专注于可用性(适合初学者的命令)和资源共享(单个计算机的分时操作)。它使得编程不在局限于当时的“计算机玩家”(我喜欢这集中的这句话),并帮助了新一代人参与了进来。进入编程领域的壁垒得以下降。
|
||||
|
||||
### 入门编程语言
|
||||
|
||||
这一集的核心话题是围绕学习入门语言展开的。关于学习什么编程语言以及如何学习,有很多建议。关于这个问题[在这里][4]已经写了很多。我喜欢听到 Saron 以 Ruby 作为她的介绍的故事,以及它以一种几乎意想不到的方式变得有趣。我有一些类似的经历,因为我在一些项目中用到了 Ruby。它的灵活性让我感到开心。当我(对编程)感到紧张时,正是这种快乐让我重新回到它的身边,并且它有一些能够使语言如此充满情感的强大功能。
|
||||
|
||||
我第一次体验编程是用 HTML 和 CSS,但我第一个重型编程语言是 Java。我永远不会忘记在课堂的第一天被告知要记住 `public static void main`,但没有告知我关于它意味着什么的任何信息。我们花了很多时间在面向对象编程的上下文环境中探讨它是什么,但它从未像我在 Ruby 中使用 `.each` 迭代列表,或者像在 Python 中用 `import numpy` 做一些数学魔术那样感到兴奋。然后我听说孩子们正在学习如何使用 Python 编写 [Minecraft][5] 或使用像 [Scratch][6] 这样的可视化编程语言,我因此而悟,BASIC 的遗产正在以新的方式存在。
|
||||
|
||||
我从这一集中获取到的内容:
|
||||
|
||||
* 请记住,没有人出生就是程序员。每个人都没有这样的背景。你并不孤单。
|
||||
* 学习一门语言。任何一种都行。如果你有选择的可能,那么请选择能带给你最大乐趣的那个。
|
||||
* 不要忘记所有语言都可以构建一些东西。请为人类创造有意义的事物。
|
||||
|
||||
《Command Line Heroes》整个第三季将涉及编程语言。[请在此处订阅来学习你想要了解的有关编程语言的起源][2],我很乐意在下面的评论中听到你的想法。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/19/7/command-line-heroes-ruby-basic
|
||||
|
||||
作者:[Matthew Broberg][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/mbbroberg
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/ep1_blog-header-520x292_lgr.png?itok=I8IS1hkt (Listen to the Command Line Heroes Podcast)
|
||||
[2]: https://www.redhat.com/en/command-line-heroes
|
||||
[3]: https://twitter.com/saronyitbarek
|
||||
[4]: https://linux.cn/article-8379-1.html
|
||||
[5]: https://opensource.com/life/15/5/getting-started-minecraft-pi
|
||||
[6]: https://opensource.com/education/11/6/how-teach-next-generation-open-source-scratch
|
@ -1,23 +1,23 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-11099-1.html)
|
||||
[#]: subject: (How To Find Virtualbox Version From Commandline In Linux)
|
||||
[#]: via: (https://www.ostechnix.com/how-to-find-virtualbox-version-from-commandline-in-linux/)
|
||||
[#]: author: (sk https://www.ostechnix.com/author/sk/)
|
||||
|
||||
在 Linux 中如何从命令行查找 Virtualbox 版本
|
||||
在 Linux 中如何从命令行查找 VirtualBox 版本
|
||||
======
|
||||
|
||||
![FInd Virtualbox version from commandline In Linux][1]
|
||||
|
||||
我使用 **Oracle VirtualBox** 和 [**KVM**][2] 虚拟化程序[**测试不同的 Linux 操作系统**][3]。虽然我偶尔使用 KVM,但 Virtualbox 始终是我的首选。不是因为我不喜欢 KVM,而是因为我只是习惯了 Virtualbox。当在我的 Ubuntu 无头服务器上使用 [**Virtualbox**][4] 时,我需要知道 Virtualbox 的版本。如果它有 GUI,我可以进入**Virtualbox - > About -> Help** 轻松找到它。但我的是没有 GUI 的 Ubuntu 服务器。如果你想知道如何在 Linux 中从命令行查找 Virtualbox 版本,可以采用以下几种方法。
|
||||
我使用 Oracle VirtualBox 和 [KVM][2] 虚拟化程序[测试不同的 Linux 操作系统][3]。虽然我偶尔使用 KVM,但 Virtualbox 始终是我的首选。不是因为我不喜欢 KVM,而是因为我只是习惯了 VirtualBox。当在我的 Ubuntu 无头服务器上使用 [Virtualbox][4] 时,我需要知道 VirtualBox 的版本。如果它有 GUI,我可以进入 Virtualbox -> About -> Help 轻松找到它。但我的是没有 GUI 的 Ubuntu 服务器。如果你想知道如何在 Linux 中从命令行查找 VirtualBox 版本,可以采用以下几种方法。
|
||||
|
||||
|
||||
### 在 Linux 中从命令行查找 Virtualbox 版本
|
||||
### 在 Linux 中从命令行查找 VirtualBox 版本
|
||||
|
||||
要查找已安装的 Virtualbox 的版本,请打开终端并运行以下命令:
|
||||
要查找已安装的 VirtualBox 的版本,请打开终端并运行以下命令:
|
||||
|
||||
```
|
||||
$ vboxmanage --version
|
||||
@ -31,11 +31,11 @@ $ vboxmanage --version
|
||||
|
||||
![][5]
|
||||
|
||||
在 Linux 中从命令行查找 Virtualbox 版本
|
||||
*在 Linux 中从命令行查找 Virtualbox 版本*
|
||||
|
||||
正如你在上面的输出中看到的,安装的 Virtualbox 的版本是 **5.2**。
|
||||
正如你在上面的输出中看到的,安装的 VirtualBox 的版本是 5.2。
|
||||
|
||||
查找 virtualbox 版本的另一种方法是:
|
||||
查找 VirtualBox 版本的另一种方法是:
|
||||
|
||||
```
|
||||
$ vbox-img --version
|
||||
@ -47,7 +47,7 @@ $ vbox-img --version
|
||||
5.2.18_Ubuntur123745
|
||||
```
|
||||
|
||||
或者,你可以使用 **“head”** 和 **“awk”** 命令来查找 Virtualbox 版本。
|
||||
或者,你可以使用 `head` 和 `awk` 命令来查找 VirtualBox 版本。
|
||||
|
||||
```
|
||||
$ virtualbox --help | head -n 1 | awk '{print $NF}'
|
||||
@ -59,7 +59,7 @@ $ virtualbox --help | head -n 1 | awk '{print $NF}'
|
||||
5.2.18_Ubuntu
|
||||
```
|
||||
|
||||
或者,使用 **“echo”** 命令结合 “head” 和 “awk” 命令:
|
||||
或者,使用 `echo` 命令结合 `head` 和 `awk` 命令:
|
||||
|
||||
```
|
||||
$ echo $(virtualbox --help | head -n 1 | awk '{print $NF}')
|
||||
@ -71,7 +71,7 @@ $ echo $(virtualbox --help | head -n 1 | awk '{print $NF}')
|
||||
5.2.18_Ubuntu
|
||||
```
|
||||
|
||||
以上命令适用于任何 Linux 发行版。如果你使用的是 Ubuntu,你可以使用 **“dpkg”** 命令查看 Virtualbox 版本。
|
||||
以上命令适用于任何 Linux 发行版。如果你使用的是 Ubuntu,你可以使用 `dpkg` 命令查看 VirtualBox 版本。
|
||||
|
||||
```
|
||||
$ dpkg -l | grep virtualbox | awk '{print $3}'
|
||||
@ -86,11 +86,9 @@ $ dpkg -l | grep virtualbox | awk '{print $3}'
|
||||
|
||||
就是这些了。这些是从 Linux 中的终端查找 Oracle Virtualbox 版本的几种方法。希望这篇文章很有用。
|
||||
|
||||
**参考来自:**
|
||||
|
||||
* [**AskUbuntu**][6]
|
||||
|
||||
参考来自:
|
||||
|
||||
* [AskUbuntu][6]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -99,7 +97,7 @@ via: https://www.ostechnix.com/how-to-find-virtualbox-version-from-commandline-i
|
||||
作者:[sk][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -1,49 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Donald Trump Now Wants to Ban End-to-End Encryption)
|
||||
[#]: via: (https://news.softpedia.com/news/donald-trump-now-wants-to-ban-end-to-end-encryption-526567.shtml)
|
||||
[#]: author: (Bogdan Popa https://news.softpedia.com/editors/browse/bogdan-popa)
|
||||
|
||||
Donald Trump Now Wants to Ban End-to-End Encryption
|
||||
======
|
||||
|
||||
**After[banning][1] and [unbanning][2] Huawei, United States President Donald Trump is now planning to go after end-to-end encryption, with a new report claiming that senior White House officials met this week to discuss the first step the administration could make in this regard.**
|
||||
|
||||
[Politico][3] notes, citing three people familiar with the matter, that number two officials from several key agencies discussed a potential offensive against end-to-end encryption.
|
||||
|
||||
“The two paths were to either put out a statement or a general position on encryption, and [say] that they would continue to work on a solution, or to ask Congress for legislation,” one source was quoted as saying by the cited publication.
|
||||
|
||||
While the White House administration wants to kill off end-to-end encryption in software developed by American companies, this proposal was received with mixed reactions from representatives of various agencies in the country.
|
||||
|
||||
For example, the DHS “is internally divided,” Politico notes, as the agency is aware of the security implications that banning end-to-end encryption could generate.
|
||||
|
||||
### The encryption dispute
|
||||
|
||||
Pushing for regulations against end-to-end encryption is described as a decisive step in the efforts of intelligence agencies and law enforcement in the United States to access devices and data belonging to criminals and terrorists.
|
||||
|
||||
The encryption, which the majority of American companies have already bundled into their products, including here Apple and Google, blocks investigators from accessing suspects’ data. Tech companies position end-to-end encryption as a key privacy feature, and several of them have warned that any regulation against it could even affect national security.
|
||||
|
||||
Apple, in particular, is one of the biggest companies fighting against anti-encryption regulation. The company [**refused to unlock an iPhone used by the San Bernardino terrorist**][4], explaining that breaking into the device would have compromised the security of all customers.
|
||||
|
||||
The FBI eventually unlocked the device using software developed by a third-party.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.softpedia.com/news/donald-trump-now-wants-to-ban-end-to-end-encryption-526567.shtml
|
||||
|
||||
作者:[Bogdan Popa;Jun][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.softpedia.com/editors/browse/bogdan-popa
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://news.softpedia.com/news/google-bans-huawei-from-using-android-google-play-gmail-other-services-526083.shtml
|
||||
[2]: https://news.softpedia.com/news/breaking-donald-trump-says-huawei-can-buy-american-products-again-526564.shtml
|
||||
[3]: https://www.politico.com/story/2019/06/27/trump-officials-weigh-encryption-crackdown-1385306
|
||||
[4]: https://news.softpedia.com/news/judge-orders-apple-to-help-the-fbi-hack-san-bernardino-shooter-s-iphone-500517.shtml
|
@ -0,0 +1,81 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Excellent! Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates [No PPA Needed Anymore])
|
||||
[#]: via: (https://itsfoss.com/ubuntu-lts-latest-nvidia-drivers/)
|
||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||
|
||||
Excellent! Ubuntu LTS Users Will Now Get the Latest Nvidia Driver Updates [No PPA Needed Anymore]
|
||||
======
|
||||
|
||||
_**Brief: To get the latest Nvidia drivers in Ubuntu LTS versions, you don’t have to use PPA anymore. The latest drivers will now be available in the repositories of the Ubuntu LTS versions.**_
|
||||
|
||||
![][1]
|
||||
|
||||
You might be aware of the troubles to install the latest and greatest Nvidia binary driver updates on Ubuntu.
|
||||
|
||||
By default, Ubuntu provides the open source [Nvidia Nouveau drivers][2] that some time result in Ubuntu being stuck at boot screen.
|
||||
|
||||
You can also [install the proprietary Nvidia driver in Ubuntu][3] easily. The problem is that the Nvidia drivers in the default [Ubuntu repositories][4] are not the latest one. To solve this problem, [Ubuntu introduced a dedicated PPA][5] a few years back.
|
||||
|
||||
[Using the official PPA][6] is still a decent workaround for installing the closed source graphics driver. However, it is definitely not the most convenient option.
|
||||
|
||||
But, now, Ubuntu agreed to include the latest Nvidia driver update as part of the SRU ([StableReleaseUpdates][7]). So, you will have Nvidia drivers baked in with Ubuntu LTS versions.
|
||||
|
||||
Well, this means that you no longer have to separately download/install the Nvidia graphics drivers on Ubuntu LTS versions.
|
||||
|
||||
Just like you get an update for your browser or the core OS updates (or the security updates), similarly, you will get the required Nvidia binary driver update packages.
|
||||
|
||||
### Can We Rely on the Latest Nvidia Graphics Driver?
|
||||
|
||||
SRU literally refers to stable updates for Ubuntu (or Ubuntu-based distros). So, instead of opting for the pre-released updates in order to get the latest graphics driver, you should wait for it to drop as a stable update.
|
||||
|
||||
Of course, no one can guarantee that it will work 100% of the time – but it will be way more safe to install than the pre-released ones.
|
||||
|
||||
### How Can I Get the latest Nvidia drivers?
|
||||
|
||||
![Software Updates Nvidia][8]
|
||||
|
||||
You just have to enable “Using NVIDIA driver meta package….” from the additional drivers section in the software update option.
|
||||
|
||||
[][9]
|
||||
|
||||
Suggested read Ubuntu 17.04 Release Date, Features And Upgrade Procedure
|
||||
|
||||
Originally, [The Linux Experiment][10] shared this news through a video – which then Ubuntu’s official Twitter handle re-tweeted as an announcement. You can watch the video below to get more details on it:
|
||||
|
||||
### Which Ubuntu LTS Versions are Supported?
|
||||
|
||||
For now, Ubuntu 18.04 LTS supports this out of the box. It will soon be available for Ubuntu 16.04 LTS (and later LTS versions will follow).
|
||||
|
||||
**Wrapping Up**
|
||||
|
||||
Now that you can install the latest Nvidia binary driver updates, how do you think will it help you?
|
||||
|
||||
If you have tested a pre-released package, let us know your thoughts on that in the comments below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/ubuntu-lts-latest-nvidia-drivers/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/nvidia-ubuntu-logo.png?resize=800%2C450&ssl=1
|
||||
[2]: https://nouveau.freedesktop.org/wiki/
|
||||
[3]: https://itsfoss.com/install-additional-drivers-ubuntu/
|
||||
[4]: https://itsfoss.com/ubuntu-repositories/
|
||||
[5]: https://itsfoss.com/ubuntu-official-ppa-graphics/
|
||||
[6]: https://itsfoss.com/ppa-guide/
|
||||
[7]: https://wiki.ubuntu.com/StableReleaseUpdates
|
||||
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/software-updates-nvidia.jpg?fit=800%2C542&ssl=1
|
||||
[9]: https://itsfoss.com/ubuntu-17-04-release-features/
|
||||
[10]: https://twitter.com/thelinuxEXP
|
@ -1,69 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (WangYueScream )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Introducing kids to computational thinking with Python)
|
||||
[#]: via: (https://opensource.com/article/19/2/break-down-stereotypes-python)
|
||||
[#]: author: (Don Watkins https://opensource.com/users/don-watkins)
|
||||
|
||||
Introducing kids to computational thinking with Python
|
||||
======
|
||||
Coding program gives low-income students the skills, confidence, and knowledge to break free from economic and societal disadvantages.
|
||||
|
||||

|
||||
|
||||
When the [Parkman Branch][1] of the Detroit Public Library was flooded with bored children taking up all the computers during summer break, the library saw it not as a problem, rather an opportunity. They started a coding club, the [Parkman Coders][2], led by [Qumisha Goss][3], a librarian who is leveraging the power of Python to introduce disadvantaged children to computational thinking.
|
||||
|
||||
When she started the Parkman Coders program about four years ago, "Q" (as she is known) didn't know much about coding. Since then, she's become a specialist in library instruction and technology and a certified Raspberry Pi instructor.
|
||||
|
||||
The program began by using [Scratch][4], but the students got bored with the block coding interface, which they regarded as "baby stuff." She says, "I knew we need to make a change to something that was still beginner friendly, but that would be more challenging for them to continue to hold their attention." At this point, she started teaching them Python.
|
||||
|
||||
Q first saw Python while playing a game with dungeons and skeleton monsters on [Code.org][5]. She began to learn Python by reading books like [Python Programming: An Introduction to Computer Science][6] and [Python for Kids][7]. She also recommends [Automate the Boring Stuff with Python][8] and [Lauren Ipsum: A Story about Computer Science and Other Improbable Things][9].
|
||||
|
||||
### Setting up a Raspberry Pi makerspace
|
||||
|
||||
Q decided to use [Raspberry Pi][10] computers to avoid the possibility that the students might be able to hack into the library system's computers, which weren't arranged in a way conducive to a makerspace anyway. The Pi's affordability, plus its flexibility and the included free software, lent more credibility to her decision.
|
||||
|
||||
While the coder program was the library's effort keep the peace and create a learning space that would engage the children, it quickly grew so popular that it ran out of space, computers, and adequate electrical outlets in a building built in 1921. They started with 10 Raspberry Pi computers shared among 20 children, but the library obtained funding from individuals, companies including Microsoft, the 4H, and the Detroit Public Library Foundation to get more equipment and expand the program.
|
||||
|
||||
Currently, about 40 children participate in each session and they have enough Raspberry Pi's for one device per child and some to give away. Many of the Parkman Coders come from low socio-economic backgrounds and don't have a computer at home, so the library provides them with donated Chromebooks.
|
||||
|
||||
Q says, "when kids demonstrate that they have a good understanding of how to use a Raspberry Pi or a [Microbit][11] and have been coming to programs regularly, we give them equipment to take home with them. This process is very challenging, however, because [they may not] have internet access at home [or] all the peripheral things they need like monitors, keyboards, and mice."
|
||||
|
||||
### Learning life skills and breaking stereotypes with Python
|
||||
|
||||
Q says, "I believe that the mainstays of learning computer science are learning critical thinking and problem-solving skills. My hope is that these lessons will stay with the kids as they grow and pursue futures in whatever field they choose. In addition, I'm hoping to inspire some pride in creatorship. It's a very powerful feeling to know 'I made this thing,' and once they've had these successes early, I hope they will approach new challenges with zeal."
|
||||
|
||||
She also says, "in learning to program, you have to learn to be hyper-vigilant about spelling and capitalization, and for some of our kids, reading is an issue. To make sure that the program is inclusive, we spell aloud during our lessons, and we encourage kids to speak up if they don't know a word or can't spell it correctly."
|
||||
|
||||
Q also tries to give extra attention to children who need it. She says, "if I recognize that someone has a more severe problem, we try to get them paired with a tutor at our library outside of program time, but still allow them to come to the program. We want to help them without discouraging them from participating."
|
||||
|
||||
Most importantly, the Parkman Coders program seeks to help every child realize that each has a unique skill set and abilities. Most of the children are African-American and half are girls. Q says, "we live in a world where we grow up with societal stigmas that frequently limit our own belief of what we can accomplish." She believes that children need a nonjudgmental space where "they can try new things, mess up, and discover."
|
||||
|
||||
The environment Q and the Parkman Coders program creates helps the participants break away from economic and societal disadvantages. She says that the secret sauce is to "make sure you have a welcoming space so anyone can come and that your space is forgiving and understanding. Let people come as they are, and be prepared to teach and to learn; when people feel comfortable and engaged, they want to stay."
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/2/break-down-stereotypes-python
|
||||
|
||||
作者:[Don Watkins][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/don-watkins
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://detroitpubliclibrary.org/locations/parkman
|
||||
[2]: https://www.dplfound.org/single-post/2016/05/15/Parkman-Branch-Coders
|
||||
[3]: https://www.linkedin.com/in/qumisha-goss-b3bb5470
|
||||
[4]: https://scratch.mit.edu/
|
||||
[5]: http://Code.org
|
||||
[6]: https://www.amazon.com/Python-Programming-Introduction-Computer-Science/dp/1887902996
|
||||
[7]: https://nostarch.com/pythonforkids
|
||||
[8]: https://automatetheboringstuff.com/
|
||||
[9]: https://nostarch.com/laurenipsum
|
||||
[10]: https://www.raspberrypi.org/
|
||||
[11]: https://microbit.org/guide/
|
@ -0,0 +1,79 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Smarter IoT concepts reveal creaking networks)
|
||||
[#]: via: (https://www.networkworld.com/article/3407852/smarter-iot-concepts-reveal-creaking-networks.html)
|
||||
[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/)
|
||||
|
||||
Smarter IoT concepts reveal creaking networks
|
||||
======
|
||||
Today’s networks don’t meet the needs of emergent internet of things systems. IoT systems need their own modern infrastructure, researchers at the University of Magdeburg say.
|
||||
![Thinkstock][1]
|
||||
|
||||
The internet of things (IoT) needs its own infrastructure ecosystem — one that doesn't use external clouds at all, researchers at the University of Magdeburg say.
|
||||
|
||||
The computer scientists recently obtained funding from the German government to study how to build a future-generation of revolutionary, emergent IoT systems. They say networks must be fault tolerant, secure, and traverse disparate protocols, which they aren't now.
|
||||
|
||||
**[ Read also: [What is edge computing?][2] and [How edge networking and IoT will reshape data centers][3] ]**
|
||||
|
||||
The researchers say a smarter, unique, and organic infrastructure needs to be developed for the IoT and that simply adapting the IoT to traditional networks won't work. They say services must self-organize and function autonomously and that people must accept the fact that we are using the internet in ways never originally intended.
|
||||
|
||||
"The internet, as we know it, is based on network architectures of the 70s and 80s, when it was designed for completely different applications,” the researchers say in their [media release][4]. The internet has centralized security, which causes choke points, and and an inherent lack of dynamic controls, which translates to inflexibility in access rights — all of which make it difficult to adapt the IoT to it.
|
||||
|
||||
Device, data, and process management must be integrated into IoT systems, say the group behind the project, called [DoRIoT][5] (Dynamische Laufzeitumgebung für Organisch (dis-)Aggregierende IoT-Prozesse), translated as Dynamic Runtime Environment for Organic dis-Aggregating IoT Processes.
|
||||
|
||||
“In order to close this gap, concepts [will be] developed in the project that transparently realize the access to the data,” says Professor Sebastian Zug of the University of Freiberg, a partner in DoRIoT. “For the application, it should make no difference whether the specific information requirement is answered by a server or an IoT node.”
|
||||
|
||||
### Extreme edge computing
|
||||
|
||||
In other words, servers and nodes, conceptually, should merge. One could argue it’s a form of extreme [edge computing][6], which is when processing and data storage is taken out of traditional, centralized data center environments and placed close to where the resources are required. It reduces latency, among other advantages.
|
||||
|
||||
DoRIoT may take edge computing one step further. Detecting failures ahead of time and seamless migration of devices are wants, too — services can’t fail just because a new kind of device is introduced.
|
||||
|
||||
“The systems [will] benefit from each other, for example, they can share computing power, data and so on,” says Mesut Güneş of Magdeburg’s [Faculty of Computer Science Institute for Intelligent Cooperating Systems][7].
|
||||
|
||||
“The result is an enormous data pool,” the researchers explain. “Which, in turn, makes it possible to make much more precise statements, for example when predicting climate models, observing traffic flows, or managing large factories in Industry 4.0.”
|
||||
|
||||
[Industry 4.0][8] refers to smart factories that have connected machines autonomously self-managing their own supply chain, production output, and logistics without human intervention.
|
||||
|
||||
Managing risks better than the current internet is one of DoRIoT's goals. The idea is to “guarantee full sovereignty over proprietary data.” To get there, though, one has to eliminate dependency on the cloud and access to data via third parties, they say.
|
||||
|
||||
“This allows companies to be independent of the server infrastructures of external service providers such as Google, Microsoft or Amazon, which are subject to constant changes and even may not be accessible,” they say.
|
||||
|
||||
**More about edge networking**
|
||||
|
||||
* [How edge networking and IoT will reshape data centers][3]
|
||||
* [Edge computing best practices][9]
|
||||
* [How edge computing can help secure the IoT][10]
|
||||
|
||||
|
||||
|
||||
Join the Network World communities on [Facebook][11] and [LinkedIn][12] to comment on topics that are top of mind.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.networkworld.com/article/3407852/smarter-iot-concepts-reveal-creaking-networks.html
|
||||
|
||||
作者:[Patrick Nelson][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.networkworld.com/author/Patrick-Nelson/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://images.idgesg.net/images/article/2018/02/industry_4-0_industrial_iot_internet_of_things_network_thinkstock_613880008-100749946-large.jpg
|
||||
[2]: https://www.networkworld.com/article/3224893/internet-of-things/what-is-edge-computing-and-how-it-s-changing-the-network.html
|
||||
[3]: https://www.networkworld.com/article/3291790/data-center/how-edge-networking-and-iot-will-reshape-data-centers.html
|
||||
[4]: http://www.ovgu.de/en/University/In+Profile/Key+Profile+Areas/Research/Secure+data+protection+in+the+new+internet+of+things.html
|
||||
[5]: http://www.doriot.net/
|
||||
[6]: https://www.networkworld.com/article/3224893/what-is-edge-computing-and-how-it-s-changing-the-network.html
|
||||
[7]: http://iks.cs.ovgu.de/iks/en/ICS.html
|
||||
[8]: https://www.networkworld.com/article/3199671/what-is-industry-4-0.html
|
||||
[9]: https://www.networkworld.com/article/3331978/lan-wan/edge-computing-best-practices.html
|
||||
[10]: https://www.networkworld.com/article/3331905/internet-of-things/how-edge-computing-can-help-secure-the-iot.html
|
||||
[11]: https://www.facebook.com/NetworkWorld/
|
||||
[12]: https://www.linkedin.com/company/network-world
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (MjSeven)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
@ -122,7 +122,7 @@ via: https://fedoramagazine.org/command-line-quick-tips-permissions/
|
||||
|
||||
作者:[Paul W. Frields][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
译者:[MjSeven](https://github.com/MjSeven)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -1,56 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (From BASIC to Ruby: Life lessons from first programming languages on Command Line Heroes)
|
||||
[#]: via: (https://opensource.com/19/7/command-line-heroes-ruby-basic)
|
||||
[#]: author: (Matthew Broberg https://opensource.com/users/mbbroberg)
|
||||
|
||||
From BASIC to Ruby: Life lessons from first programming languages on Command Line Heroes
|
||||
======
|
||||
Find out more about why BASIC is a beloved first language and how the
|
||||
next generation will learn to code.
|
||||
![Listen to the Command Line Heroes Podcast][1]
|
||||
|
||||
The second episode of this [Command Line Heroes][2] season 3 drops today and it sent me back through a nostalgic look at the idea of first programming languages.
|
||||
|
||||
### Languages affect accessibility
|
||||
|
||||
This episode taught me that BASIC was a huge leap in the democratization of computer comprehension. It's hard for me to imagine a time when computers were scarce, but that not-so-distant past was when BASIC changed the world. As [Saron Yitbarek][3] mentions, "In the early days of programming, you pretty much needed a Ph.D. to do anything." BASIC was such a monumental leap with its focus on usability (beginner-friendly commands) and resource sharing (timesharing of a single computer). It helped programming get beyond the "computer jocks" of the time (I love that phrase from the episode) and helped a new generation of people participate. The barrier of entry dropped.
|
||||
|
||||
### First programming languages
|
||||
|
||||
The heart of this episode rests on the topic of learning the first language. There is so much advice out there about what to learn and how to learn it. Quite a lot has been written on the subject [on here][4]. I love hearing Saron's story of Ruby being her introduction, and how it was fun in an almost unexpected way. I had a similar experience as I dug into Ruby for a few projects. It's wildly flexible in a way that makes me happy. It's that happiness that keeps me coming back to it when I'm in a pinch, and there's something powerful about how languages can be so emotionally charged.
|
||||
|
||||
I first experienced programming with HTML and CSS, but the first heavy-duty language was Java. I will never forget being told on day one of class to memorize **public static void main** without any context on what it meant. We took a good bit of that semester to explore what it in the context of object-oriented programming, but it never made me feel as excited as when I iterate over a list using **.each** in Ruby or **import numpy** and do some mathematical magic in Python. Then I hear about how kids are learning to program with Python for [Minecraft][5] or visual programming languages like [Scratch][6] and I am inspired. The legacy of BASIC lives on in new ways.
|
||||
|
||||
Which leads to my takeaways from this episode:
|
||||
|
||||
* Remember that no one is born a programmer. Everyone starts with no background. You're not alone there.
|
||||
* Learn a language. Any of them. Choose the one that brings you the most joy if you have the luxury of choosing.
|
||||
* Don't forget that all languages are there to build something. Create meaningful things for humans.
|
||||
|
||||
|
||||
|
||||
Command Line Heroes will cover programming languages for all of season 3. [Subscribe here to learn everything you want to know about the origin of programming languages][2], and I would love to hear your thoughts in the comments below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/19/7/command-line-heroes-ruby-basic
|
||||
|
||||
作者:[Matthew Broberg][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/mbbroberg
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/ep1_blog-header-520x292_lgr.png?itok=I8IS1hkt (Listen to the Command Line Heroes Podcast)
|
||||
[2]: https://www.redhat.com/en/command-line-heroes
|
||||
[3]: https://twitter.com/saronyitbarek
|
||||
[4]: /article/17/1/choosing-your-first-programming-language
|
||||
[5]: /life/15/5/getting-started-minecraft-pi
|
||||
[6]: /education/11/6/how-teach-next-generation-open-source-scratch
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (robsean)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (0x996 is translating)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
73
sources/tech/20190711 DevOps for introverted people.md
Normal file
73
sources/tech/20190711 DevOps for introverted people.md
Normal file
@ -0,0 +1,73 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (DevOps for introverted people)
|
||||
[#]: via: (https://opensource.com/article/19/7/devops-introverted-people)
|
||||
[#]: author: (Matthew Broberg https://opensource.com/users/mbbroberg/users/don-watkins/users/shawnhcorey/users/mbbroberg/users/marcobravo)
|
||||
|
||||
DevOps for introverted people
|
||||
======
|
||||
We asked the Opensource.com DevOps team to talk about their experience
|
||||
as DevOps introverts and to give DevOps extroverts some advice. Here are
|
||||
their answers.
|
||||
![Q and A letters][1]
|
||||
|
||||
We asked members of our [DevOps team][2] to talk about their experience as introverts and to give extroverts some advice. Before we get into their responses, though, let’s first define the term.
|
||||
|
||||
### What does being introverted mean?
|
||||
|
||||
Being an introvert is commonly defined as someone who finds it more energy depleting, as opposed to energizing, to be around people. It can be a helpful term when we think about how we recharge: introverted people may require more alone time to recharge, especially after spending a lot of time around groups of people. A big myth about introverts is that they are necessarily shy, but [science suggests][3] that is a separate personality trait.
|
||||
|
||||
Introversion and extraversion were popularized by the [Myers Briggs Type Indicators][4] and are now more commonly referred to as two ends of the same [spectrum][5]. Even though it may seem that there are more extroverted people in the world than introverts, psychologists tend to believe that a majority of us fall along the spectrum closer to [ambiverts or introverts][6].
|
||||
|
||||
Now, on to the questions and answers.
|
||||
|
||||
### What are some techniques DevOps leaders can use to make sure introverts feel like part of the team and increase their willingness to share ideas?
|
||||
|
||||
"Everyone is a little different, so it’s important to be observant. Someone from GitLab once told me their philosophy is that if you aren’t offering your opinion, then they’re being exclusionary. If someone isn’t offering an opinion in a meeting, then find ways to include them. **When I know an introvert is interested in a topic we’re meeting about, I’ll ask in advance for written input. A lot of meetings can be avoided by moving the discussion to slack or GitLab where introverts are more willing to engage.** In stand-up, everyone gives an update, and introverts seem to do fine in this context. So we sometimes do the same thing in other meetings just to make sure everyone has time to speak. I also encourage introverts to speak in front of small groups either at work or in the community in order to build those skills." —Dan Barker
|
||||
|
||||
"**I think the best thing that anyone ever did for me was to make sure I had the skills necessary to answer the big questions when they came.** As a very young enlisted Air Force member I was giving status briefings to my units’ senior leadership. That required that I have a number of data points available at any given moment as well as the why behind any delays or deviations on the way towards established objectives. That propelled me from a behind the scenes person into being willing to share my opinion and thoughts with others." —Chris Short
|
||||
|
||||
"**Lead through culture. Design and try out a ritual for your co-workers.** You can design a smaller weekly ritual for groups or teams or a bigger yearly event for your department or organization. The point is to try something and observe your leadership role in it. Identify gaps or tensions in your culture. Look back at the beliefs and behaviors of teams. Where do you observe tension? What’s missing from your culture? Start with a simple statement 'I see a tension between X and Y'. Or 'My team is missing Z'. Next, flip the gap or tension into a question: write down 3 'How might we’s (HMWs)'." —Catherine Louis
|
||||
|
||||
"Introverts are not a different class of people, they are either people who think or wait too much before they share their mind or people who have no idea what's going on. I was one among the first category, I thought too much and sometimes worried about what if my opinion is laughed upon or not entertained or thought otherwise. It was hard coming up of that kind of mindset but it was also eating my chances of learning better things. Once, we were discussing in the team about an implementation issue. My then manager asked me one on one, why I am not participating as I am one of the more experienced people on the team, and I opened up (after I gathered all the power in the universe to say something) saying everything I wanted to say was already shared. He suggested 'I could use a repetition sometimes, as there are many things going on, it would be helpful if you just repeat your thought even if it is discussed'. Well, that was not a very persuasive way but that gave me a bit of confidence that someone at-least wants to hear me.
|
||||
|
||||
"Now, the way I used to make people speak in my team, is **I often ask the introvert person for help, even if I know the resolution, and appreciate them in team meetings and discussions to boost up their confidence encouraging them to share more knowledge with the team, by slowly giving them time to come out of their reserved nature**. They may still remain a bit isolated in the outer world but within a team, some emerge a player we can count on." —Abhishek Tamrakar
|
||||
|
||||
"My advice to introverts when participating in conferences is to find friends/colleagues who are also attending so you have people to talk to comfortably, reach out prior to the event to schedule some smaller meetings/meals with other attendees (friends, industry contacts, former colleagues, etc.), **be mindful of your exhaustion level and take care of yourself**: skip the social/evening events if you need to recharge, write about your experience in a post-event retrospective." —Elizabeth Joseph
|
||||
|
||||
### What are some tips for increasing productivity when working with a teammate who tends to be more of an introvert?
|
||||
|
||||
"Productivity is increasingly challenging to really qualify. In many cases, a break from work or a casual conversation can be the spark needed in our creative endeavors. Again, I find slack and GitLab to be very helpful mediums for exchanging ideas and interacting with others when you have introverts on your team. **I also find pair programming to be very useful for most introverts as one on one interactions aren’t usually as taxing but the product quality and efficiency gains are substantial.** However, when an introvert is working alone, everyone on the team should be discouraged from interrupting them. It’s best to send them an email or some non-intrusive medium." —Dan Barker
|
||||
|
||||
"Give them great tools for doing and documenting their work. **Enable them to be the best they can be at their job.** Check in with them frequently enough to make sure they’re on the right track but also be mindful it’s a bigger distraction to them than it is more extroverted people." —Chris Short
|
||||
|
||||
"**Don’t interrupt me when I am heads down.** Really, don’t. It could take me 2 hours minimally to get my brain back to where I was when I was knee deep in something. It feels painful. Really. Instead, email me and ask me to come to a place where there is a whiteboard. Share the problem from the customer's point of view—draw it—not from your point of view. I may have dozens of customer issues niggling in the back of my brain. If your issues sound like 'make me look good to my upper management', it will get less attention from me than the true customer's issues I already have. Draw a picture. Give me time to think. Make sure there is more than one marker in case I am ready to share. Be prepared that your hypothesis about the problem is completely wrong." —Catherine Louis
|
||||
|
||||
"Appreciation and encouragement is the way out, appreciation may not be an appraisal, but an appreciation that encourages people to feel comfortable in presence of more than one living entities, **so that everyone feels heard and not laughed or underrated**." —Abhishek Tamrakar
|
||||
|
||||
### Final thoughts
|
||||
|
||||
The biggest takeaway from our conversations on introverted DevOps enthusiasts is one of equity: Treat people as they need to be treated, and ask people to treat you as you want to be treated. Whether you are extroverted or introverted, we all need to respect the fact that we do not all experience the world in the same way. Our colleagues deserve the space they need to get the work done, and knowing how to support them starts with a discussion on their needs. Our differences are what make our communities so special and it makes our work more useful for more people. The most effective way to communicate with others is to communicate in a style that works well for both of you.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/7/devops-introverted-people
|
||||
|
||||
作者:[Matthew Broberg][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/mbbroberg/users/don-watkins/users/shawnhcorey/users/mbbroberg/users/marcobravo
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_QandAorange_520x292_0311LL.png?itok=qa3hHSou (Q and A letters)
|
||||
[2]: https://opensource.com/devops-team
|
||||
[3]: https://www.inc.com/melanie-curtin/are-you-shy-or-introverted-science-says-this-is-1-primary-difference.html
|
||||
[4]: https://www.myersbriggs.org/my-mbti-personality-type/mbti-basics/extraversion-or-introversion.htm?bhcp=1
|
||||
[5]: https://lifehacker.com/lets-quit-it-with-the-introvert-extrovert-nonsense-1713772952
|
||||
[6]: https://www.psychologytoday.com/us/blog/the-gen-y-guide/201710/the-majority-people-are-not-introverts-or-extroverts
|
154
sources/tech/20190711 How to install Elasticsearch on MacOS.md
Normal file
154
sources/tech/20190711 How to install Elasticsearch on MacOS.md
Normal file
@ -0,0 +1,154 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to install Elasticsearch on MacOS)
|
||||
[#]: via: (https://opensource.com/article/19/7/installing-elasticsearch-macos)
|
||||
[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo/users/don-watkins)
|
||||
|
||||
How to install Elasticsearch on MacOS
|
||||
======
|
||||
Installing Elasticsearch is complex! Here's how to do it on a Mac.
|
||||
![magnifying glass on computer screen][1]
|
||||
|
||||
[Elasticsearch][2] is an open source, full-text search engine developed in Java. Users upload datasets as JSON files. Then, Elasticsearch stores the original document before adding a searchable reference to the document in the cluster’s index.
|
||||
|
||||
Less than nine years after its creation, Elasticsearch is the most popular enterprise search engine. Elastic released its latest update—version 7.2.0 —on June 25, 2019.
|
||||
|
||||
[Kibana][3] is an open source data visualizer for Elasticsearch. This tool helps users create visualizations on top of content indexed in an Elasticsearch cluster.
|
||||
|
||||
[Sunbursts][4], [geospatial data maps][5], [relationship analyses][6], and dashboards with live data are just a few options. And thanks to Elasticsearch’s machine learning prowess, you can learn which properties might influence your data (like servers or IP addresses) and find abnormal patterns.
|
||||
|
||||
At [DevFest DC][7] last month, [Dr. Summer Rankin][8]—lead data scientist at Booz Allen Hamilton—uploaded a dataset of content from TED Talks to Elasticsearch, then used Kibana to quickly build a dashboard. Intrigued, I went to an Elasticsearch meetup days later.
|
||||
|
||||
Since this course was for newbies, we started at Square One: Installing Elastic and Kibana on our laptops. Without both packages installed, we couldn’t create our own visualizations from the dataset of Shakespeare texts we were using as a dummy JSON file.
|
||||
|
||||
Next, I will share step-by-step instructions for downloading, installing, and running Elasticsearch Version 7.1.1 on MacOS. This was the latest version when I attended the Elasticsearch meetup in mid-June 2019.
|
||||
|
||||
### Downloading Elasticsearch for MacOS
|
||||
|
||||
1. Go to <https://www.elastic.co/downloads/elasticsearch>, which takes you to the webpage below:
|
||||
|
||||
|
||||
|
||||
![The Elasticsearch download page.][9]
|
||||
|
||||
2. In the **Downloads** section, click **MacOS**, which downloads the Elasticsearch TAR file (for example, **elasticsearch-7.1.1-darwin-x86_64.tar**) into your **Downloads** folder.
|
||||
3. Double-click this file to unpack it into its own folder (for example, **elasticsearch-7.1.1**), which contains all of the files that were in the TAR.
|
||||
|
||||
|
||||
|
||||
**Tip**: If you want Elasticsearch to live in another folder, now is the time to move this folder.
|
||||
|
||||
### Running Elasticsearch from the MacOS command line
|
||||
|
||||
You can run Elasticsearch only using the command line if you prefer. Just follow this process:
|
||||
|
||||
1. [Open a **Terminal** window][10].
|
||||
2. In the terminal window, enter your Elasticsearch folder. For example (if you moved the program, change **Downloads** to the correct path):
|
||||
|
||||
|
||||
|
||||
**$ cd ~Downloads/elasticsearch-1.1.0**
|
||||
|
||||
3. Change to the Elasticsearch **bin** subfolder, and start the program. For example:
|
||||
|
||||
|
||||
|
||||
**$ cd bin $ ./elasticsearch**
|
||||
|
||||
Here’s some of the output that my command line terminal displayed when I launched Elasticsearch 1.1.0:
|
||||
|
||||
![Terminal output when running Elasticsearch.][11]
|
||||
|
||||
**NOTE**: Elasticsearch runs in the foreground by default, which can cause your computer to slow down. Press **Ctrl-C to** stop Elasticsearch from running.
|
||||
|
||||
### Running Elasticsearch using the GUI
|
||||
|
||||
If you prefer your point-and-click environment, you can run Elasticsearch like so:
|
||||
|
||||
1. Open a new **Finder** window.
|
||||
2. Select **Downloads** in the left Finder sidebar (or, if you moved Elasticsearch to another folder, navigate to there).
|
||||
3. Open the folder called (for the sake of this example) **elasticsearch-7.1.1**. A selection of eight subfolders appears.
|
||||
|
||||
|
||||
|
||||
![The elasticsearch/bin menu.][12]
|
||||
|
||||
4. Open the **bin** subfolder. As the screenshot above shows, this subfolder yields 20 assets.
|
||||
5. Click the first option, which is **elasticsearch**.
|
||||
|
||||
|
||||
|
||||
Note that you may get a security warning, as shown below:
|
||||
|
||||
![The security warning dialog box.][13]
|
||||
|
||||
|
||||
|
||||
In order to open the program in this case:
|
||||
|
||||
1. Click **OK** in the warning dialog box.
|
||||
2. Open **System Preferences**.
|
||||
3. Click **Security & Privacy**, which opens the window shown below:
|
||||
|
||||
|
||||
|
||||
![Where you can allow your computer to open the downloaded file.][14]
|
||||
|
||||
4. Click **Open Anyway**, which opens the confirmation dialog box shown below:
|
||||
|
||||
|
||||
|
||||
![Security confirmation dialog box.][15]
|
||||
|
||||
5. Click **Open**. A terminal window opens and launches Elasticsearch.
|
||||
|
||||
|
||||
|
||||
The launch process can take a while, so let it run. Eventually, it will finish, and you will see output similar to this at the end:
|
||||
|
||||
![Launching Elasticsearch in MacOS.][16]
|
||||
|
||||
### Learning more
|
||||
|
||||
Once you’ve installed Elasticsearch, it’s time to start exploring!
|
||||
|
||||
The tool’s [Elasticsearch: Getting Started][17] guide directs you based on your goals. Its introductory video walks through steps to launch a hosted cluster on [Elasticsearch Service][18], perform basic search queries, play with data through create, read, update, and delete (CRUD) REST APIs, and more.
|
||||
|
||||
This guide also offers links to documentation, dev console commands, training subscriptions, and a free trial of Elasticsearch Service. This trial lets you deploy Elastic and Kibana on AWS and GCP to support your Elastic clusters in the cloud.
|
||||
|
||||
In the follow-up to this article, we’ll walk through the steps you’ll take to install Kibana on MacOS. This process will take your Elasticsearch queries to the next level via diverse data visualizations. Stay tuned!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/7/installing-elasticsearch-macos
|
||||
|
||||
作者:[Lauren Maffeo][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/lmaffeo/users/don-watkins
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/search_find_code_issue_bug_programming.png?itok=XPrh7fa0 (magnifying glass on computer screen)
|
||||
[2]: https://www.getapp.com/it-management-software/a/qbox-dot-io-hosted-elasticsearch/
|
||||
[3]: https://www.elastic.co/products/kibana
|
||||
[4]: https://en.wikipedia.org/wiki/Pie_chart#Ring
|
||||
[5]: https://en.wikipedia.org/wiki/Spatial_analysis
|
||||
[6]: https://en.wikipedia.org/wiki/Correlation_and_dependence
|
||||
[7]: https://www.devfestdc.org/
|
||||
[8]: https://www.summerrankin.com/about
|
||||
[9]: https://opensource.com/sites/default/files/uploads/wwa1f3_600px_0.png (The Elasticsearch download page.)
|
||||
[10]: https://support.apple.com/en-ca/guide/terminal/welcome/mac
|
||||
[11]: https://opensource.com/sites/default/files/uploads/io6t1a_600px.png (Terminal output when running Elasticsearch.)
|
||||
[12]: https://opensource.com/sites/default/files/uploads/o43yku_600px.png (The elasticsearch/bin menu.)
|
||||
[13]: https://opensource.com/sites/default/files/uploads/elasticsearch_security_warning_500px.jpg (The security warning dialog box.)
|
||||
[14]: https://opensource.com/sites/default/files/uploads/the_general_tab_of_the_system_preferences_security_and_privacy_window.jpg (Where you can allow your computer to open the downloaded file.)
|
||||
[15]: https://opensource.com/sites/default/files/uploads/confirmation_dialog_box.jpg (Security confirmation dialog box.)
|
||||
[16]: https://opensource.com/sites/default/files/uploads/y5dvtu_600px.png (Launching Elasticsearch in MacOS.)
|
||||
[17]: https://www.elastic.co/webinars/getting-started-elasticsearch?ultron=%5BB%5D-Elastic-US+CA-Exact&blade=adwords-s&Device=c&thor=elasticsearch&gclid=EAIaIQobChMImdbvlqOP4wIVjI-zCh3P_Q9mEAAYASABEgJuAvD_BwE
|
||||
[18]: https://info.elastic.co/elasticsearch-service-gaw-v10-nav.html?ultron=%5BB%5D-Elastic-US+CA-Exact&blade=adwords-s&Device=c&thor=elasticsearch%20service&gclid=EAIaIQobChMI_MXHt-SZ4wIVJBh9Ch3wsQfPEAAYASAAEgJo9fD_BwE
|
77
sources/tech/20190711 What is a golden image.md
Normal file
77
sources/tech/20190711 What is a golden image.md
Normal file
@ -0,0 +1,77 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (What is a golden image?)
|
||||
[#]: via: (https://opensource.com/article/19/7/what-golden-image)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
What is a golden image?
|
||||
======
|
||||
Working on projects that will be distributed widely? Learn more about
|
||||
golden images so it's easy to revert to a "perfect" state if things go
|
||||
wrong.
|
||||
![Gold star][1]
|
||||
|
||||
If you’re in quality assurance, system administration, or (believe it or not) media production, you might have heard some variation of the term _gold master_, _golden image_, or _master image_, and so on. It’s a term that has made its way into the collective consciousness of anyone involved in creating one _perfect_ model and then producing many duplicates from that mold. That’s what a gold master, or golden image, is: The virtual mold from which you cast your distributable models.
|
||||
|
||||
In media production, the theory is that a crew works toward the gold master. This final product is one of a kind. It looks and sounds the best a movie or an album (or whatever it is) can possibly look and sound. Copies of this master image are made, compressed, and sent out to the eager public.
|
||||
|
||||
In software, a similar idea is associated with the term. Once software has been compiled and tested and re-tested, the perfect build is declared _gold_. No further changes are allowed, and all distributable copies are generated from this master image (this used to actually mean something, back when software was distributed on CDs or DVDs).
|
||||
|
||||
And in system administration, you may encounter golden images of an organization’s chosen operating system, with the important settings *baked in—*the virtual private network (VPN) certificates are already in place, incoming email servers are already set in the email client, and so on. Similarly, you might also hear this term in the world of virtual machines (VMs), where a _golden image_ of a carefully configured virtual drive is the source from which all new virtual machines are cloned.
|
||||
|
||||
### GNOME Boxes
|
||||
|
||||
The concept of a gold master is simple, but putting it into practice is often overlooked. Sometimes, your team is just so happy to have reached their goal that no one stops to think about designating the achievement as the authoritative version. At other times, there’s no simple mechanism for doing this.
|
||||
|
||||
A golden image is equal parts historical preservation and a backup plan in advance. Once you craft a perfect model of whatever it is you were toiling over, you owe it to yourself to preserve that work, because it not only marks your progress, but it serves as a fallback should you stumble as you continue your work.
|
||||
|
||||
[GNOME Boxes][2], the virtualization platform that ships with the GNOME desktop, can provide a simple demonstration. If you’ve never used GNOME Boxes, you can learn the basics from Alan Formy-Duval in his article [Getting started with GNOME Boxes][3].
|
||||
|
||||
Imagine that you used GNOME boxes to create a virtual machine, and then installed an operating system into that VM. Now, you want to make a golden image. GNOME Boxes is one step ahead of you: It has already taken a snapshot of your install, which can serve as the golden image for a stock OS installation.
|
||||
|
||||
With GNOME Boxes open and in the dashboard view, right-click on any virtual machine and select **Properties**. In the **Properties** window, select the **Snapshots** tab. The first snapshot, created automatically by GNOME Boxes, is **Just Installed**. As its name suggests, this is the operating system as you originally installed it onto its virtual machine.
|
||||
|
||||
![The Just Installed snapshot, or initial golden image, in GNOME Boxes.][4]
|
||||
|
||||
Should your virtual machine reach a state that you did not intend, you can always revert to this **Just Installed** image.
|
||||
|
||||
Of course, reverting back to the OS after it’s just been installed would be a drastic measure if you’ve already fine-tuned the environment for yourself. That’s why it’s a common workflow with virtual machines to first install the OS, then modify it to suit your requirements or preferences, and then take a snapshot, declaring that snapshot as your configured golden image. For instance, if you are using the virtual machine for [Flatpak][5] packaging, then after your initial install you might add software and Flatpak development tools, construct your working environment, and then take a snapshot. Once the snapshot is created, you can rename the virtual machine to indicate its true purpose in life.
|
||||
|
||||
To rename a virtual machine, right-click on its thumbnail in the dashboard view, and select **Properties**. In the **Properties** window, enter a new name:
|
||||
|
||||
![Renaming your VM image in GNOME Boxes.][6]
|
||||
|
||||
To make a clone of your golden image, right-click on the virtual machine in the GNOME Boxes interfaces and select **Clone**.
|
||||
|
||||
![Cloning your golden image in GNOME Boxes.][7]
|
||||
|
||||
You now have a clone from your golden image’s latest snapshot.
|
||||
|
||||
### Golden
|
||||
|
||||
There are few disciplines that can’t benefit from golden images. Whether you’re tagging releases in [Git][8], taking snapshots in Boxes, pressing a prototype vinyl, printing a book for approval, designing a screen print for mass production, or fashioning a literal mold, the archetype is everything. It’s just one more way that modern technology lets us humans work smarter rather than harder, so make a golden image for your project, and generate clones as often as you need.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/7/what-golden-image
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/origami_star_gold_best_top.jpg?itok=aEc0eutt (Gold star)
|
||||
[2]: https://wiki.gnome.org/Apps/Boxes
|
||||
[3]: https://opensource.com/article/19/5/getting-started-gnome-boxes-virtualization
|
||||
[4]: https://opensource.com/sites/default/files/uploads/snapshots.jpg (The Just Installed snapshot, or initial golden image.)
|
||||
[5]: https://opensource.com/business/16/8/flatpak
|
||||
[6]: https://opensource.com/sites/default/files/uploads/boxes-rename_0.jpg (Renaming your virtual machine in GNOME Boxes.)
|
||||
[7]: https://opensource.com/sites/default/files/uploads/boxes-clone.jpg (Cloning your golden image in GNOME Boxes.)
|
||||
[8]: https://git-scm.com
|
64
sources/tech/20190712 Certifications for DevOps engineers.md
Normal file
64
sources/tech/20190712 Certifications for DevOps engineers.md
Normal file
@ -0,0 +1,64 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Certifications for DevOps engineers)
|
||||
[#]: via: (https://opensource.com/article/19/7/devops-certifications)
|
||||
[#]: author: (Daniel OhDominika Bula https://opensource.com/users/daniel-oh/users/vincepower/users/ftrivino/users/dominika/users/heronthecli)
|
||||
|
||||
Certifications for DevOps engineers
|
||||
======
|
||||
Establish your DevOps expertise and become more valuable in the job
|
||||
marketplace with these certifications.
|
||||
![Open books][1]
|
||||
|
||||
DevOps teams [appreciate using DevOps processes][2], especially in [multi][3]\- and [hybrid cloud][4] infrastructures, for many reasons. For one thing, [DevOps][5] breaks down barriers and enables [agile][6] software development and continuous delivery of IT operations. It is also popular in enterprises because it helps accelerate business outcomes through digital transformation.
|
||||
|
||||
DevOps engineers and site reliability engineers (SREs) help organizations achieve their performance objectives because they have the high-level skillsets required to use the tools that orchestrate the DevOps pipeline—from automated app builds to continuous integration, multi-stage testing, and continuous deployment on the hybrid cloud.
|
||||
|
||||
As agile practices and processes move deeper into enterprises, experts with the knowledge to scale the framework can become more valuable in DevOps teams and across their organizations.
|
||||
|
||||
### DevOps certifications to consider
|
||||
|
||||
A successful career in DevOps engineering requires knowledge of agile practices, excellent collaboration skills, and the ability to thrive on rapid response times. DevOps-related certifications, including the ones listed below, will strengthen your capabilities to align with market demands and demonstrate your expertise.
|
||||
|
||||
* [ICAgile][7] certifications demonstrate expertise in agile methodologies and practices for DevOps initiatives. Training is offered by more than 150 member organizations; the costs vary depending upon courses selected and coursework providers.
|
||||
* [PMI Agile Certified Practitioner (PMI-ACP][8]) certification recognizes knowledge of agile tools and principles. Certification requires passing the PMI-ACP exam, which costs US$ 435.00 (for Project Management Institute members) or US$ 495.00 (for non-members).
|
||||
* Many organizations are using the Scaled Agile Framework (SAFe) as the foundation to deliver lean software development. The [Scaled Agile Academy][9] offers multiple SAFe certifications for various professions and roles. Certification is earned based on taking specific classes and passing exams; the cost depends on which class you choose.
|
||||
* Open source tools and platforms enable DevOps teams to build, deploy, and manage [Linux container][10] apps with minimal efforts. [Kubernetes][11] is a popular (and growing) platform to manage clusters of containers, and [Kubernetes certification][12] is an excellent option for sysadmins who aspire to become DevOps professionals. This expertise will also help you reduce human errors, minimize manual tasks, and eventually improve [team collaboration][13] across multiple [open organizations][14].
|
||||
|
||||
|
||||
|
||||
### Summary
|
||||
|
||||
These certifications will establish your DevOps credentials and help you encourage your team to embrace DevOps practices. Certification is not the end of your DevOps learning journey; rather it's the first step in becoming a DevOps professional. To keep up with the latest tools and technologies, continue to practice your skills and stay in touch with news about [DevOps trends and insights][15].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/7/devops-certifications
|
||||
|
||||
作者:[Daniel OhDominika Bula][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/daniel-oh/users/vincepower/users/ftrivino/users/dominika/users/heronthecli
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/open%20courseware.png?itok=WT_B93r5 (Open books)
|
||||
[2]: https://opensource.com/article/19/5/values-devops-mindset
|
||||
[3]: https://opensource.com/article/18/1/future-devops
|
||||
[4]: https://opensource.com/article/17/7/hybrid-cloud
|
||||
[5]: https://opensource.com/resources/devops
|
||||
[6]: https://opensource.com/article/18/10/what-agile
|
||||
[7]: https://www.icagile.com/
|
||||
[8]: https://www.pmi.org/certifications/types/agile-acp
|
||||
[9]: https://www.scaledagileacademy.com/
|
||||
[10]: https://opensource.com/resources/what-are-linux-containers
|
||||
[11]: https://opensource.com/resources/what-is-kubernetes
|
||||
[12]: https://www.cncf.io/certification/ckad/
|
||||
[13]: https://opensource.com/business/13/9/openproject-interview
|
||||
[14]: https://opensource.com/open-organization/resources/open-org-definition
|
||||
[15]: https://opensource.com/tags/devops
|
79
sources/tech/20190712 MTTR is dead, long live CIRT.md
Normal file
79
sources/tech/20190712 MTTR is dead, long live CIRT.md
Normal file
@ -0,0 +1,79 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (MTTR is dead, long live CIRT)
|
||||
[#]: via: (https://opensource.com/article/19/7/measure-operational-performance)
|
||||
[#]: author: (Julie Gunderson https://opensource.com/users/juliegund/users/kearnsjd/users/ophir)
|
||||
|
||||
MTTR is dead, long live CIRT
|
||||
======
|
||||
By focusing on business-impacting incidents, CIRT is a more accurate way
|
||||
to gauge ops performance.
|
||||
![Green graph of measurements][1]
|
||||
|
||||
The game is changing for the IT ops community, which means the rules of the past make less and less sense. Organizations need accurate, understandable, and actionable metrics in the right context to measure operations performance and drive critical business transformation.
|
||||
|
||||
The more customers use modern tools and the more variation in the types of incidents they manage, the less sense it makes to smash all those different incidents into one bucket to compute an average resolution time that will represent ops performance, which is what IT has been doing for a long time.
|
||||
|
||||
### History and metrics
|
||||
|
||||
History shows that context is key when analyzing signals to prevent errors and misunderstandings. For example, during the 1980s, Sweden set up a system to analyze hydrophone signals to alert them to Russian submarines in local Sweden waters. The Swedes used an acoustic signature they thought represented a class of Russian submarines—but was actually [gas bubbles][2] released by herring when confronted by a potential predator. This misinterpretation of a metric increased tensions between the countries and almost resulted in a war.
|
||||
|
||||
![Funny fish cartoon][3]
|
||||
|
||||
Mean time to resolve (MTTR) is the main ops performance metric operations managers use to gain insight towards achieving their goals. It is an age-old measure based on systems reliability engineering. MTTR has been adopted across many industries, including manufacturing, facility maintenance, and, more recently, IT ops, where it represents the average time it takes to resolve incidents from the time they were created across a given period of time.
|
||||
|
||||
MTTR is calculated by dividing the time it takes to resolve all incidents (from the time of incident creation to time of resolution) by the total number of incidents.
|
||||
|
||||
![MTTR formula][4]
|
||||
|
||||
MTTR is exactly what it says: It's the average across _**all**_ incidents. MTTR smears together both high- and low-urgency incidents. It also repetitively counts each separate, ungrouped incident and results in a biased resolve time. It includes manually resolved and auto-resolved incidents in the same context. It mashes together incidents that are tabled for days (or months) after creation or are even completely ignored. Finally, MTTR includes every little transient burst (incidents that are auto-closed in under 120 seconds), which are either noisy non-issues or quickly resolved by a machine.
|
||||
|
||||
![Variability in incident types][5]
|
||||
|
||||
MTTR takes all incidents, regardless of type, throws them into a single bucket, mashes them all together, and calculates an "average" resolution time across the entire set. This overly simplistic method results in a noisy, erroneous, and misleading indication of how operations is performing.
|
||||
|
||||
### A new way of measuring performance
|
||||
|
||||
Critical incident response time (CIRT) is a new, significantly more accurate method to evaluate operations performance. PagerDuty developed the concept of CIRT, but the methodology is freely available for anyone to use.
|
||||
|
||||
CIRT focuses on the incidents that are most likely to impact business by culling noise from incoming signals using the following techniques:
|
||||
|
||||
1. Real business-impacting (or potentially impacting) incidents are very rarely low urgency, so rule out all low-urgency incidents.
|
||||
2. Real business-impacting incidents are very rarely (if ever) auto-resolved by monitoring tools without the need for human intervention, so rule out incidents that were not resolved by a human.
|
||||
3. Short, bursting, and transient incidents that are resolved within 120 seconds are highly unlikely to be real business-impacting incidents, so rule them out.
|
||||
4. Incidents that go unnoticed, tabled, or ignored (not acknowledged, not resolved) for a very long time are rarely business-impacting; rule them out. Note: This threshold can be a statistically derived number that is customer-specific (e.g., two standard deviations above the mean) to avoid using an arbitrary number.
|
||||
5. Individual, ungrouped incidents generated by separate alerts are not representative of the larger business-impacting incident. Therefore, simulate incident groupings with a very conservative threshold, e.g., two minutes, to calculate response time.
|
||||
|
||||
|
||||
|
||||
What effect does applying these assumptions have on response times? In a nutshell, a very, very large effect!
|
||||
|
||||
By focusing on ops performance during critical, business-impacting incidents, the resolve-time distribution narrows and shifts greatly to the left, because now it is dealing with similar types of incidents rather than all events.
|
||||
|
||||
Because MTTR calculates a much longer, artificially skewed response time, it is a poor indicator of operations performance. CIRT, on the other hand, is an intentional measure focused on the incidents that matter most to business.
|
||||
|
||||
An additional critical measure that is wise to use alongside CIRT is the percentage of responders who are acknowledging and resolving incidents. This is important, as it validates whether the CIRT (or MTTA/MTTR for that matter) is worth utilizing. For example, if an MTTR result is low, say 10 minutes, it sounds great, but if only 42% of your responders are resolving their incidents, then that number is suspect.
|
||||
|
||||
In summary, CIRT and the percentage of responders who are acknowledging and resolving incidents form a valuable set of metrics that give you a much better idea of how operations is performing. Gauging performance is the first step to improving performance, so these new measures are key to achieving continuous cycles of measurable improvement for your organization.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/7/measure-operational-performance
|
||||
|
||||
作者:[Julie Gunderson][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/juliegund/users/kearnsjd/users/ophir
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_lead-steps-measure.png?itok=DG7rFZPk (Green graph of measurements)
|
||||
[2]: http://blogfishx.blogspot.com/2014/05/herring-fart-to-communicate.html
|
||||
[3]: https://opensource.com/sites/default/files/uploads/fish.png (Funny fish cartoon)
|
||||
[4]: https://opensource.com/sites/default/files/uploads/mttr.png (MTTR formula)
|
||||
[5]: https://opensource.com/sites/default/files/uploads/incidents.png (Variability in incident types)
|
@ -0,0 +1,252 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (zianglei)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Make an RGB cube with Python and Scribus)
|
||||
[#]: via: (https://opensource.com/article/19/7/rgb-cube-python-scribus)
|
||||
[#]: author: (Greg Pittman https://opensource.com/users/greg-p/users/greg-p)
|
||||
|
||||
Make an RGB cube with Python and Scribus
|
||||
======
|
||||
Create a 3D cube that shows the RGB color spectrum with Scribus' Python
|
||||
Scripter capability.
|
||||
![cubes coming together to create a larger cube][1]
|
||||
|
||||
When I decided I wanted to play with color this summer, I thought about the fact that colors are usually depicted on a color wheel. This is usually with pigment colors rather than light, and you lose any sense of the variation in color brightness or luminosity.
|
||||
|
||||
As an alternative to the color wheel, I came up with the idea of displaying the RGB spectrum on the surfaces of a cube using a series of graphs. RGB values would be depicted on a three-dimensional graph with X-, Y-, and Z-axes. For example, a surface would keep B (or blue) at 0 and the remaining axes would show what happens as I plot values as colors for R (red) and G (green) from 0 to 255.
|
||||
|
||||
It turns out this is not very difficult to do using [Scribus][2] and its [Python Scripter][3] capability. I can create RGB colors, make rectangles showing the colors, and arrange them in a 2D format. I decided to make value jumps of 5 for the colors and make rectangles measuring 5 points on a side. Thus, for each 2D graph, I would make about 250 colors, and the cube would measure 250 points to a side, or 3.5 inches.
|
||||
|
||||
I used this bit of Python code to accomplish that task for the Green–Red graph:
|
||||
|
||||
|
||||
```
|
||||
x = 300
|
||||
y = 300
|
||||
r = 0
|
||||
g = 0
|
||||
b = 0
|
||||
|
||||
if scribus.newDoc(scribus.PAPER_LETTER, (0,0,0,0),scribus.PORTRAIT, 1, scribus.UNIT_POINTS, scribus.NOFACINGPAGES, scribus.FIRSTPAGERIGHT):
|
||||
while r < 256:
|
||||
while g < 256:
|
||||
newcolor = str(r) + '_' + str(g) + '_' + str(b)
|
||||
if newcolor == '0_0_0':
|
||||
newcolor = 'Black'
|
||||
scribus.defineColorRGB(newcolor,r, g, b)
|
||||
rect = scribus.createRect(x + g, y, 5, 5)
|
||||
scribus.setFillColor(newcolor, rect)
|
||||
scribus.setLineColor(newcolor, rect)
|
||||
g = g + 5
|
||||
g = 0
|
||||
r = r + 5
|
||||
y = y – 5
|
||||
```
|
||||
|
||||
This script starts the graphical structure at **300, 300**, which is about the middle of a US Letter-size page horizontally and maybe a third of the way down from the top; this is the origin of the graph. Then it builds the graph horizontally along the X-axis (the Green value), then returns to the Y-axis, jumps up the page 5 points, and makes another line of rectangles.
|
||||
|
||||
![Red-Green graph][4]
|
||||
|
||||
That looks easy enough; I'll just fiddle with the numbers and make the other sides. But this isn't just a matter of making two more graphs, one with Blue–Green and another with Red–Blue. I had in mind to create an unfolded cube so I could print it, cut it, fold it, and create a 3D view of RGB. Therefore, the next part (going down the page) needs to have the origin (the Black corner) at the upper left, with Green horizontally and Blue vertically increasing downward.
|
||||
|
||||
"Fiddling with the numbers" ended up being more or less trial and error to get what I wanted. After creating the second graph, I needed the third one, for Red–Blue, to have the origin in the upper left corner with Red increasing to the left and Blue increasing downward.
|
||||
|
||||
Here it is:
|
||||
|
||||
![First half of RGB cube][5]
|
||||
|
||||
Of course, this is just the first half of this cube. I needed to make a similar shape, except that the origins should be White (rather than Black) to represent the high values. It's one of those times when I wish I were smarter, since not only did I need to make a similar overall shape, it needed to interface with the first shape in a mirror-image sort of way (I think). Sometimes trial and error is the only friend you have.
|
||||
|
||||
Here is how that came out; I used a separate script since there wasn't enough space on a US Letter-sized page for both of them:
|
||||
|
||||
![Second half of RGB cube][6]
|
||||
|
||||
Now, it's off to the printer! This is where you get a sense of how well your color printer does with RGB to CMYK transformation as well as other aspects of printing color-dense spaces.
|
||||
|
||||
Next, boys and girls, it's cut-and-paste time! I could use tape, but I didn't want to change the appearance of the surfaces, so I left some tabs along the sides while cutting so I could glue them on the inside. From experience, I can say that printing on copy paper comes out with some undesirable wrinkles, so after my copy paper prototype, I printed the cube on heavier paper with a matte finish.
|
||||
|
||||
![RGB cubes][7]
|
||||
|
||||
Keep in mind this is just a view of the boundaries of the RGB space; to be more accurate, you would have to make a solid cube that you could slice in the middle. For example, this would be a slice through a solid RGB cube where Blue = 120:
|
||||
|
||||
![RGB cube slice][8]
|
||||
|
||||
In the end, I had fun doing this project. In case you want to join the party, here are the two scripts.
|
||||
|
||||
Here's the first half:
|
||||
|
||||
|
||||
```
|
||||
#!/usr/bin/env python
|
||||
# black2rgb.py
|
||||
"""
|
||||
Creates one-half of RGB cube with Black at origin
|
||||
"""
|
||||
|
||||
import scribus
|
||||
|
||||
x = 300
|
||||
y = 300
|
||||
r = 0
|
||||
g = 0
|
||||
b = 0
|
||||
|
||||
if scribus.newDoc(scribus.PAPER_LETTER, (0,0,0,0),scribus.PORTRAIT, 1, scribus.UNIT_POINTS, scribus.NOFACINGPAGES, scribus.FIRSTPAGERIGHT):
|
||||
while r < 256:
|
||||
while g < 256:
|
||||
newcolor = str(r) + '_' + str(g) + '_' + str(b)
|
||||
if newcolor == '0_0_0':
|
||||
newcolor = 'Black'
|
||||
scribus.defineColorRGB(newcolor,r, g, b)
|
||||
rect = scribus.createRect(x + g, y, 5, 5)
|
||||
scribus.setFillColor(newcolor, rect)
|
||||
scribus.setLineColor(newcolor, rect)
|
||||
g = g + 5
|
||||
g = 0
|
||||
r = r + 5
|
||||
y = y - 5
|
||||
|
||||
r = 0
|
||||
g = 0
|
||||
y = 305
|
||||
|
||||
while b < 256:
|
||||
while g < 256:
|
||||
newcolor = str(r) + '_' + str(g) + '_' + str(b)
|
||||
if newcolor == '0_0_0':
|
||||
newcolor = 'Black'
|
||||
scribus.defineColorRGB(newcolor,r, g, b)
|
||||
rect = scribus.createRect(x + g, y, 5, 5)
|
||||
scribus.setFillColor(newcolor, rect)
|
||||
scribus.setLineColor(newcolor, rect)
|
||||
g = g + 5
|
||||
g = 0
|
||||
b = b + 5
|
||||
y = y + 5
|
||||
|
||||
r = 255
|
||||
g = 0
|
||||
y = 305
|
||||
x = 39
|
||||
b = 0
|
||||
|
||||
while b < 256:
|
||||
while r >= 0:
|
||||
newcolor = str(r) + '_' + str(g) + '_' + str(b)
|
||||
if newcolor == '0_0_0':
|
||||
newcolor = 'Black'
|
||||
scribus.defineColorRGB(newcolor,r, g, b)
|
||||
rect = scribus.createRect(x, y, 5, 5)
|
||||
scribus.setFillColor(newcolor, rect)
|
||||
scribus.setLineColor(newcolor, rect)
|
||||
r = r - 5
|
||||
x = x+5
|
||||
b = b + 5
|
||||
x = 39.5
|
||||
r = 255
|
||||
y = y + 5
|
||||
|
||||
scribus.setRedraw(True)
|
||||
scribus.redrawAll()
|
||||
```
|
||||
|
||||
Now the second half:
|
||||
|
||||
|
||||
```
|
||||
#!/usr/bin/env python
|
||||
# white2rgb.py
|
||||
"""
|
||||
Creates one-half of RGB cube with White at origin
|
||||
"""
|
||||
|
||||
import scribus
|
||||
|
||||
x = 300
|
||||
y = 300
|
||||
r = 255
|
||||
g = 255
|
||||
b = 255
|
||||
|
||||
if scribus.newDoc(scribus.PAPER_LETTER, (0,0,0,0),scribus.PORTRAIT, 1, scribus.UNIT_POINTS, scribus.NOFACINGPAGES, scribus.FIRSTPAGERIGHT):
|
||||
while g >= 0:
|
||||
while r >= 0:
|
||||
newcolor = str(r) + '_' + str(g) + '_' + str(b)
|
||||
if newcolor == '255_255_255':
|
||||
newcolor = 'White'
|
||||
scribus.defineColorRGB(newcolor,r, g, b)
|
||||
rect = scribus.createRect(x + 255 - r, y, 5, 5)
|
||||
scribus.setFillColor(newcolor, rect)
|
||||
scribus.setLineColor(newcolor, rect)
|
||||
r = r - 5
|
||||
r = 255
|
||||
g = g - 5
|
||||
y = y - 5
|
||||
|
||||
r = 255
|
||||
g = 255
|
||||
y = 305
|
||||
|
||||
while b >= 0:
|
||||
while r >= 0:
|
||||
newcolor = str(r) + '_' + str(g) + '_' + str(b)
|
||||
if newcolor == '255_255_255':
|
||||
newcolor = 'White'
|
||||
scribus.defineColorRGB(newcolor,r, g, b)
|
||||
rect = scribus.createRect(x + 255 - r, y, 5, 5)
|
||||
scribus.setFillColor(newcolor, rect)
|
||||
scribus.setLineColor(newcolor, rect)
|
||||
r = r - 5
|
||||
r = 255
|
||||
b = b - 5
|
||||
y = y + 5
|
||||
|
||||
r = 255
|
||||
g = 0
|
||||
y = 305
|
||||
x = 39
|
||||
b = 255
|
||||
|
||||
while b >= 0:
|
||||
while g < 256:
|
||||
newcolor = str(r) + '_' + str(g) + '_' + str(b)
|
||||
if newcolor == '255_255_255':
|
||||
newcolor = 'White'
|
||||
scribus.defineColorRGB(newcolor,r, g, b)
|
||||
rect = scribus.createRect(x + g, y, 5, 5)
|
||||
scribus.setFillColor(newcolor, rect)
|
||||
scribus.setLineColor(newcolor, rect)
|
||||
g = g + 5
|
||||
g = 0
|
||||
b = b - 5
|
||||
y = y + 5
|
||||
|
||||
scribus.setRedraw(True)
|
||||
scribus.redrawAll()
|
||||
```
|
||||
|
||||
Since I was creating a large number of colors, I wasn't surprised to see that the Scribus file is much larger than the PDF I made from it. For example, my Scribus SLA file was 3.0MB, while the PDF I generated from it was only 70KB.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/7/rgb-cube-python-scribus
|
||||
|
||||
作者:[Greg Pittman][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/greg-p/users/greg-p
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/cube_innovation_process_block_container.png?itok=vkPYmSRQ (cubes coming together to create a larger cube)
|
||||
[2]: https://www.scribus.net/
|
||||
[3]: https://opensource.com/sites/default/files/ebooks/pythonscriptingwithscribus.pdf
|
||||
[4]: https://opensource.com/sites/default/files/uploads/redgreengraph.png (Red-Green graph)
|
||||
[5]: https://opensource.com/sites/default/files/uploads/rgbcubefirsthalf.png (First half of RGB cube)
|
||||
[6]: https://opensource.com/sites/default/files/uploads/rgbcubesecondhalf.png (Second half of RGB cube)
|
||||
[7]: https://opensource.com/sites/default/files/uploads/rgbcubecompositephoto.png (RGB cubes)
|
||||
[8]: https://opensource.com/sites/default/files/uploads/rgbcubeslice.png (RGB cube slice)
|
98
sources/tech/20190712 What is Silverblue.md
Normal file
98
sources/tech/20190712 What is Silverblue.md
Normal file
@ -0,0 +1,98 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (What is Silverblue?)
|
||||
[#]: via: (https://fedoramagazine.org/what-is-silverblue/)
|
||||
[#]: author: (Tomáš Popela https://fedoramagazine.org/author/tpopela/)
|
||||
|
||||
What is Silverblue?
|
||||
======
|
||||
|
||||
![][1]
|
||||
|
||||
Fedora Silverblue is becoming more and more popular inside and outside the Fedora world. So based on feedback from the community, here are answers to some interesting questions about the project. If you do have any other Silverblue related questions, please leave it in the comments section and we will try to answer them in a future article.
|
||||
|
||||
### What is Silverblue?
|
||||
|
||||
Silverblue is a codename for the new generation of the desktop operating system, previously known as Atomic Workstation. The operating system is delivered in images that are created by utilizing the _[rpm-ostree][2]_ [project][2]. The main benefits of the system are speed, security, atomic updates and immutability.
|
||||
|
||||
### What does “Silverblue” actually mean?
|
||||
|
||||
“Team Silverblue” or “Silverblue” in short doesn’t have any hidden meaning. It was chosen after roughly two months when the project, previously known as Atomic Workstation was rebranded. There were over 150 words or word combinations reviewed in the process. In the end _Silverblue_ was chosen because it had an available domain as well as the social network accounts. One could think of it as a new take on Fedora’s blue branding, and could be used in phrases like “Go, Team Silverblue!” or “Want to join the team and improve Silverblue?”.
|
||||
|
||||
### What is ostree?
|
||||
|
||||
[OSTree or libostree is a project][3] that combines a “git-like” model for committing and downloading bootable filesystem trees, together with a layer to deploy them and manage the bootloader configuration. OSTree is used by rpm-ostree, a hybrid package/image based system that Silverblue uses. It atomically replicates a base OS and allows the user to “layer” the traditional RPM on top of the base OS if needed.
|
||||
|
||||
### Why use Silverblue?
|
||||
|
||||
Because it allows you to concentrate on your work and not on the operating system you’re running. It’s more robust as the updates of the system are atomic. The only thing you need to do is to restart into the new image. Also, if there’s anything wrong with the currently booted image, you can easily reboot/rollback to the previous working one, if available. If it isn’t, you can download and boot any other image that was generated in the past, using the _ostree_ command.
|
||||
|
||||
Another advantage is the possibility of an easy switch between branches (or, in an old context, Fedora releases). You can easily try the _[Rawhide][4]_ or _[updates-testing][5]_ branch and then return back to the one that contains the current stable release. Also, you should consider Silverblue if you want to try something new and unusual.
|
||||
|
||||
### What are the benefits of an immutable OS?
|
||||
|
||||
One of the main benefits is security. The base operating system is mounted as read-only, and thus cannot be modified by malicious software. The only way to alter the system is through the _rpm-ostree_ utility.
|
||||
|
||||
Another benefit is robustness. It’s nearly impossible for a regular user to get the OS to the state when it doesn’t boot or doesn’t work properly after accidentally or unintentionally removing some system library. Try to think about these kind of experiences from your past, and imagine how Silverblue could help you there.
|
||||
|
||||
### How does one manage applications and packages in Silverblue?
|
||||
|
||||
For graphical user interface applications, [Flatpak][6] is recommended, if the application is available as a flatpak. Users can choose between Flatpaks from either Fedora and built from Fedora packages and in Fedora-owned infrastructure, or Flathub that currently has a wider offering. Users can install them easily through GNOME Software, which already supports Fedora Silverblue.
|
||||
|
||||
One of the first things users find out is there is no _dnf_ preinstalled in the OS. The main reason is that it wouldn’t work on Silverblue — and part of its functionality was replaced by the _rpm-ostree_ command. Users can overlay the traditional packages by using the _rpm-ostree install PACKAGE_. But it should only be used when there is no other way. This is because when the new system images are pulled from the repository, the system image must be rebuilt every time it is altered to accommodate the layered packages, or packages that were removed from the base OS or replaced with a different version.
|
||||
|
||||
Fedora Silverblue comes with the default set of GUI applications that are part of the base OS. The team is working on porting them to Flatpaks so they can be distributed that way. As a benefit, the base OS will become smaller and easier to maintain and test, and users can modify their default installation more easily. If you want to look at how it’s done or help, take a look at the official [documentation][7].
|
||||
|
||||
### What is Toolbox?
|
||||
|
||||
[_Toolbox_][8] is a project to make containers easily consumable for regular users. It does that by using _podman_’s rootless containers. _Toolbox_ lets you easily and quickly create a container with a regular Fedora installation that you can play with or develop on, separated from your OS.
|
||||
|
||||
### Is there any Silverblue roadmap?
|
||||
|
||||
Formally there isn’t any, as we’re focusing on problems we discover during our testing and from community feedback. We’re currently using Fedora’s [Taiga][9] to do our planning.
|
||||
|
||||
### What’s the release life cycle of the Silverblue?
|
||||
|
||||
It’s the same as regular Fedora Workstation. A new release comes every 6 months and is supported for 13 months. The team plans to release updates for the OS bi-weekly (or longer) instead of daily as they currently do. That way the updates can be more thoroughly tested by QA and community volunteers before they are sent to the rest of the users.
|
||||
|
||||
### What is the future of the immutable OS?
|
||||
|
||||
From our point of view the future of the desktop involves the immutable OS. It’s safest for the user, and Android, ChromeOS, and the last macOS Catalina all use this method under the hood. For the Linux desktop there are still problems with some third party software that expects to write to the OS. HP printer drivers are a good example.
|
||||
|
||||
Another issue is how parts of the system are distributed and installed. Fonts are a good example. Currently in Fedora they’re distributed in RPM packages. If you want to use them, you have to overlay them and then restart to the newly created image that contains them.
|
||||
|
||||
### What is the future of standard Workstation?
|
||||
|
||||
There is a possibility that the Silverblue will replace the regular Workstation. But there’s still a long way to go for Silverblue to provide the same functionality and user experience as the Workstation. In the meantime both desktop offerings will be delivered at the same time.
|
||||
|
||||
### How does Atomic Workstation or Fedora CoreOS relate to any of this?
|
||||
|
||||
Atomic Workstation was the name of the project before it was renamed to Fedora Silverblue.
|
||||
|
||||
Fedora CoreOS is a different, but similar project. It shares some fundamental technologies with Silverblue, such as _rpm-ostree_, _toolbox_ and others. Nevertheless, CoreOS is a more minimal, container-focused and automatically updating OS.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/what-is-silverblue/
|
||||
|
||||
作者:[Tomáš Popela][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://fedoramagazine.org/author/tpopela/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/what-is-fedora-silverblue-816x345.jpg
|
||||
[2]: https://rpm-ostree.readthedocs.io/en/latest/
|
||||
[3]: https://ostree.readthedocs.io/en/latest/
|
||||
[4]: https://fedoraproject.org/wiki/Releases/Rawhide
|
||||
[5]: https://fedoraproject.org/wiki/QA:Updates_Testing
|
||||
[6]: https://flatpak.org/
|
||||
[7]: https://docs.fedoraproject.org/en-US/flatpak/tutorial/
|
||||
[8]: https://github.com/debarshiray/toolbox
|
||||
[9]: https://teams.fedoraproject.org/project/silverblue/
|
@ -0,0 +1,118 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (ElectronMail – a Desktop Client for ProtonMail and Tutanota)
|
||||
[#]: via: (https://itsfoss.com/electronmail/)
|
||||
[#]: author: (John Paul https://itsfoss.com/author/john/)
|
||||
|
||||
ElectronMail – a Desktop Client for ProtonMail and Tutanota
|
||||
======
|
||||
|
||||
The majority of people on the internet have email accounts from big companies, such as Google, that do not respect your privacy. Thankfully, there are privacy conscience alternatives like [Tutanota][1] and [ProtonMail][2]. The problems is that not all of them have a desktop client. Today, we will look at a project that seeks to solve that problem for you. Let’s take a look at ElectronMail.
|
||||
|
||||
‘Electron’-ic warning!
|
||||
|
||||
The following app is built with Electron (the name is ElectronMail for a reason). If the use of Electron upsets you, please consider this a trigger warning.
|
||||
|
||||
### ElectronMail: Desktop Client for Tutanota and ProtonMail
|
||||
|
||||
![Electron Mail About][3]
|
||||
|
||||
[ElectronMail][4] is simply put an email client for ProtonMail and Tutanota. It is built using three big technologies: [Electron][5], [TypeScript][6] and [Angular][7]. It includes the following features:
|
||||
|
||||
* Multi accounts support per each email provider
|
||||
* Encrypted local storage
|
||||
* Available for Linux, Windows, macOS, and FreeBSD
|
||||
* Native notifications
|
||||
* System tray icon with a total number of unread messages
|
||||
* Master password to protect account information
|
||||
* Switchable view layouts
|
||||
* Offline access to the emails
|
||||
* Encrypted local storage for emails
|
||||
* Batch emails export to EML files
|
||||
* Full-text search
|
||||
* Built-in/prepackaged web clients
|
||||
* Configuring proxy per account
|
||||
* Spell Checking
|
||||
* Support for two-factor authentication for extra security
|
||||
|
||||
|
||||
|
||||
Currently, ElectronMail only supports Tutanota and ProtonMail. I get the feeling that they will be adding more in the future. According to the [GitHub page][4]: “Multi email providers support. ProtonMail and Tutanota at the moment.”
|
||||
|
||||
ElectronMail is licensed under the MIT license.
|
||||
|
||||
#### How to install ElectronMail
|
||||
|
||||
Currently, there are several options to install ElectronMail on Linux. for Arch and Arch-based distros, you can install it from the [Arch User Repository][8]. There is also a Snap available for ElectrionMail. To install it, just enter `sudo snap install electron-mail`.
|
||||
|
||||
For all other Linux distros, you can [download][9] a `.deb` or `.rpm` file.
|
||||
|
||||
![Electron Mail Inbox][10]
|
||||
|
||||
You can also [download][9] an `.exe` installer for Windows or a `.dmg` file for macOS. There is even a file for FreeBSD.
|
||||
|
||||
[][11]
|
||||
|
||||
Suggested read Zettlr - Markdown Editor for Writers and Researchers
|
||||
|
||||
#### Removing ElectronMail
|
||||
|
||||
If you install ElectronMail and decide that it is not for you, there are a couple steps that the [developer][12] recommends. **Be sure to follow these steps before you uninstall the application.**
|
||||
|
||||
If you are using the “Keep Me Signed In” feature, click “Log out” on the menu. This will delete the locally stored master password. It is possible to delete the master password after uninstalling ElectronMail, but that would involve editing the system keychain.
|
||||
|
||||
You will also need to delete the settings folder manually. You can find it by clicking “Open setting folder” after selecting the application’s icon in the system tray.
|
||||
|
||||
![Electron Mail Setting][13]
|
||||
|
||||
### My Thoughts on ElectronMail
|
||||
|
||||
I don’t usually use email clients. In fact, I mostly depend on web clients. So, I don’t have much use for this application.
|
||||
|
||||
That being said, ElectronMail has a nice feel to it and is easy to set up. It has a good number of features activated out of the box and the advanced features aren’t that hard to activate.
|
||||
|
||||
The one question I have relates to search. According to the features list, ElectronMail supports full-text search. However, the free version of Tutanota only supports a limited search. I wonder how ElectronMail handles that.
|
||||
|
||||
At the end of the day, ElectronMail is just an Electron wrapper for a couple of web-based emails. I would rather just have them open in my browser than dedicate separate system resources to running Electron. If you only [use Tutanota email, they have their own official Electron-based desktop client][14]. You may try that.
|
||||
|
||||
My biggest issue is with security. This is an unofficial app for two very secure email apps. What if there is a way to capture your login info or read through your emails? Someone who is smarter than I would have to go through the source code to know for sure. That is always the issue with unofficial apps for a security project.
|
||||
|
||||
[][14]
|
||||
|
||||
Suggested read Secure Email Service Tutanota Has a Desktop App Now
|
||||
|
||||
Have you every used ElectronMail? Do you think it would be worthwhile to install ElectronMail? What is your favorite email client? Please let us know in the comments below.
|
||||
|
||||
If you found this article interesting, please take a minute to share it on social media, Hacker News or [Reddit][15].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/electronmail/
|
||||
|
||||
作者:[John Paul][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/john/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/tutanota-review/
|
||||
[2]: https://itsfoss.com/protonmail/
|
||||
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/electron-mail-about.jpg?resize=800%2C500&ssl=1
|
||||
[4]: https://github.com/vladimiry/ElectronMail
|
||||
[5]: https://electronjs.org/
|
||||
[6]: http://www.typescriptlang.org/
|
||||
[7]: https://angular.io/
|
||||
[8]: https://aur.archlinux.org/packages/electronmail-bin
|
||||
[9]: https://github.com/vladimiry/ElectronMail/releases
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/07/electron-mail-inbox.jpg?ssl=1
|
||||
[11]: https://itsfoss.com/zettlr-markdown-editor/
|
||||
[12]: https://github.com/vladimiry
|
||||
[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/07/electron-mail-setting.jpg?ssl=1
|
||||
[14]: https://itsfoss.com/tutanota-desktop/
|
||||
[15]: http://reddit.com/r/linuxusersgroup
|
@ -0,0 +1,75 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (WangYueScream)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Introducing kids to computational thinking with Python)
|
||||
[#]: via: (https://opensource.com/article/19/2/break-down-stereotypes-python)
|
||||
[#]: author: (Don Watkins https://opensource.com/users/don-watkins)
|
||||
|
||||
|
||||
利用 Python 引导孩子的计算机思维
|
||||
========================
|
||||
|
||||
编程可以给低收入家庭的学生提供足够的技能,信心和知识,进而让他们摆脱因为家庭收入低带来的经济和社会地位上的劣势。
|
||||
|
||||

|
||||
|
||||
尽管暑假期间底特律公共图书馆的[帕克曼分部][1]挤满了无聊的孩子并且占用了所有的电脑,图书馆工作人员并不觉得这会是个问题,反而更多是一个机会。他们成立一个名为 [Parkman Coders][2] 的编程社团,社团以 [Qumisha Goss][3] 为首,她是图书管理员,也负责利用 Python 的魔力引导弱势儿童的计算机思维。
|
||||
|
||||
四年前 [Qumisha Goss][3] 刚发起 Parkman Coders 计划的时候, “Q” 并不是太懂编程。之后她通过努力成为图书馆里教学和技术方面的专家和 Raspberry Pi 认证讲师。
|
||||
|
||||
社团最开始采用 [Scratch][4] 教学,但很快学生就对这种图形化的块编程感到乏味,他们觉得这就是个“婴儿玩具”。Q 坦言,“我们意识到是时候需要在课程内容这方面做些改变了,如果是为了维持课程内容对初学者的友好性继续选择 Scratch 教学,这无疑会影响孩子们后期继续保持对编程的关注。”因此,她开始教授孩子们 Python。
|
||||
|
||||
Q 是在 [Code.org][5] 平台玩地牢骷髅怪物这个关卡的时候第一次接触到 Python。她最开始是通过 [Python Programming: An Introduction to Computer Science][6] 和 [Python for Kids][7] 这两本书学习 Python。她也推荐 [Automate the Boring Stuff with Python][8] 和 [Lauren Ipsum: A Story about Computer Science and Other Improbable Things][9] 这两本书。
|
||||
|
||||
|
||||
### 建立一个基于 Raspberry Pi 的创客空间
|
||||
|
||||
|
||||
Q 决定使用 [Raspberry Pi][10] 电脑来避免学生可能会因为自己的不当操作对图书馆的电脑造成损害,而且这些电脑因为便携性等问题也不方便用来构建组成一个创客空间。[Raspberry Pi][10] 的购买价格加上它的灵活性和便携性包括生态圈里面的一些适合教学的自由免费软件,让大家更能感受到她的决策的可行性和可靠性。
|
||||
|
||||
虽然图书馆发起 [Parkman Coders][2] 社区计划的本意是通过努力创造一个吸引孩子们的学习空间进而维持图书馆的平和,但社区发展的很快,很受大家欢迎以至于这座建立于 1921 的大楼的空间,电脑和插座都不够用了。他们最开始是 20 个孩子共享 10 台 [Raspberry Pi][10] 来进行授课,但后来图书馆陆续收到了来自个人和公司比如 Microsoft,4H,和 Detroit Public Library Foundation 的资金援助从而能够购买更多设备以支撑社区的进一步壮大发展。
|
||||
|
||||
目前,大概有 40 个孩子参加了每节课程而且图书馆也有了足够的 [Raspberry Pi][10] 让参与者人手一台设备甚至还可以分发出去。鉴于不少 [Parkman Coders][2] 的参与者来自于低收入家庭,图书馆也能提供别人捐赠的 Chromebooks 给他们使用。
|
||||
|
||||
Q 说,“当孩子们的表现可以证明他们能够很好的使用 [Raspberry Pi][10] 或者 [Microbit][11] 而且定期来参加课程,我们也会提供设备允许他们可以带回家练习。但即便这样也还是会遇到很多问题,比如他们在家无法访问网络或者没有显示器,键盘,鼠标等外设。”
|
||||
|
||||
### 利用 Python 学习生存技能,打破束缚
|
||||
|
||||
|
||||
Q 说,“我认为教授孩子们计算机科学的主要目的是让他们学会批判性思考和解决问题的能力。我希望随着孩子们长大成人,不管他们选择在哪个领域继续发展他们的未来,这些经验教训都会一直伴随他们成长。此外,我也希望这个课程能够激发孩子们对创造的自豪感。能够清楚的意识到‘这是我做的’是一种很强烈很有用的感受。而且一旦孩子们越早能够有这种成功的体验,我相信未来的路上他们都会满怀热情迎接新的挑战而不是逃避。”
|
||||
|
||||
她继续分享道,“在学习编程的过程中,你不得不对单词的拼写和大小写高度警惕。受限于孩子年龄,有时候阅读认知会是个大问题。为了确保课程受众的包容性,我们会在授课过程中大声拼读,同样我们也会极力鼓励孩子们大声说出他们不知道的或者不能正确拼写的单词,以便我们纠正。”
|
||||
|
||||
Q 也会尝试尽力去给需要帮助的孩子们更多的关注。她解释道,“如果我确认有孩子遇到困难不能跟上我们的授课进度,我们会尝试在课下时间安排老师辅导帮助他,但还是会允许他们继续参加编程。我们想到帮助到他们而不是让他们因为挫败而沮丧的不在参与进来。”
|
||||
|
||||
最重要的是, [Parkman Coders][2] 计划所追求的是能够帮助每个孩子认识到每个人都会有独特的技能和能力。参与进来的大部分孩子都是非裔美国人,一半是女孩。Q 直言,“我们所生活在的这个世界,我们成长的过程中,伴随着各种各种的社会偏见,这些都常常会限制我们对自己所能达到的成就的准确认知。”她坚信孩子们需要一个没有偏见的空间,“他们可以尝试很多新事物,不会因为担心犯错责骂而束手束脚,可以放心大胆的去求知探索。”
|
||||
|
||||
Q 和 [Parkman Coders][2] 计划所营造的环境氛围能够帮助到参与者摆脱低家庭收入带来的劣势。如果说社区能够发展壮大到今天的规模真有什么独特秘诀的话,那大概就是,Q 解释道,“确保你有一个令人舒适的空间,充满了理解与宽容,这样大家才会被吸引过来。让来的人不忘初心,做好传道受业解惑的准备;当大家参与进来并感觉到充实愉悦,自然而然会想要留下来。”
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/19/2/break-down-stereotypes-python
|
||||
|
||||
作者:[Don Watkins][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[WangYueScream](https://github.com/WangYueScream)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/don-watkins
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://detroitpubliclibrary.org/locations/parkman
|
||||
[2]: https://www.dplfound.org/single-post/2016/05/15/Parkman-Branch-Coders
|
||||
[3]: https://www.linkedin.com/in/qumisha-goss-b3bb5470
|
||||
[4]: https://scratch.mit.edu/
|
||||
[5]: http://Code.org
|
||||
[6]: https://www.amazon.com/Python-Programming-Introduction-Computer-Science/dp/1887902996
|
||||
[7]: https://nostarch.com/pythonforkids
|
||||
[8]: https://automatetheboringstuff.com/
|
||||
[9]: https://nostarch.com/laurenipsum
|
||||
[10]: https://www.raspberrypi.org/
|
||||
[11]: https://microbit.org/guide/
|
@ -1,103 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (GraveAccent)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (5G will augment Wi-Fi, not replace it)
|
||||
[#]: via: (https://www.networkworld.com/article/3399978/5g-will-augment-wi-fi-not-replace-it.html)
|
||||
[#]: author: (Zeus Kerravala https://www.networkworld.com/author/Zeus-Kerravala/)
|
||||
|
||||
|
||||
5G 会增强 Wi-Fi,而不是取代它
|
||||
======
|
||||
Aruba 战略和企业发展副总裁 Jeff Lipton 为 5G 炒作增添了一些干货,讨论了它和 Wi-Fi 如何协同工作以及如何最大化两者的价值。
|
||||
![Thinkstock][1]
|
||||
|
||||
可以说没有技术主题比 [5G][2] 更热。 这是最近 [移动世界大会][3] 节目的一个主题,并且已经在其他活动中占据了主导地位,例如 Enterprise Connect 和我参加的几乎所有供应商活动。
|
||||
|
||||
一些供应商将 5G 定位为解决所有网络问题的灵丹妙药,并预测它将消除所有其他形式的网络。 像这样的观点显然是极端的,但我相信 5G 会对网络行业产生影响,网络工程师应该意识到这一点。
|
||||
|
||||
为了帮助为5G炒作带来一些现实感,我最近采访了一家惠普公司 Aruba 的战略和企业发展副总裁 Jeff Lipton,因为我知道惠普已经深入参与了 5G 和 Wi-Fi 的发展。
|
||||
|
||||
**[ 另见:[5G 时代几乎已经来了][3] ]**
|
||||
|
||||
### Zeus Kerravala: 5G 被吹捧为“下一件大事”。你是这样看的吗?
|
||||
|
||||
**Jeff Lipton:** 接下来的重点是连接“事物”并从这些事物中产生可操作的见解和背景。5G 是服务于这一趋势的技术之一。Wi-Fi 6 是另一个,还有边缘计算,蓝牙低功耗(BLE),人工智能(AI)和机器学习(ML)。这一切都很重要,全都有自己的用武之地。
|
||||
|
||||
### 你是否在企业中看到 5G 的风头盖过 Wi-Fi?
|
||||
|
||||
![Jeff Lipton, VP of strategy and corporate development, Aruba][4]
|
||||
|
||||
**Lipton:** 与所有蜂窝接入一样,如果你需要宏观区域覆盖和高速切换,使用 5G 是合适的。但对于大多数企业级应用程序而言,它通常不需要这些功能。从性能角度来看,[Wi-Fi 6][5] 和 5G 在大多数指标上大致相等,包括吞吐量,延迟,可靠性和连接密度。它们并不相似的地方在经济方面,Wi-Fi要好得多。我不认为很多客户愿意用 Wi-Fi 交换 5G,除非他们需要宏观覆盖或高速切换。
|
||||
|
||||
### Wi-Fi 和 5G 可以共存吗? 企业如何一起使用 5G 和 Wi-Fi?
|
||||
|
||||
**Lipton:** Wi-Fi 和 5G 可以并且应该是互补的。 5G 架构将蜂窝核心和无线接入网络(RAN)分离。 因此,Wi-Fi 可以是企业无线电前端,并与 5G 核心紧密连接。 由于 Wi-Fi 的经济性 - 特别是 Wi-Fi 6 - 是有利的并且性能非常好,我们设想许多服务提供商在有可行的地方使用 Wi-Fi 作为其 5G 系统的无线电前端,充当分布式天线(DAS)和小型蜂窝系统的替代。
|
||||
|
||||
“Wi-Fi 和 5G 可以并且应该是互补的。” — Jeff Lipton
|
||||
|
||||
### 如果一个企业打算完全转向 5G,那将如何实现以及它的实用性如何?
|
||||
|
||||
**Lipton:** 为了将 5G 用于主要的室内访问,客户需要升级其网络和几乎所有设备。 5G 在室外提供良好的覆盖,但蜂窝信号不能可靠地穿透建筑物。 5G 会使这个问题变得更糟,因为它部分依赖于更高频率的无线电。因此,服务提供商需要一种提供室内覆盖的方法。为了提供这种覆盖,他们会部署 DAS 或小型蜂窝系统 - 由终端客户支付。然后,客户将他们的设备直连到这些蜂窝系统,并为每个设备支付服务合同。
|
||||
|
||||
**[[上 PluralSight 学习移动设备管理课程,了解如何在不降低用户体验的情况下保护公司中的设备。][6]]**
|
||||
|
||||
这种方法存在一些问题。首先,DAS 和小型蜂窝系统比 Wi-Fi 网络贵得多。 并且成本不会因网络而停止。 每台设备都需要一台 5G 蜂窝调制解调器,批发价格高达数十美元,而终端用户通常需要花费一百多美元。 由于目前很少或者没有 MacBook、PC、打印机、AppleTV 有 5G 调制解调器,因此需要对这些设备进行升级。我不相信很多企业会愿意支付这笔额外费用并升级他们的大部分设备以获得不明确的好处。
|
||||
|
||||
### 经济是 5G 与 Wi-Fi 之争的一个要素吗?
|
||||
|
||||
**Lipton:** 经济始终是一个要素。让我们将对话集中在室内企业级应用程序上,因为这是一些运营商打算用 5G 定位的用例。 我们已经提到升级到 5G 将要求企业部署昂贵的 DAS 或小型蜂窝系统用于室内覆盖,几乎将所有设备升级到包含 5G 调制解调器,并为每个设备支付服务合同。理解 5G 蜂窝网络和 DAS 系统在许可频谱上运行也很重要,这类似于私人高速公路。 服务提供商为此频谱支付了数十亿美元,这笔费用需要货币化并嵌入服务成本中。 因此,从部署和生命周期的角度来看,Wi-Fi 在经济上比 5G 有利。
|
||||
|
||||
### 5G 与 Wi-Fi 有任何安全隐患吗?
|
||||
|
||||
**Lipton:** 一些人认为蜂窝技术比Wi-Fi更安全,但事实并非如此。LTE 相对安全,但也有弱点。例如,普渡大学和爱荷华大学的研究人员表示,LTE 容易受到一系列攻击,包括数据拦截和设备跟踪。5G 通过多种认证方法和更好的密钥管理改进了 LTE 安全性。
|
||||
|
||||
Wi-Fi 的安全性也没有停滞不前而是继续发展。当然,不遵循最佳实践的 Wi-Fi 实现,例如那些甚至没有基本密码保护的实现,并不是最佳的。但那些配置了适当的访问控制和密码的人是非常安全的。 随着新标准 - 特别是 WPA3 和增强开放(Enhanced Open) - Wi-Fi网络安全性进一步提高。
|
||||
|
||||
同样重要的是要记住,企业已根据其特定需求对安全性和合规性解决方案进行了大量投资。对于包括 5G 在内的蜂窝网络,企业将失去部署所选安全性和合规性解决方案的能力,以及对流量流的大多数可见性。 虽然 5G 的未来版本将通过称为网络切片的功能提供高级别的自定义,但企业仍将失去他们目前需要和拥有的安全性和合规性定制级别。
|
||||
|
||||
### 关于 5G 与 Wi-Fi 之间的讨论有什么最后的想法?
|
||||
|
||||
**Lipton:** 围绕 Wi-Fi 与 5G 的争论忽略了这一点。它们都有自己的用武之地,而且它们在很多方面都是互补的。由于需要连接和分析越来越多的东西,Wi-Fi 和 5G 市场都将增长。如果客户需要宏覆盖或高速切换,并且可以为这些功能支付额外成本,那么 5G 是可行的。
|
||||
|
||||
5G 也适用于客户需要物理网络分段的某些工业用例。但对于绝大多数企业客户而言,Wi-Fi 将继续像现在一样证明自己作为可靠,安全且经济高效的无线接入技术的价值。
|
||||
|
||||
**更多关于 802.11ax (Wi-Fi 6):**
|
||||
|
||||
* [为什么 802.11ax 是无线网络的下一件大事][7]
|
||||
* [FAQ: 802.11ax Wi-Fi][8]
|
||||
* [Wi-Fi 6 (802.11ax) 正在来到你附件的路由器][9]
|
||||
* [带有 OFDMA 的 Wi-Fi 6 打开了一个全新的无线可能性世界][10]
|
||||
* [802.11ax 预览:支持 Wi-Fi 6 的接入点和路由器随时可用][11]
|
||||
|
||||
|
||||
|
||||
加入 [Facebook][12] 和 [LinkedIn][13] 上的 network world 社区,评论你认为最重要的话题。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.networkworld.com/article/3399978/5g-will-augment-wi-fi-not-replace-it.html
|
||||
|
||||
作者:[Zeus Kerravala][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[GraveAccent](https://github.com/graveaccent)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.networkworld.com/author/Zeus-Kerravala/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://images.idgesg.net/images/article/2019/05/wireless_connection_speed_connectivity_bars_cell_tower_5g_by_thinkstock-100796921-large.jpg
|
||||
[2]: https://www.networkworld.com/article/3203489/what-is-5g-how-is-it-better-than-4g.html
|
||||
[3]: https://www.networkworld.com/article/3354477/mobile-world-congress-the-time-of-5g-is-almost-here.html
|
||||
[4]: https://images.idgesg.net/images/article/2019/06/headshot_jlipton_aruba-100798360-small.jpg
|
||||
[5]: https://www.networkworld.com/article/3215907/why-80211ax-is-the-next-big-thing-in-wi-fi.html
|
||||
[6]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fmobile-device-management-big-picture
|
||||
[7]: https://www.networkworld.com/article/3215907/mobile-wireless/why-80211ax-is-the-next-big-thing-in-wi-fi.html
|
||||
[8]: https://%20https//www.networkworld.com/article/3048196/mobile-wireless/faq-802-11ax-wi-fi.html
|
||||
[9]: https://www.networkworld.com/article/3311921/mobile-wireless/wi-fi-6-is-coming-to-a-router-near-you.html
|
||||
[10]: https://www.networkworld.com/article/3332018/wi-fi/wi-fi-6-with-ofdma-opens-a-world-of-new-wireless-possibilities.html
|
||||
[11]: https://www.networkworld.com/article/3309439/mobile-wireless/80211ax-preview-access-points-and-routers-that-support-the-wi-fi-6-protocol-on-tap.html
|
||||
[12]: https://www.facebook.com/NetworkWorld/
|
||||
[13]: https://www.linkedin.com/company/network-world
|
@ -1,177 +0,0 @@
|
||||
穿越到 1983 年学习 BASIC
|
||||
======
|
||||
|
||||
1983 年时还没有我,这让我偶有一些遗憾。但我特别遗憾的是,我没有经历过 8 位计算机时代的到来,因为我认为那些初次接触到还相对简单和受限的计算机的人们,拥有了超过如今的我们的巨大优势。
|
||||
|
||||
今天,(几乎)每个人知道如何使用计算机,但是即使是在计算机行业当中,也很少有人能明白任何一台计算机内部的所有内容。现在软件分为[如此多的层次][1],做的是如此不同的事情,没有哪个人能知道哪些是必不可少的。而在 1983 年,家用电脑足够傻大粗,努力一些的人就能了解到一台特定计算机是如何工作的。那样的一个人可能没有今天的我觉得操作系统那么神秘,因为如今的操作系统已经在硬件上叠加了太多的抽象层。我希望这些抽象层在逐一引入时易于理解;而今天,新的程序员们不得不自上而下、按时间回溯尝试理解它们。
|
||||
|
||||
很多著名的程序员,尤其在计算机游戏行业,孩童时期就在苹果 II 和 Commodore 64 这样的 8 位计算机上开始编写游戏,John Romero、Richard Garriott 和 Chris Roberts 都是例子。很容易看到这是如何发生。在 8 位计算机时代,很多游戏只能在计算机杂志和[书籍][2]中以印刷的 BASIC 程序清单方式得到。如果你想玩这其中一款游戏,你必须手工键入整个程序。不可避免的,你可能遇到一些问题,所以你就得必须调试你的程序。等到你让它可以工作起来了,你就已经足够了解了程序是如何运行的,你可以开始自己修改它了。如果你是一个狂热的游戏玩家,你几乎必然会成为一名优秀的程序员。
|
||||
|
||||
在我的童年时期我也玩电脑游戏。但是我玩的游戏在 CD-ROM 上的。我有时发现我自己必须得搜索如何修复崩溃的安装程序,这可能涉及编辑 Windows 注册表之类的东西。这种小故障的排除可能让我感觉很舒服,所以才考虑在大学里学习计算机科学。但是在大学中从不教我一些计算机如何工作的或如何控制它们的关键性的东西。
|
||||
|
||||
当然,现在我可以告诉计算机去干什么。尽管如此,我还是不禁感到,我缺少一些基础的见解 —— 只有那些伴随着更简单的计算机编程而成长的人才有的深刻见解。我不禁在想,如果在上世纪 80 年代初就接触到计算机会是什么样子?它们与今天使用计算机的体验相比有何不同?
|
||||
|
||||
这篇文章将与通常的 Two-Bit History 的文章有一点不同,因为我将为这些问题尝试设想一个答案。
|
||||
|
||||
### 1983
|
||||
|
||||
就在上周,你在电视上看到 [Commodore 64 广告][3] ,现在 M\*A\*S\*H 播完了(LCTT 译注: 这是一部上世纪 70 年代初的电视剧),星期一晚上你可以找到新的事情做了。这个 Commodore 64 甚至看起来比鲁迪(LCTT 译注:应该是下文中拥有 Apple II 的人)的家人放在他们家地下室的 Apple II 更好。而且,广告中吹嘘说新的计算机会让你的朋友们“挤破”你家的大门。你知道学校里的几个家伙宁愿在你家闲逛,也不愿去鲁迪的家里,只要他们能玩 Zork 就行。
|
||||
|
||||
所以,你得说服你的父母去买一台。你的母亲说,他们可以考虑它,只要你不去游戏厅玩街机就给你买一台家庭电脑。虽然不太情愿,但是你还是同意了。而你的父亲则想,他可以开始用 MultiPlan (LCTT 译注:电子表格程序)跟踪家庭的资金状况,MultiPlan 是他曾听说过的一个电子表格程序,这就是为什么这台计算机被放在客厅的原因。然而,一年后,你仍然是唯一使用它的人。最终,他们允许你把它搬到了你的卧室中的桌子上,正好位于你的警察海报下方。
|
||||
|
||||
(你的姐姐对这个决定表示抗议,但是,在 1983 年电脑这种东西[并不适合女孩][4]。)
|
||||
|
||||
你的父亲在下班路上从 [ComputerLand][5] 那里把它捎了回来。你俩把盒子放置在电视机的旁边,并打开它。外包装上说“欢迎来到友好的计算机世界”。而二十分钟以后你就不再信这句话了 —— 你俩仍然在尝试把 Commodore 连接到电视机上,并在想电视机的天线电缆是 75 欧姆还是 300 欧姆的同轴电缆。但是,最终你把电视机调到了频道 3,看到了一个颗粒状的、紫色的图像。
|
||||
|
||||
![Commodore 64 启动屏幕][6]
|
||||
|
||||
计算机显示了一个 `READY`。你的爸爸把计算机推向了你,这意思是你是第一个尝试它的人。你小心翼翼地敲击每个字母,键入了 `HELLO`。然而计算机的回应是令人困惑的。
|
||||
|
||||
![Commodore 64 语法错误][7]
|
||||
|
||||
你尝试输入一些稍有不同的单词,但是回应总是一样的。你父亲说,你最好仔细读一下手册的其它部分。这绝非易事,[随 Commodore 64 一起提供的手册][8] 是一本小书。但是这不会困住你,因为手册的介绍预兆着奇迹。
|
||||
|
||||
它声称,Commodore 64 有“微型计算机行业中最先进的图画制作器”,能允许“你设计拥有四种不同颜色的图画,就像你在街机视频游戏里看到的一样”。Commodore 64 也有“内置的音乐和声音效果,可以和很多著名的音乐合成器相媲美”。所有的这些工具都置身于你的手边,手册会引导你完成所有这些:
|
||||
|
||||
> 与所有提供的硬件一样重要的是,这本用户指南将提高你对计算机的理解。它不能在这里告诉你有关计算机的所有信息,但是它会向你推荐各种出版物,以获取有关所提出主题的更多详细信息。Commodore 希望你真正喜欢你的新 COMMODORE 64。要想真正得到乐趣,请记住:编程不是一天就能学会的一种东西。通读这个用户指南你要有耐心。
|
||||
|
||||
那一夜,你在床上通读了整个前三个章节:“安装”、“入门”和“开始 BASIC 编程”,在最终睡着时,手册打开着放在了胸前。
|
||||
|
||||
### Commodore BASIC
|
||||
|
||||
现在是星期六早上,你渴望尝试你所学到的东西。手册教给你的第一件事是如何更改在显示器上的颜色。你按照操作说明,按下 `CTRL-9` 来进入反向输入模式,然后按住空格键来创建一个长长的行。你可以使用 `CTRL-1` 到 `CTRL-8` 在不同的颜色之间交换,让你的电视机屏幕焕发出新的力量。
|
||||
|
||||
![Commodore 64 颜色带][9]
|
||||
|
||||
尽管这很酷,但你觉得这不算是编程。要对计算机编程机,你昨晚已经学会了如何做,你必须以一种称为 BASIC 的语言与计算机交谈。对你来说,BASIC 看起来就像星球大战中的东西一样科幻,但是,在 1983 年的时候,其实 BASIC 已经快二十岁了。它是由两位达特茅斯教授 John Kemeny 和 Tom Kurtz 发明的,他们想让社会科学和人文科学中的本科生也可以使用计算机。它广泛使用在微型计算机上,在大学的数学课上很受欢迎。在比尔盖茨和保罗艾伦为 Altair 编写了微软 BASIC 解释器后,它就成为了微型计算机上的标准。但是手册对此没有任何解释,很多年你都没有学会它。
|
||||
|
||||
手册中建议你尝试的第一个 BASIC 命令是 `PRINT` 命令。你输入了 `PRINT "COMMODORE 64"`,很慢,因为你需要花费一点时间才能在按键 `2` 上面找到引号符号。你单击 `RETURN`,这一次,计算机没有抱怨,完全是按照你告诉它做的,在下一行中显示了 “COMMODORE 64” 。
|
||||
|
||||
现在你尝试对各种不同的东西上使用 `PRINT` 命令:两个数字加在一起,两个数字乘在一起,甚至几个十进制数字。你不再输入 `PRINT` ,而是使用 `?` 代替,因为手册中告知你 `?` 是 `PRINT` 的一个缩写,通常专业程序员这么使用。你感觉自己已经像是一个专家了,不过你想起你还没有看第三章“开始 BASIC 编程”。
|
||||
|
||||
你很快就开始阅读了。该章节提示你编写你的第一个真正的 BASIC 程序。你输入 `NEW` 并单击 `RETURN`,它给了你一个干净的<ruby>黑板<rt>slate</rt></ruby>。然后你在其中输入你的程序:
|
||||
|
||||
```
|
||||
10 ?"COMMODORE 64"
|
||||
20 GOTO 10
|
||||
```
|
||||
|
||||
手册里解释说 10 和 20 是行号。它们为计算机排序了语句。它们也允许程序员在某些命令中引用程序的其它行,正像你在这里使用的 `GOTO` 命令一样,它将程序回指回到行 10。“这是一个很好的编程习惯”,手册认为,“以 10 的增量来编号行,可以防止你以后需要插入一些语句”。
|
||||
|
||||
你输入 `RUN`,并凝视充满了 “COMMODORE 64” 的屏幕,它一遍又一遍的重复。
|
||||
|
||||
![Commodore 64 显示反复打印 "Commodore 64" 的结果][10]
|
||||
|
||||
你不确定这不会引爆你的计算机,过了一秒钟你才想起来应该单击 `RUN/STOP` 按键来打断循环。
|
||||
|
||||
手册接下来的一些部分向你介绍了变量,它告诉你变量像“在计算机中许多的盒子,它们每个可以容纳一个数字或一个文本字符串”。以一个 `%` 符号结尾的变量是一个整数,与此同时,以一个 `$` 符号结尾的变量是一个字符串。其余的所有变量是一些称为“浮点”变量的东西。手册警告你小心变量名称,因为计算机仅识别变量名称的前两个字母,尽管它不限制你想创建的名称有多长。(这并不没有特别让你困扰,但是要是 30 年后看,这可能会让人们感到太疯狂了)
|
||||
|
||||
你接着学习 `IF... THEN...` 和 `FOR... NEXT...` 结构体。有了这些新的工具,你感觉有能力来解决接下来手册丢给你的重大挑战。“如果你是有野心的人”,没错,“输入下面的程序,并查看会发生什么。”该程序比你目前为止看到的程序更长、更复杂,但是,你很想知道它做了什么:
|
||||
|
||||
```
|
||||
10 REM BOUNCING BALL
|
||||
20 PRINT "{CLR/HOME}"
|
||||
25 FOR X = 1 TO 10 : PRINT "{CRSR/DOWN}" : NEXT
|
||||
30 FOR BL = 1 TO 40
|
||||
40 PRINT " ●{CRSR LEFT}";:REM (● is a Shift-Q)
|
||||
50 FOR TM = 1 TO 5
|
||||
60 NEXT TM
|
||||
70 NEXT BL
|
||||
75 REM MOVE BALL RIGHT TO LEFT
|
||||
80 FOR BL = 40 TO 1 STEP -1
|
||||
90 PRINT " {CRSR LEFT}{CRSR LEFT}●{CRSR LEFT}";
|
||||
100 FOR TM = 1 TO 5
|
||||
110 NEXT TM
|
||||
120 NEXT BL
|
||||
130 GOTO 20
|
||||
```
|
||||
|
||||
上面的程序充分利用 Commodore 64 最酷的功能之一。当把不可打印的命令字符作为字符串的一部分传递到 `PRINT` 命令时,它们会执行其操作,而不是被打印到屏幕上。这允许你重新摆放你程序中打印的字符串。(LCTT 译注:上述程序中如 `{CRSR LEFT}` 之类的控制字符执行类似 “在行中向左移动一个位置” 的操作,因此上述程序中利用这些字符操作了一个圆点字符四处移动,如下图。)
|
||||
|
||||
输入上面的程序花费了很长时间。你犯一些错误,并不得不重新输入一些行。但是,你最终能够按下 `RUN`,并看到了一件杰作:
|
||||
|
||||
![Commodore 64 反弹球][11]
|
||||
|
||||
你觉得这恐怕是你见过的最酷的事了。不过你转头就几乎忘记了它,因为马上你就学到了 BASIC 的内置的函数,像 `RND`(它返回一个随机数字)和 `CHR$`(它返回与一个给定数字代码匹配的字符),这个手册向你展示一个程序,它有名到什么程度呢?直到许多年后,它仍然被当成了一个[短文选集][12]的标题:
|
||||
|
||||
```
|
||||
10 PRINT "{CLR/HOME}"
|
||||
20 PRINT CHR$(205.5 + RND(1));
|
||||
40 GOTO 20
|
||||
```
|
||||
|
||||
当运行时,上面的程序产生一个随机的迷宫:
|
||||
|
||||
![Commodore 64 迷宫程序][13]
|
||||
|
||||
这绝对是你曾经见过最酷的事。
|
||||
|
||||
### PEEK 和 POKE
|
||||
|
||||
现在你已经看过了 Commodore 64 手册的前四章节,包含那篇 “高级的 BASIC” 的章节,所以你感到十分自豪。在这个星期六早上,你学习到了很多东西。但是这个下午(在赶快吃了点午饭后),你将继续学习一些使这个放在你的客厅中的奇妙机器变得不再神秘的东西。
|
||||
|
||||
手册中的下一个章节标题是“高级颜色和图像命令”。它从回顾你今天早上首先键入的彩色条开始,并向你展示了如何在一个程序中做同样的事。然后它教给了你如何更改屏幕的背景颜色。
|
||||
|
||||
为此,你需要使用 BASIC 的 `PEEK` 和 `POKE` 命令。这些命令分别允许你检查和写入存储器地址。Commodore 64 有一个主背景颜色和一个边框背景颜色。每个通过一个特定的内存地址控制。你可以写入任何你喜欢的颜色值到这些地址,以使用这些背景颜色和边框颜色。
|
||||
|
||||
手册中解释:
|
||||
|
||||
> 正像变量可以被认为你放置信息的机器中的“盒子”一样,你也可以认为在计算机中代表特定内存位置的是一些特殊定义的“盒子”。
|
||||
>
|
||||
> Commodore 64 会查看这些内存位置来了解屏幕的背景和边框应该是什么样的颜色,什么样的字符应该被显示在屏幕上,以及显示在哪里,等等其它任务。
|
||||
|
||||
你编写了一个程序来遍历所有可用的背景和边界的颜色的组合:
|
||||
|
||||
```
|
||||
10 FOR BA = 0 TO 15
|
||||
20 FOR BO = 0 TO 15
|
||||
30 POKE 53280, BA
|
||||
40 POKE 53281, BO
|
||||
50 FOR X = 1 TO 500 : NEXT X
|
||||
60 NEXT BO : NEXT BA
|
||||
```
|
||||
|
||||
虽然 `POKE` 命令以及它的大操作数一开始时看起来很吓人,现在你看到数字的实际值其实不是很要紧。显然,你必须得到正确的数字,但是所有的数字代表的是一个“盒子”,Commodore 只是正好存储在地址 53280 处而已。这个盒子有一个特殊的用途:Commodore 使用它来确定屏幕背景应该是什么颜色。
|
||||
|
||||
![Commodore 64 更改背景颜色][14]
|
||||
|
||||
你认为这很漂亮。只需要写入到内存中一个专用的盒子,你可以控制一台计算机的基础属性。你不确定 Commodore 64 的电路系统如何读取你写入在内存中的值并更改屏幕的颜色的,但是,你不知道这些也没事。至少你知道结果是怎么样的。
|
||||
|
||||
### 特殊容器
|
||||
|
||||
那个周六,你没有读完整本手册,因为你现在开始精疲力尽。但是你最终会全部读完它。在这个过程中,你学到更多关于 Commodore 64 专用的盒子。有一些盒子你可以写入来控制在屏幕上显示什么——这也是一个盒子,事实上,是控制每一个位置出现的字符。在第六章节 “精灵图形” 中,你学到可以让你定义可以移动和甚至缩放图像的特殊盒子。在第七章节 “创造声音” 中,你学到你能写入以便使你的 Commodore 64 歌唱 “Michael Row the Boat Ashore” 的盒子。Commodore 64,事实证明,它和你可能以后学习到的一个称为 API 的关系甚少。控制 Commodore 64 大多涉及写入到电路系统赋予特殊意义的内存地址。
|
||||
|
||||
你花费在这些特殊盒子的多年时光一直伴随着你。甚至几十年后,当你发现你是在一个拥有大量的图形或声音 API 的机器上编程时,你知道,在隐其背后,这些 API 最终是写入到这些盒子之类的东西里面的。你有时会好奇那些只使用过 API 的年轻程序员,好奇他们肯定是觉得 API 为他们做到的这一切。可能他们认为这些 API 调用了一些其它隐藏的 API。但是,那些隐藏的 API 调用了什么?你不由得同情这些年轻的程序员,因为他们一定会非常迷惑。
|
||||
|
||||
如果你喜欢这篇文章,也喜欢它每两周发布的一篇!那么请在 Twitter 上关注 [@TwoBitHistory][15] 或订阅 [RSS 源][16]来确保你知道新的文章发布出来的时间。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via:https://twobithistory.org/2018/09/02/learning-basic.html
|
||||
|
||||
作者:[Two-Bit History][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[robsean](https://github.com/robsean)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://twobithistory.org
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.youtube.com/watch?v=kZRE7HIO3vk
|
||||
[2]: https://en.wikipedia.org/wiki/BASIC_Computer_Games
|
||||
[3]: https://www.youtube.com/watch?v=ZekAbt2o6Ms
|
||||
[4]: https://www.npr.org/sections/money/2014/10/21/357629765/when-women-stopped-coding
|
||||
[5]: https://www.youtube.com/watch?v=MA_XtT3VAVM
|
||||
[6]: https://twobithistory.org/images/c64_startup.png
|
||||
[7]: https://twobithistory.org/images/c64_error.png
|
||||
[8]: ftp://www.zimmers.net/pub/cbm/c64/manuals/C64_Users_Guide.pdf
|
||||
[9]: https://twobithistory.org/images/c64_colors.png
|
||||
[10]: https://twobithistory.org/images/c64_print_loop.png
|
||||
[11]: https://twobithistory.org/images/c64_ball.gif
|
||||
[12]: http://10print.org/
|
||||
[13]: https://twobithistory.org/images/c64_maze.gif
|
||||
[14]: https://twobithistory.org/images/c64_background.gif
|
||||
[15]: https://twitter.com/TwoBitHistory
|
||||
[16]: https://twobithistory.org/feed.xml
|
||||
[17]: https://twitter.com/TwoBitHistory/status/1030974776821665793?ref_src=twsrc%5Etfw
|
Loading…
Reference in New Issue
Block a user