Questions from a "new" developer

I recently got my first “official” developer job working with Node.js and Vue.js (although we working with React until about a week ago). I learned over the past few years and employed what I knew at my last employer, so my experience has been working in isolation.

I never worked with other developers until the new job I started a month ago.

Is it unusual for experienced developers to not follow the DRY principle and the Single Responsibility Principle? I always thought that would be something long time developers would apply and it doesn’t seem to be the case.

I’m not talking about being a code nazi and expecting everything to be pristine and perfect, but seeing the same non-trivial code written multiple times in virtually the same file instead of just creating a function to me is pretty amateurish.

It tends to happen in larger code bases as different developers add functionality piecemeal over time without realizing that there might already be code that they can leverage. If you have the freedom to do so, refactoring that duplication out into a common utility will usually get a “Good catch. Thanks.” response from your teammates.

That’s good to know.

The code base is new. We started working on it two weeks ago and the problems I’m citing was the first merging of other code into the first commit (which was what I had contributed).

Some of it sounds like an organization and communication issue, some of it sounds like the developer is maybe being a little lazy and didn’t refactor the code after their initial implementation was just to get the job done.

Project Managers tend to be the one that helps you sort out these organization issues prior to the actual implementation so that people aren’t “stepping on each other’s toes,” but it’s also up to the developers to communicate with each other efficiently so that you’re not stuck in endless meetings. Code Reviewers tend to help with code refactoring to make it cleaner, but not all team do code review all the time, time and effort contrainst and all.

1 Like