Clean Code - Writing Meaningful Names episode artwork

EPISODE · Sep 28, 2016 · 1H 51M

Clean Code - Writing Meaningful Names

from Coding Blocks

In this episode, we take our first dive into the book Clean Code by Robert Martin and specifically we talk about writing meaningful names for all things code related.  You'll be amazed at how following some decent rules that you can start naming things that will help you and fellow coders understand your code at a glance. You can see the original show notes and put your own stamp on our survey here: http://www.codingblocks.net/episode47 News Samsung 960 Pro http://www.anandtech.com/show/10698/samsung-announces-960-pro-and-960-evo-m2-pcie-ssds SQL Server 2016 Columnstore for real time operational analytics https://msdn.microsoft.com/en-us/library/dn817827.aspx Krebs site taken off Akamai http://www.zdnet.com/article/krebs-on-security-booted-off-akamai-network-after-ddos-attack-proves-pricey/ The best Android distribution is iOS? Outlaw's thoughts on various phone OS's Survey [yop_poll id="23"] Meaningful Names - Clean Code Chapter 2 "If a name requires a comment, then the name does not reveal its intent" Write explicit code - naming variables and methods can reveal the entire intent of the code Avoid using words that would be confusing like "List" as they refer to programming types and could be misleading : accountList should be accounts Avoid using characters that look like numbers i and L or capital o disinformative vs noninformative noise words "data" "info" - noninformative Types should almost never be in a name "table" "string" "object" Names should be distinguished so a user can look at them and understand the differences Use pronounceable names Use searcheable names - longer names trump shorter names Author's pref - single letter names should only be used as local variables inside small methods - length of the name should correspond to the size of its scope Avoid encoding names Avoid Hungarian Notation with typing as part of the variable name - simply not needed nowadays Stop prefixing member (instance) variables with m_ or _ Decorating Interfaces vs Classes with a prefix / suffix - opinion - he prefers ClassImp or vs IType Don't force someone to map variable names in their mind - n = username…smart programmer vs professional programmer - clarity is king Class names should be nouns - English 101 - NOT VERBS Method names should be verbs Use get, set, is - javabean standard When constructors are overloaded, use static factory methods with explicit names - liked this one, possibly make the constructors private Don't get cute with naming by means of jokes (inside or well known) Use consistent naming - Get, Set, Controller - makes it easier to understand and code various parts of an application Avoid puns - add for a collection vs add for setting a value - two different meanings with the same name Use technical names such as pattern names or CS terms in your names - other programmers will understand them better than the problem domain in some cases Fall back to the problem domain for a name if there is no suitable technical name Adding context to naming can clarify their use - prefixes can work but putting variables into classes may work out better "Hardest thing about choosing good names is that it requires good descriptive skills and a shared cultural background" Renaming things that don't make sense as you work in code is a good thing. Resources we Like Clean Code Clean Code by Robert C. Martin Even though we're giving our thoughts on the various ideas throughout the book, Clean Code has tons of excellent sample code that really helps drive the points home. We can't recommend it enough - it's probably one of the few books EVERY developer should read and revisit from time to time. http://amzn.to/2cryvJR Tip of the Week Allen: Implementing OAuth in ASP.NET for a number of providers http://www.oauthforaspnet.com/ Michael: Get out there! Go to conferences, meetups, do it all! http://www.connect.tech/ https://www.atlantacodecamp.com/2016

Episode metadata supplied by the publisher feed · Published Sep 28, 2016

NOW PLAYING

Clean Code - Writing Meaningful Names

0:00 1:51:36

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

API Intersection Stoplight Building a successful API requires more than just coding. It starts with collaborative design, focuses on creating a great developer experience, and ends with getting your company on board, maintaining consistency, and maximizing your API’s profitability.In the API Intersection, you’ll learn from experienced API practitioners who transformed their organizations, and get tangible advice to build quality APIs with collaborative API-first design.Jason Harmon brings over a decade of industry-recognized REST API experience to discuss topics around API design, governance, identity/auth versioning, and more.They’ll answer listener questions, and discuss best practices on API design (definition, modeling, grammar), Governance (multi-team design, reviewing new API’s), Platform Transformation (culture, internal education, versioning) and more.They’ll also chat with experienced API practitioners from a wide array of industries to draw out practical takeaways and insights you can use.H Unshamed & Unchained: Carving Space For Self-Healing & Habit Transformation Danny Poelman Welcome to "Unshamed & Unchained: Carving Space For Self-Healing & Habit Transformation", the podcast where we break the chains of shame and societal expectations to create a safe space for self-healing, habit transformation, and personal growth. Hosted by a seasoned life coach, Danny Poelman DDS, with years of hands-on experience, this podcast is your guide to reclaiming your voice, embracing your story, and living life on your terms.In each episode, we dive deep into the topics that matter most to you—whether it's:-breaking free from unwanted habits like pornography-excessive people-pleasing-healing from past trauma-recovering from narcissistic abuse or religious/relational trauma-anxiety/depression-money mindset blocks-overcoming limiting beliefsWe’re not afraid to talk about the things that are often considered taboo, because we believe that through honest, unfiltered conversations, real transformation happens.You’ll hear real Khanyisa Keke TV Khanyisa Keke On Khanyisa Keke TV, developers can learn and improve their Android for Kotlin Development skills. On this podcast, programmers can learn Android for Kotlin coding from scratch, improve their existing programming skills, get tips, be kept up to date with all the latest happenings and get access to free resources. Powered by Firstory Hosting The Triathlon Mental Performance Podcast Neil Edge This podcast is for you if you are a Triathlete that is interested in learning about tools and strategies to overcome challenges and to utilize the power of your mind to race faster.I'm an experienced Triathlon Mental Performance Coach working with both Age Groupers and Pros.Episodes will cover the following and more.How to improve your mental toughnessRemoving the possibility of panic attacks in open water Removing the fear of fast descents on your bike -Removing mental blocks to improve your race times Completely remove performance anxiety (you don't have to just cope with it)4 weeks to race day - Strategies to  arrive at your a-race feeling calm and confident, with race day mental strategiesI will also talk about specific tools that you can use to ensure that you race faster.<b

Frequently Asked Questions

How long is this episode of Coding Blocks?

This episode is 1 hour and 51 minutes long.

When was this Coding Blocks episode published?

This episode was published on September 28, 2016.

What is this episode about?

In this episode, we take our first dive into the book Clean Code by Robert Martin and specifically we talk about writing meaningful names for all things code related.  You'll be amazed at how following some decent rules that you can start naming...

Can I download this Coding Blocks episode?

Yes, you can download this episode by clicking the download button on the episode player, or subscribe to the podcast in your preferred podcast app for automatic downloads.
URL copied to clipboard!