开发者
2022-06-01
基本要求
- 价格在 5000 ~ 8000
- 11 代 / 12 代英特尔 CPU,核数多一些(8+)
- 16G / 32G 内存
- 512G 固态硬盘
- 独立显卡
- 屏幕:至少 14 英寸
品牌筛选
首先确定品牌范围:惠普,戴尔,联想,ThinkPad,华为,小米
- 联想拯救者 Y7000
https://detail.zol.com.cn/notebook_advSearch/subcate16_1_m160-g5000-g6000-s9332-s8478-s9331-s8523-s5065-s5064-s6648-s5730-s855_9_1_0_1.html
- ThinkPad
https://detail.zol.com.cn/notebook_advSearch/subcate16_1_m32108-g5000-g6000-s9332-s8478-s9331-s8523-s5065-s5064-s6648-s5730-s855_9_1_0_1.html
- 惠普:光影精灵,暗影精灵
https://detail.zol.com.cn/notebook_advSearch/subcate16_1_m223-g5000-g6000-s9332-s8478-s9331-s8523-s5065-s5064-s6648-s5730-s855_9_1_0_1.html
- 戴尔:
https://detail.zol.com.cn/notebook_advSearch/subcate16_1_m21-g5000-g6000-s9332-s8478-s9331-s8523-s5065-s5064-s6648-s5730-s855_9_1_0_1.html
- 华为 MateBook
https://detail.zol.com.cn/notebook_advSearch/subcate16_1_m613-g5000-g6000-s9332-s8478-s9331-s8523-s5065-s5064-s6648-s5730-s855_9_1_0_1.html
- 小米:
https://detail.zol.com.cn/notebook_advSearch/subcate16_1_m55731-m34645-g5000-g6000-s9332-s8478-s9331-s8523-s5065-s5064-s6648-s5730-s855_9_1_0_1.html
小米,华为,ThinkPad 都是四核八线程
剩下:
- 联想拯救者 Y7000P 2022
i5 版 6.8,i7 版 7.8
开发者
2022-05-22
阮一峰最新的《科技爱好者周刊》中提到一个观点:代码优先和产品优先。大概是说代码优先程序员比较注重技术和代码,产品优先程序员则是更注重解决的问题。阮一峰明显是认为应该产品优先。
我看后感觉我就是文章的批判对象,从而进行了一个反思。但是我思考之后认为阮一峰说的并不全对,我的做法没有什么问题。
公司的目标,或者说研发中心的目标,就是用技术解决问题。而研发中心的开发人员的职责就是设计可行方案,然后通过代码来实现这个方案。
研发人员并不直接面向市场,面向用户,大多数时候也不负责产品的设计。甚至有些时候,研发人员都不参与产品设计方案评审。
理论上,如果我们能够吃透产品的设计,那么对开发工作肯定是有利的。但是我们的时间精力是非常有限的,平衡工作和生活之余,还有挤出时间来自学。
而且,对产品的思考更多的是产品设计人员的工作,让开发者把精力放在对产品的思考上有点不切实际。
确实,“如果产品不好用,代码也不会好”。但是,我们所处的位置真的很难左右公司的产品策略。让产品好用这个目标,在我们这边的操作空间就是写好自己代码。
所以对于开发者来说,代码优先几乎等同于产品优先,并不冲突,更好的代码等于更好的产品。
开发者根据项目背景和工期安排设计方案就行了。需要在代码和产品上做取舍的,是技术部门负责人的工作。
我知道很多人都说打工人要有更高层次的思维,思考更多,做得更多,才能有更好的发展。我自己确实也是这么想的,积极主动的承担起份外的工作,将能创造更大的影响力,然后决定你在组织中的角色。但我觉得这是工作之余的一些额外的投入,和日常开发工作无关,没有什么产品优先的问题,开发者还是应该把主要精力都放在自己的代码上。
- 我们应该投入一些精力去了解公司的产品设计,以及各项重点数据。
产品不是一成不变的,所以这是一个需要持续投入精力去做的事情。
- 我们还应该关注其他公司同事的工作,尤其是任务相关的其他同事。
开发者 RPC
2022-04-26
C++
- protocolbuffers/protobuf

