当前位置:网站首页>是否需要提高代码阅读能力?这有技巧
是否需要提高代码阅读能力?这有技巧
2022-06-24 19:39:00 【Gemcoder】
阅读源代码是软件开发人员的工作任务之一。但不是每个人都想阅读其他人的代码,有些情况下,当你开始阅读其他人的代码,但最终会因为无法理解或代码写得不好而感到痛苦。大多数开发人员都希望专注于编码而不是阅读,并且意识不到阅读代码也是一项技能。
通过阅读代码这种方式,可以了解其他开发人员的想法,以及他们如何解决特定问题以及他们缺乏的方式,从中获取不同的想法、风格、模式等,逐渐丰富自身知识,编写出更好的代码。
简而言之,代码阅读技巧可以提高自己的编码能力和技巧。在此推荐几种提高阅读的技巧。
1.运行代码
这是阅读代码的第一步,可能不会为提供有关该项目的大量详细信息,但可以知道如何构建代码并运行,还能了解代码所使用的库、框架等。
2.理清高级逻辑
比如,一个Web应用程序,可以查看不同的包,了解业务逻辑代码在哪里、UI代码在哪里、控制器在哪里等。如果代码库较大,可能无法阅读整个代码库,可以只看自己感兴趣的部分代码库,从而理清有哪些高级逻辑。
3.使用/了解工具
有很多工具有助于可视化代码的源代码阅读。例如,IntelliJIdea具有很强的导航源代码功能,可以通过单词、单词的一部分甚至缩写进行搜索。还可以学习键盘快捷键,快速从源代码的一部分跳转到另一部分。
4.了解语言/惯例
深入了解特定编码语言,可以帮助提高代码阅读技巧。每种语言都有自己的约定样式和语法,了解这些有助于快速熟悉特定代码。例如,在Java中,方法名称以小写字母开头,其中C#以大写字母开头。
提高代码质量不是一朝一夕能完成的事情,但一个应用的开发周期就那么短,如何在有效时间内,既能高效开发应用提升成果产出,还能提升自己的开发技能?低代码平台就是不错的选择。可视化的低码开发方式,在本质上也是一种特殊的、新的开发语言,如果能掌握一门专业的、通用化程度高的低码开发能力,对程序员本身的职业价值与职业发展大有裨益。
边栏推荐
- Future development of education industry of e-commerce Express
- Problèmes de concurrence dans l'allocation de mémoire en tas
- 2022-06-10 work record --js- obtain the date n days after a certain date
- In the era of full programming, should I give up this road?
- CDN principle
- 糖豆人登录报错解决方案
- Visitor tweets tell you which groups are consuming blind boxes
- 2022-06-10 工作记录--JS-获取到某一日期N天后的日期
- Technology inventory: Technology Evolution and Future Trend Outlook of cloud native Middleware
- nuScenes——数据集配置过程中遇到图像文件缺失或大小为0时的补救方法
猜你喜欢

Chapter 10 project communication management

Panorama of enterprise power in China SSD industry

Leetcode: push domino (domino simulation)

Redis-跳表

Technology inventory: Technology Evolution and Future Trend Outlook of cloud native Middleware

Environment configuration | vs2017 configuring openmesh source code and environment

2022-06-16 work record --js- judge the number of digits in string type digits + judge the number of digits in numeric type digits + limit the text length (display n words at most, exceeding...)

【Mongodb】READ_ ME_ TO_ RECOVER_ YOUR_ Data, the database is deleted maliciously

Win10 or win11 printer cannot print

vulnhub DC: 2
随机推荐
MySQL + JSON = King fried!!
How to solve the problem that the computer suddenly can't connect to WiFi
Source code reading | the process of reading text format STL by openmesh
Online filing process
糖豆人登录报错解决方案
2022-06-16 工作记录--JS-判断字符串型数字有几位 + 判断数值型数字有几位 + 限制文本长度(最多展示n个字,超出...)
Pinduoduo updates the merchant live broadcast service agreement and strictly punishes the illegal merchants
Technology inventory: past, present and future of Message Oriented Middleware
HTTP的缓存控制
How to compare two or more distributions: a summary of methods from visualization to statistical testing
ThreadLocal local thread
FANUC机器人_KAREL编程入门学习(1)
Memory alignment of structures
Based on the codeless platform, users deeply participated in the construction, and digital data + Nanjing Fiberglass Institute jointly built a national smart laboratory solution
Panorama of enterprise power in China SSD industry
双亲委派机制
Analyze the implementation process of oauth2 distributed authentication and authorization based on the source code
大厂面试必问:如何解决TCP可靠传输问题?8张图带你详细学习
Virtual private network foundation
See how sparksql supports enterprise data warehouse