Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better pattern matching #470

Merged
merged 2 commits into from
Sep 29, 2023
Merged

Better pattern matching #470

merged 2 commits into from
Sep 29, 2023

Conversation

Lehonti
Copy link
Contributor

@Lehonti Lehonti commented Sep 29, 2023

Mostly to avoid casts, which are ugly, but it's also used in other ways

@ForNeVeR
Copy link
Owner

@Lehonti, hey! You seem to do a lot of work on refactorings of projects in the .NET ecosystem (thank you for that!), and the fork repository names look like they were created using some kind of tool. I am curious about this. Do you use some special refactoring automation tools that fork the repositories and perform some (semi-)automated refactorings for you?

Please do not take this as a criticism. I do appreciate your accurate and useful work!

Copy link
Owner

@ForNeVeR ForNeVeR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And thanks for this PR!

@ForNeVeR ForNeVeR merged commit 3a474ea into ForNeVeR:master Sep 29, 2023
4 checks passed
@Lehonti Lehonti deleted the improvement1 branch September 29, 2023 22:01
@Lehonti
Copy link
Contributor Author

Lehonti commented Sep 30, 2023

Hi, @ForNeVeR, neither the fork names nor the branch names have been created using an automated tool. I think you are referring to the numbers at the end of many of them. I wrote those by hitting random keys on my keyboard's number pad; you know, to make extra sure that the names are actually unique :) (I know it's most likely unnecessary, but still).

I download the repositories and make the changes to the code manually. My refactoring tool is good ol' Visual Studio. The git branch names (improvement1, improvement2, improvement3, ...) are also created manually. I name them that way (as opposed to giving them more specific names) because I usually go hunting for bits of code to improve, but I don't know in advance what I'm going to find. What I can tell you is that I have a mental list of widespread programming anti-patterns, and an idea on how to refactor them away piece by piece (a "code algebra" of sorts), based on my experience as a programmer.

It would indeed be very cool to have a tool that automatically forks a GitHub repository, creates branches with improvements, and opens pull requests. Alas, I don't know of any such tool (if it exists, I would for sure love to know about it!). It would be a cool project to work on; but I don't think I have the time for that right now.

At the moment I'm trying to build the habit of making contributions to GitHub, and on most days I only have the time to do relatively small refactorings, so that's what I do in order to keep the habit alive, but I have been occasionally known to work on a real feature or two as well. Not to underestimate the importance of refactorings, though... I like to work with code where everything is super clear, and where I can immediately tell what the invariants are, which is why many of my refactorings are of that sort, so that the codebase is very habitable when I actually get to the part of working on a feature.

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

Successfully merging this pull request may close these issues.

2 participants