Protocol Buffers - Google's data interchange format
- aria2/aria2

aria2 is a lightweight multi-protocol & multi-source, cross platform download utility operated in command-line. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
- google/flatbuffers

FlatBuffers: Memory Efficient Serialization Library
- apache/incubator-brpc

Industrial-grade RPC framework used throughout Baidu, with 1,000,000+ instances and thousands kinds of services. "brpc" means "better RPC".
- RPCS3/rpcs3

PS3 emulator/debugger
- TarsCloud/Tars

Tars is a high-performance RPC framework based on name service and Tars protocol, also integrated administration platform, and implemented hosting-service via flexible schedule.
- capnproto/capnproto

Cap'n Proto serialization/RPC system - core tools and C++ library
- idealvin/cocoyaxi

A go-style coroutine library in C++11 and more.
- baidu/sofa-pbrpc

A light-weight RPC implement of google protobuf RPC framework.
- zeroc-ice/ice

Comprehensive RPC framework with support for C++, C#, Java, JavaScript, Python and more.
- Tencent/phxrpc

A simple C++ based RPC framework.
- FISCO-BCOS/FISCO-BCOS

FISCO BCOS 是由微众牵头的金链盟主导研发、对外开源、安全可控的企业级金融区块链底层技术平台。 单链配置下,性能 TPS 可达万级。提供群组架构、并行计算、分布式存储、可插拔的共识机制、隐私保护算法、支持全链路国密算法等诸多特性。 经过多个机构、多个应用,长时间在生产环境中的实践检验,具备金融级的高性能、高可用性及高安全性。FISCO BCOS is a secure and reliable financial-grade open-source blockchain platform. The platform provides rich features including group architecture, cross-chain communication protocols, pluggable consensus mechanisms, privacy protection algorithms, OSCCA-approved (Office of State Commercial Cryptography Administration) cryptography algorithms, and distributed storage. Its performance, usability, and security have been testified by many institutional users and successful business applications in a live production environment.
- rpclib/rpclib

rpclib is a modern C++ msgpack-RPC server and client library
- sogou/srpc

High performance, low latency, lightweight enterprise-level RPC system. Supports Baidu bRPC, Tencent tRPC, thrift protocols.
Go
- asim/go-micro

A Go microservices framework
- chai2010/advanced-go-programming-book

:books: 《Go 语言高级编程》开源图书,涵盖 CGO、Go 汇编语言、RPC 实现、Protobuf 插件实现、Web 框架实现、分布式系统等高阶主题(完稿)
- zeromicro/go-zero

A web and RPC framework written in Go. It's born to ensure the stability of the busy sites with resilient design. Builtin goctl greatly improves the development productivity.
- grpc/grpc-go

The Go language implementation of gRPC. HTTP/2 based RPC
- geektutu/7days-golang

7 days golang programs from scratch (web framework Gee, distributed cache GeeCache, object relational mapping ORM framework GeeORM, rpc framework GeeRPC etc) 7 天用 Go 动手写/从零实现系列
- smallnest/rpcx

Best microservices framework in Go, like alibaba Dubbo, but with more features, Scale easily. Try it. Test it. If you feel it's better, use it! 𝐉𝐚𝐯𝐚 有 𝐝𝐮𝐛𝐛𝐨, 𝐆𝐨𝐥𝐚𝐧𝐠 有 𝐫𝐩𝐜𝐱! build for clound!
- roadrunner-server/roadrunner

🤯 High-performance PHP application server, load-balancer and process manager written in Golang
- twitchtv/twirp

A simple RPC framework with protobuf service definitions
- cloudwego/kitex

A high-performance and strong-extensibility Golang RPC framework that helps developers build microservices.
- davyxu/cellnet

High performance, simple, extensible golang open source network library
- hashicorp/go-plugin

Golang plugin system over RPC.
- TarsCloud/TarsGo

A high performance microservice framework in golang. A linux foundation project.
Java
- doocs/advanced-java

😮 Core Interview Questions & Answers For Experienced Java(Backend) Developers | 互联网 Java 工程师进阶知识完全扫盲:涵盖高并发、分布式、高可用、微服务、海量数据处理等领域知识
- apache/dubbo

Apache Dubbo is a high-performance, java based, open source RPC framework.
- redisson/redisson

Redisson - Redis Java client with features of In-Memory Data Grid. Over 50 Redis based Java objects and services: Set, Multimap, SortedSet, Map, List, Queue, Deque, Semaphore, Lock, AtomicLong, Map Reduce, Publish / Subscribe, Bloom filter, Spring Cache, Tomcat, Scheduler, JCache API, Hibernate, MyBatis, RPC, local cache ...
- dianping/cat

CAT 作为服务端项目基础组件,提供了 Java, C/C++, Node.js, Python, Go 等多语言客户端,已经在美团点评的基础架构中间件框架(MVC 框架,RPC 框架,数据库框架,缓存框架等,消息队列,配置系统等)深度集成,为美团点评各业务线提供系统丰富的性能指标、健康状况、实时告警等。
- grpc/grpc-java

The Java gRPC implementation. HTTP/2 based RPC
- nathanmarz/storm

Distributed and fault-tolerant realtime computation: stream processing, continuous computation, distributed RPC, and more
- weibocom/motan

A cross-language remote procedure call(RPC) framework for rapid development of high performance distributed services.
- line/armeria

Your go-to microservice framework for any situation, from the creator of Netty et al. You can build any type of microservice leveraging your favorite technologies, including gRPC, Thrift, Kotlin, Retrofit, Reactive Streams, Spring Boot and Dropwizard.
- sofastack/sofa-rpc

SOFARPC is a high-performance, high-extensibility, production-level Java RPC framework.
Python
- crossbario/autobahn-python

WebSocket and WAMP in Python for Twisted and asyncio
- quantmind/pulsar

Event driven concurrent framework for Python
- lgandx/PCredz

This tool extracts Credit card numbers, NTLM(DCE-RPC, HTTP, SQL, LDAP, etc), Kerberos (AS-REQ Pre-Auth etype 23), HTTP Basic, SNMP, POP, SMTP, FTP, IMAP, etc from a pcap file or from a live interface.
- Thriftpy/thriftpy

Thriftpy has been deprecated, please migrate to https://github.com/Thriftpy/thriftpy2
- tomerfiliba-org/rpyc

RPyC (Remote Python Call) - A transparent and symmetric RPC library for python
- samuelcolvin/arq

Fast job queuing and RPC in python with asyncio and redis.
- arskom/spyne

A transport agnostic sync/async RPC library that focuses on exposing services with a well-defined API using popular protocols.
- jgarzik/python-bitcoinrpc

Python interface to bitcoin's JSON-RPC API
- Pyrlang/Pyrlang

Erlang node implemented in Python 3.5+ (Asyncio-based)
- Thriftpy/thriftpy2

Pure python approach of Apache Thrift.
- kevinhwang91/rnvimr

Make Ranger running in a floating window to communicate with Neovim via RPC
- hakril/PythonForWindows

A codebase aimed to make interaction with Windows and native execution easier
- joshmarshall/jsonrpclib

A Python JSON-RPC over HTTP that mirrors xmlrpclib syntax.
- CiscoDevNet/yang-explorer

An open-source Yang Browser and RPC Builder Application
- phunt/avro-rpc-quickstart

Apache Avro RPC Quick Start.
- pavlov99/json-rpc

🔁 JSON-RPC 1/2 transport implementation. Supports python 2/3 and pypy.
- progrium/duplex

Full duplex modern RPC
- maxcutler/python-wordpress-xmlrpc

Python library for WordPress XML-RPC integration
- studio-ousia/mprpc

A fast Python RPC library
- Ananto30/zero

