@williamle8300/boilerplate
v1.0.7
Published
Personal boilerplate for quickly iterating npm modules.
Downloads
10
Readme
@williamle8300/boilerplate
thing!
Leanest thing under 200loc that actually works
Now SUBSTACK doesn't do that. He just wants the most dependable, easy to understand and smallest module he can find (or make) to fulfil his objective. In other words, he subscribes to the UNIX philosophy.
[...]
To him, it's about taking the time to understand the abstractions.
SUBSTACK drafts a new module
Abstractify the problem: draw ––>write nonJS ––>write pseudoJS ––>?
SUBSTACK codes as usual:
- Uses console.dir alot to inspect & debug
- DIDN'T TDD - CREATES AN EXAMPLE.JS THAT REQUIRES THE MODULE AND TESTS ITS FUNCTIONALITY
- Codes in vim & switches to a terminal every so often to run the example.js script
IF HE NOTICES AN OPPORTUNITY TO MODULARISE, HE IMMEDIATELY MOVES THE FUNCTION INTO A NEW FILE & CHANGES THE FUNCTION DECLARATION TO MODULE.EXPORTS = ... (WHEN I SAY IMMEDIATELY, I REALLY DO MEAN IMMEDIATELY).
When he's happy with the module,
npm install tape tap --save-dev
Refactors the example.js file as a set of tests (see below).
Writes README.markdown from scratch with introduction, API documentation & license (API documentation is quick & easy to write when you have small modules).
Runs pkginit to create package.json.
Create GitHub repo and npm publish
Add travis and/or testling-ci github hooks as appropriate
1 + 2 = 3 philosophy and mathematics are agreed on this proof
PARAMETERS CODE 1/4 2 YEARS!!! TURTLES ALL THE WAY UP LOST
What to Build® scope + brevity + elegance (1st importance)
abstract problem (2nd importance)
know which npm modules to use
know which npm modules to author
solve problem. yay.
Litmus test: If you don't know exactly what the parameters and return values will be, you haven't abstracted or scoped the module sufficiently.
explore and get inspired; do a lot of online reading
design stuff
- think of cool, new things to make
- draw & write
- spec ideas
- seek opinions of others
cobble and ship code prodigiously
read books on
- javascript
- programming
- math; number theory
take math classes at OCC
i can do anything i want using npm!
but study how "they" do "the" anything
at infinite
real world thing
philsophically modeled
with mathematical precision
proofed in javascript
you want it
does 1 thing
completely open-sourceable
"turtle" learn do
quickest path to a README
events
streams
url
path
querystring