DEV Community

Cover image for Five programming tricks I learned from writers

Five programming tricks I learned from writers

scottshipp on December 02, 2019

Writers are interesting people. They spend all their time with words. They obsess over the smallest details. They polish and revise. E.B. White onc...
Collapse
 
deathshadow60 profile image
deathshadow60

Great article.

A trick I picked up from writers was to proofread your code backwards when looking for bugs.

It sounds strange, but when proofreading professional writing, reading it backwards changes how the brain processes the information revealing bugs you might otherwise miss.

In this age of over-reliance on tools, many basic concepts of debugging aren't taught or learned hobbling beginners and many alleged "professionals" alike. As such when they butt heads with an issue the tool isn't handling for them the developers end up hobbled by their lack of the basics.

Something as simple as just reading through it backwards instead of blindly hoping that a tool will do the work for you is shockingly effective.

Collapse
 
scottshipp profile image
scottshipp

Now that's awesome! Thanks for the tip!

Collapse
 
tacomanick profile image
Nick Shattuck

Wow! Great article! I studied a lot of writing-intensive courses in school and once I realized that coding is a lot like writing an essay, short story, article, etc, I became much more confident in my problem-solving abilities. So cool that I am not alone in thinking this way!

Collapse
 
murrayvarey profile image
MurrayVarey • Edited

If I had more time, I would have written a shorter letter. —Mark Twain

Love this quote (and all its different versions). A similar thought comes from Elmore Leonard:

Try to leave out the part that readers tend to skip.

If it's the kind of code I hate to read, then it's not the kind of code I should write.

Writers have so much to teach us developers. And -- lucky for us -- they're good at expressing themselves. After all, that's their job.

Great article Scott. Thank you!

Collapse
 
erikwhiting88 profile image
Erik

excellent article, thank you!

Collapse
 
codemouse92 profile image
Jason C. McDonald • Edited

Great advice straight through!

I do indeed try to live by The Elements of Style. ;)

Collapse
 
abeonweb profile image
abeonweb

Thank you for this. Really enjoyed reading this article.

Collapse
 
zakkaioken profile image
Zak Kaioken

Write what you know, unless you want to write what you don't know.