Zero: A simple, fast, high performance and low latency Python framework (RPC + PubSub) for building microservices or distributed servers
开发者 安全
2022-04-25
OSCHINA 上听说墨菲安全, 是一个 Golang 写的 cli 工具, 收集项目的依赖信息提交到服务器端, 查询可能的安全风险。
根据官方文档,目前支持 Java(maven,gradle),Golang(go mod),Node(npm,yarn),Python(pip)语言。
本文档就是简单的试用一下。
总结:我感觉挺好的,一般来说对于依赖我们都不上心,其实是有很大安全风险在里面。我觉得应该对线上业务的依赖都应该有严格的审查。
如果是安全方面的需求没有那么强烈,用这个工具可以为依赖的管理提供一些帮助。
可以考虑和 CI/CD 继承,如果有安全风险就发出告警信息。
开发者 Python
2022-04-19
一些阶段性目标:
-
参照网上查到的博客和文档,先列出大纲以及制定学习计划
大概以下五个主题的内容:
-
Python 标准库
- Tornado
- Redis
- RabbitMQ (pika)
-
MySQL (SQLAlchemy/pymysql)
-
如果资源方面允许,可以实现一个内部系统开发,进行编码和设计方面的指导
- 阅读项目文档,理解邮件和短信的处理流程,项目结构,以及每个项目的核心逻辑
- 给定一个周边项目进行开发维护,小任务开发(Code Review)
- 从写文档和单元测试开始,逐渐参与核心项目的开发和维护
其他:Linux 基础,Git,我们的开发流程和规范
标准库
- 常用基础库: os, sys, shutil, re, time, datetime, ramdom, json, pickle ...
- 日志: logging
- HTTP 相关: urllib, http
- 邮件相关: email, smtplib, smtpd
- 编码和加密相关: md5, sha, base64, hmac, binascii
- 单元测试: unitest 非常重要
Tornado
- Web 框架先走起来
- 基本用法,比如
add_timeout, call_later, add_callback ...
- 了解 IOLoop/IOStream
- 项目开发过程中的一些实践
Redis
- 安装
redis-cli
- 数据类型
- 命令清单
redis 库
RabbitMQ
- 基本概念 (Exchange / Queue / Binding / Channel / Connection)
- 安装和使用
pika 库
- 发布/订阅 (生产, 消费)
MySQL
- 数据类型
- 连接
- 索引
pymysql / mysqlclient 库
- SQLAlchemy
开发者
2022-04-14
文本类型
最常见的文本类型数据序列化格式要数 JSON 和 XML 了。
早年间,知名的 RPC 规范 SOAP,XML-RPC 就是定义在 XML 的基础之上。
后来,随着 Web 的流行,JSON 使用得越来越多,基于 JSON 的 RPC 也开始出现。
但是最后 RPC 整体衰弱下来,终究没有抵过 HTTP API 的趋势。大部分 HTTP API 都是基于 JSON,少部分基于 XML。
苹果公司的 plist (Property list) 格式也是基于 XML。
除了 JSON 和 XML 之外,其他常见的文本类型数据序列化格式还有:CSV,YAML。
二进制类型
-
ASN.1 参考 2020/01/31, ASN.1。
-
D-BUS
-
三种语言相关的序列化格式:
-
Java Object Serialization
- Python Pickle
-
PHP serialization format
-
Mongo 引入的 BSON,二进制 JSON。类似的格式(JSON 二进制化)还有:
-
Binn
- CBOR (rfc8949)
- Amazon Ion
- msgpack
- Smile
-
ubjson。
-
也有一些 XML 二进制化的格式(Binary XML),比如:
-
W3C 推荐的 Efficient XML Interchange (EXI)
-
ISO 标准 Fast Infoset。
-
Apache 基金会的 Avro 和 Parquet。
-
近些年,随着微服务的流行,RPC 重新席卷而来。一般都是采用二进制的数据格式。
二进制的编码效率更高,可视化(转换成文本)的问题可以通过网关来提供。
Google 公司的 Protocol Buffers (protobuf) 和 FlatBuffers
Apache Thrift 也有自己独创的序列化格式(同名)。
开发者
2022-04-07
BNF,Backus-Naur Form,或者 Backus Normal Form,巴科斯范式
用来准确地描述一种计算机语言的语法规则,所以可以理解成是 “语言的语言”。
约翰·巴科斯(美国)首次在 ALGOL 58 中实现巴科斯范式。彼得·诺尔(丹麦)在 ALGOL 60 之中,进一步发展它的概念并将它的符号加以简化,称其为巴科斯范式(Backus Normal Form)。但高德纳主张应称为巴科斯-诺尔范式(Backus–Naur Form),因为它不算是一种正规形式(Normal Form)。
BNF 有两种常见变体:
- ABNF,扩充巴科斯范式
- EBNF,扩展巴科斯范式
不用深究 BNF,EBNF,ABNF,或者什么 xBNF 之间到底有什么区别,在需要开发语法解析器之前,只用知道这些是现在最主流的语法语言就行了。
这篇文章讨论的就是 Internet 领域常用的 ABNF。
(ABNF)它是由第68号互联网标准定义的,也就是RFC 5234,经常用于互联网工程任务组(IETF)通信协议的定义语言。
规则
ABNF 语法描述就是一组规则,每个规则分成规则名称、规则说明两部分。
PS:规则说明可以引用其他的规则。
拿 RFC#822 Internet Message Format 中的例子:
date-time = [ day-of-week "," ] date FWS time [CFWS]
day-of-week = ([FWS] day-name) / obs-day-of-week
day-name = "Mon" / "Tue" / "Wed" / "Thu" /
"Fri" / "Sat" / "Sun"
date = day month year
PS:这里只是截取的部分,没有列出来的规则在别处声明。
参考资料与拓展阅读
开发者 英语
2022-04-02
开发者想必都有耳闻,过去一两年间,因为一些美国政治风波的影响,各大社区都被政治正确问题所困扰,然后有一些相关改名的操作。
PS: 连黑人牙膏(高露洁旗下)都改名 “好来牙膏” 了。
最著名的可能就是 GitHub 中的默认主干分支从 master 改成 main,然后很多项目宣布将主从表述由 master/slave 改成 primary/replica,黑名单 Blacklist 改叫 Denylist 或者 Blocklist。
我最近听说有个叫包容性命名促进会的组织(Inclusive Naming Initiative)。
https://inclusivenaming.org/
他们列了一个清单,将开发过程中常用的一些有冒犯性的词,按照冒犯级别分三类,然后还给出来一些他们建议的替换词。
开发者 千年虫
2022-01-28
前些天应该都看过微软 Exchange Server 开发者跨年改 BUG 的新闻了吧 (相关链接)。
Exchange Server 的邮件过滤器采用了 yymmddHHMM 格式的时间,存储在 long 类型字段中。
PS: 微软的 C++ Compiler 会将 long 当做 32 位 int。
32 位有符号整形能够表达的范围:[$-2^{31}$, $2^{31} - 1$],也就是 [-2147483648, 2147483647]。
到了 2022 年,就会超出范围,比如 2022-01-01 12:00:00, 会被存储为 2201011200,会超出 signed int 的表达范围。
2147483647
2201011200 # 超出
可能有一些系统采用 int 类型存储 yymmdd + 4 位数字做编号的方式,比如 2101011234。
相同的原因,到了 2022 年,就行不通了。
2147483647
2201011234 # 超出
最好的办法是改成 long long, 或者 unsigned int。
PS: Linux 下的 C/C++ 编译器——GCC、CLang/LLVM 都是将 long 当做是 64 位。
参考资料与拓展阅读
- 微软文档,Data Type Ranges
Docs > Microsoft C, C, and Assembler > C language > C++ language reference > Built-in types > Data type ranges
- 微软文档,C and C++ Integer Limits
Docs > Microsoft C, C, and Assembler > C language > C language reference > Elements of C > C constants > C integer constants > C and C integer limits
- 人们说 32 位、64 位时,到底是在说啥
开发者 二维码 COVID19 西安
2022-01-07
西安一码通半个月内两次宕机,值此西安疫情突发之时,可是严重的安全故障。相关负责人(西安大数据资源管理局局长)已经停职检查。
为确保系统运行更高效,他们将一张图片从1MB压缩到500KB,再从500KB优化到100KB。这样的工作看似简单,却蕴含着高技术含量,他们连续两天两夜守在电脑前,终于攻下难关。