React Notes

React.js Note Intro React is a JavaScript library for rendering UI Components React is all about Components A component is a piece of the UI that has its own logic and appearance We don’t have to manipulate DOM manually anymore with components A component is just a JavaScript function Their names always begin with a capital letter They return JSX markup React application begins at a “root” component JSX JavaScript XML A syntax extension for JavaScript that lets you write HTML-like markup inside a ....

Dec 11 2023 · 36 min · Jiayuan Zhang

Time To Read A Book: The Pragmatic Programmer

Intro As a undergraduate who majors in computer science, I was focusing on learning prgramming languages, popular frameworks, university or online lectures in the last three years. My past learning goal was to get myself into the computer science field as well as build a solid theory foundation on which I can step and thrive in my future career. Therefore, most of the books that I read in this period can be categorised into so-called “tool-books” or “textbooks”....

Nov 17 2023 · 5 min · Jiayuan Zhang

JavaScript Notes

Introduction Three pillars in web development HTML - Content - Nouns CSS - Style and layout - Adjectives JavaScript - The real programming language to build web applications - Verbs What applications that JavaScript can build? Front-end apps React, Angular, Vue, etc. Back-end apps Node.js Native mobile apps React Native, Ionic Native desktop apps Electron JavaScript is a multi-paradigm interpreted language Modern JavaScript uses just-in-time compilation (no portable files) JavaScript runtime...

Feb 27 2023 · 34 min · Jiayuan Zhang

SOLID Principle

SOLID principles complement each other, and work together in union. Single Responsibility Principle Every software component should have one and only one responsibility / reason to change Group the responsibilities in a sensible way Cohesion - 内聚 The degree to which the various parts of a software component are related Example of garbage classification Aim for high cohesion Coupling - 耦合 The level of inter dependency between various software components Aim for loose coupling Changes are inevitable, so we need higher cohesion and loose coupling...

Jun 29 2022 · 2 min · Jiayuan Zhang

C Notes (Chinese Version)

导论 计算机的思维方式:枚举 算法改进暴力枚举 程序的执行: 解释:借助一个程序,那个程序试图理解你的程序,然后按照你的要求执行 编译:借助一个程序,把你的程序翻译成机器语言,然后执行机器语言的程序 编译是将源程序翻译成可执行的目标代码,翻译与执行是分开的;而解释是对源程序的翻译与执行一次性完成,不生成可存储的目标代码。这只是表象,二者背后的最大区别是:对解释执行而言,程序运行时的控制权在解释器而不在用户程序;对编译执行而言,运行时的控制权在用户程序。 语言本身没有解释和编译之分,只是具体执行方式不同 现代两种执行方式已经没有过大的区别,各有优劣 现代编程语言语法上差异很小,几乎都是 C-like 语言 某些场景,例如操作系统,只能用 C 写 语言的能力/适用领域主要决定因素: 库 传统 FORTRAN -> BCPL -> B -> C C implementations give a better understanding of how the machine behaves. There is no language runtime environment or virtual machine between you and the underlying machine. 标准:ANSI C -> C99 C is a general-purpose programming language. 指针是 C 的灵魂 C 的应用场景: 操作系统,编译器 嵌入式系统 驱动程序 底层驱动 图形引擎、图像处理、声音效果 C是一种工业语言...

Feb 6 2022 · 12 min · Jiayuan Zhang