Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Use clearer, more verbose variable names #237

Closed
shubheksha opened this issue Dec 27, 2017 · 6 comments
Closed

Use clearer, more verbose variable names #237

shubheksha opened this issue Dec 27, 2017 · 6 comments

Comments

@shubheksha
Copy link
Contributor

Using one character variable names without any context/comments makes it really hard to understand what's going on in the code. For example, consider the following block of code:
https://github.com/prometheus/tsdb/blob/07ef80820ef1250db82f9544f3fcf7f0f63ccee0/head.go#L480-L493

@krasi-georgiev
Copy link
Contributor

yep I completely agree, single letters are fine in some cases, but unless it is really clear I would also prefer a more descriptive namingz.

I am closing this now since we don't need an issue for this, but feel free to open a PR and I will happily review.

@krasi-georgiev
Copy link
Contributor

actually it might be useful to keep it open for someone looking to pick up a task.

@palash25
Copy link

palash25 commented Sep 12, 2018

Hi, I am looking for a beginner issue, can I claim this?

@krasi-georgiev
Copy link
Contributor

that would be great , thanks!

@krasi-georgiev
Copy link
Contributor

short variable names are fine if they are used in the next 1-2 lines , otherwise something more descriptive would be easier to follow.

@krasi-georgiev
Copy link
Contributor

this is stale now so closing and if anyone feels like improving the variable names feel free to open a PR and I will review.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants