DEV Community

Cover image for If programmers were writers...
David Armendáriz
David Armendáriz

Posted on

If programmers were writers...

We as programmers can learn a lot from writers.

1. The first draft has a high chance to suck

It doesn't matter if you are an expert in Django or Express or React or whatever. The first version of your code will suck. But don't worry, it's perfectly normal. And you will be refactoring that code later, won't you?

2. You have to proofread your own work

Other people proofread your work via pull requests. But you need to also proofread your code before doing that pull request! This is what I normally do. Start creating a pull request, but don't create it. Just look at the changes on those beautiful UIs in GitHub, Bitbucket or GitLab. Did you accidentally include a console.log? Don't worry, just remove it and start proofreading your work again. Start asking yourself questions. Should I move this variable to a constant? Should I move this piece of code to its own method? After you think your code is perfect, create that pull request!

3. Let others proofread your work

Ok, this one is pretty obvious. Your code needs to be reviewed before going to production right? Well, I just want to add something else here: never, ever, take a pull request personally. Pull requests are there for you to be better, not to harm your ego.

4. There will be a second or third draft

This is related to point 1. Remember I told you to refactor your code? Well, as Nike says: just do it. And if you are touching someone else's code, be that guy in the team to leave the house clean. That means, refactor other people code if necessary!

5. A finished piece is better than a perfect WIP

Again, just do it. If you are seeking perfection and never deploying code, then why are you writing code? Code will never be perfect. Just push that damn code to production already.

6. Keep a cohesive narrative

Write code as if you were writing a predictable yet exciting tale. In software development, predictable is in some sense good. You are writing your React app with class based components? That's fine. But please, don't start mixing functional components and class based components because YOLO.

Just wanted to share this with you. Bye, bye! And also, don't forget to subscribe to my channel: YouTube Channel

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more