3 ms·
This is a really great repo! > How much algorithmic work do you other JS folks end up doing? I find JS to be the ideal language to implement an algorithm, des
by marknadal 8y ago
This is a really great repo!
> How much algorithmic work do you other JS folks end up doing?
I find JS to be the ideal language to implement an algorithm, despite its quirks. Why?
1. Because JS has syntax similar to most other class based languages, or can be used in ways that match functional languages, even if the syntax is different.
2. It is the lingua-franca of the web, so it is easy for others to also understand, use as a reference implementation (into other languages), or literally visualize it in the browser.
3. Along the lines of visualization, browser's have some of the best and state-of-the-art live debugging tools. So often it is easier to implement and test in JS (despite lack of types) than other languages.
4. For better or for worse, a pure JS implementation (no NPM or other packages) has very little standard library tooling, so you are forced to write some pretty low level logic that you might not otherwise write in real low level languages simply because they have good built-in standard libraries.
We also took the time to write some algorithm and explainer articles, but they are largely focused at the high-level conceptual layer, and explaining for kids:
- GIT explained for kids http://gun.js.org/explainers/school/class.html http://gun.js.org/explainers/school/class.html
- Stream sorting interactive explainer http://gun.js.org/explainers/basketball/basketball.html http://gun.js.org/explainers/basketball/basketball.html
- Cartoon cryptography http://gun.js.org/explainers/data/security.html http://gun.js.org/explainers/data/security.html
Most all the work we do is algorithmic, not app focused. But that is unusual for JS devs.