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

Fix bugs, add rough API documentation and make code more consistent. #1

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

expeehaa
Copy link

@expeehaa expeehaa commented May 4, 2020

When trying the server out I noticed that some features are not working, for example the displaying of which users are currently connected to the whiteboard.
I am not sure if some of these changes break compatibility with older NodeJS versions. They were tested with version 12.16.1.

Since there isn’t any documentation on how the API works I tried to understand it from the source code an created a file with my results.

Lastly, I tried to improve the code. Some method names were changed to be either consistent with javascript conventions or more descriptive of what they do (I do not like abreviated names since it feels like manual and inconsequent obfuscation of code), string concatenations using the "+" operator were replaced with string interpolation for readability.

I also made the controversial decision to change the formatting of the code, which might be the main risk of acceptance for this pull request. I like tabs more than spaces for indentation and having similar code aligned to each other, and I also do not like early returns because in my opinion they make the readability of code worse by having to search for all returns. I suppose that you do not agree with that since it basically changes everything and I didn’t think of committing these changes somehow indepent from the bug fixes back when I made the commits.

@expeehaa expeehaa force-pushed the master branch 2 times, most recently from 1327440 to 3934078 Compare May 4, 2020 12:26
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.

1 participant