Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Steven Mercatante
Steven Mercatante

Posted on • Edited on • Originally published atstevenmercatante.com

     

Code With Intent


This post was originally published athttps://stevenmercatante.com


When people ask what makes someone a senior software engineer, they tend to get the same responses: ability to ask meaningful questions, mentoring others, putting aside one's ego, technical ability and so on. But, there's something else that is just as essential that is rarely mentioned: making the intent of your code clear.

This can be accomplished a few ways:

  • variables and functions have clear names that express their purpose
  • functions are small and have only one responsibility
  • code should be self documenting, but if that's not possible...
  • ... comments should be added that explainwhy the code is written this way, andhow it works
  • functions and classes are organized so that new contributors can quickly find what they're looking for

It's easy to neglect some of the above when you're new to programming, or under tight deadlines. But making the effort is absolutely worth it. Your code will be easier to understand, easier to test, and easier to refactor. New contributers will thank you. Future-you will thank you, too. After all, there's nothing worse than coming back to a codebase you wrote 6 months ago and wondering what the hell is going on. So take the time now to make your intent clear - even if it only helps future-you, it'll be worth it.

👋Enjoyed this post?

Join mynewsletter and follow me on Twitter@mercatante for more content like this.

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Hey, I'm Steven Mercatante and I build things for the web.I'm a full stack software engineer with over 15 years of experience building websites, mobile apps, APIs, CMSs, and ETL pipelines.
  • Joined

More fromSteven Mercatante

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp