Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,406 members, 7,808,449 topics. Date: Thursday, 25 April 2024 at 12:04 PM

Naming Variables - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Naming Variables (843 Views)

0x01. C - Variables, If, Else, While ALX Task / Magento 2 Configurable Product Purchase Variables / Variables In Programming (2) (3) (4)

(1) (Reply)

Naming Variables by harryobas: 12:17pm On Apr 16, 2018
Every time you are writing code you are naming things. When you read code that you or someone else has written, you are gaining most of your understanding about that code from the names of things in that code.

Most of the time I can accurately predict a developer’s skill level by looking at how they have named methods, variables and classes in code they have written.

A developer who lacks the ability to give good names to concepts and data in their code is like a mute translator. It doesn’t matter if you can understand something, if you can’t adequately explain it, the moment it leaves your head it is gone.

The best way to improve this skill is to always put it into practice. I’ll often rename things in code I am just reading to get an understanding. As I start to understand what a method is doing, I’ll change the name to match that understanding. I’ll do this while I am reading the code, not even making any logic changes to it.

The more you focus on giving good names to things, the better at it you will become.

This is also the most visible thing about your code. It is hard to know if your code is correct or efficient by looking at it, but if I read it and can understand it, I am going to assume you know what you are doing.

(1) (Reply)

Python Beginners / Learn Web App Development In 3 Months(html,css,js,jquery C#.NET MVC And SQL) / Are You A Mean Stack Developer? This If For You!

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 7
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.