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
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
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
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
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
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
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
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
Nothing really to add to that tip - just a poetry of truth.
#1 by Brian Morrison II
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!
Read the docs!
3 Steps to Good Code
What developer tips did you like? Do you have your own to add?
Top comments (8)
Mostly simple, sometimes fast. -- by Chenge
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!!
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โ.
oww...! Nice one:)
Aww thanks :)
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.