内容简介:I’m don’t claim to be an authority in software development. These are just the wisdom I earned along the way. I’m sure this list will be more mature after another 20 years.Do you have any tips or wisdom you’d like to share? I really appreciate a comment he
My guiding principles after 20 years of programming
Jan 22 ·4min read
I’ve been programming since 1999. This year I’ve officially coded for 20+ years. I’ve started with Basic but soon jumped into Pascal and C and then Delphi and C++. Then I moved to Java for 4 years before working with JavaScript for the last 9 years. I’ve worked with a wide range of businesses from robotics, fin tech, med tech to media and telecom. Sometimes I had a different hat as a researcher, TPM (technical project manager), teacher, system architect or TL (technical leader) but I’ve always been coding even for fun. I’ve worked on some products that served millions of people, and some that failed before being released. I even had my own startup. I have spent lots of time on open source projects, closed source projects and internally open source projects. I’ve worked with tiny microcontrollers all the way to mobile and desktop apps to cloud servers and lately serverless.
For my 20 years programming anniversary, I tried to list the top principles that I’ve learned over the years and have been guiding me through my career:
- Don’t fight the tools: libraries, language, platform, etc. Use as much native constructs as possible. Don’tbend the technology, but don’t bend the problem either. Pick the right tool for the job or you’ll have to find the right job for the tool you got.
- You don’t write the code for the machines, you write it for your colleagues and your future self (unless it’s a throw away project or you’re writing assembly). Write it for the junior ones as a reference.
- Any significant piece of software is the result of collaboration. Communicate effectively and collaborate openly. Trust others and earn their trust.
- Divide and conquer. Write isolated modules with separate concerns which are loosely coupled. Test each part separately and together. Keep the tests close to reality but test the edge cases too.
- Deprecate yourself. Don’t be the go-to person for the code. Optimize it for people to find their way fixing bugs and adding features to the code. Free yourself to move on to the next project/company. Don’t own the code or you’ll never grow beyond that.
- Anything significant is done by a team. Respect people more than code. Lead by example. Convert your followers to leaders.
- Realize that every code has a life cycle and will die. Sometimes it dies in its infancy before seeing the light of production. Be OK with letting go.
- Don’t attach your identity to your code. Don’t attach anyone’s identity to their code. Realize that people are separate from the artifacts they produce. Don’t take code criticism personally but be very careful when criticizing others’ code.
- Tech debt is like fast food. Occasionally it’s good but if you get used to it, it’ll kill the product faster than you think.
- When making decisions about the code always keep this priority in mind:
Security > Usability (UX) > Maintainability > Simplicity (DX) > Brevity (code length) > Performance - Bugs’ genitals is called copy & paste . That’s how they reproduce. Always read what you copy, always audit what you import. Bugs take shelter in complexity . “Magic” is fine in my dependency but not in my code.
- Don’t only write code for the happy scenario. Writegood errors that answer why it happened, how it was detected and what can be done to resolve it.
- Don’t use dependencies unless the cost of importing, maintaining, dealing with their edge cases and refactoring when they don’t satisfy the needs is significantly less than code that you own.
- Stay clear from hype-driven development . But learn all you can. Always have pet projects .
- Get out of your comfort zone. Learn every day. Teach what you learn. If you’re the master, you’re not learning. Expose yourself to other languages, technologies, culture and stay curious.
- Good code doesn’t need documentation, great code is well documented so that anyone who hasn’t been part of the evolution, trial & error process and requirements that led to the current status can be productive with it. An undocumented feature is a non-existing feature. A non-existing feature shouldn’t have code.
- Avoid overriding, inheritance and implicit smartness as much as possible. Write pure functions. They are easier to test and reason about. Any function that’s not pure should be a class. Any code construct that has a different function, should have a different name.
- Never start coding (making a solution) unless you fully understand the problem . It’s very normal to spend more time listening and reading than typing code. Understand the domain before starting to code.
- Never solve a problem that doesn’t exist. Don’t do speculative programming .
- Software is more fun when it’s made together. Build a sustainable community . Listen. Inspire. Learn. Share.
I’m don’t claim to be an authority in software development. These are just the wisdom I earned along the way. I’m sure this list will be more mature after another 20 years.
Do you have any tips or wisdom you’d like to share? I really appreciate a comment here or on Twitter or on Reddit .
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
数据挖掘
(美)Jiawei Han、(加)Micheline Kamber、(加)Jian Pei / 范明、孟小峰 / 机械工业出版社 / 2012-8 / 79.00元
数据挖掘领域最具里程碑意义的经典著作 完整全面阐述该领域的重要知识和技术创新 这是一本数据挖掘和知识发现的优秀教材,结构合理、条理清晰。本书既保留了相当篇幅讲述数据挖掘的基本概念和方法,又增加了若干章节介绍数据挖掘领域最新的技术和发展,因此既适合初学者学习又适合专业人员和实践者参考。本书视角广阔、资料翔实、内容全面,能够为有意深入研究相关技术的读者提供足够的参考和支持。总之, 强烈推荐......一起来看看 《数据挖掘》 这本书的介绍吧!
HTML 压缩/解压工具
在线压缩/解压 HTML 代码
Base64 编码/解码
Base64 编码/解码