If we google how to become a better developer and increase the code quality, we can see a lot many links. For example, X number of ways/tips to become a better developer. Mainly having the same tips explained differently. Write unit tests and write readable code to name a few.
Writing better code makes us better software engineers?
Software engineering has many aspects other than good code. There are many parties involved, such as the sponsors and stakeholders, actual users, support teams, infrastructure teams, security teams, etc. Also, the managers who bridge between developers and business are crucial. To become better engineers, we need to work better with them.
Below are three golden steps to becoming a better software engineer. Those are useful, especially in this agile world. We can repeat the steps for the entire system if it is small, or for each feature, we are adding to the existing system.
Each step can include some activities.
- Get it done
- The aim is to get the working code to get attention.
- Use wireframe before writing code.
- Show demos. Do not release the code.
- Recommend to follow TDD from here itself. The target of 50% test coverage but not mandatory.
- Get early feedback.
- Can use copy-paste coding without understanding how it works.
- Get it right
- At this step, we should be having confirmed projects or features, so refactor to readable code.
- Patterns such as DI. Make code SOLID.
- Complete API specs
- Strive for 100% test coverage though it's a dream.
- Ensure security, basic performance, etc...
- Do not copy-paste code. If you are forced, understand after pasting it as it is our code.
- Release the versions to production in this step.
- Get it optimized
- Increase the performance and scalability.
- Do not change anything without proper test cases.
- Get feedback from support and address their pain points.
- Learn from production logs, usage stats, etc...
This works great with the products. For service organizations, it may be different. They may be looking more at the "number of features to money conversion" ratio than the final product. A demo may be promoted to production. In such circumstances, avoid the first step (Get it done). Do it the right way from the very first step, even for a demo or PoC (Proof of Concept). Otherwise, we may lose our sleep, weekends, and holidays. Finally, it will be difficult to advance in our career path.
Should we say goodbye to code quality?
Still, code quality is important. As coding has an art element in it, we should always improve its quality and its never-ending process. Remember, the code is never written forever. There will be fellow developers maintaining it in the future. We should not make their lives difficult. Along with execution, readability to fellow developers is also important.
If we look at the code we wrote 6 months ago, we find a couple of ways to improve the code quality.
One easy way is to look at others' code on GitHub or in other tracks in our projects. Reading books will also help improve coding quality. It is very difficult to get all the things right on the first read. So read it again...
Become a better debugger by increasing debugging skills
Coding is something very complex that a human brain can do. Our brains are not evolved to code. It is difficult when we need to deal with a lot of states (variables). Also, keeping track of their values at various levels of execution is tedious.
If we want to become better developers, we should also become better debuggers. We should be capable of avoiding debugging in the first place by planning. To be frank, I am not able to reach that level. Increasing our debugging skills is very much required.
Below are some links to help us improve our debugging skills. This includes a free course on systematic debugging.
Reference
- 97 Things every programmer should know
- Books
- Clean code
- Code complete
- Pragmatic programmer
- Why programs fail?
- Debugging: The 9 Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems
- How Debuggers Work: Algorithms, Data Structures, and Architecture
- The Developer's Guide to Debugging
- The Practice of Programming
- Courses
- Advanced
- How Does a C Debugger Work? (GDB Ptrace/x86 example)
- Using WinDbg
- .Net debugging internals
- Linux How debuggers work: Part 1 - Basics
- http://www.codeproject.com/Articles/838973/Why-your-code-is-so-hard-to-understand
- http://blog.dmbcllc.com/15-ways-to-write-beautiful-code-that-have-nothing-to-do-with-testing/
- Systematic Debugging
Happy engineering...
No comments:
Post a Comment