UCL / rsd-engineeringcourse

Course materials for Research Software Engineering course.
http://github-pages.ucl.ac.uk/rsd-engineeringcourse/
Other
108 stars 97 forks source link

Refactoring page #105

Closed mattagape closed 5 years ago

mattagape commented 5 years ago
  1. "Replace repeated code with a function" - what is the point of showing the traceback? That just confuses the issue.

  2. I can see the point of the "Replace set of arrays with array of structures" example, but am confused by the "after" block of code. i.e. are we using dictionaries or similar here? If so it would be good to see what we are using to make it clear.

  3. "Replace global variables with function arguments". This is a topic of some debate!

ageorgou commented 5 years ago
  1. Overall, quite a few formatting changes needed if we want to adhere to PEP8. Also, minor inconsistencies in punctuation (e.g. ending lines with "." or ":" or nothing)

  2. Replace set of arrays with array of structures: Confused by how exactly data/objects are structured here, and the terminology

  3. Replace constants with a configuration file: Update link to Python os (https://docs.python.org/3/library/os.html). Also, I would clarify "Python OS module"

  4. Summary does not exactly match previous advice (it's missing "Separate a complex expression into a local variable" and "Merge neighbouring loops")

dpshelio commented 5 years ago