#684 Thunderbolt

2021-10-24

Thunderbolt(又称“雷电”,苹果中国译为“雷雳”[4])是由英特尔发表的连接器标准,目的在于当作电脑与其他设备之间的通用总线,第一代与第二代接口是与 Mini DisplayPort 集成,较新的第三代开始改为与 USB Type-C 结合,并能提供电源。

早期由英特尔独立研发,使用光纤传输;后来在一次科技展示会场上,苹果公司看到了早期光纤传输的原型后,主动对英特尔表示兴趣并给予开发上的建议,致使正式发表的第一代从光纤改用铜线和苹果的 Mini DisplayPort 外形。

第三代改为使用 USB Type-C 接口。由于二合一的集成特点,因此它既能以双向 40 Gbit/s 传输数据(40 Gbit/s + 40 Gbit/s,特别是针对外置高速网络时),既能兼容 Mini DisplayPort 设备直接连接 Thunderbolt 接口传输视频与声音信号,也可连接 Apple Thunderbolt Display 直接同时输出视频、声音与数据,且不用如传统使用多条连接线。

版本 时间 厂商 代号 带宽 USB
Thunderbolt 开发版 2009 Intel Light Peak    
Thunderbolt 2011/02 Intel
Apple
Light Peak 10 Gbit/s 与 USB 3.0 同时应用在未来的系统中,扮演互补角色。
具有这种接口的 MacBook Pro 及一根 29 美元的连接线。
苹果独享这技术专利权一年。
Thunderbolt 2 2013 Intel
Apple
Falcon Ridge 20 Gbit/s  
Thunderbolt 3 2015/06/02 Intel Alpine Ridge 40 Gbit/s 连接端口更换为 USB Type-C
Thunderbolt 4 2020/07/08 Intel   40 Gbit/s  
  1. Thunderbolt 也叫雷电接口,Intel 公司开发。
  2. 最新的是今年发布的 4 代。
  3. 需要 CPU 支持:Thunderbolt 控制器
  4. 可以支持 USB, SD/TF, 网口 (), 视频接口(HDMI, VGA, DP)等接口, PCI-E 设备, 固态硬盘。
    注意:支持的接口和设备还需要看具体的实现,上面只是说理论上支持。
  5. 通常通过扩展坞的方式进行连接。

参考资料与拓展阅读

#683 我的开发机器

2021-10-24

Notebook
我的主力开发环境是大概 14 年 4 月在 DELL 官方 (dell.com) 买的一台 Inspiron 14R (5437) 笔记本。
PS: 这台笔记本原本是我老婆办公用, 用了将近五年之后, 于 2019 年 1 月在换了一台 小米 Air 13.3, 然后我就有笔记本了...到现在我也用了两年多了。

#682 家庭教育促进法

2021-10-23

除了房产税的消息,这是新闻联播内容中最让我感兴趣的第二个点,主要是我有孩子,自然对教育两个字特别感兴趣。

不过我本以为是和 “双减” 有关,但仔细了解之后才知道,立法是为了明确监护人应该承担的教育义务,明确家庭和学校在教育方面的界限。

  1. 道德品质
  2. 身体素质
  3. 生活技能
  4. 文化修养
  5. 行为习惯

但也没有规定什么处罚措施,据说是删掉了,只是强调了国家对家庭教育的指导、支持和配套服务。

参考资料与拓展阅读

#681 房产税开始试点

2021-10-23

今天的最重要新闻:

新华社10月23日消息,为积极稳妥推进房地产税立法与改革,引导住房合理消费和土地资源节约集约利用,促进房地产市场平稳健康发展,第十三届全国人民代表大会常务委员会第三十一次会议决定:授权国务院在部分地区开展房地产税改革试点工作。
———— 新华社:全国人大常委会授权国务院在部分地区开展房地产税改革试点工作

我不懂法律条文,但我之前听说,房产税将会很大程度改变中国楼市。观察ing...

#680 Python GIL 的最新动态

2021-10-22

开源中国上看到有人通过一些实验验证来视图说服 Python 核心团队移除 GIL,根据他的数据,移除 GIL 可以大幅提升多线程性能(19.8 倍)。

#679 Redis 版本历史

