程序员学习资料

简介

记录自己作为程序学习过程中,一些重点的学习资料,视频多为udemy或者其他平台

devops

git

视频
The Git & Github Bootcamp

前端

javascript

视频
The Complete JavaScript Course 2024: From Zero to Expert!

bootstrap

视频
Bootstrap 5 Course - The Complete Guide Step by Step
Bootstrap 5 Crash Course

React

视频
React - The Complete Guide 2024 (incl. React Router & Redux)

nextjs

视频
Next.js 14 & React - The Complete Guide

Angular vs React vs Vue

TypeScript

视频
Understanding TypeScript

后端

Ardanlabs系列

视频 书籍
Kubernetes ArdanLabs - Introduction To KinD
Kubernetes ArdanLabs - Intensive Kubernetes
Kubernetes ArdanLabs - Intensive Kubernetes_ Advanced Concepts
Kubernetes ArdanLabs - Deep Dive Into Kubernetes Networking with CNI
golang Ardan Labs Ultimate GO
golang Ardan Labs Ultimate Service by Jacob Walker
golang Ardanlabs - Ultimate Service 3.0
golang Ardanlabs - Ultimate Service 4.1
golang Ardan Labs - Ultimate Debugging
golang Ardan Labs - Ultimate Go Software Design with Kubernetes 2024-1

golang

书籍
Learning Go An Idiomatic Approach to Real world Go Programming 2nd Edition 2024(Jon_Bodner )
Network Programming with Go Learn to Code Secure and Reliable Network Services from Scratch-No Starch Press(Adam Woodbeck)
Concurrency in Go Tools and Techniques for Developers

Protocol Buffers 3

视频
Complete Guide to Protocol Buffers 3 [Java, Golang, Python]

openapi

视频
OpenAPI Specification & Swagger Tools - Zero To Master

grpc

书籍
gRPC: Up and Running: Building Cloud Native Applications with Go and Java for Docker and Kubernetes

Microservices

视频
Design Microservices Architecture with Patterns & Principles

k8s

视频 书籍
Certified Kubernetes Administrator (CKA) with Practice Tests
Certified Kubernetes Application Developer (CKAD)
The Kubernetes Book 2024
Learning CoreDNS

aws and eks

视频 书籍
Ultimate AWS Certified Solutions Architect Associate SAA-C03
Amazon EKS Starter Docker on AWS EKS with Kubernetes

database

视频 书籍
Fundamentals of Database Engineering
CMU Intro to Database Systems (15-445/645 - Fall 2022)
Databases Course

rest-api

视频 书籍
REST API Design,Eevelopment&Management

GraphQL

视频
GraphQL with React The Complete Developers Guide

docker

视频 书籍
Docker Deep Dive Zero to Docker in a single book

tls

视频 书籍
Web Security

Distributed Systems

视频 书籍
Distributed Systems lecture series
Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems
Designing Distributed Systems: Patterns and Paradigms for Scalable, Reliable Services

Observability

OpenTelemetry

书籍
Cloud-Native Observability with OpenTelemetry
Learning OpenTelemetry

Grafana

视频 书籍
Udemy - Grafana 11 from ZERO to advanced 2024-7
Udemy - Observability with Grafana, Prometheus,Loki, Alloy and Tempo 2024-5

Prometheus

视频
Prometheus Certified Associate
Prometheus Certified Associate (PCA) KodeKloud

Unit Testing

书籍
Unit Testing Principles, Practices, and Patterns

functional programming

书籍
Grokking Simplicity: Taming complex software with functional thinking

Weighted Random Selection

简介

最近在项目中遇到了加密权重算法,记录下使用心得

问题描述

  • Given a list of items where each item has a weight (integer value), select a random item from the list based on that weight.
  • The key requirement — items with a higher weight value are more likely to be returned. So even the lowest weighted value will still sometimes be returned from the function.

解决思路

1.Add up all the weights for all the items in the list 2.Pick a number at random between 1 and the sum of the weights 3.Iterate over the items 4.For the current item, subtract the item’s weight from the random number that was originally picked 5.Compare the result to zero. If less than or equal to zero then break otherwise keep iterating. The key is that the larger the weight the more likely to be less than zero when compared to the random selection between zero and the sum of weights. 6.If not less than zero, continue iterating over the list, all the while subtracting more and more weights off the random number chosen from the sum of the weights.

Golang位运算符的溢出情况

简介

在编码过程中,经常会遇到使用逻辑运算符的情况,其中对于溢出操作需要特别小心

介绍

  1. 编译型语言,编译器的静态求值是自然的。
  2. 必须使用强制类型转换。甚至于对一个uint16变量赋uint8的值都是不允许的。
  3. 整数字面值不包含存储空间的大小,可以直接赋给各种uintX(必须不溢出)。
  4. <<运算的结果的类型,以左侧操作数为准。

直接表现为

  1. 静态求值的规则是先不顾代码范围,强制求值,之后再塞回目标的存储空间中
  2. 对变量左移的时候,会直接考虑存储空间大小,将左移的数据丢弃

反例

const c_i8 uint8 = 255
var i16 uint16
i16 = uint16(c_i8 << 4) // constant 4080 overflows uint8
i16 = uint16(uint8(255) << 4) // constant 4080 overflows uint8

因为<<左侧都是uint8,所以最终的结果也是uint8,则得出的结果装不下uint8就会报错,哪怕最后准备了uint16的容器也不行