#803 常见的程序设计语言
开发者 2022-06-03根据最新的 TIOBE 数据, 分析前面 50 中语言。
具体排名的意义对我们来说到不大,只是用来做一个比较热门语言的清单。
coding in a complicated world
根据最新的 TIOBE 数据, 分析前面 50 中语言。
具体排名的意义对我们来说到不大,只是用来做一个比较热门语言的清单。
阮一峰最新的《科技爱好者周刊》中提到一个观点:代码优先和产品优先。大概是说代码优先程序员比较注重技术和代码,产品优先程序员则是更注重解决的问题。阮一峰明显是认为应该产品优先。
我看后感觉我就是文章的批判对象,从而进行了一个反思。但是我思考之后认为阮一峰说的并不全对,我的做法没有什么问题。
公司的目标,或者说研发中心的目标,就是用技术解决问题。而研发中心的开发人员的职责就是设计可行方案,然后通过代码来实现这个方案。
研发人员并不直接面向市场,面向用户,大多数时候也不负责产品的设计。甚至有些时候,研发人员都不参与产品设计方案评审。
理论上,如果我们能够吃透产品的设计,那么对开发工作肯定是有利的。但是我们的时间精力是非常有限的,平衡工作和生活之余,还有挤出时间来自学。
而且,对产品的思考更多的是产品设计人员的工作,让开发者把精力放在对产品的思考上有点不切实际。
确实,“如果产品不好用,代码也不会好”。但是,我们所处的位置真的很难左右公司的产品策略。让产品好用这个目标,在我们这边的操作空间就是写好自己代码。
所以对于开发者来说,代码优先几乎等同于产品优先,并不冲突,更好的代码等于更好的产品。
开发者根据项目背景和工期安排设计方案就行了。需要在代码和产品上做取舍的,是技术部门负责人的工作。
我知道很多人都说打工人要有更高层次的思维,思考更多,做得更多,才能有更好的发展。我自己确实也是这么想的,积极主动的承担起份外的工作,将能创造更大的影响力,然后决定你在组织中的角色。但我觉得这是工作之余的一些额外的投入,和日常开发工作无关,没有什么产品优先的问题,开发者还是应该把主要精力都放在自己的代码上。
Restart GNOME without rebooting
Ctrl–Alt–Backspace
sudo /etc/init.d/gdm restart
killall gnome-panel
以上方法没有用,下面这个方法挺好的 (My Choice):
killall -HUP gnome-shell
在桌面还有响应的时候(比如桌面组件出了一些乱码之类的问题):
Alt + F2, and restart/r
pipenv requirements > requirements.txt && pipenv requirements --dev-only > requirements-dev.txt
Ctrl + R / F5 刷新
中国移动 CMPP 协议中的 UDH 头设计源自 SMPP 协议,SMPP 协议又是参考的 GSM 短信服务的相关标准。
UDH,User Data Header,定义在 GSM 03.40 / 3GPP 23.040 中。
UDH 是短信中可能包含的一个二进制头部,对短信服务进行拓展。
可以实现以下功能:
概念:
UDHL:UDH Length,UDH 的第一字节,表示 UDH 的长度。
UDH 剩余部分是若干标签 + 长度 + 值的组合。其中标签又叫做 IEI(Information-Element-Identifier,信息元素标识符),占一字节。
例如:05 00 03 5F 03 01
重点:如果短信采用 GSM-7 编码,则需要对齐到 7 bit,也就是说真正需要的 bit 数是 math.ceil(6 * 8 / 7) * 7
上面这个例子,8 bit _ 6 = 48 bit,需要增加 1 bit,对齐成 7 bit _ 7 = 49 bit。
IEI (hex) | Meaning | Classification | Length | May repeat |
---|---|---|---|---|
00 | Concatenated short messages, 8-bit reference number | SMS Control | 3 | no |
01 | Special SMS Message Indication | SMS Control | 2 | yes |
02 | Reserved | N/A | N/A | yes |
03 | Not used to avoid misinterpretation as <LF> character |
N/A | N/A | yes |
04 | Application port addressing scheme, 8 bit address | SMS Control | 2 | no |
05 | Application port addressing scheme, 16 bit address | SMS Control | 4 | no |
06 | SMSC Control Parameters | SMS Control | 1 | no |
07 | UDH Source Indicator | SMS Control | 1 | yes |
08 | Concatenated short message, 16-bit reference number | SMS Control | 4 | no |
09 | Wireless Control Message Protocol | SMS Control | 1-255 | yes |
0A | Text Formatting | EMS Control | 3-4 | yes |
0B | Predefined Sound | EMS Content | 2 | yes |
0C | User Defined Sound (iMelody max 128 bytes) | EMS Content | 2-129 | yes |
0D | Predefined Animation | EMS Content | 2 | yes |
0E | Large Animation (1616 times 4 = 324 =128 bytes) | EMS Content | 129 | yes |
0F | Small Animation (88 times 4 = 84 =32 bytes) | EMS Content | 33 | yes |
10 | Large Picture (32*32 = 128 bytes) | EMS Content | 129 | yes |
11 | Small Picture (16*16 = 32 bytes) | EMS Content | 33 | yes |
12 | Variable Picture | EMS Content | 4-255 | yes |
13 | User prompt indicator | EMS Control | 1 | yes |
14 | Extended Object | EMS Content | 7-255 | yes |
15 | Reused Extended Object | EMS Control | 3 | yes |
16 | Compression Control | EMS Control | 3-255 | no |
17 | Object Distribution Indicator | EMS Control | 2 | yes |
18 | Standard WVG object | EMS Content | 1-255 | yes |
19 | Character Size WVG object | EMS Content | 1-255 | yes |
1A | Extended Object Data Request Command | EMS Control | 0-255 | no |
1B | Reserved for future EMS features | N/A | 0-255 | yes |
1C | Reserved for future EMS features | N/A | 0-255 | yes |
1D | Reserved for future EMS features | N/A | 0-255 | yes |
1E | Reserved for future EMS features | N/A | 0-255 | yes |
1F | Reserved for future EMS features | N/A | 0-255 | yes |
20 | RFC 822 E-Mail Header | SMS Control | 1 | no |
21 | Hyperlink format element | SMS Control | 0-255 | yes |
22 | Reply Address Element | SMS Control | 1-255 | no |
23 | Enhanced Voice Mail Information | SMS Control | 0-255 | no |
24 | National Language Single Shift | SMS Control | 1 | no |
25 | National Language Locking Shift | SMS Control | 1 | no |
26 – 6F | Reserved for future use | N/A | 0-255 | N/A |
70 – 7F | (U)SIM Toolkit Security Headers | SMS Control | 0-255 | ? |
80 – 9F | SME to SME specific use | SMS Control | 0-255 | ? |
A0 – BF | Reserved for future use | N/A | 0-255 | ? |
C0 – DF | SC specific use | SMS Control | 0-255 | ? |
E0 – FF | Reserved for future use | N/A | 0-255 | ? |
主要角色:
#!/bin/bash
# 下载RocketMQ二进制包(20MB)
wget https://archive.apache.org/dist/rocketmq/4.9.4/rocketmq-all-4.9.4-bin-release.zip
# 解压RocketMQ安装包
unzip rocketmq-all-4.9.4-bin-release.zip
cd rocketmq-all-4.9.4-bin-release/
# ls
# benchmark/ bin/ conf/ lib/ LICENSE NOTICE README.md
#
# ls bin conf
# bin:
# cachedog.sh* mqbroker* mqnamesrv* play.sh* setcache.sh*
# cleancache.sh* mqbroker.cmd mqnamesrv.cmd README.md startfsrv.sh*
# cleancache.v1.sh* mqbroker.numanode0* mqshutdown* runbroker.cmd tools.cmd
# dledger/ mqbroker.numanode1* mqshutdown.cmd runbroker.sh* tools.sh*
# mqadmin* mqbroker.numanode2* os.sh* runserver.cmd
# mqadmin.cmd mqbroker.numanode3* play.cmd runserver.sh*
#
# conf:
# 2m-2s-async/ 2m-noslave/ dledger/ logback_namesrv.xml plain_acl.yml
# 2m-2s-sync/ broker.conf logback_broker.xml logback_tools.xml tools.yml
# 启动 NameServer
nohup sh bin/mqnamesrv &
# 验证 NameServer 服务是否正常运行
# tail -f ~/logs/rocketmqlogs/namesrv.log
# # The Name Server boot success...
# 启动 Broker
nohup sh bin/mqbroker -n localhost:9876 &
# 验证 Broker 服务是否正常运行
# tail -f ~/logs/rocketmqlogs/broker.log
# # The broker[broker-a,192.169.1.2:10911] boot success...
echo "RocketMQ installed successfully."
sh bin/mqshutdown broker
sh bin/mqshutdown namesrv
vim /etc/systemd/system/rocketmq-namesrv.service
vim /etc/systemd/system/rocketmq-broker.service
# 配置启动命令、环境变量、工作目录、限制资源使用、设置启动顺序、依赖关系等选项
systemctl daemon-reload
然后就可以执行 start, stop, restart, status, reload, enable, disable 等操作了。
可以通过官方的 rocketmq-dashboard(SpringBoot + React)管理。
最简单的方式就是运行在 Docker 中:
docker run -d --name rocketmq-dashboard -e "JAVA_OPTS=-Drocketmq.namesrv.addr=127.0.0.1:9876" -p 8080:8080 -t apacherocketmq/rocketmq-dashboard:latest
https://cloud.tencent.com/developer/article/1857491
openssh 8.2 remove ssh-rsa support for security reasons, suggest to use ssh-ed25519 instead.
我对开发者十分佩服,几十年如一日的开发这样一个现阶段明显没有盈利可能的系统。等这个项目稳定下来之后,或许很多古老的遗留系统可以收益。
相关的镜像可以在 SourceForge 上取得, 最新的版本是 03/31 发布的 0.4.14 release 19,可以下载 LiveCD 体验。
PS:完整的 ISO 只有 110M,Live 版 80M。
PS:最新版完整镜像的下载链接: https://sourceforge.net/projects/reactos/files/latest/download
1995 年,FreeWin95 项目
1998 年,ReactOS 项目启动
主要用 C 编写。目标是完全不采用 Windows 代码的前提下,对 x86/amd64 平台的 Windows NT 5.2 (Windows Server 2003) 兼容。
代码审核非常严格,曾经由于被怀疑用了反编译 Windows 的代码而自行开展大规模的代码审查。
研发团队规模有限。
GitHub 地址: https://github.com/reactos/reactos
推荐的硬件配置:
VirtualBox 4C1G 虚拟机,起最新版 Live 镜像,大概 2 分钟后进入桌面(Installing devices 这一步太久了)。
选的 Chinese (RPC)
语言,然后 US
键盘。Run ReactOS Live CD
进来之后,中文都是小方框。
然后重启,选择安装 (Install ReactOS
),提示需要插入安装媒体。
然后还是换成 English (United States)
语言, 可以进入桌面,但是感觉不怎么流畅。
请赐予我力量,全力改变那些可以改变的事情,平静接受那些无能为力的事情,拥有智慧区分这两者。
2022 年已经过去三分之一,希望今年的年度计划能够落实。年初定的五个主要目标:
深挖现有技术栈
目前全部毫无进展。要是再不抓紧,年底又会觉得一年过去啥事都没有做成。
PS: 我说的表达能力就是普通的语言能力,不是社交能力。我对社交并不热衷,也没想过那么活蹦乱跳。作为一个技术人员,做好分内工作就行,其他事情爱咋咋地。