当前位置:网站首页>Nine good programming habits for 10 years
Nine good programming habits for 10 years
2022-06-22 13:44:00 【Bear coder】
Edited from : https://mp.weixin.qq.com/s/1FUrK-cBQXMra7ymMSSx_w
Don't be frightened by these words , Official documents are actually treasures . A mature technology was born , There can be no blog, no books , But there must be an official document , Beyond all doubt , It must Is the most accurate 、 Most real-time information . People who write official documents , It's usually the developers of these technologies or software , They are the people who know these things best , Therefore, the written documents are not only of high quality , Usually the content is also up-to-date .
therefore , Official documents are far more suitable for beginners than blogs and forums on the Internet . When we come across a lot of problems and technical details , Go through the official documents carefully , You will find that many problems and vague areas will be clear . Programmers should master the ability to learn a technology through official documents , With this ability , You just Have the foundation to learn all other technical frameworks ; And authentic official documents , Also can exercise your self-study summary ability . Many people always think that no matter what Google This is a very low act , But in fact , Ordinary programmers + Google= Super programmer . Make good use of the search function ,Google +Stack Overflow + GitHub Can solve most of your problems . therefore , Before asking others questions , Search for it yourself first .
Of course , Super programmers don't know Google That's fine , hold Google Absorb and apply what you find , Is the real ability . however , Whether it's looking at official documents or , Or face Google Programming is good , all Must have a good command of English . In order to better read the document , Search for what you need .ITWorld Once launched a “ The biggest headache for programmers ” vote , result , Nearly half of programmers think naming is the biggest headache .
Sometimes the code is written high , Start flying yourself when you name it ,gousheng、tiedan、xiaonaigou、i、j… I wrote hi , Others are confused when they read .
therefore , Whether it's an internal variable or a global variable , Both Form your own naming rules , Be able to see the meaning of variables at a glance . Confusing or incorrect naming not only makes our code difficult to understand , It can mislead our thinking ; conversely , Good naming , It can greatly improve the readability of our code , It can also greatly enhance the maintainability of the code . Like naming, there are two other things that make programmers headache : Write notes... Headache , It's a headache for others to read without writing notes . The reason for writing notes , Because when you're writing a program , Maybe I remember it very clearly , What is the mechanism of this paragraph 、 How to achieve , But as you write more and more programs , You'll forget why you wrote that , Changes and handover are also very troublesome , Comments on the code can effectively avoid this situation . Annotations don't just make code intelligible , It can even give code readers more information .
however , Annotation is more expensive than essence . We should put an end to aunt like “ Examples and notes ”, All over the mountains , It's actually background noise .“ Don't make wheels over and over again ( Stop Trying to Reinvent the Wheel)”, Maybe it should be the first rule that every programmer should be told . Writing a program is actually one of the best “ lazy ” The job of : Every function you're struggling to achieve now , There may already be excellent solutions contributing to the open source community , Use the existing wheels and various open source libraries , It will make you more effective with less . Of course , To find a very suitable wheel , Is a very difficult thing . Sometimes it takes a lot of effort to find the wheel , But I found that there were such problems , In the end, it ended without any trouble .
[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-RH2EVp1L-1655817295361)(https://mmbiz.qpic.cn/mmbiz_gif/IXtafucUqr5OkAy7Dwx4pMjBKGGWvhZHXJG9SQWL4wKEXIkzMl1cAY1NaicSQGw0dRo5RibVWkcpudDg73b9s0icQ/640?wx_fmt=gif&wxfrom=5&wx_lazy=1)]
that , What kind of wheel is a good wheel ?
- Open source , also License loose .
- There are documents , Code specification , Friendly interface , It's best to have actual use cases .
- The community is relatively active .
- loose coupling , It's easy to customize .
All in all , As long as it is suitable and easy to use , It's a good wheel . There is no shortcut to improve your programming ability , The best way is to write more code . however , Besides writing a lot of code , To improve your programming ability, you also need to read a lot of code written by others .

in the first place , Read the source code can Improve the programming ability . Learning begins with imitation , Whether it's getting started by reading the sample code in the tutorial , Or advanced reading excellent project source code , It's a good way to learn . both , Read the source code can Improve debug Ability . Only practice the accumulated ability to read code , To understand the code , So as to quickly and accurately locate the problem in the code . Last , Reading the source code can help Form a good code style .“ Development ” Not just write executable code , But also Write code that others can read , This is very good for code maintenance and expansion . Whether a programmer can accurately evaluate the development time , It's a very important thing . But for novice programmers , It's better to count one more week , Don't underestimate one day . excessively “ optimistic ” Easy to make your boss Scared . After all , In the process of evaluating development time , You need to preset the impact of various modifications on other modules . A modified unit test , Acceptable test ,UAT Environmental testing , Go online again , Many places take time . Once a test fails , Then you have to debug , modify , Unit test again … Who can guarantee that every modification is passed at one time . Refactoring is the main skill of programmers . The greatest courage of a programmer is to look at the code he wrote three months ago . however , Learn how to refactor your code into a better code , This is a valuable skill . Good code is changed , The code needs constant refactoring , Refactoring should run through the whole phase of code development .
Refactoring should not be refactoring after a few months , The best way is to refactor in real time . Write a day's code ,70% We can't spend too much time on refactoring . Last , As a novice programmer in the workplace , Find a reliable elder to lead yourself , Is a very conducive to their own growth choice . This master had better have these characteristics :
- Support you : Someone who won't lose interest because of your success .eg. Colleagues compete with each other
- Technical skills : Someone who makes sure you can actually learn from him .
- High standards : Can keep you up to a high standard , Not just to cope with today's work , It is also to become a more senior programmer in the future .
such , When you have all kinds of problems in your work , Your master can lead you in the right direction of career development .
边栏推荐
- Redis password modification, startup, view and other operations
- Opengauss database source code analysis series articles -- detailed explanation of dense equivalent query technology
- 散户开户哪个证券公司好?手机开户安全么?
- HMS core news industry solution: let technology add humanistic temperature
- Problème de sous - séquence / substrat leetcode
- Oracle's skills in dealing with inserting duplicate records
- Leetcode union search set
- Run sqoop1.4.5 to report warning: does not exist! HCatalog jobs will fail.
- 定金预售的规则思路详解
- File download vulnerability & file read vulnerability & file delete vulnerability
猜你喜欢

Stop using system Currenttimemillis() takes too long to count. It's too low. Stopwatch is easy to use!

基于SSM的小区垃圾分类和运输管理系统,高质量毕业论文范例(可直接使用),源码,数据库脚本,项目导入运行视频教程,论文撰写教程

SSM based library management system, high-quality graduation thesis example (can be used directly), project import video, attached source code and database script, Thesis Writing Tutorial

Système de classification des déchets et de gestion des transports basé sur SSM, exemple de thèse de diplôme de haute qualité (peut être utilisé directement), code source, script de base de données, t

聊一聊数据库的行存与列存

Word skills summary

leetcode-二分法

Detailed installation tutorial of MySQL 8.0.29 under windows to solve the problem that vcruntime140 cannot be found_ 1.dll、plugin caching_ sha2_ password could not be loaded

【Nacos云原生】阅读源码第一步,本地启动Nacos

46. Permutations
随机推荐
【Nacos云原生】阅读源码第一步,本地启动Nacos
SQL row column conversion
476. Number Complement
“不敢去怀疑代码,又不得不怀疑代码”记一次网络请求超时分析
Talk about row storage and column storage of database
华为这份关于专利的会议纪要,都说了什么?(内含华为十大发明彩蛋)
Secondary development of robotframework -- socket push real-time log
Stop using system Currenttimemillis() takes too long to count. It's too low. Stopwatch is easy to use!
基于SSM的小区垃圾分类和运输管理系统,高质量毕业论文范例(可直接使用),源码,数据库脚本,项目导入运行视频教程,论文撰写教程
Stored procedures in MySQL
Acwing game 55
Acwing week 53
别再用 System.currentTimeMillis() 统计耗时了,太 Low,StopWatch 好用到爆!
epoch_ Num and predict_ Conversion of num
Temporary recommendation on graphs via long- and short term preference fusion
leetcode-子序列/子串問題
Ppt data collection methods and analysis skills
Linux setting enables Oracle10g to start automatically
Oracle user space statistics
HMS core news industry solution: let technology add humanistic temperature