2021-10-20
版本 日期
6.2.8 October 2021
6.2.4 August 2021
6.0.20 April 2021
6.0.12 January 2021
6.0.8 September 2020
6.0 May 2020
5.6.0 April 2020
5.5 Preview April 2019
5.4.14 February 2020
5.4.10 December 2019
5.4.6 July 2019
5.4.4 June 2019
5.4.2 April 2019
5.4 December 2018
5.2.2 August 2018
5.3 beta July 2018
5.2 June 2018
5.0.2 2018 March
5.0 November 2017
4.5 May 2017
4.4 December 2016
4.3.0-230 August 2, 2016
4.2.1-30 October 18, 2015
4.0.0-49 June 18, 2015
0.99.5-24 February 15, 2015
0.99.5-11 January 5, 2015

Redis 4

  1. 模块系统,为后来的 RedisJSON,RedisSearch 打基础
  2. PSYNC 2.0(部分复制)
  3. LFU 优化
  4. 异步优化
  5. DEL -> UNLINK
  6. FLUSHDB, FLUSHALL 增加 ASYNC 参数
  7. RDB-AOF 混合持久化
  8. SWAPDB 命令
  9. MEMORY 命令

Redis 5

Redis 6

  • 多线程 IO
  • SSL
  • ACL 权限控制
  • RESP3
  • 客户端缓存

Redis 7

参见:2022/04/29,Redis 7 的变化

参考资料与拓展阅读

#678 Golang: 泛型

2021-10-18

泛型就是在编码中,涉及类型的定义可以不指定具体的类型,编译器根据使用时的上下文来生成相应类型的定义。

#677 亚马逊领导力准则

2021-10-15

亚马逊领导力准则
Amazon Leadership Principles

