-
Notifications
You must be signed in to change notification settings - Fork 12
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
refactoring #11
Comments
Cool. Just as an aside, we have documented branch naming for org repos here: https://remotestoragejs.readthedocs.io/en/latest/contributing/github-flow.html#branch-names -- Makes everyone's lives easier, when things are not completely random. Also contains other tips, e.g. for commit messages. |
I've renamed the branch as suggested (feature/11-refactoring). Sorry for constantly breaking rules :) |
DONE: TODO: |
I haven't worked with I'm strongly in support of this refactoring in general. It makes the code look better, makes it easier to maintain, and can make optimization easier. |
To clarify what I've been doing, I'm replacing Note: I edited to clarify my clarification |
I love that and that's the way I would go too. Unfortunately refactoring from callback to Promise in node is not that linear (native fs promise support requires node v9.8.0, landed in master few month ago) and options I see are: I would go with the first (search lib supporting promises) when possible and with the second in case. BTW. I'm using standardjs as coding convention while refactoring, are you ok with this? I used this 'cause it's my everyday linter and I like it but if you wanna switch to airbnb or semistandard both are ok to me |
Oh oh oh! I also have not run into For the options you listed, I think I like them in the opposite order, trying to use For coding style, I like standardjs a lot except:
Because of the semicolons, I'd rather do semistandard (I can get over the spaces). However, I think it's more important that we all at least mostly agree, so armadietto doesn't get all messy. |
Just a note regarding spaces after function names: those enable you to search for function definitions more easily, because function calls cannot have them. In general, there's also the option of having the code style be applied automatically when merging a PR, or in a git hook before then, or even when saving a file: https://github.com/prettier/prettier -- So you can write the style you want when implementing a feature. It's obviously no solution for being able to comfortably read a certain style later on. But it does help with not having to adjust one's muscle memory so much, especially when switching between projects. |
That was the sole reason for me to switch to this code style as well. I didn't like the look of it either, but the benefit to easily search for function definitions far surpasses my aesthetic preferences. And to be honest, I actually started to like the look of it as well :) |
Alright, I'll accept that (spaces after function names), I can get over the way it looks. I haven't run into that issue before, but I understand the utility. I have some coworkers who like doing that in Java, maybe they have a point! :) In summary, I like semistandard! |
Done here, as said using promisify. |
Awesome! 👏 🎉 As there's already a release on npm, which is advertised in the README, I think it would be useful to git-tag the commit as well, and add release notes for it. Also, as there are zero known issues now, is it really still alpha? And should we maybe publish a 1.0.0 soon, so people can start relying on SemVer versions from then on? |
@thornjad Did you get a chance to take it for a spin yet? |
you're right.
ok with semver, to 1.0.0-beta let me finish to re-add redis support at least. |
I have! Sorry for the delay. That's a lot of refactoring and it all looks great, and I'm very happy to have promisify in the stack. |
I was doing an upgrade of the protocol version as specified in #3, but decided to doing the work @Raindeer44 has done in the main
armadietto.js
file to the other part of the project.I'm working in feat/refactoring branch.
The text was updated successfully, but these errors were encountered: