当前位置:网站首页>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 )
边栏推荐
- Linker --- linker
- 广发证券靠谱吗?开证券账户安全吗?
- Discussion on redis communication protocol
- Cryptography series: collision defense and collision attack
- GLOG从入门到入门
- Can Tencent's tendis take the place of redis?
- 11+ article - machine learning builds Protics framework - deeply reveals the impact of tumor infiltrating immune cells in different molecular subtypes on prognosis
- Listed JD Logistics: breaking through again
- Pipeline post instruction
- National standard platform easygbs administrator assigns roles to sub users and troubleshooting of invalid channels
猜你喜欢

链接器 --- Linker
[mysql_16] variables, process control and cursors

Install Kali on the U disk and persist it

How can a shell script (.Sh file) not automatically close or flash back after execution?
![[live review] battle code pioneer phase 7: how third-party application developers contribute to open source](/img/fa/e52bd8a1a404a759ef6ba88e8da0f0.png)
[live review] battle code pioneer phase 7: how third-party application developers contribute to open source

GTest从入门到入门

GLOG from getting started to getting started

How to write controller layer code gracefully?

Opencv learning notes - Discrete Fourier transform

New progress in the construction of meituan's Flink based real-time data warehouse platform
随机推荐
Embedded must learn! Detailed explanation of hardware resource interface - based on arm am335x development board (Part 2)
Conceptual analysis of DDD Domain Driven Design
Tencent cloud and the ICT Institute launched the preparation of the "cloud native open source white paper" to deeply interpret cloud native
9+! Predicting lymph node status from histology of colorectal cancer by deep learning
Popular science of data annotation: ten common image annotation methods
Do you really know "open source"? Please check [nanny level] open source Encyclopedia
Is it safe to apply for new bonds to open an account
JVM GC garbage collection detailed introduction quick check of learning notes
What is the reason why the video intelligent analysis platform easycvr is locally controllable but the superior equipment cannot control the subordinate equipment?
Opencv learning notes - regions of interest (ROI) and image blending
Automatic reconstruction of pod after modifying resource object
电商红包雨是如何实现的?拿去面试用(典型高并发)
不用做实验的6分+基因家族纯生信思路~
GTEST from getting started to getting started
[2021 techo youth dry goods sorting post, there is always one you are interested in]
How to check the situation that the national standard platform easygbs equipment video cannot be accessed by grabbing packets?
[Old Wei makes machines] issue 090: keyboard? host? Full function keyboard host!
ArrayList # sublist these four holes, you get caught accidentally
打新债可以申请多少 开户是安全的吗
[digital ic/fpga] booth multiplier