Refactor the code that serves as a value for the agenda-files variable. Does it sound natural in my context?

Status
Not open for further replies.

Zoli

Member
Joined
Feb 24, 2015
Member Type
Student or Learner
Native Language
Hungarian
Home Country
Hungary
Current Location
Romania
Refactor the code that serves as a value for the agenda-files variable.

or should I just write?:

Refactor the code serving as a value for the agenda-files variable.

They are both commands (imperative).

Context:
I have a variable which is like a drawer in computer programming. For example, I can store my name in the variable "name" like so:

name = zoli

The equal sign assigns the value "zoli" to the variable named "name".
Sometimes the value is computed using an operation like 1 + 1. The operation is performed, then the final result is assigned to the variable.

total = 1 + 1 => becomes => total = 2

I have a variable named "agenda-files" that accepts a list of names, but the list of names is computed using a more sopisticated code:

agenda-files = ...a lot of code here that generates a list... => agenda-files = zoli, peter, dan, etc..

Refactor is a term used in programming to change something in an existing code but without changing the functionality and end result. It's like changing 2+3 to 3+2.
 

Barque

Banned
Joined
Nov 3, 2022
Member Type
Interested in Language
Native Language
English
Home Country
India
Current Location
Singapore
They both work but the first (serves) sounds more natural to me.
 

Zoli

Member
Joined
Feb 24, 2015
Member Type
Student or Learner
Native Language
Hungarian
Home Country
Hungary
Current Location
Romania
Does this sound better?

Refactor the code that generates a list of agenda files.

I don't necessarily need to imply the name of the variable.
 

Barque

Banned
Joined
Nov 3, 2022
Member Type
Interested in Language
Native Language
English
Home Country
India
Current Location
Singapore
It works, but it doesn't seem to mean the same thing as your earlier sentence.
 

Zoli

Member
Joined
Feb 24, 2015
Member Type
Student or Learner
Native Language
Hungarian
Home Country
Hungary
Current Location
Romania
How about this one?

Refactor the code that generates a list of names for the agenda-files variable.
 

Barque

Banned
Joined
Nov 3, 2022
Member Type
Interested in Language
Native Language
English
Home Country
India
Current Location
Singapore
This works too, but again, it seems to mean something different. Aren't agenda files and "names for the agenda-files variable" different things?
 

Zoli

Member
Joined
Feb 24, 2015
Member Type
Student or Learner
Native Language
Hungarian
Home Country
Hungary
Current Location
Romania
No. It's just the name of the files. Instead of "refactor" I will go with the word "change." I think "refactor" can be interpreted in many ways in the world of tech. The word "change" is safer.

Change the code that generates a list of names for the agenda-files variable.
 
Last edited:

Tdol

No Longer With Us (RIP)
Staff member
Joined
Nov 13, 2002
Native Language
British English
Home Country
UK
Current Location
Japan
Change sounds a bit vague to me as it doesn't tell the person what changes you want to make. (Not a specialist)
 
Last edited:

SoothingDave

VIP Member
Joined
Apr 17, 2009
Member Type
Interested in Language
Native Language
American English
Home Country
United States
Current Location
United States
You must be pretty bored if you're "refactoring" code but ending up with no change in its functionality.
 
Status
Not open for further replies.
Top