Welcome to IceHe's web notes!
好记性不如烂博客
- Here: https://icehe.life
- Whoami: IceHe's bio
Recent works:
IceHe's Reading List @douban.com
短期太急躁,總想走捷徑快速見效; 長期沒耐心,小覷長期堅持的成長。
Coding
- Refactoring
- Improving the Design of Existing Code
- Design Patterns
- Elements of Reusable Object-Oriented Software
- Pragmatic Programmer
- Your journey to mastery - 2nd Edition
- Clean Agile
- Back to Basics
- The Zen of Python
- PEP 20
Designing Data Intensive Applications - TOC
- Part I. Foundations of Data Systems
- 1. Reliable, Scalable, and Maintainable Applications
- 2. Data Models and Query Languages
- 3. Storage and Retrieval / 4. Encoding and Evolution
- Part II. Distributed Data
- 5. Replication / 6. Partitioning / 7. Transactions
- 8. The Trouble with Distributed Systems
- 9. Consistency and Consensus
- Part III. Derived Data
- 10. Batch Processing / 11. Stream Processing / …
JVM - Java Virtual Machine - TOC
- Part I & Part II. Automatic Memory Management
- Part III. Execution Engine - todo some day
- Part IV. Compile and Code Optimize
Fundamentals of Software Architecture - TOC
巨大的建築,總是由一木一石疊起來的,我們何妨做做這一木一石呢?我時常做些零碎事,就是為此。
—— 鲁迅《致赖少麟》
Algorithm & Data Structure
- Solve programming problems: notes, aka. cheat sheet.
- LeetCode: 光说不练假把式。
Terminology
- Abbreviations
- usually related to coding (programming)
- Glossaries
- with intros to the common technology products
Message Queue
Storage
MySQL: lessons p1 / p2 / p3 / commands
- robust SQL database server
PostgreSQL: notes
Elasticsearch: usage
- for search and analysis
Redis: basics / notes / key notes
- in-memory data structure store as a database, cache and message broker
LSM Tree: intro
- basic data structure of LevelDB & RocksDB
- cache aside / read through / write through / write behind caching
Markdown
Web
- URL explained - The Fundamentals
- IP Address
- Network - Notes
- URL Encoding
aka. Percent Encoding
- a method to encode arbitrary data in a Uniform Resource Identifier (URI) using only the limited US-ASCII characters legal within a URI
- Base64 Encoding
- a group of binary-to-text encoding schemes that represent binary data in an ASCII string format
- Simple HTTP service
- How to build my personal website?
- Powered by docsify
- How to estimate the required computing resources?
Programming Languages - at a glance
- PHP
- a popular general-purpose scripting language that is especially suited to web development
- AppleScript
- a scripting language that facilitates automated control over scriptable Mac applications
- Control Evernote & macOS
- Learn X in Y minutes
Others
- Alpine Linux
- minimal OS Docker image
- Debug experiences
- Regular Expression
- a sequence of characters that specifies a search pattern
- Kotlin + Spring Boot (doing)
- ID Generator
- Memcached
- Work Flow
- XXL-JOB - github
- Cache Line - False Sharing
磨刀不誤砍柴工。
macOS
- Setup Guide - 设置指南
- Efficiency Guide - 效率指南
- macOS shortcuts
- Sublime Text shortcuts
- JetBrains IDE shortcuts
- mac-conf: my macOS configuration files
- JVM Options Optimization
- e.g. for JetBrains IDE - IntelliJ IDEA
Git
Manual
- ab: Apache HTTP server benchmarking tool
- ag: The Silver Searcher. Like
ack, but faster. - awk: pattern-directed scanning and processing language
- gawk: pattern scanning and processing language
- bash: GNU Bourne-Again SHell
- parameter: basic, expansion & substitution
- shell variables: variables are set by the shell
- brew: the missing package manager for macOS
- bzip2: block-sorting file compressor
- cat: concatenate files & print on the standard output
- cd: change the current directory
- chgrp: change group ownership
- chmod: change file mode bits
- chown: change file owner & group
- column: columnate lists
- comm: compare two sorted files line by line
- cp: copy files & directories
- cpu: show cpu info - not a command
- crontab: time-based job scheduler
- curl: transfer data from or to a server
- cut: remove sections from each line of files
- common combo:
column | cut
- common combo:
- date: print or set the system date & time
- df: report file system disk space usage - display free space
- diff: compare files line by line
- better choice:
comm
- better choice:
- dig: DNS lookup utility
- docker: base command for the Docker CLI
- dstat: versatile tool for generating system resource statistics
- du: estimate file space usage - disk usage
- env: run a program in a modified environment
- expect: interact with programs
- expr: evaluate expressions
- file: determine file type
- find: search for files in a directory hierarchy
- git: the stupid content tracker
- gpg: OpenPGP encryption and signing tool
- grep: print lines matching a pattern
- zgrep: search possibly compressed files for a regular expression
- head: output the first part of files
- htop: interactive process viewer
- ifconfig: configure a network interface
- ip: show / manipulate routing, devices, policy routing & tunnels
- jobs, bg, fg, disown, wait, …
- stop (suspend) the execution of processes & continue (resume) their execution at a later point
- join: join lines of two files on a common field
- jq: command-line JSON processor
- kill: terminate or signal a process
- killall: kill processes by name
- last: show listing of last logged in users
- less: provides `more` emulation plus extensive enhancements
- more: file perusal filter for paging through text one screenful at a time
- ln: make links between files
- locale: get locale-specific information
- ls: list directory contents
- lsof: list open files
- man: an interface to the on-line reference manuals
- mailx: send mails on CentOS
- msmtp: send mails on macOS - sth wrong?
- mkdir: make directories
- mount: mount a filesystem
- umount: un-mount a filesystem
- mv: move (rename) files
- mvn: a tool for building & managing any Java-based project
- mysql: MySQL CLI tool - not only a command
- nc: TCP / UDP connect & listen
- netstat: show network status
- nl: number lines of files
- nginx: HTTP and reverse proxy server
- nohup: invoke a utility immune to hangups
- nslookup: query Internet name servers interactively
- os: show os info - not a command
- output: redirect output - not a command
- passwd: modify a user's password
- paste: merge lines of files
- perf: performance analysis tools for Linux
- php: PHP Command Line Interface
- pidstat: report statistics for Linux tasks
- ping: send ICMP ECHO_REQUEST to network hosts
- python: Python Command Line Interface
- ps: process status
- realpath: print the resolved path
- redis-cli: Redis client
- redis-server & redis-sentinel: Redis server
- redis-dump & redis-load: Backup & restore Redis data to and from JSON
- rm: remove files or directories
- rsync: transfer files
- scp: secure copy - remote file copy program
- sed: stream editor for filtering & transforming text
- seq: print a sequence of numbers
- service: run a System V init script
- sleep: delay for a specified amount of time
- sort: sort lines of text files
- ssh: OpenSSH Client - remote login program
- stat: display file or file system status
- su: run a command with substitute user & group ID
- sudo: execute a command as another user
- sysctl: configure kernel parameters at runtime
- systemctl: control systemd & service manager
- tac: concatenate and print files in reverse
- tail: output the last part of files
- tar: pack & compress
- tee: write to standard output & files
- terminal-notifier: send macOS User Notifications
- time: time command execution
- timeout: run a command with a time limit
- tmux: terminal multiplexer
- touch: change file access & modification times
- tr: translate or delete characters
- ulimit: system resource limit to shell
- uname: print system information
- uniq: report or omit repeated lines
- uptime: show how long system has been running
- vim: terminal text editor
- visudo: edit the sudoers file
- w: show who is logged on & what they are doing
- watch: execute a program periodically, showing output fullscreen
- wc: print newline, word, & byte counts for each file
- wget: network downloader
- whereis & which & whatis: locate, show path & description
- whoami: print effective userid
- xargs: build and execute command lines from standard input
- xxd: make a hexdump or do the reverse
- yes: be repetitively affirmative
- zsh: one of shells
- Linux Abbreviations
- CLI Notes - todo some day
Scene
- automate: expect, yes
- connect: curl, nc, ssh, telnet
- directory: cp, find, ln, ls, mv
- disk: df, du, duf
- monitor status: dstat, htop, lsof, netstat, pidstat, ps, stat, top
- network detect: dig, ifconfig, ip, netstat, nslookup, ping
- string display: cat, head, less, tac, tail
- string process:
- awk, column, comm, cut, grep,
- join, jq, paste, sed, sort,
- tr, uniq, wc, …
- transfer data: ftp, nc, rsync, scp
- write file: tee,
>,2>&1 - notify: terminal-notifier
- http benchmark: ab, watch
- differ output: comm, diff, vimdiff, watch
- run in background:
^z, bg, fg, nohup [CMD] & - ……
Shell
- Notes: a bash script example
- Terminal Colors
Batch 批处理
Basics
- Glossaries
- Install: JDK
- IDE: IntelliJ IDEA usage
- Code Style Guide: Alibaba & Google
- Annotations: Spring / Lombok / FastJson / Jackson / …
- Exceptions: exception class hierarchy / …
- Others: Notes
Package Manager
- Maven: a software project management and comprehension tool
- Based on the concept of a project object model (POM), Maven can:
- manage a project's build,
- reporting and
- documentation from a central piece of information.
- Based on the concept of a project object model (POM), Maven can:
- Gradle
- From mobile apps to microservices, from small startups to big enterprises,
- Gradle helps teams build, automate and deliver better software, faster.
Benchmark, Stress Testing & Unit Testing
- Benchmark & Stress Testing: JMH - Java Microbenchmark Harness
- Unit testing & Integration testing: Spock or JUnit
- Groovy: a multi-faceted language for the Java platform
Code Snippet
- CSV - Comma Separate Value
- Excel
- Elasticsearch
- Executor
- JSON
- LocalDateTime
- MyBatis and JDBC
- OSS - Object Storage Service
- Spring Beans
- Spring ConstraintValidator
- Stream and Optional
- Task
Command Line Tool
- jar: archive tool
- java: application launcher
- javac: compiler
- javap: class file disassembler
- jps: JVM process status - list the instrumented JVMs on the target system
- jcmd: send diagnostic command requests to a running JVM
- jhsdb: HotSpot Debugger
- attach to a Java process or launch a postmortem debugger to analyze the content of a core dump from a crashed JVM
- available after JDK 9
- Seldom-used and deprecated
- javadoc: API documentation generator
- jstat: monitor JVM statistics
- jinfo: configuration info - generate configuration info for a specified Java process
- jmap: memory map - print details of a specified process
jhat: Heap Analysis Tool- only available in JDK 8 !- jstack: stack trace - print Java stack traces of Java threads for a specified Java process
Basics
- JavaScript: aka. ECMAScript
- Node.js: a JavaScript runtime built on Chrome's V8 JavaScript engine
- API Documentation: for 16.X LTS version
- Promise object represents the eventual completion (or failure) of an asynchronous operation and its resulting value
- async & await: to simplify the syntax necessary to consume promise-based APIs
- states & fates: clarify the different adjectives surrounding promises
- States: { settled: [ fulfilled, rejected ] , unsettled: [ pending ] }
- Fates: [ resolved, unresolved ]
- Event Loop: which the JavaScript concurrency model based on
- Tasks vs. Microtasks:
- HTML Living Standard: html.spec.whatwg.org
Code Snippet
- Base Encoding: encode, decode
- Environment: running under Node or browser-like environments
- Jest: for unit tests
- *.d.ts declaration files that functions as an interface to the components compiled in JavaScript
- debugger statement invokes any available debugging functionality, such as setting a breakpoint.
- Pause code with breakpoints - Chrome DevTools
- DOM change, XHR/Fetch, event listener, exception and function
debug(functionName)
- DOM change, XHR/Fetch, event listener, exception and function
- Pause code with breakpoints - Chrome DevTools
Package Management
- npm: share and borrow packages
- yarn: a package manager that doubles down as project manager
- pnpm: fast, disk space efficient package manager
NPM: the world's largest software registry
- Configuring
- package.json: a lot of the behavior described in this document is affected by the config settings described in config.
- package-lock.json: a manifestation of the manifest
- folders: folder structures used by npm
- npm semver calculator & Sematic Versioning (external links)
- Using
- registry: The JavaScript package registry
- scope: scoped packages
- scripts: How npm handles the "scripts" field
- workspaces: Working with workspaces
- Command
- npm: javascript package manager
- npm init: create a
package.jsonfile - npm install: install a package
- npm link: symlink a package folder
- npm publish: publish a package
- npm exec,
npx: run a command from a local or remote npm package
TypeScript
- TypeScript Deep Dive
- TypeScript: JavaScript with syntax for types
- tsc: compiles the current project, with additional settings
- tsconfig.json: specifies the root files and the compiler options required to compile the project
- Handbook
Assembly
- register / cs / ip / CPU / memory
- endian / register / ds / [addr] / stack
- pseudo instruction / compile / link / debug / [bx] / loop / seg prefix / mem space
- stack / data / code / 栈的段 / 多段程序 / 大小写转换 / addressing / si / di
- bx / si / di / bp / addressing / division / dd / dup / Structural Data
- jump / offset / jmp / jcxz / loop / dec / bounds checking
- call / ret / mul / show str (pos, color) / division overflow / show value
- course design: 公司数据以指定格式在屏幕上显示
- flag register / adc / sbb / cmp 检测比较结果的条件转移指令,DF 标识和串传送指令 / Tests
- internal interrupt / interrupt routine / install 中断向量表 / 设置中断向量
- int instruction / Interrupt Routine / tests
- port IO / in / out / shl / shr / visit CMOS RAM
- external interrupt / 接口芯片和端口,可屏蔽|不可屏蔽中断,PC 机键盘的处理过程 / tests
- 直接定址表 / data / 地址标号 / 在其它段中,计算 sin(x) / tests
- 用 BIOS 进行键盘输入和磁盘读写 / tests
- Appendix: 汇编编译器对 jmp 的处理,地址计数器(AC),处理伪操作指令,栈传递参数,无溢出除法…
C++
- C++ Primer 5th
- C++ Interview Book
- C++ Coding Standards
- C++ Macros & Bit Operations
- Effective C++: Part 1 / Part 2 / Part 3 / Part 4
OAuth 2 - Open Authorization
an open standard for access delegation, commonly used as a way for Internet users to grant websites or applications access to their information on other websites but without giving them the passwords
OIDC (Open ID Connect)
an interoperable authentication protocol based on the OAuth 2.0 family of specifications
- OIDC Core 1.0
- OpenID Connect Core 1.0 incorporating errata set 1
- It defines the core OpenID Connect functionality: authentication built on top of OAuth 2.0 and the use of Claims to communicate information about the End-User.
- It also describes the security and privacy considerations for using OpenID Connect.
- PKCE: Proof Key for Code Exchange by OAuth Public Clients - RFC7636
- OIDC Core 1.0
Living
如果你要拥有你从未有过的东西,那么你必须去做你从未做过的事。
Bio: Backend Experience & Education
- Silverhand: Founding Team - Node.js
- YFD: Zebra - Supply Chain - Java
- Alibaba Local Life: 蜂鸟跑腿前台 - Java
- Alibaba Local Life: 众包物流运营 & 数据组后台 - Java
- Weibo: Video Platform - Java
- Weibo: Mobile API - PHP
- Huawei: Telecom Software Customization - Java Intern.
- SCUT: Software Engineering - Bachelor
Timeline
- After 2018
- How to live
- 2022 Feb ~ Apr: Best Gain Everyday
- from both technology practice and daily life
- 2019 ~ 2021 on Weibo
- 2018 Winter
- 2018 Spring ~ 2019 Autumn
- Moments 回忆
- 2015 ~ 2017
- 2017 Summer ~ Winter
- 2017 Spring
- 2016 Winter
- 2016 Fall
- 2016 Spring & Summer
- Bye 2015
- icehe.github.io: previous technology blog
- Before 2015
- QZone Index of the old posts
愚蠢,懒惰,贫穷,没有梦想。越活越畏畏缩缩,生怕别人发现自己尚未泯灭的野心,还有无能。
博弈论:理性就是对你的各种东西设定一个优先级,并且能够贯彻执行这个优先级。
- How to Ask: Prepare before asking
- Avoid the stupid ways
- JFGI: Just Fucking Google It
- RTFM: Read The Fucking Manual
- Trade-off: Ask for help if stuck over 15 | 30 min.
- How to Work: Working Standards
- 请示工作说方案
- 布置工作说标准
- 汇报工作说结果
- 总结工作说流程
- 回顾工作说感受
- GTD Flow: Get Thing Done
- PDCA Cycle: Plan → Do → Check → Act or Adjust
- SMART principle: Specific / Measurable / Achievable / Relevant / Time-based
- STAR principle: Situation → Target → Action → Result
- Deployment Checklist: avoid low-level mistakes
- How to Leave:《解除劳动合同告知书》
写一部小说就像在黑夜里开车,你只能看到车灯照亮的部分,但是你却可以走完整个旅程。
—— E.L. Doctorow
好文共赏
- Bookmarks
- Cruel Reality - ZH ver. - digest
- Nice guy? I never give a shit.
- Life Meaning - digest
- 因为活着,才去寻找意义。
- Happiness Course - digest
- 如果你只有一个选择,它让你满意吗?
- Why Unhappy - digest
- 我,并不特别。
- Poet: 诗和远方 - digest
- 眼前的苟且,也正是诗和远方。
- Teacher Said - digest
- 我们用「我能做到什么」来判断和定位自己,而别人用「你已经做过什么」来判断和定位你。
- 做正确的选择,而不是可以接受的选择。
- Pessimist - digest
- It's the hardest part when memories remain.
- Anti-Fragile - book
- 一只火鸡被屠夫喂养了 1000 天,每天都向其分析师证实,屠夫对火鸡的爱的「统计置信度与日俱增」。
- VicodinXYZ's Life Beliefs
- 决策的第一要务是给自己创造足够多的好选项。大多数决策失败来源于在几个都不够好的选择中反复纠结。
- 对于日常小决策,决策速度大于决策质量,不要拖;对于重大而难逆转的大决策,要收集足够多信息尽量保证做对。
- 不是生活中的每一个问题都要解决,和问题共处是人生常态。把精力用在重要的事情上。
- Sspai Time Management
- 更大的效率来自于重要事情上做得好,而不是在处处做得好,管理精力比管理时间更重要。
- 在考虑如何提高精力之前,我们得先解决导致精力被浪费的主要原因:精力错位,也就是把最好的时间和状态,浪费在了低产出的任务上。
- 「不做事」一定是最节省时间、最高效的做事方式,学会「做重要的事」才是掌控时间的终极法门。
- 提高自控力的一个小窍门是尽量避免在无谓的小事情上做决定。
- 何谓「真正的休息」呢?不少人习惯将阅读网站和新闻当作一种休息,事实上研究表明, 认知活动(阅读文字、视频等)加重了工作需求产生消极情绪,另一项研究则表明, 对于减少疲惫感,而且通过智能手机应用休息的效果差于与朋友或同事社交。
- The Tyranny of Merit
- 《“绩点”的暴政》 成功者會認為他們的成功是靠自己的才能和努力,而與社會無關,既然成功是我自己的事,那失敗就是輸家自己的錯,這會製造出「才德的驕傲」(meritocratic hubris),對階梯下的人缺乏同理心,甚至不屑和輕蔑,因此更不會有對於共同體內同胞的相互責任。
- How to Be an Imperfectionist
- The New Way to Self-Acceptance, Fearless Living, and Freedom from Perfectionism
- 《如何成为不完美主义者》
- 不那么在意问题本身,更在意在有问题存在的情况下能取得的进展。
- 不那么在意行动正确与否,更在意是否在行动。
- 不那么在意所谓时机,更在意任务本身。
- 个人感受:很棒的书,解决了很多自己对于工作和生活的困惑以及心态问题;但说实话,不能应用到完美主义的职场中。
- The Complete Guide to Effective Reading
- Just-In-Case vs. Just-In-Time Learning
To be a better me.
- Jan Fan: Pythonist / Tencent / Applied Mathematics PhD @ Sweden
- Johnson Zhang: Sina Mobile / Didi / Meituan / … @ Beijing
- SF Zhou: ACMer / Microsoft / SenseTime / Weixin / High-Flyer Quant @Hangzhou
- Shiwey Yan: Game Engine Developer / Tencent - Timi @ Shenzhen
- Toxic Johann: Frontend / 360 / UC / Tencent / Tubi @ Beijing
- ME: Backend / Weibo / Alibaba / YFD / Silverhand / What's next? @ Beijing
- …
靡不有初,鮮克有終。