Cleaner function names
See original GitHub issueThere are some common functions that I think could have better names. I’m not a huge fan of shortening commonly-used names when slightly longer names would bring a lot more clarity. Pandas does stuff like pd.read_clipboard, for instance, rather than read_clip.
Here is a short, non-comprehensive list of functions that I think could be improved with name changes (though I can go through and expand if we decide this is worth doing):
utils.to_laplace>to_laplacianutils.get_lcc>largest_connected_component(debatable, maybelargest_cc? maybe justlccwould be fine here)utils.get_multigraph_union_lccandutils.get_multigraph_intersect_lcc>multigraph_lccwith a keyword argument for union vs intersectutils.cartprod>cartesian_product
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Clean code 101 — Meaningful names and functions - Medium
Classes and objects should have noun or noun phrase names like Customer, WikiPage, Account, and AddressParser. Avoid words like Manager, ...
Read more >Clean code tips - names and functions - Code4IT
Clean code tips - names and functions · 1: Use consistent names · 2: Keep simple, small functions with meaningful names · 3:...
Read more >clean_names: Cleans names of an object (usually a data.frame).
clean_names: Cleans names of an object (usually a data.frame). In janitor: Simple Tools for Examining and Cleaning Dirty Data · Description.
Read more >Clean Code: Naming | Baeldung on Computer Science
In this tutorial, we're going to take a look into naming. Naming is a crucial and daily task for developers in any programming...
Read more >Method and function names - Clean Coding Practices - LinkedIn
[Instructor] Let's look at the rules for crafting cleanly named functions and methods. This file contains a bunch of example method names in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi All, I would like to work on this issue if this is still open.
With regard to the actual changes that need to be made, all of the functions that @loftusa mentioned are in this file: https://github.com/microsoft/graspologic/blob/dev/graspologic/utils/utils.py. @loftusa any other functions that you think should be changed?
You will need to change:
I would recommend trying to use some sort of IDE with a variable naming tool (VS code, for instance) because many of those tools can change a function name throughout the entire library for you. If not, then something like find and replace, but again, would have to make sure to check other files in the library.