当前位置:网站首页>Some views on libco
Some views on libco
2022-07-01 00:42:00 【51CTO】
I don't know when to start , I often think about a problem , That is, what is a good code ? Let's take a look at this description :
‘Good code’ is code that works, is bug free, and is readable and maintainable. Some organizations have coding ‘standards’ that all developers are supposed to adhere to, but everyone has different ideas about what’s best, or what is too many or too few rules. There are also various theories and metrics, such as McCabe Complexity metrics. It should be kept in mind that excessive use of standards and rules can stifle productivity and creativity. ‘Peer reviews’, ‘buddy checks’ code analysis tools, etc. can be used to check for problems and enforce standards.
Good code is that the code works normally 、bug Very few 、 And it has readability and maintainability . Some enterprises have their own coding specifications that all developers must abide by , But everyone has their own standards for what code is the best 、 Or there are too many or too few coding rules . There are many principles and Standards , for example ,McCable Complexity measure . Indeed, using too many coding standards and rules can reduce productivity and creativity .“ Peer review ” or “ Colleague inspection ” Code analysis tools, etc , Can be used to check problems or adhere to standards .
Yes , This passage answered my question , But in my opinion, this is still one-sided . My view on this issue is : Code that solves practical problems is good code . Whether it's redis,nginx Are benchmarks in this regard , They are all created by the author to solve practical problems due to his dissatisfaction with the current situation , And it does solve the problem . Not to say how difficult these two projects are , Find a willing college student , In the case of willing to study , I'm sure he can understand the codes of those two masterpieces . In this respect , In my submission libco It's a good project , Because it really perfectly undertakes the transformation of wechat background from semi synchronous and semi asynchronous to asynchronous , And the implementation of the code is commendable , The exquisite design of many places is really beyond the ordinary people's ability to complete .
But I think from the perspective of an open source project libco Not a good project . Because its official documents can almost be understood as 0, That is, nothing . I even suspect that libco The night before it was open source TX Our engineers are deleting comments line by line . Maybe the whole libco The comments of don't add up to a hundred lines . Secondly, actually libco Our community is at least github It's not very active , I mentioned a few issue, Handed in a few patch,issue Your answer is not what you asked ,patch I haven't received any reply after so long . You can see that the earliest update was half a year ago .
Of course, these are understandable , After all, the company may not pay more for doing this .
Reference resources :
- post 《 How to write code is good code 》
边栏推荐
- Get screen height
- MySQL variables, stored procedures and functions
- 初识 Flutter 的绘图组件 — CustomPaint
- leetcode 474. Ones and Zeroes 一和零(中等)
- [UML] UML class diagram
- 2022-2028 global 3D printing ASA consumables industry research and trend analysis report
- Interface documentation system - Yapi
- File reading and writing for rust file system processing - rust Practice Guide
- Line number of Jenkins pipeline script execution exception
- 问题解决:如何管理线程私有(thread_local)的指针变量
猜你喜欢

2022-2028 global rampant travel industry research and trend analysis report

Quick start of wechat applet -- project introduction

20220216 misc buuctf another world WinHex, ASCII conversion flag zip file extraction and repair if you give me three days of brightness zip to rar, Morse code waveform conversion mysterious tornado br

给按钮的边框和文字设置不同的背景色

CMU15445 (Fall 2019) 之 Project#1 - Buffer Pool 详解

Deployment of mini version message queue based on redis6.0

2022-2028 global ethylene oxide scrubber industry research and trend analysis report

Vmware16 installing win11 virtual machine (the most complete step + stepping on the pit)

PyTorch安装并使用gpu加速

Cmu15445 (fall 2019) project 1 - buffer pool details
随机推荐
Longest valid bracket
Integer to hexadecimal string PTA
Introduction to ES6 promise, new features of ES7 and es8 async and await
MySQL variables, stored procedures and functions
File reading and writing for rust file system processing - rust Practice Guide
2022-2028 global carbon fiber room scraper system industry research and trend analysis report
Host FL Studio fruit music production daw20.9
2022-2028 global ethylene oxide scrubber industry research and trend analysis report
Interface documentation system - Yapi
Line number of Jenkins pipeline script execution exception
2022-2028 global ICT test probe industry research and trend analysis report
2022-2028 global weight loss ginger tea industry research and trend analysis report
CTF tool (1) -- archpr -- including installation / use process
Solving the weird problem that the query conditions affect the value of query fields in MySQL query
2022-2028 global retro glass industry research and trend analysis report
Quick start of wechat applet -- project introduction
Tide - rust web framework based on async STD
Basic knowledge of Embedded Network - introduction of mqtt
Set different background colors for the border and text of the button
Rust controls Dajiang programmable UAV Tello