The saying, "It's better to give than to receive" is true. Now the fine print you can barely read under this frequently repeated statement adds, "In the end you get a lot more in return than what you give." I believe it's important to give altruistically, but there are a lot of benefits to the giver, more so than the receiver. The same is true of coding. Want to get better at writing code, go look at someone else's and give them a constructive code review session. The more code reviews I do, the better I am at my own code. The more things I catch myself doing, it raises the bar for my own expectations of what I am able to do and what I want to do. It pushes me internally to have a higher standard for myself. It helps me focus more and to be attuned to why certain things are coded the way they are, maybe it's more performant, maybe it handles data in a more simpler way with far less code than I would have used. Doing code reviews also helps me be more creative. Kind of like looking at a famous artist's picture and learning how they used shadow and light to make certain features more prominent. The gift of code reviews are a wonderful way of getting to know other engineers as well. I find it gives me a quick peek into how and why they think they way they do. It's also a mini teaching session, you look things up if you aren't sure and it helps build those pathways in the brain more concretely. You are able to give reasoning behind why an element behaves the way it does and is or isn't the best use case for the engineer. It's a great little hack and more importantly, helps your fellow engineer.
ย