当前位置:网站首页>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 )
边栏推荐
- 怎样申购打新债 开户是安全的吗
- 数据标注科普:十种常见的图像标注方法
- Opencv learning notes - loading and saving images
- Conceptual analysis of DDD Domain Driven Design
- Automatic reconstruction of pod after modifying resource object
- The world's largest meat processor has been "blackmailed", how many industries will blackmail virus poison?
- LS-DYNA新手入门经验
- Use the object selection tool to quickly create a selection in Adobe Photoshop
- Getting started with scrapy
- Istio FAQ: istio init crash
猜你喜欢
Database migration tool flyway vs liquibase (II)

How stupid of me to hire a bunch of programmers who can only "Google"!

【Go语言刷题篇】Go从0到入门4:切片的高级用法、初级复习与Map入门学习

GLOG从入门到入门

Group planning - General Review
[Old Wei makes machines] issue 090: keyboard? host? Full function keyboard host!

ArrayList#subList这四个坑,一不小心就中招

"Meng Hua Lu" is about to have a grand finale. It's better to learn it first than to look ahead!

GLOG from getting started to getting started

Insurance app aging service evaluation analysis 2022 issue 06
随机推荐
Tencent security monthly report - zero trust development trend forum, digital Expo Technology Award, Mercedes Benz security research results
Adjustment method of easynvr video platform equipment channel page display error
Tencent cloud and the ICT Institute launched the preparation of the "cloud native open source white paper" to deeply interpret cloud native
[mysql_16] variables, process control and cursors
Coinbase will launch the first encrypted derivative product for retail traders
How does the video networking / network penetration tool easynts permanently delete one of the devices?
Which commercial insurance endowment insurance is good? Ranking of commercial endowment insurance products in 2022
The solution of distributed system: directory, message queue, transaction system and others
In depth analysis, from ordinary clock system to various time service modes
Reading at night -- about microservices and containers
GLOG从入门到入门
[Old Wei makes machines] issue 090: keyboard? host? Full function keyboard host!
How to make Baidu quickly include its own personal website?
数据标注科普:十种常见的图像标注方法
Is it safe to apply for new bonds to open an account
Opencv learning notes - loading and saving images
GLOG from getting started to getting started
Is it safe to open an account for how many new bonds you can apply for
Use go to process millions of requests per minute
What are the software prototyping tools?