Photo by Aaron Burden on Unsplash
A few weeks back during a #DevDiscuss, I asked the question "What is the one tip you would give another programmer?" and had quite a large number of responses. Many people commented their own tips or liked/retweeted some of the other tips.
This list here are the top 10 tips tweeted as a response to that question:
#10 by Marcel Gehlen
Marcel Gehlen@marcel_gehlen
@MrTurnerj Talking to people can save you hours of relentless, undirected and ultimately unsatisfying coding.06:34 AM - 10 Apr 2019
Talking with others is always good advice as it is a good way to expand your knowledge. We all come from a variety of different backgrounds with different experiences and may approach problems differently.
#9 by Simon Rood
Simon Rood@trigalti
@peeke__ @MrTurnerj @ThePracticalDev Write your code pretending someone at 3am needs to debug/fix it in a highly critical state. π08:29 AM - 10 Apr 2019
There were a few tweets like this one all with the general gist of "write good code so when the bad times come around, you are less screwed".
Another tweet categorised it like:
Assume the next person debugging your code is a serial killer who knows where you live.
#8 by Rowan Weismiller
Rowan Weismiller@rowbot_weisguy
@MrTurnerj @ThePracticalDev Use StackOverflow etiquette with your colleagues, too: show your work, ask questions that we all might learn from, and donβt expect anyone to do the work for you.03:07 AM - 10 Apr 2019
It is definitely important remember that others won't just do the work for us. If we are wanting help with something, we should provide as much help back through what we tried, what errors we get etc etc. Don't take others for granted!
#7 by Juho PerΓ€lΓ€
Good commit messages are always a win! You may not have needed to dive through your version control history much but when you do, you will definitely see the benefit in well written commit messages.
Tied #6 by Hayley Denbraver and Sid
Liquid error: internal
I feel that this tip is relates somewhat to tips #8, #9 and #10. We aren't perfect, we can make mistakes.
I've been caught out on this a few times. It can be very easy to try and make something the "best" it can possibly be, working under every possible situation/configuration. You can end up easily over-engineering a solution. This also came up in the most recent DevDiscuss with a popular tweet by Laurie.
#5 by Molly Struve
Liquid error: internal
In a similar vein to Sid's tip, it can be easy to get stressed over what we are building. There are totally developers working on literal life-and-death things (and I thank them for their hard work) though most of us really aren't. If we can't solve something in the next 5 minutes, it isn't the end of the world.
#4 by Annie Garneau
annie garneau π@annishky
@MrTurnerj @ThePracticalDev Give meaningful names to variables, methods and classes.02:20 AM - 10 Apr 2019
A few others expressed a similar tip which I consider coming down to the phrase "self-documenting code". It isn't meant to take away from any documentation - it is instead code that is intrinsically easy to read from things like good variable names, non-confusing structures and method calls etc.
#3 by Matt Kahl
@MrTurnerj @ThePracticalDev Never lose the courage and humility to say βI donβt know.β Your future self, your software, and your teammates will thank you for it.02:39 AM - 10 Apr 2019
There is nothing wrong with saying "I don't know". Even some of the most visible developers on Twitter make mistakes or don't know something. Any time we don't know something or make a mistake is just another opportunity to learn something new.
#2 by Laurie
Liquid error: internal
Nothing really to add to that tip - just a poetry of truth.
#1 by Brian Morrison II
Brian Morrison II@bmorrisondev
@MrTurnerj @ThePracticalDev Donβt stress perfection before you understand concepts. I have a bad habbit of freezing and worrying if Iβm doing X the most optimized way instead of just getting it done!01:58 AM - 10 Apr 2019
An expansion on the same tip that Sid (#6) gave earlier. I see that having this tip come up multiple times means that it really resonates with other developers.
Honourable Mentions
Here are a few more tips that, while didn't get the highest number of likes, are still useful to keep in mind regardless of your experience.
Remember to sleep!
Faizan Akram Dar@faizanakram99
@MrTurnerj Always sleep well, never compromise21:30 PM - 10 Apr 2019
Read the docs!
@MrTurnerj Itβs s alright to read the docs, even if you are an experienced developer. Treat them as theyβre your best friends! π π€19:59 PM - 10 Apr 2019
3 Steps to Good Code
@MrTurnerj First, make it work. Then, make it right. Finally, make it fast.16:08 PM - 10 Apr 2019
What developer tips did you like? Do you have your own to add?
Top comments (8)
Mostly simple, sometimes fast. -- by Chenge
My all-time-favorite: Code, as if the person ending up maintaining your code will be a violent psychopath, who knows where you live. Code for readability! (John F. Wood)
I just took the liberty to phrase it gender neutral, since John used βguyβ.
Discipline is more important than motivation - by @swyx #NoZeroDay
Love it :-) For me, I would have swapped No. 1 and No. 10 but I'm sure EVERYONE has their own ordering. Thanks for taking the time to put it together!!
oww...! Nice one:)
Don't code when you're hungry, thirsty, tired, preoccupied or... you have to go to the bathroom!
Fix your needs before that, or else you might not achieve sufficient concentration π
Don't try to write clever code. Try to write code for clarity, even if it takes a few lines longer.
Aww thanks :)