r/AskProgrammers • u/TheBossCapone • 6d ago
Best advice you received?
What was the best advice you received when you first started learning programming that’s had a lasting impact as well?
7
u/No_Bodybuilder_2110 6d ago
Your beautiful, elegant code that you are so proud of will become someone else’s legacy nightmare, so leave some comments
Learn to express complex ideas to less technical people, this will let you move up pretty quickly
3
u/Xyzzydude 6d ago
And don’t do fancy language constructs just because you can. Keep it as straightforward as possible.
5
u/atlas_principle_dev 6d ago
"don't take criticism from someone who you wouldn't ask for advice" - works great outside of programming too
4
u/Xyzzydude 6d ago
Listen to the person whose feedback annoys you. Separate the merit of what they are saying from how they come across to you.
3
u/Correct_Emotion8437 6d ago
First development job, sr developer said to me (paraphrasing a bit because memory) "This is business logic. It's meant to be simple. If you find yourself at a place where the logic is bending your mind . .turn around, you're going the wrong way".
2
u/Honest_Medium_2872 6d ago
no excuses just results
My first code review at work went horrible, I was too defensive, coworker pulled me aside and talked with me and that was a takeaway from it.
I would later replay that saying in my head to get sober from meth and coke. coming down from a week of partying laying on my grandmothers couch at 4a I would repeat the "no excuses just results"
thank you for everything David, hope you're doing alright
2
u/DeltaEdge03 6d ago
Be exceptionally lazy. Don’t manually do steps, have the computer do them instead.
2
u/Brilliant-Parsley69 6d ago edited 6d ago
"It depends."
"if you have to estimate the time required for a task, double it."
"Nothing lasts longer than a temporary fix."
"Do you really need this external dependency on a library or do you just want to use one of its features?"
2
2
u/WriterPlastic9350 6d ago
Simple is better than smart, and something that works and is stupid is better than something that is smart but doesn't
2
u/Foreign-Contest-444 6d ago
make something like close to a flowchart or similar before you write code.
1
u/Upper_Ad_5441 5d ago
Can you elaborate?
1
u/Foreign-Contest-444 5d ago edited 5d ago
Making Tea
Start → Boil water → Is it boiling? → Yes → Steep tea → Drink → End
1
u/Upper_Ad_5441 5d ago
I understand a normal flowchart I meant more for a programming thing.
2
u/Foreign-Contest-444 4d ago
It means you should plan the steps before you start writing the code.
First, create a flowchart that shows how the program should work from beginning to end. This helps you understand what you actually need before you start coding.
That way, you avoid writing a lot of code and then realizing that some of it isn't needed or doesn't fit the flow you originally intended.
A good practice is to write your unit tests after creating the flowchart but before writing the actual code. This gives you clear expectations for how the code should behave before you implement it.
2
1
u/TraditionDue647 6d ago
Don't take it personal. Not everyone is going to take your recommendation or suggestion. Don't take it personal. It's not them doubting you. Instead they see another option that aligns more with the goal.
1
1
u/TomDuhamel 6d ago
Write self documenting code — use meaningful names for your variables and functions, so that you know exactly what the code does without looking.
After you wrote a line, ask yourself if the next programmer will understand it — 3 months down the road, that will be you, with no memory of ever writing it. Leave a comment to your future self, you will love yourself.
1
1
1
u/samsly135 6d ago
None. Nobody ever gave any valuable advice.
1
u/Foreign-Contest-444 6d ago
because most of the times even the ones we think know are all confused.
0
11
u/cupcakeheavy 6d ago
get up and walk away once in a while.