当前位置:网站首页>99% of the students can't write good code because of this problem!
99% of the students can't write good code because of this problem!
2022-06-24 12:33:00 【Programmer fish skin】
Most students of mathematical programming never pay attention to the problem , Must see !
Hello everyone , I'm fish skin , Recently, I helped some students to see their projects , Found a very serious problem , That is, their code is very Rough .
What is rough ?
Is refers to : Although on the surface, the project can run , The interface effect is also pretty good , But when I looked at the code they wrote , Found that the quality of the code was very low . Some people obviously write code after I haven't read it once !
Take a few examples :
- 1 Lines of code can complete the function to write 10 That's ok 、20 That's ok , I'm tired .
- Copy and paste the same code several times , Some variable names have been pasted and forgotten to change .
- Variable names are not standardized , There are even Chinese names !
Actually , These are all for programming learners “ Common failing ”.
Let me ask you three more questions :
- Will you read the code yourself after you write it ?
- Have you ever wondered what might go wrong with the code that works ?
- Have you ever thought about improving the quality of your code ?
I believe most of the students haven't considered these at all , When you do the project by yourself, feel free , The code you write will run and be done , I don't care about the quality of the code , No one's watching anyway .
Why write high-quality code ?
It's OK to write code by yourself , But sooner or later you have to work , If you keep this bad habit in team development , The code is smelly and long 、 Difficult to understand and maintain , It will not only affect their own development efficiency , And bring down the whole team ! in the course of time , Maybe your colleagues will never play games again .
Why? ? One is to change your bad code , There is no time to play games ; On the other hand, instead of playing the game, I beat you .
So why do more and more students who study programming not pay attention to their own code quality ?
There are two main reasons : It's not just because there's less code , More of it is due to less code .
Most of my classmates must be the same as before , First watch the video tutorial 、 Or books to get started with programming , I haven't seen any other code . however , Most tutorials will only teach you how to write code , Make your code run , It makes you feel “ Oh dear , My code is working , How happy , How wonderful !”. therefore , Many students think that writing code means learning to program , Lower your demands on yourself , Thus missing “ Try to write high-quality code ” The consciousness of , What's more, it seems that writing code is not difficult .
Never thought about writing good code , Only when you can write high-quality code can you see the ghost !
therefore , Want to improve their programming ability , Become a good programmer , It is necessary to maintain the awareness of improving code quality at all times , Look at possible problems in your code , Can not be “ Gold and jade are among them ” Confused by the appearance of . Especially when others question your poor code , Don't hurry up with a hammer , Take a good look at your code first , Rational treatment .
So how to improve your code quality intentionally ? I can't find any problems in my code , I thought I had written very well , What do I do ?
below In the next article , Fishskin will share the habit of writing code that he has always adhered to , Kneel down and beg for one Fabulous , Let's see each other ️
I'm still developing my Programming navigation ( https://www.code-nav.cn ), A project to help you find programming resources , Welcome to use !
How did I teach myself in college , Get Tencent 、 Byte and other big factories offer Of , You can read this article , No more confusion !
I studied computer for four years , Mutual encouragement !( https://t.1yb.co/q0mS )
边栏推荐
- Tencent cloud and the ICT Institute launched the preparation of the "cloud native open source white paper" to deeply interpret cloud native
- [redisson] analysis of semaphore lock source code
- [5 minutes to play lighthouse] create an immersive markdown writing environment
- 11+! Methylation modification patterns based on m6A regulatory factors in colon cancer are characterized by different tumor microenvironment immune spectra
- Remote terminal RTU slope monitoring and early warning
- Database migration tool flyway vs liquibase (II)
- How stupid of me to hire a bunch of programmers who can only "Google"!
- 嵌入式必学!硬件资源接口详解——基于ARM AM335X开发板 (下)
- Installation and operation of libuv
- How can I open an account with new bonds? Is it safe
猜你喜欢
How is the e-commerce red envelope realized? For interview (typical high concurrency)
电商红包雨是如何实现的?拿去面试用(典型高并发)
GLOG从入门到入门
Insurance app aging service evaluation analysis 2022 issue 06
Ten thousand campus developers play AI in a fancy way. It's enough to see this picture!
链接器 --- Linker
Opencv learning notes - regions of interest (ROI) and image blending
New progress in the construction of meituan's Flink based real-time data warehouse platform
[Architect (Part 41)] installation of server development and connection to redis database
GLOG from getting started to getting started
随机推荐
[redisson] analysis of semaphore lock source code
9+!通过深度学习从结直肠癌的组织学中预测淋巴结状态
Axi low power interface
GTEST from getting started to getting started
Is it safe to apply for new bonds to open an account
12+!不同癌症中TMB与ICI反应之间的免疫相关因素研究
最新热点:使用铜死亡相关基因进行肿瘤预后分型!
The latest hot spot: the use of copper death related genes for tumor prognosis typing!
基于AM335X开发板 ARM Cortex-A8——Acontis EtherCAT主站开发案例
What are the software prototyping tools?
怎么可以打新债 开户是安全的吗
Example of SMS interface verification code function implemented by ThinkPHP framework
Hardware enterprise website ranking, 8 commonly used processes
嵌入式必学!硬件资源接口详解——基于ARM AM335X开发板 (上)
Easynvr user login is modified to share the modification process of ip+ user name restriction
5分+的单基因泛癌纯生信思路!
As one of the bat, what open source projects does Tencent have?
11+文章-机器学习打造ProTICS框架-深度揭示了不同分子亚型中肿瘤浸润免疫细胞对预后的影响
怎么申请打新债 开户是安全的吗
How to check the situation that the national standard platform easygbs equipment video cannot be accessed by grabbing packets?