intercellular / cell

A self-driving web app framework
https://www.celljs.org
MIT License
1.5k stars 93 forks source link

Add comments to code based on feedback #137

Closed gliechtenstein closed 7 years ago

gliechtenstein commented 7 years ago

This library has an unconventional architecture. And the code initially had near 0 annotation. This made it difficult to understand what's going on.

So I have started adding comments https://github.com/intercellular/cell/blob/develop/cell.js

I would love to improve it, so please let me know if there are parts that are unclear and I'll update or add more comments.

piranna commented 7 years ago

Could you stick them to 80 columns so they are easier to read? :-)

gliechtenstein commented 7 years ago

@piranna I had actually started updating the code to reflect your feedback but the code became too long, and the functions became too far from one another separated by long paragraphs of comments.

I think each option has pros and cons. Too many lines of code makes it hard to get a quick birds eye view of the code. Also it's good to have comments but having too many lines of code gives the impression that the code is more complex than it actually is (humans are irrational beings).

I'm going to just stash the changes I've made so far, but if many people want this option I'll think about it. Thanks for the feedback!