Clean Code

所在平台: Udemy

课程主页: https://www.udemy.com/course/writing-clean-code/

课程评论:没有评论

第一个写评论        关注课程

课程简介

课程名称:清晰代码 课程概述: 作为开发者,编写运行良好的代码当然是必要的,但很多开发者即便编写了可运行的代码,仍然在写“糟糕代码”。“可运行的代码”与“清晰代码”并不相同!本课程教授如何编写清晰的代码——这些代码不仅易于计算机理解,更易于人类阅读和理解! 在课程中,您将学到清晰代码的定义,以及如何编写清晰的代码。清晰的代码便于阅读和理解,因此也更加易于维护。这不仅是计算机需要理解代码,您的同事和未来的自己同样需要能够理解! 课程将深入探讨与清晰代码相关的主要“痛点”,您将学习什么是糟糕代码,并了解如何将其转变为清晰代码。具体内容包括: - 正确和清晰地命名“事物”(变量、属性、类、函数等) - 避免常见的命名陷阱和错误 - 关于注释的讨论及其对代码的影响 - 代码格式化——包括横向和纵向格式化 - 函数及其参数数量的限制 - 如何通过专注于“单一功能”来编写清晰的函数 - 通过抽象层次分割功能并保持函数简洁 - 编写 DRY 函数以避免意外副作用 - 避免深层嵌套控制结构的方法 - 错误及错误处理替代 if 语句的用法 - 对象和数据容器/数据结构的区别及其重要性 - 凝聚力及如何编写良好的小类 - 德梅特法则及其对清晰代码的影响 - SOLID 原则及其在编写清晰代码中的重要性 除此之外,您还将学习许多其他内容。本课程整合了与编写清晰代码相关的常见模式、最佳实践、原则和规则。最终,您将对编写清晰代码时需要注意的要点有良好的理解。 请注意,这不是设计模式或通用模式课程,而是专门集中在有助于编写清晰代码的模式、规则和概念上。所有这些概念和规则都有实例、代码片段和演示作支持。为了确保您能够深入理解课程内容,我们还提供了大量挑战,让您实践所学知识! 本课程使用 Python、JavaScript 和 TypeScript 作为代码示例,但您不需要了解这些语言即可顺利参与。此外,课程不专注于某种具体的编程风格或范式,而是涵盖适用于所有编程情况的通用概念和技术。 课程先决条件: 必须具备基本的编程知识(无论使用何种语言)。您无需了解特定编程语言或编程范式即可跟随课程。亦不需要具备编写清晰代码的先前经验。

课程评论(0条)

课程详情

As a developer, you should be able to write code which works - of course!A lot of developers write bad code nonetheless - even though the code works. Because "working code" is not the same as "clean code"!This course teaches you how to write clean code - code that is easy to read and understand by humans, not just computers!In this course, you'll learn what exactly clean code is and, more importantly, how you can write clean code. Because if your code is written in a clean way, it's easier to read and understand and therefore easier to maintain. Because it's NOT just the computer who needs to understand your code - your colleagues and your future self needs to be able to understand it as well!In this course, we'll dive into all the main "pain points" related to clean code (or bad code - depending on how you look at it) and you will not just learn what makes up bad code but of course also how to turn it into clean code.Specifically, you will learn about:Naming "things" (variables, properties, classes, functions,...) properly and in a clean wayCommon pitfalls and mistakes you should avoid when naming thingsComments and that most of them are badGood comments you might consider adding to your codeCode formatting - both horizontal and vertical formattingFunctions and how to limit the number of function parametersHow to write clean functions by focusing on "one thing"How levels of abstraction help you split functions and keep them smallHow to write DRY functions and avoid unexpected side effectsAvoiding deeply nested control structures with guards and by extracting functionality into functionsErrors and error handling as a replacement for if-statementsObjects & data containers/ data structures and why that differentiation could matterCohesion and how to write good (small!) classesThe Law of Demeter and why it matters for clean codeWhat the SOLID principles are and why they matter when it comes to writing clean codeMuch more!This course is a compilation of common patterns, best practices, principles and rules related to writing clean code.In this course, you'll learn about a broad variety of concepts, rules, ideas, thoughts and principles and by the end of course, you'll have a good idea of what to keep in mind when it comes to writing clean code.This is not a design patterns or general patterns course though - we will entirely focus on patterns, rules and concepts that help with writing clean code specifically.All these concepts and rules are backed up by examples, code snippets and demos. And to ensure that you get the most out of this course, and you don't just learn a bunch of theory which you forget soon after, there also are plenty of challenges for you to apply what you learned!This course uses Python, JavaScript and TypeScript for code examples but you don't need to know these languages to follow along and get a lot out of the course. In addition, the course does not focus on a specific programming style or paradigm (like functional programming, object-oriented programming etc) but instead covers general concepts and techniques which will always apply.What are the course prerequisites?Basic programming knowledge (no matter which language) is required!You don't need to know any specific programming language or programming paradigm to follow alongNO prior experience with writing clean code is required

课程标签

0人关注该课程

主题相关的课程