A few thoughts about the principles of coding

A few thoughts about the principles of coding

May 6, 2021 Johanna Kainulainen Tech

We asked our experienced professionals for their views on the basic principles of software development; testing, “clean code,” and the importance of teamwork. Aslan, Tuukka, Evgenia, Mingfeng and Teemu have a total of 65 years of work experience in software development, so these veterans know what they are talking about.

Why you see testing as important?

ASLAN, PROJECT MANAGER

There is no such thing as perfect code. With careful planning, one can really reduce the number of possible errors, but in practice, there will always be the possibility of the bug ending up in the code nonetheless. A plan and specs are only indicative, and in practice when working with code, it must be adapted to the software or to the environment. 

When these are matched, new dynamic situations can arise that were not taken into account in the plans and the tests will then hopefully capture these before the code is still in production. 

Unit tests and test plans act as a “free” design document. Future developers can read these through and get additional context for the functionality of the software. 

TUUKKA, SENIOR DEVELOPER 

Tests are important so that the correct functionality of the code is defined and will not change inadvertently. It's a lot easier to make changes to the code on top of existing tests and trust that the code still works after the changes. I could also learn what the code was supposed to be doing based on tests other developers have written as long as the test themselves were well-made.

MINGFENG, SENIOR SOFTWARE DEVELOPER & GIS MASTER

We are humans and we all make mistakes. And testing is one of the most effective and cheap way to help us to avoid most mistakes. It's nearly impossible to know everything or get everything right on day one of a project, so changes to the software are inevitable.

Tests give developers more confidence to make changes and developers can constantly improve the software without worrying about introducing more bugs to software. One of the good practices in software development is to refactor mercilessly, which is only possible with relentless testing and continuous integration.

EVGENIA, SENIOR DEVELOPER 

As a developer, tests help me in my everyday work. If a project has good quality testing, it makes my work less stressful as I can have piece in mind that my feature doesn't break anything. That is why it is also important to create good tests for my newly developed feature as it also shows my possible logic fails in code.

TEEMU, TEST MANAGER 

Essentially testing in my opinion is there to build trust. Trust that we are delivering the requirements that the business has set, trust to the stability of the application, and trust that this increment to the whole is truly kicking ass (as always). :)

Note to self:

With quality testing, one dares to produce code without fear of crashing the entire domino line (read: system). Testing increases system stability and supports the work of the software developer.

At the office

Why writing clean code is important?

ASLAN, PROJECT MANAGER

Clearly written code makes it easier to get people to look for possible errors. Beautiful code also makes it smoother to find bugs yourself. It’s easier for people to collaborate when the code is neat and follows a common style. In general, neat code is also easier to reuse. 

TUUKKA, SENIOR DEVELOPER 

It's easier to understand, edit, and maintain the code.

At worst, the code becomes a mixed blend that the developer himself no longer will remember after a couple of months, why he wrote something or what he was trying to do. You should leave a comment in your own code to remember what it was supposed to do.

MINGFENG, SENIOR SOFTWARE DEVELOPER & GIS MASTER

It's very important to understand that code is for humans, but not for computers (the code needs to be compiled to 0s and 1s in order to be understood by the computer). Developers need to express their intentions clearly and easy to understand to make it possible for other developers and for themselves (people forget things) to make changes or fix bugs in it.

This is also one important way to make it easier to change the software. If you cannot understand something, you cannot change it.

EVGENIA, SENIOR DEVELOPER 

Clean code is easy to read and debug, and of course nice to look at. :) If you are developing for someone else it is pretty sure you are not the first or last person to look at it. Writing clean code is also a professional pride and respect toward future developers in the project.

TEEMU, TEST MANAGER 

Like dirty laundry, dirty code smells. Yes truly and literally, especially if you have Sonarqube watching your back in the DevOps. Clean code is more understandable, hides fewer defects, and is easier to adapt by others. Another day, another clean T-shirt.

Note to self:

Just like cleaning the toilet after use, you should also respect other users when coding. Coding is a team effort and like the programmer himself, others also need to understand the handprint.

Aslan Venejoki

Why working as a team is important?

ASLAN, PROJECT MANAGER

Nobody can move mountains alone. In addition to mental support, the team provides technical assistance in troubleshooting. In creative work like programming, it is helpful to occasionally get comments from another perspective. There are often many different solutions to problems and teamwork is a great way to creating ideas.

TUUKKA, SENIOR DEVELOPER 

Because two or more pairs of eyes are better than one. 

MINGFENG, SENIOR SOFTWARE DEVELOPER & GIS MASTER

Software development can be hard sometimes and collaboration within a team help solve difficult problems. Exchanging ideas between the team members can help come up with more creative ways of doing things. It also creates more opportunities to learn from each other.

EVGENIA, SENIOR DEVELOPER 

On a personal level, a team is a great place to grow as an individual and a professional. From a project perspective, there are only some things a person can do alone. Teams with good communication skills, good working discipline, and mutual respect can accomplish great things.

TEEMU, TEST MANAGER 

Teamwork has two critical aspects, social and professional. Social is there to make you feel good about sharing a laugh or two while spending time with your closest colleagues and professional is there to make you feel good about learning and building things faster.

Note to self:

Programming is a creative process and every now and then a pair of eyes can bring an useful perspective. A strong team supports each other and complements both each other’s weaknesses and strengths. Honest and fair communication is the holy foundation of a value-adding team.

Anders juhlii

Banner photo by Vlad Hilitanu on Unsplash