Q&A
Can You Read the Code You Wrote Last Week? How to Do Better
Can you read the code you wrote today, last week, last year? The positive impact authoring readable code can have on your career can be enormous, as developers spend far more time reading code than writing it. So how can you turn this to your benefit?
Microsoft's John Papa will explore actionable techniques to help you craft code that lives longer and is easier to maintain in an upcoming session at the big Live! 360 conference in Orlando in November.
The principal developer advocate will present an introductory-level session titled "Are You Writing Readable Code?" wherein attendees will learn about code readability, maintainability and productivity, achieved specifically with methods including:
- Separation of concerns
- Above the fold
- The five-second rule
- Consequential commenting
- Contextual clarity
We recently caught up with Papa for a quick Q&A to learn more about his session.
VisualStudioMagazine: What inspired you to present a session on writing readable code?
Papa: All technologists do this far more often than they realize.
Could you delve into the significance of code readability in today's fast-evolving tech world, especially when many might argue it's the functionality that's paramount?Everyone's heard of AI and how it's changing the world around us. With these advancements, we're not always the one writing our code. So this issue is even more important today -- and especially in the future -- than it ever has been.
"Everyone's heard of AI and how it's changing the world around us. With these advancements, we're not always the one writing our code."
John Papa, Principal Developer Advocate, Microsoft
The concept of "separation of concerns" is a principle many developers might be familiar with, but how do you see its relationship with code readability? Can you give us a glimpse of how you'll be addressing this during your presentation?
Have you ever looked for a pair of scissors in a kitchen drawer? And you just can't find it. That's kind of what happens when everything is put in one place along with 100 other things.
"Above the fold" is a term more associated with newspapers and web design, referring to content visible without scrolling. How does this concept translate to code and its readability, and why should developers pay attention to it?
It's about spotting and understanding what the functionality of the code is doing instantly. You'll learn more in the session.
Maintaining legacy code can be a nightmare for many developers. How do the principles you'll be discussing, like consequential commenting and contextual clarity, aid in making legacy code easier to decipher and manage?
Every developer has to maintain code. The messages in the session benefit everyone.
Note: Those wishing to attend the conference can save hundreds of dollars by registering early, according to the event's pricing page. The event organizer said: "Save up to $400 if you register by September 22!"
About the Author
David Ramel is an editor and writer at Converge 360.