Amazon LOGO

  1. 顾客至尚 Customer Obsession
    领导者从客户入手,再反向推动工作。他们努力工作,赢得并维系客户对他们的信任。虽然领导者会关注竞争对手,但是他们更关注客户。
    Leaders start with the customer and work backwards. They work vigorously to earn and keep customer trust. Although leaders pay attention to competitors, they obsess over customers.
    ps: 作为开发者也应该关心客户(无论是真是的产品使用者,还是代码世界中接口调用方)会如何使用我们的代码。
  2. 主人翁精神 Ownership
    领导者是主人翁。他们会从长远考虑,不会为了短期业绩而牺牲长期价值。他们不仅仅代表自己的团队,而且代表整个公司行事。他们绝不会说“那不是我的工作”。
    Leaders are owners. They think long term and don’t sacrifice long-term value for short-term results. They act on behalf of the entire company, beyond just their own team. They never say “that’s not my job."
    ps: 领导者是必须要有这种精神的,积极主动,认真负责。不过有些公司喜欢向员工洗脑 “公司是我家” 的理念,但也没见把员工当家人,这就有点扯淡了。
  3. 创新简化 Invent and Simplify
    领导者期望并要求自己的团队进行创新和发明,并始终寻求使工作简化的方法。他们了解外界动态,四处寻找新的创意,并且不局限于“非我发明”的观念。当我们开展新事物时,我们要接受被长期误解的可能。
    Leaders expect and require innovation and invention from their teams and always find ways to simplify. They are externally aware, look for new ideas from everywhere, and are not limited by “not invented here." As we do new things, we accept that we may be misunderstood for long periods of time.
  4. 决策正确 Are Right, A Lot
    领导者在大多数情况下都能做出正确的决定。他们拥有卓越的业务判断能力和敏锐的直觉.他们寻求多样的视角,并挑战自己的观念。
    Leaders are right a lot. They have strong judgment and good instincts. They seek diverse perspectives and work to disconfirm their beliefs.
  5. 好奇求知 Learn and Be Curious
    领导者从不停止学习,并不断寻找机会以提升自己。领导者对各种可能性充满好奇并付于行动加以探索。
    Leaders are never done learning and always seek to improve themselves. They are curious about new possibilities and act to explore them.
  6. 选贤育能 Hire and Develop the Best
    领导者不断提升招聘和晋升员工的标准。他们表彰杰出的人才,并乐于在组织中通过轮岗磨砺他们。领导者培养领导人才,他们严肃地对待自己育才树人的职责。领导者从员工角度出发,创建职业发展机制。
    Leaders raise the performance bar with every hire and promotion. They recognize exceptional talent, and willingly move them throughout the organization. Leaders develop leaders and take seriously their role in coaching others. We work on behalf of our people to invent mechanisms for development like Career Choice.
    ps: 愿意去培养员工的公司就是好公司。
  7. 最高标准 Insist on the Highest Standards
    领导者有着近乎严苛的高标准 — 这些标准在很多人看来可能高得不可理喻。领导者不断提高标准,激励自己的团队提供优质产品、服务和流程。领导者会确保任何问题不会蔓延,及时彻底解决问题并确保问题不再出现。
    Leaders have relentlessly high standards — many people may think these standards are unreasonably high. Leaders are continually raising the bar and drive their teams to deliver high quality products, services, and processes. Leaders ensure that defects do not get sent down the line and that problems are fixed so they stay fixed.
    ps: 完美主义不一定适用于所有场景。
  8. 远见卓识 Think Big
    局限性思考只能带来局限性的结果。领导者大胆提出并阐明大局策略,由此激发良好的成果。他们从不同角度考虑问题,并广泛寻找服务客户的方式。
    Thinking small is a self-fulfilling prophecy. Leaders create and communicate a bold direction that inspires results. They think differently and look around corners for ways to serve customers.
  9. 崇尚行动 Bias for Action
    速度对业务影响至关重要。很多决策和行动都可以改变,因此不需要进行过于广泛的推敲。我们提倡在深思熟虑前提下进行冒险。
    Speed matters in business. Many decisions and actions are reversible and do not need extensive study. We value calculated risk taking.
  10. 勤俭节约 Frugality
    力争以更少的投入实现更大的产出。勤俭节约可以让我们开动脑筋、自给自足并不断创新。增加人力、预算以及固定支出并不会为你赢得额外加分。
    Accomplish more with less. Constraints breed resourcefulness, self-sufficiency, and invention. There are no extra points for growing headcount, budget size, or fixed expense.
  11. 赢得信任 Earn Trust
    ​领导者专注倾听,坦诚沟通,尊重他人。领导者敢于自我批评,即便这样做会令自己尴尬或难堪。他们并不认为自己或其团队总是对的。领导者会以最佳领导者和团队为标准来要求自己及其团队。
    Leaders listen attentively, speak candidly, and treat others respectfully. They are vocally self-critical, even when doing so is awkward or embarrassing. Leaders do not believe their or their team’s body odor smells of perfume. They benchmark themselves and their teams against the best.
  12. 刨根问底 Dive Deep
    ​领导者深入各个环节,随时掌控细节,经常进行审核,当数据与传闻不一致时持有怀疑态度。领导者不会遗漏任何工作。
    Leaders operate at all levels, stay connected to the details, audit frequently, and are skeptical when metrics and anecdote differ. No task is beneath them.
  13. 敢于谏言,服从大局 Have Backbone; Disagree and Commit
    ​领导者必须要能够不卑不亢地质疑他们无法苟同的决策,哪怕这样做让人心烦意乱,精疲力尽。领导者要信念坚定,矢志不移。他们不会为了保持一团和气而屈就妥协。一旦做出决定,他们就会全身心地致力于实现目标。
    Leaders are obligated to respectfully challenge decisions when they disagree, even when doing so is uncomfortable or exhausting. Leaders have conviction and are tenacious. They do not compromise for the sake of social cohesion. Once a decision is determined, they commit wholly.
    ps: 不同意就提出来,如果有分歧就意见保留。
  14. 达成业绩 Deliver Results
    ​领导者会关注其业务的关键决定条件,确保工作质量并及时完成。尽管遭受挫折,领导者依然勇于面对挑战,从不气馁。
    Leaders focus on the key inputs for their business and deliver them with the right quality and in a timely fashion. Despite setbacks, they rise to the occasion and never settle.
    ps: 目标导向。
  15. 致力于成为全球最佳雇主 Strive to be Earth's Best Employer
    领导者致力于打造一个更安全、更高生产力、更高效、更多元、更公平的工作环境。领导者具备同理心,享受工作乐趣,并帮助他人也在工作中获得乐趣。领导者时常自省:团队成员在成长吗?他们是否被赋能?是否准备好迎接未来?领导者对员工的个人成功拥有愿景和承诺,无论这成功是在亚马逊还是在其他地方。
    Leaders work every day to create a safer, more productive, higher performing, more diverse, and more just work environment. They lead with empathy, have fun at work, and make it easy for others to have fun. Leaders ask themselves: Are my fellow employees growing? Are they empowered? Are they ready for what's next? Leaders have a vision for and commitment to their employees' personal success, whether that be at Amazon or elsewhere.
    ps: 无论哪家公司肯定是老板赚钱第一,只能当口号讲讲,员工也姑妄听之。
  16. 成功和规模带来更大的责任 Success and Scale Bring Broad Responsibility
    亚马逊诞生于车库,但并未止步于此。亚马逊的业务规模庞大,对世界产生着影响,但我们还远非完美。我们必须时刻保持谦虚,并谨慎思考我们的行动带来的潜在影响。我们所在的社区、地球和后代需要我们每日精益求精做到更好。为了惠及客户、员工、合作伙伴以及全球更多人,我们必须抱着进步的决心开启每一天,并在每天结束时,深信明天可以更有作为。领导者要创造远超其所消费的更多价值,做到发现问题、并推动事物向更好的方向发展。
    We started in a garage, but we're not there anymore. We are big, we impact the world, and we are far from perfect. We must be humble and thoughtful about even the secondary effects of our actions. Our local communities, planet, and future generations need us to be better every day. We must begin each day with a determination to make better, do better, and be better for our customers, our employees, our partners, and the world at large. And we must end every day knowing we can do even more tomorrow. Leaders create more than they consume and always leave things better than how they found them.
    ps: 一般来说,能对客户负责就很不错了,如果还能对员工负责就更厉害了,如果还要讲社会责任就有点高山仰止了。大公司还是要讲讲社会责任的。

