Coding the right way
PitechPlus
A global technology and services leader — Human-centered. Tech-powered. Intelligence-fueled.
Get ready to dive into the world of software development.
We are excited to bring you a great interview with our experienced software engineers, Laura Cern?u and Mircea Fernea.
They will be sharing insights on the most common coding errors they have encountered in the industry, the lessons they have learned from coding the wrong way, and their best practices to avoid making these mistakes in the future.
Question: What are the most common coding errors you have encountered in the industry and how have you addressed them?
Mircea: ‘Stupid errors!’ I think those are the most common. This was not due to a lack of focus or attention on the part of developers. It’s just that the initial code was poorly written, so it made it nearly impossible for the next developer to get it right. And I’m thinking here, especially of bad code structure and bad naming - naming is one of the most difficult things in the industry to get right.
Laura: I would go more in-depth and say overengineering is one of the most common roots of bad code. Sometimes, we think ten steps ahead and come up with a much too complicated solution to solve a simple task.
?????
Question: What lessons have you learned from coding the wrong way and how have these impacted your approach to coding now?
Laura: Over time, I learned how important it is to think about a task's big picture rather than diving head-first into the code. This includes thinking about naming, code structure, and code complexity.
Mircea: “I wrote this code and it doesn’t look good, but we’ll have time to refactor it later!” As time went on, I became very adept at using this lie and being lazy or ignorant. But I soon realized it simply doesn't work. It's best to get it right from the beginning. Maybe not perfect for every scenario, but right for the current needs.?
?????
Question: What best practices have you developed to avoid making these mistakes in the future?
Mircea: Discipline. As a result, I got more disciplined in not ignoring bad coding and doing the right thing right. “Do the right things right” means the outcome is important, but also the process.
I also added more learning time into my development process. Learn about the actual problem, the possible solutions, best practices, about pitfalls, and be disciplined and use that information.
?Laura: Some of the guidelines I have in my mind when working are good naming, straightforward solutions, and writing tests.
领英推荐
?????
Question: ?Can you share any real-world examples or case studies of how following these best practices has led to successful software development outcomes?
Laura: One good example is the project I am currently working on, where we invested many resources to ensure a certain degree of code quality in our project. We do that by employing tools for code scanning and discussing strategies and solutions for dealing with legacy code.
Mircea: A best practice would be to leverage code scanning tools use in your development/deployment process. This strategy allowed us in the current project to go for almost a year without any major incidents in production in our domain. Before doing this the platform experienced one major incident every 2-3 months.
?????
Question: What advice would you give to new developers to ensure they start coding the right way from the beginning??
Mircea:
Use your creativity. That’s one of your greatest assets.
Use your creativity wisely. Wisdom is another one of your greatest assets.
Use your creativity wisely and create simple solutions to complex problems. Those will get you far.
?“I have made this more complex than usual because I have not had time to make it simpler” to paraphrase Blaise Pascal’s ?Je n’ai fait celle-ci plus longue que parce que je n’ai pas eu le loisir de la faire plus courte”.
Laura: As a beginner developer, you should be very curious (read a lot, and watch technical presentations). Moreover, since the trends in this domain evolve at a fast pace, you should focus on learning the basics first rather than starting with a framework. And finally, the learning phase is an ongoing process throughout your career.
?
We hope you find their insights as valuable as we did, and that you are inspired to improve your own coding practices.
?????
For those eager to enter the?tech industry, our?Internship Program?offers mentorship, hands-on training, team bonding activities, and an opportunity to enter the field.
Apply here or by clicking on the image
?? ?? ?? ?? ??
Group Product Manager @ JustEatTakeaway
1 年Great interview Mircea Fernea and Laura Diana Cern?u. Many of coding learnings can definetly be applied in other areas. Thank you for the inspiration!