DEV Community

UponTheSky
UponTheSky

Posted on

[Opinion] Why is my code so bad

TL; DR

  • You need to convince yourself; you should be equipped with solid knowledge and experience
  • You should talk with your bosses and coworkers frequently to get feedbacks from them

Why I write this short article

It’s been hard weeks. I’ve been doing a task that involves not typical REST API or MVC things. I had to figure out how to do that task from the beginning, designing the logic flow by myself.

But you may also have experienced this: if you’re not fully in charge of the task that you’re doing, you have to at least firmly understand what you're doing and need to persuade others. Unfortunately, due to my lack of knowledge and experience, I couldn't be sure of my work result, I had to change the logic more than three times.

It was (to be honest)so torturing experience, so I write this article at least for myself not to have such a pain again.

So what was the problem?

The main problem is, of course, I wasn’t convinced at all about myself and my decisions. I wasn’t sure what I was doing, always afraid of things going wrong, and disappointed in my lack of knowledge and skills.

However, that’s something I can’t control(my personality) that easily. So I think there is only one way to get over this: I have to improve my knowledge, skills, and experience, until I achieve the level at which I could convince myself.

How I should have done

But couldn’t there be a better way? I think I had. The followings are possible behaviors I could have taken to avoid the current disaster:

  • More frequent feedback: even small changes in your code, you should confirm that you can go on with it, otherwise many other classes and functions will rely on your shitty code
  • The basic design: Software design is so important since all your work is based on this. If you change your design, it means you have to change your public interfaces, which also means that your tests, implementations, and configurations all need to be changed in the worst case.

So, I recommend you should talk with your bosses and coworkers frequently(ideally every 2~3 hours a day during your work). Talk about your design plan, your estimations, and any difficulties you’re having at the moment. Based on their feedback, you’ll be more convinced about your work and stop wasting your time.

Conclusion

Today I don’t talk about how to code, but rather how to work. Good code skill is something you must have, but that’s not enough, since most programmers work as a team. You have to improve yourself, but at the same time, you must communicate with others and observe yourself in an objective perspective.

Oldest comments (0)