#676 Windows 11

2021-10-15

https://www.microsoft.com/zh-cn/windows/windows-11-specifications

主要的变化

  1. 新的 UI 设计
    根据网上流传的图片,还挺好看的,令人耳目一心
  2. 支持 Android App

其他:

  1. 新的应用商城
  2. 整合了微软的 Teams 作聊天功能
  3. 游戏相关的功能
  4. DirectX 12 Ultimate
  5. DirectStorage
  6. Auto HDR
  7. XBox 相关整合

硬件要求

CPU (1GHz,双核),内存 (4G),磁盘 (64G)

  1. CPU: 1GHz,双核
  2. 内存: 4G
  3. 磁盘: 64G
  4. UEFI 安全启动
  5. TPM 2.0
  6. 显卡:支持 DirectX 12, WDDM 2.0 驱动

CPU, 内存, 磁盘方面的要求,主流的配置应该都能满足。
UEFI 安全启动

检测工具

MS 官方工具只能给出一个是否的答复,太弱了(正在开发新的监测工具)。

社区有提供一个检测工具:WhyNotWin11.exe (GitHub 下载)

第一次检测:

WhyNotWin11 Result Before

  1. 引导方式:Legacy
  2. CPU 兼容性:不支持
  3. 硬盘分区形式:分区形式不是 GPT
  4. 安全启动:禁用或未检测到
  5. TPM 版本:不存在 TPM 模块或 BIOS 禁用

除了 CPU 之外,其他几项都可以在 BIOS 中设置。
TPM:如果是 Intel 就找一下 Platform Trust Technology, AMD 可能是 fTPM。

WhyNotWin11 Result After

我的 CPU 是六代 i5,这就真的没办法了,i5 的话,最低要求是八代 (完整的 CPU 要求清单:Windows 11 supported Intel processors

抛弃才发布六年(2015/09)的六代 CPU 绝壁是一个愚蠢的决定,希望微软耗子喂汁!

Tiny11(2023-02-07)

根据微信公众号高效程序员文章《Win11 极限精简版发布:2G内存就能流畅运行!》中的信息,有人基于 Windows 11 Pro 22H2 打造了 Tiny11,不需要 TPM 和安全启动。