Skip to content
loading...

One Difference Between Smart and Professional Programmer

twitter logo ・1 min read  

Programmers are pretty smart people.

Smart Programmer

Smart people sometimes like to show off their smarts by demonstrating their mental juggling abilities.
if you can reliably remember you can write similar code.

for (int j=0; j<34; j++) {
s += (t[j]*4)/5;
}

Professional Programmer

A professional programmer understands that clarity is king. Professionals use their powers for good and write code that others can understand.

int realDaysPerIdealDay = 4;
const int WORK_DAYS_PER_WEEK = 5;
int sum = 0;
for (int j=0; j < NUMBER_OF_TASKS; j++) {
int realTaskDays = taskEstimate[j] * realDaysPerIdealDay;
int realTaskWeeks = (realdays / WORK_DAYS_PER_WEEK);
sum += realTaskWeeks;
}

Write readable and understandable code.

i couldn't add indentation, if you know please write in comment.

Keep Learning!

twitter logo DISCUSS (10)
markdown guide
 

You could have created a code block that preserves indentation.

Format:
[three backquotes][name of the language]
Your code
[Three backquotes]

Like this
 

it's very cool. thanks Manav, I will try

 

"A professional programmer understands that clarity is king. Professionals use their powers for good and write code that others can understand." YES YES and YES!

 
Sloan, the sloth mascot Comment marked as low quality/non-constructive by the community View code of conduct

I read it in book "Clean Code" by C.Martin a.k.a "Uncle Bob"

I'll suggest to read this book. i can send you soft copy.

 

Just a reminder that any form of piracy via dev.to is going to be against terms of service.

 

Yes I know, I've already read it. Such a lovely book.

 

Lookup Markdown syntax to properly add indentation.

 
Classic DEV Post from Jun 15 '19

Know Not Only Your Weaknesses, But Strengths as Well

Most people want to develop self-awareness. Whether we are managers, entrepreneurs, or aspiring software engineers, the more knowledge we have of our strength and weaknesses, the easier life becomes.

Shoaib Akbar profile image
Software Engineer