DEV Community

Cover image for 100 Tips from The Pragmatic Programmers Book: Part 4/10

100 Tips from The Pragmatic Programmers Book: Part 4/10

Rajesh Royal on January 28, 2024

4.1. Failing Test Before Fixing Code. Create a focussed test that reveals the bug before you try fixing it.   4.2. Read the...
Collapse
 
patfinder profile image
Le Vuong • Edited

Should we create const for all the strings? I saw a leader enforce this rule but suspect that give any value though it takes effort doing that.

Collapse
 
rajeshroyal profile image
Rajesh Royal

I do all the times, but again it depends on the usage of the string. If the string is going to be used at one place and only once it is better to use directly.

Collapse
 
patfinder profile image
Le Vuong • Edited

You are right, use const when it is used at one place add an indirection to the code, meaning it is more difficult to understand. Thanks.

Collapse
 
fersadilala profile image
Lora • Edited

When I started learning programming through books, I was faced with a huge amount of information that seemed overwhelming at first. But gradually I mastered the basic concepts. The main thing is not to stop because of mistakes. I even decided to stop studying for a while, then I started searching on Google for check paper, plagiarism, essay, student, and finally found ca.papersowl.com/free-plagiarism-c.... For me, this was a great option to concentrate on programming. Because it requires a lot of time to study.

Collapse
 
rajeshroyal profile image
Rajesh Royal

agreed

Collapse
 
officialphaqwasi profile image
Isaac Klutse

Thanks for sharing, it will be much more better and simple for we readers if the link of the book are add.

Collapse
 
rajeshroyal profile image
Rajesh Royal

Thanks @officialphaqwasi I will add the link to the book