How to Write Better Code

Senior Brogrammer
2 min readJul 6, 2022

Coding is easy and you’re making it too hard

Mandatory Cheesy Inspirational Photo via Public Domain Pictures

Alright everyone gather around the campfire, we need to learn how to write better code. Several articles talk about clean code, designing proper schemas and keeping software simple. While this is all true, my question to everyone is why you don’t write better code?

How do I write better code?

Based on personal experience I just decided to start writing better code. Everything I write is just better than what I find on Stack Overflow because I understand how to write better code. It’s simple, if you have a long function, just make the function shorter. Looking at a confusing example to do something in Stack Overflow, just do it better.

I can change 2 lines into 1 short line by just being better at coding, which is a simple skill. Why do you have to refactor if you just write it correctly the first time? Exactly, refactoring is a bullshit concept for people who can’t get it exactly right the first time. Which if you can’t do that then you might not be cut out for the software field.

Best Text Editor

Anyone who writes better code needs a text editor that compliments their ability. In this case VIM is the only text editor you need as auto-fill is for scrubs. If you don’t know VIM then git gud because VIM is the superior text editor.

--

--