Awesome
Wade
Blazing fast 1kb search
Installation
NPM
npm install wade
CDN
<script src="https://unpkg.com/wade"></script>
Usage
Initialize Wade with an array of data.
const search = Wade(["Apple", "Lemon", "Orange", "Tomato"]);
Now you can search for a query within the data, and Wade will return results. Each result will include the index of the item in the data it corresponds to along with a score depending on the relevance of the query to the result.
search("App");
/*
[{
index: 0,
score: 1.25
}]
*/
Combined with JavaScript libraries like Moon, you can create a <a href="https://kbrsh.github.io/moon/play/#const%20items%20%3D%20%5B%22Don't%20worry%20about%20what%20anybody%20else%20is%20going%20to%20do.%20The%20best%20way%20to%20predict%20the%20future%20is%20to%20invent%20it.%22%2C%22Premature%20optimization%20is%20the%20root%20of%20all%20evil%20(or%20at%20least%20most%20of%20it)%20in%20programming.%22%2C%22Lisp%20has%20jokingly%20been%20called%20%5C%22the%20most%20intelligent%20way%20to%20misuse%20a%20computer%5C%22.%20I%20think%20that%20description%20is%20a%20great%20compliment%20because%20it%20transmits%20the%20full%20flavor%20of%20liberation%3A%20it%20has%20assisted%20a%20number%20of%20our%20most%20gifted%20fellow%20humans%20in%20thinking%20previously%20impossible%20thoughts.%22%2C%22Keep%20away%20from%20people%20who%20try%20to%20belittle%20your%20ambitions.%20Small%20people%20always%20do%20that%2C%20but%20the%20really%20great%20make%20you%20feel%20that%20you%2C%20too%2C%20can%20become%20great.%22%2C%22What%20Paul%20does%2C%20and%20does%20very%20well%2C%20is%20to%20take%20ideas%20and%20concepts%20that%20are%20beautiful%20in%20the%20abstract%2C%20and%20brings%20them%20down%20to%20a%20real%20world%20level.%20That's%20a%20rare%20talent%20to%20find%20in%20writing%20these%20days.%22%2C%22Since%20programmers%20create%20programs%20out%20of%20nothing%2C%20imagination%20is%20our%20only%20limitation.%20Thus%2C%20in%20the%20world%20of%20programming%2C%20the%20hero%20is%20the%20one%20who%20has%20great%20vision.%20Paul%20Graham%20is%20one%20of%20our%20contemporary%20heroes.%20He%20has%20the%20ability%20to%20embrace%20the%20vision%2C%20and%20to%20express%20it%20plainly.%20His%20works%20are%20my%20favorites%2C%20especially%20the%20ones%20describing%20language%20design.%20He%20explains%20secrets%20of%20programming%2C%20languages%2C%20and%20human%20nature%20that%20can%20only%20be%20learned%20from%20the%20hacker%20experience.%20This%20book%20shows%20you%20his%20great%20vision%2C%20and%20tells%20you%20the%20truth%20about%20the%20nature%20of%20hacking.%22%2C%22To%20follow%20the%20path%3A%20look%20to%20the%20master%2C%20follow%20the%20master%2C%20walk%20with%20the%20master%2C%20see%20through%20the%20master%2C%20become%20the%20master.%22%2C%22No%20problem%20should%20ever%20have%20to%20be%20solved%20twice.%22%2C%22Attitude%20is%20no%20substitute%20for%20competence.%22%2C%22It%20is%20said%20that%20the%20real%20winner%20is%20the%20one%20who%20lives%20in%20today%20but%20able%20to%20see%20tomorrow.%22%2C%22Fools%20ignore%20complexity.%20Pragmatists%20suffer%20it.%20Some%20can%20avoid%20it.%20Geniuses%20remove%20it.%22%2C%22A%20year%20spent%20in%20artificial%20intelligence%20is%20enough%20to%20make%20one%20believe%20in%20God.%22%2C%22Dealing%20with%20failure%20is%20easy%3A%20Work%20hard%20to%20improve.%20Success%20is%20also%20easy%20to%20handle%3A%20You've%20solved%20the%20wrong%20problem.%20Work%20hard%20to%20improve.%22%2C%22Within%20a%20computer%20natural%20language%20is%20unnatural.%22%2C%22You%20think%20you%20know%20when%20you%20learn%2C%20are%20more%20sure%20when%20you%20can%20write%2C%20even%20more%20when%20you%20can%20teach%2C%20but%20certain%20when%20you%20can%20program.%22%2C%22Adapting%20old%20programs%20to%20fit%20new%20machines%20usually%20means%20adapting%20new%20machines%20to%20behave%20like%20old%20ones.%22%2C%22A%20little%20learning%20is%20a%20dangerous%20thing.%22%2C%22Computer%20science%20education%20cannot%20make%20anybody%20an%20expert%20programmer%20any%20more%20than%20studying%20brushes%20and%20pigment%20can%20make%20somebody%20an%20expert%20painter.%22%2C%22Einstein%20argued%20that%20there%20must%20be%20simplified%20explanations%20of%20nature%2C%20because%20God%20is%20not%20capricious%20or%20arbitrary.%22%2C%22Students%20should%20be%20evaluated%20on%20how%20well%20they%20can%20achieve%20the%20goals%20they%20strived%20to%20achieve%20within%20a%20realistic%20context.%20Students%20need%20to%20learn%20to%20do%20things%2C%20not%20know%20things.%22%2C%22We%20remember%20what%20we%20learn%20when%20we%20care%20about%20performing%20better%20and%20when%20we%20believe%20that%20what%20we%20have%20been%20asked%20to%20do%20is%20representative%20of%20reality.%22%2C%22There%20really%20is%20no%20learning%20without%20doing.%22%2C%22We%20really%20have%20to%20get%20over%20the%20idea%20that%20some%20stuff%20is%20just%20worth%20knowing%20even%20if%20you%20never%20do%20anything%20with%20it.%20Human%20memories%20happily%20erase%20stuff%20that%20has%20no%20purpose%2C%20so%20why%20try%20to%20fill%20up%20children's%20heads%20with%20such%20stuff%3F%22%2C%22The%20only%20problems%20we%20can%20really%20solve%20in%20a%20satisfactory%20manner%20are%20those%20that%20finally%20admit%20a%20nicely%20factored%20solution.%22%2C%22The%20best%20way%20to%20learn%20to%20live%20with%20our%20limitations%20is%20to%20know%20them.%22%2C%22This%20challenge%2C%20viz.%20the%20confrontation%20with%20the%20programming%20task%2C%20is%20so%20unique%20that%20this%20novel%20experience%20can%20teach%20us%20a%20lot%20about%20ourselves.%20It%20should%20deepen%20our%20understanding%20of%20the%20processes%20of%20design%20and%20creation%2C%20it%20should%20give%20us%20better%20control%20over%20the%20task%20of%20organizing%20our%20thoughts.%20If%20it%20did%20not%20do%20so%2C%20to%20my%20taste%20we%20should%20no%20deserve%20the%20computer%20at%20all!%20%20It%20has%20allready%20taught%20us%20a%20few%20lessons%2C%20and%20the%20one%20I%20have%20chosen%20to%20stress%20in%20this%20talk%20is%20the%20following.%20We%20shall%20do%20a%20much%20better%20programming%20job%2C%20provided%20that%20we%20approach%20the%20task%20with%20a%20full%20appreciation%20of%20its%20tremenduous%20difficulty%2C%20provided%20that%20we%20stick%20to%20modest%20and%20elegant%20programming%20languages%2C%20provided%20that%20we%20respect%20the%20intrinsec%20limitations%20of%20the%20human%20mind%20and%20approach%20the%20task%20as%20Very%20Humble%20Programmers.%22%2C%22We%20now%20come%20to%20the%20decisive%20step%20of%20mathematical%20abstraction%3A%20we%20forget%20about%20what%20the%20symbols%20stand%20for.%20...%5BThe%20mathematician%5D%20need%20not%20be%20idle%3B%20there%20are%20many%20operations%20which%20he%20may%20carry%20out%20with%20these%20symbols%2C%20without%20ever%20having%20to%20look%20at%20the%20things%20they%20stand%20for.%22%2C%22An%20expert%20is%2C%20according%20to%20my%20working%20definition%20%5C%22someone%20who%20doesn't%20need%20to%20look%20up%20answers%20to%20easy%20questions%5C%22.%22%2C%22The%20programmer%20must%20seek%20both%20perfection%20of%20part%20and%20adequacy%20of%20collection.%22%2C%22Thus%2C%20programs%20must%20be%20written%20for%20people%20to%20read%2C%20and%20only%20incidentally%20for%20machines%20to%20execute.%22%2C%22We%20control%20complexity%20by%20building%20abstractions%20that%20hide%20details%20when%20appropriate.%20We%20control%20complexity%20by%20establishing%20conventional%20interfaces%20that%20enable%20us%20to%20construct%20systems%20by%20combining%20standard%2C%20well-understood%20pieces%20in%20a%20%5C%22mix%20and%20match%5C%22%20way.%20We%20control%20complexity%20by%20establishing%20new%20languages%20for%20describing%20a%20design%2C%20each%20of%20which%20emphasizes%20particular%20aspects%20of%20the%20design%20and%20deemphasizes%20others.%22%2C%22The%20acts%20of%20the%20mind%2C%20wherein%20it%20exerts%20its%20power%20over%20simple%20ideas%2C%20are%20chiefly%20these%20three%3A%201.%20Combining%20several%20simple%20ideas%20into%20one%20compound%20one%2C%20and%20thus%20all%20complex%20ideas%20are%20made.%202.%20The%20second%20is%20bringing%20two%20ideas%2C%20whether%20simple%20or%20complex%2C%20together%2C%20and%20setting%20them%20by%20one%20another%20so%20as%20to%20take%20a%20view%20of%20them%20at%20once%2C%20without%20uniting%20them%20into%20one%2C%20by%20which%20it%20gets%20all%20its%20ideas%20of%20relations.%203.%20The%20third%20is%20separating%20them%20from%20all%20other%20ideas%20that%20accompany%20them%20in%20their%20real%20existence%3A%20this%20is%20called%20abstraction%2C%20and%20thus%20all%20its%20general%20ideas%20are%20made.%22%2C%22Lisp%20programmers%20know%20the%20value%20of%20everything%20but%20the%20cost%20of%20nothing.%22%2C%22An%20interpreter%20raises%20the%20machine%20to%20the%20level%20of%20the%20user%20program%3B%20a%20compiler%20lowers%20the%20user%20program%20to%20the%20level%20of%20the%20machine%20language.%22%2C%22Everything%20should%20be%20made%20as%20simple%20as%20possible%2C%20but%20no%20simpler.%22%2C%22The%20great%20dividing%20line%20between%20success%20and%20failure%20can%20be%20expressed%20in%20five%20words%3A%20%5C%22I%20did%20not%20have%20time.%5C%22%22%2C%22When%20your%20enemy%20is%20making%20a%20very%20serious%20mistake%2C%20don't%20be%20impolite%20and%20disturb%20him.%22%2C%22A%20charlatan%20makes%20obscure%20what%20is%20clear%3B%20a%20thinker%20makes%20clear%20what%20is%20obscure.%22%2C%22There%20are%20two%20ways%20of%20constructing%20a%20software%20design%3B%20one%20way%20is%20to%20make%20it%20so%20simple%20that%20there%20are%20obviously%20no%20deficiencies%2C%20and%20the%20other%20way%20is%20to%20make%20it%20so%20complicated%20that%20there%20are%20no%20obvious%20deficiencies.%20The%20first%20method%20is%20far%20more%20difficult.%22%2C%22And%20if%20you%20go%20too%20far%20up%2C%20abstraction-wise%2C%20you%20run%20out%20of%20oxygen.%20Sometimes%20smart%20thinkers%20just%20don't%20know%20when%20to%20stop%2C%20and%20they%20create%20these%20absurd%2C%20all-encompassing%2C%20high-level%20pictures%20of%20the%20universe%20that%20are%20all%20good%20and%20fine%2C%20but%20don't%20actually%20mean%20anything%20at%20all.%22%2C%22The%20three%20chief%20virtues%20of%20a%20programmer%20are%3A%20Laziness%2C%20Impatience%20and%20Hubris.%22%2C%22All%20non-trivial%20abstractions%2C%20to%20some%20degree%2C%20are%20leaky.%22%2C%22XML%20wasn't%20designed%20to%20be%20edited%20by%20humans%20on%20a%20regular%20basis.%22%2C%22Premature%20abstraction%20is%20an%20equally%20grevious%20sin%20as%20premature%20optimization.%22%2C%22You%20can%20have%20premature%20generalization%20as%20well%20as%20premature%20optimization.%22%2C%22He%20causes%20his%20sun%20to%20rise%20on%20the%20evil%20and%20the%20good%2C%20and%20sends%20rain%20on%20the%20righteous%20and%20the%20unrighteous.%22%2C%22A%20language%20that%20doesn't%20affect%20the%20way%20you%20think%20about%20programming%2C%20is%20not%20worth%20knowing.%22%2C%22Men%20never%20do%20evil%20so%20completely%20and%20cheerfully%20as%20when%20they%20do%20it%20from%20religious%20conviction.%22%2C%22Everybody%20makes%20their%20own%20fun.%20If%20you%20don't%20make%20it%20yourself%2C%20it%20ain't%20fun%3B%20it's%20entertainment.%22%2C%22If%20we%20wish%20to%20count%20lines%20of%20code%2C%20we%20should%20not%20regard%20them%20as%20*lines%20produced*%20but%20as%20*lines%20spent*.%22%2C%22Sometimes%20a%20man%20with%20too%20broad%20a%20perspective%20reveals%20himself%20as%20having%20no%20real%20perspective%20at%20all.%20A%20man%20who%20tries%20too%20hard%20to%20see%20every%20side%20may%20be%20a%20man%20who%20is%20trying%20to%20avoid%20choosing%20any%20side.%20A%20man%20who%20tries%20too%20hard%20to%20seek%20a%20deeper%20truth%20may%20be%20trying%20to%20hide%20from%20the%20truth%20he%20already%20knows.%20%20That%20is%20not%20a%20sign%20of%20intellectual%20sophistication%20and%20%5C%22great%20thinking%5C%22.%20It%20is%20a%20demonstration%20of%20moral%20degeneracy%20and%20cowardice.%22%2C%22Omit%20needless%20words.%22%2C%22I%20have%20never%20met%20a%20man%20so%20ignorant%20that%20I%20couldn't%20learn%20something%20from%20him.%22%2C%22Philosophy%3A%20the%20finding%20of%20bad%20reasons%20for%20what%20one%20believes%20by%20instinct.%22%2C%22Of%20all%20tyrannies%20a%20tyranny%20sincerely%20exercised%20for%20the%20good%20of%20its%20victims%20may%20be%20the%20most%20oppressive.%20It%20may%20be%20better%20to%20live%20under%20robber%20barons%20than%20under%20omnipotent%20moral%20busybodies%2C%20The%20robber%20baron's%20cruelty%20may%20sometimes%20sleep%2C%20his%20cupidity%20may%20at%20some%20point%20be%20satiated%3B%20but%20those%20who%20torment%20us%20for%20own%20good%20will%20torment%20us%20without%20end%2C%20for%20they%20do%20so%20with%20the%20approval%20of%20their%20own%20conscience.%22%2C%22Fools!%20Don't%20they%20know%20that%20tears%20are%20a%20woman's%20most%20effective%20weapon%3F%22%2C%22It's%20like%20a%20condom%3B%20I'd%20rather%20have%20it%20and%20not%20need%20it%20than%20need%20it%20and%20not%20have%20it.%22%2C%22C%2B%2B%20is%20history%20repeated%20as%20tragedy.%20Java%20is%20history%20repeated%20as%20farce.%22%2C%22Simplicity%20takes%20effort.%20Genius%2C%20even.%22%2C%22Show%2C%20don't%20tell.%22%2C%22In%20God%20I%20trust%3B%20I%20will%20not%20be%20afraid.%20What%20can%20mortal%20man%20do%20to%20me%3F%22%2C%22Linux%20is%20only%20free%20if%20your%20time%20has%20no%20value.%22%2C%22Code%20is%20poetry.%22%2C%22If%20you%20choose%20not%20to%20decide%2C%20you%20still%20have%20made%20a%20choice.%22%2C%22Civilization%20advances%20by%20extending%20the%20number%20of%20important%20operations%20which%20we%20can%20perform%20without%20thinking%20about%20them.%22%2C%22The%20function%20of%20wisdom%20is%20to%20discriminate%20between%20good%20and%20evil.%22%2C%22The%20reason%20to%20do%20animation%20is%20caricature.%20Good%20caricature%20picks%20out%20the%20essense%20of%20the%20statement%20and%20removes%20everything%20else.%20It's%20not%20simply%20about%20reproducing%20reality%3B%20It's%20about%20bumping%20it%20up.%22%2C%22Mistakes%20were%20made.%22%2C%22I%20would%20rather%20be%20an%20optimist%20and%20be%20wrong%20than%20a%20pessimist%20who%20proves%20to%20be%20right.%20The%20former%20sometimes%20wins%2C%20but%20never%20the%20latter.%22%2C%22What%20is%20truth%3F%22%2C%22Life%20moves%20pretty%20fast.%20If%20you%20don't%20stop%20and%20look%20around%20once%20in%20a%20while%2C%20you%20could%20miss%20it.%22%2C%22Lisp%20is%20worth%20learning%20for%20the%20profound%20enlightenment%20experience%20you%20will%20have%20when%20you%20finally%20get%20it%3B%20that%20experience%20will%20make%20you%20a%20better%20programmer%20for%20the%20rest%20of%20your%20days%2C%20even%20if%20you%20never%20actually%20use%20Lisp%20itself%20a%20lot.%22%2C%22Any%20sufficiently%20complicated%20C%20or%20Fortran%20program%20contains%20an%20ad%20hoc%2C%20informally%20specified%2C%20bug-ridden%2C%20slow%20implementation%20of%20half%20of%20Common%20Lisp.%22%2C%22I%20was%20talking%20recently%20to%20a%20friend%20who%20teaches%20at%20MIT.%20His%20field%20is%20hot%20now%20and%20every%20year%20he%20is%20inundated%20by%20applications%20from%20would-be%20graduate%20students.%20%5C%22A%20lot%20of%20them%20seem%20smart%2C%5C%22%20he%20said.%20%5C%22What%20I%20can't%20tell%20is%20whether%20they%20have%20any%20kind%20of%20taste.%5C%22%22%2C%22The%20direct%20pursuit%20of%20happiness%20is%20a%20recipe%20for%20an%20unhappy%20life.%22%2C%22It's%20no%20trick%20for%20talented%20people%20to%20be%20interesting%2C%20but%20it's%20a%20gift%20to%20be%20interested.%20We%20want%20an%20organization%20filled%20with%20interested%20people.%22%2C%22Why%20teach%20drawing%20to%20accountants%3F%20Because%20drawing%20class%20doesn't%20just%20teach%20people%20to%20draw.%20It%20teaches%20them%20to%20be%20more%20observant.%20There's%20no%20company%20on%20earth%20that%20wouldn't%20benefit%20from%20having%20people%20become%20more%20observant.%22%2C%22All%20problems%20in%20computer%20science%20can%20be%20solved%20by%20another%20level%20of%20indirection.%22%2C%22A%20designer%20knows%20he%20has%20arrived%20at%20perfection%20not%20when%20there%20is%20no%20longuer%20anything%20to%20add%2C%20but%20when%20there%20is%20no%20longuer%20anything%20to%20take%20away.%22%2C%22For%20the%20things%20we%20have%20to%20learn%20before%20we%20can%20do%20them%2C%20we%20learn%20by%20doing%20them.%22%2C%22There%20are%20many%20ways%20to%20avoid%20success%20in%20life%2C%20but%20the%20most%20sure-fire%20just%20might%20be%20procrastination.%22%2C%22PI%20seconds%20is%20a%20nanocentury.%22%2C%22A%20non%20negative%20binary%20integer%20value%20x%20is%20a%20power%20of%202%20iff%20(x%20%26%20(x-1))%20is%200%20using%202's%20complement%20arithmetic.%22%2C%22While%20I%E2%80%99ve%20always%20appreciated%20beautiful%20code%2C%20I%20share%20Jonathan%E2%80%99s%20concern%20about%20studying%20it%20too%20much.%20I%20think%20studying%20beauty%20in%20music%20and%20painting%20has%20led%20us%20to%20modern%20classical%20music%20and%20painting%20that%20the%20majority%20of%20us%20just%20don%E2%80%99t%20get.%20Beauty%20can%20be%20seen%20when%20it%20emerges%2C%20but%20isn%E2%80%99t%20something%20to%20strive%20for%20in%20isolation%20of%20a%20larger%20context.%20In%20the%20software%20world%2C%20the%20larger%20context%20would%20be%20the%20utility%20of%20the%20software%20to%20the%20end%20user.%22%2C%22Dont%20give%20users%20the%20opportunity%20to%20lock%20themselves.%22%2C%22Any%20fool%20can%20make%20the%20simple%20complex%2C%20only%20a%20smart%20person%20can%20make%20the%20complex%20simple.%22%2C%22To%20do%20something%20well%20you%20have%20to%20love%20it.%20So%20to%20the%20extent%20you%20can%20preserve%20hacking%20as%20something%20you%20love%2C%20you're%20likely%20to%20do%20it%20well.%20Try%20to%20keep%20the%20sense%20of%20wonder%20you%20had%20about%20programming%20at%20age%2014.%20If%20you're%20worried%20that%20your%20current%20job%20is%20rotting%20your%20brain%2C%20it%20probably%20is.%22%2C%22-%20If%20you%20give%20him%20a%20penny%20for%20his%20thoughts%2C%20you'd%20get%20change.%20-%20Not%20the%20sharpest%20knife%20in%20the%20drawer.%20-%20A%20prime%20candidate%20for%20natural%20deselection.%22%2C%22What%20I%20didn't%20understand%20was%20that%20the%20value%20of%20some%20new%20acquisition%20wasn't%20the%20difference%20between%20its%20retail%20price%20and%20what%20I%20paid%20for%20it.%20It%20was%20the%20value%20I%20derived%20from%20it.%20Stuff%20is%20an%20extremely%20illiquid%20asset.%20Unless%20you%20have%20some%20plan%20for%20selling%20that%20valuable%20thing%20you%20got%20so%20cheaply%2C%20what%20difference%20does%20it%20make%20what%20it's%20%5C%22worth%3F%5C%22%20The%20only%20way%20you're%20ever%20going%20to%20extract%20any%20value%20from%20it%20is%20to%20use%20it.%20And%20if%20you%20don't%20have%20any%20immediate%20use%20for%20it%2C%20you%20probably%20never%20will.%22%2C%22Only%20bad%20designers%20blame%20their%20failings%20on%20the%20users.%22%2C%22Humans%20aren't%20rational.%20They%20rationalize.%20And%20I%20don't%20just%20mean%20%5C%22some%20of%20them%5C%22%20or%20%5C%22other%20people%5C%22.%20I'm%20talking%20about%20everyone.%20We%20have%20a%20%5C%22logic%20engine%5C%22%20in%20our%20brains%2C%20but%20for%20the%20most%20part%2C%20it's%20not%20the%20one%20in%20the%20driver's%20seat.%22%2C%22What%20do%20Americans%20look%20for%20in%20a%20car%3F%20I've%20heard%20many%20answers%20when%20I've%20asked%20this%20question.%20The%20answers%20include%20excellent%20safety%20ratings%2C%20great%20gas%20mileage%2C%20handling%2C%20and%20cornering%20ability%2C%20among%20others.%20I%20don't%20believe%20any%20of%20these.%20That's%20because%20the%20first%20principle%20of%20the%20Culture%20Code%20is%20that%20the%20only%20effective%20way%20to%20understand%20what%20people%20truly%20mean%20is%20to%20ignore%20what%20they%20say.%20This%20is%20not%20to%20suggest%20that%20people%20intentionally%20lie%20or%20misrepresent%20themselves.%20What%20it%20means%20is%20that%2C%20when%20asked%20direct%20questions%20about%20their%20interests%20and%20preferences%2C%20people%20tend%20to%20give%20answers%20they%20believe%20the%20questioner%20wants%20to%20hear.%20Again%2C%20this%20is%20not%20because%20they%20intend%20to%20mislead.%20It%20is%20because%20people%20respond%20to%20these%20questions%20with%20their%20cortexes%2C%20the%20parts%20of%20their%20brains%20that%20control%20intelligence%20rather%20than%20emotion%20or%20instinct.%20They%20ponder%20a%20question%2C%20they%20process%20a%20question%2C%20and%20when%20they%20deliver%20an%20answer%2C%20it%20is%20the%20product%20of%20deliberation.%20They%20believe%20they%20are%20telling%20the%20truth.%20A%20lie%20detector%20would%20confirm%20this.%20In%20most%20cases%2C%20however%2C%20they%20aren't%20saying%20what%20they%20mean.%22%2C%22When%20all%20you%20have%20is%20a%20hammer%2C%20everything%20looks%20like%20a%20nail.%22%2C%22Good%20coders%20code%2C%20great%20reuse.%22%2C%22The%20lesson%20of%20the%20story%20might%20appear%20to%20be%20that%20self-interested%20and%20ambitious%20people%20in%20power%20are%20often%20the%20cause%20of%20wastefulness%20in%20developing%20countries.%20But%20self-interested%20and%20ambitious%20people%20are%20in%20positions%20of%20power%2C%20great%20and%20small%2C%20all%20over%20the%20world.%20In%20many%20places%2C%20they%20are%20restrained%20by%20the%20law%2C%20the%20press%2C%20and%20democratic%20opposition.%20Cameroon's%20tragedy%20is%20that%20there%20is%20nothing%20to%20hold%20self-interest%20in%20check.%22%2C%22To%20solve%20your%20problems%20you%20must%20learn%20new%20skills%2C%20adapt%20new%20thought%20patterns%2C%20and%20become%20a%20different%20person%20than%20you%20were%20before%20that%20problem.%20%20God%20has%20crafted%20you%20for%20success.%20In%20the%20middle%20of%20every%20adversity%20lie%20your%20best%20opportunities.%20Discover%20it%2C%20build%20upon%20it%20and%20move%20forward%20in%20your%20journey%20to%20live%20an%20extraordinary%20life.%20%20You%20owe%20it%20to%20yourself%20to%20live%20a%20great%20life.%20Don%E2%80%99t%20let%20negative%20thoughts%20pull%20you%20down.%20Be%20grateful%20and%20open%20to%20learn%20and%20grow.%22%2C%22If%20there%20is%20a%20will%2C%20there%20is%20a%20way.%22%2C%22Having%20large%20case%20statements%20in%20an%20object-oriented%20language%20is%20a%20sure%20sign%20your%20design%20is%20flawed.%22%2C%22Being%20a%20programmer%20is%20the%20same%20way.%20The%20only%20way%20to%20be%20a%20good%20programmer%20is%20to%20write%20code.%20When%20you%20realize%20you%20haven't%20been%20writing%20much%20code%20lately%2C%20and%20it%20seems%20like%20all%20you%20do%20is%20brag%20about%20code%20you%20wrote%20in%20the%20past%2C%20and%20people%20start%20looking%20at%20you%20funny%20while%20you're%20shooting%20your%20mouth%20off%2C%20realize%20it's%20because%20they%20know.%20They%20might%20not%20even%20know%20they%20know%2C%20but%20they%20know.%20So%2C%20yes%2C%20doing%20what%20you%20love%20brings%20success%2C%20and%20by%20all%20means%2C%20throw%20yourself%20a%20nice%20big%20party%2C%20buy%20yourself%20a%20nice%20car%2C%20soak%20up%20the%20adulation%20of%20an%20adoring%20crowd.%20Then%20shut%20the%20fuck%20up%20and%20get%20back%20to%20work.%22%2C%22Another%20feature%20about%20this%20guy%20is%20his%20low%20threshold%20of%20boredom.%20He'll%20pick%20up%20on%20a%20task%20and%20work%20frantically%20at%20it%2C%20accomplishing%20wonders%20in%20a%20short%20time%20and%20then%20get%20bored%20and%20drop%20it%20before%20its%20properly%20finished.%20He'll%20do%20nothing%20but%20strum%20his%20guitar%20and%20lie%20around%20in%20bed%20for%20several%20days%20after.%20%20Thats%20also%20part%20of%20the%20pattern%20too%3B%20periods%20of%20frenetic%20activity%20followed%20by%20periods%20of%20melancholia%2C%20withdrawal%20and%20inactivity.%20This%20is%20a%20bipolar%20personality.%22%2C%22My%20dream%20is%20that%20people%20adopt%20it%20on%20its%20own%20merits.%20We're%20not%20trying%20to%20bend%20Ruby%20on%20Rails%20to%20fit%20the%20enterprise%2C%20we're%20encouraging%20enterprises%20to%20bend%20to%20Ruby%20on%20Rails.%20Come%20if%20you%20like%20it%2C%20stay%20away%20if%20you%20don't.%20We're%20not%20going%20head%20over%20heels%20to%20accommodate%20the%20enterprise%20or%20to%20lure%20them%20away%20from%20Java.%20That's%20how%20you%20end%20up%20with%20Java%2C%20if%20you%20start%20bending%20to%20special%20interest%20groups.%22%2C%22New%20eyes%20have%20X-ray%20vision.%20%20%5Bsomeone%20that%20hasn't%20written%20it%20is%20more%20likely%20to%20spot%20the%20bug.%20%5C%22someone%5C%22%20can%20be%20you%20after%20a%20break%5D%22%2C%22So%20-%20what%20are%20the%20most%20important%20problems%20in%20software%20engineering%3F%20I%E2%80%99d%20answer%20%E2%80%9Cdealing%20with%20complexity%E2%80%9D.%22%2C%22So%20the%20mere%20constraint%20of%20staying%20in%20regular%20contact%20with%20us%20will%20push%20you%20to%20make%20things%20happen%2C%20because%20otherwise%20you'll%20be%20embarrassed%20to%20tell%20us%20that%20you%20haven't%20done%20anything%20new%20since%20the%20last%20time%20we%20talked.%22%2C%22The%20choice%20of%20the%20university%20is%20mostly%20important%20for%20the%20piece%20of%20paper%20you%20get%20at%20the%20end.%20The%20education%20you%20get%20depends%20on%20you.%22%2C%22Remember%20that%20you%20are%20humans%20in%20the%20first%20place%20and%20only%20after%20that%20programmers.%22%2C%22Humans%20differ%20from%20animals%20to%20the%20degree%20that%20they%20are%20not%20merely%20an%20end%20result%20of%20their%20conditioning%2C%20but%20are%20able%20to%20reflect%20on%20their%20experiences%20and%20strategies%2C%20and%20apply%20insight%20to%20make%20changes%20in%20the%20way%20they%20live%20to%20modify%20the%20outcome.%22%2C%22As%20builders%20and%20creators%20finding%20the%20perfect%20solution%20should%20not%20be%20our%20main%20goal.%20We%20should%20find%20the%20perfect%20problem.%22%2C%22Just%20like%20carpentry%2C%20measure%20twice%20cut%20once.%22%2C%22The%20good%20thing%20about%20reinventing%20the%20wheel%20is%20that%20you%20get%20a%20round%20one.%22%2C%22I%20feel%20it%20is%20everybodies%20obligation%20to%20reach%20for%20the%20best%20in%20themselves%20and%20use%20that%20for%20the%20interest%20of%20mankind.%22%2C%22Abstraction%20is%20a%20form%20of%20data%20compression%3A%20absolutely%20necessary%2C%20because%20human%20short-term%20memory%20is%20so%20small%2C%20but%20the%20critically%20important%20aspect%20of%20abstraction%20is%20the%20algorithm%20that%20gets%20you%20from%20the%20name%20back%20to%20the%20%5C%22uncompressed%5C%22%20details.%22%2C%22Have%20you%20ever%20noticed%20that%20when%20you%20sit%20down%20to%20write%20something%2C%20half%20the%20ideas%20that%20end%20up%20in%20it%20are%20ones%20you%20thought%20of%20while%20writing%20it%3F%20The%20same%20thing%20happens%20with%20software.%20Working%20to%20implement%20one%20idea%20gives%20you%20more%20ideas.%22%2C%22In%20general%2C%20we%20can%20think%20of%20data%20as%20defined%20by%20some%20collection%20of%20selectors%20and%20constructors%2C%20together%20with%20specified%20conditions%20that%20these%20procedures%20must%20fulfill%20in%20order%20to%20be%20a%20valid%20representation.%22%2C%22Resume%20writing%20is%20just%20like%20dating%2C%20or%20applying%20for%20a%20bank%20loan%2C%20in%20that%20nobody%20wants%20you%20if%20you're%20desperate.%22%2C%22Mastering%20isn%E2%80%99t%20a%20survival%20instinct%3B%20it%E2%80%99s%20an%20urge%20to%20excel.%20Mastering%20is%20one%20of%20the%20experiences%20that%20delineates%20us%20from%20animals.%20It%20is%20striving%20to%20be%20more%20tomorrow%20than%20we%20are%20today%3B%20to%20perfectly%20pitch%20the%20ball%20over%20home%20plate%3B%20to%20craft%20the%20perfect%20sentence%20in%20an%20article%3B%20to%20open%20the%20oven%20and%20feel%20the%20warm%2C%20richly-scented%20cloud%20telling%20you%20dinner%20is%20going%20to%20be%20absolutely%20extraordinary.%20We%20humans%20crave%20perfection%2C%20to%20be%20masters%20of%20our%20domain%2C%20to%20distinguish%20ourselves%20by%20sheer%20skill%20and%20prowess.%22%2C%22It(mastering)%E2%80%99s%20knowing%20what%20you%20are%20doing.%22%2C%22Well%20then.%20How%20could%20you%20possibly%20live%20without%20automated%20refactoring%20tools%3F%20How%20else%20could%20you%20coordinate%20the%20caterpillar-like%20motions%20of%20all%20Java%E2%80%99s%20identical%20tiny%20legs%2C%20its%20thousands%20of%20similar%20parts%3F%20I%E2%80%99ll%20tell%20you%20how%3A%20Ruby%20is%20a%20butterfly.%22%2C%22You%20will%20never%20become%20a%20Great%20Programmer%20until%20you%20acknowledge%20that%20you%20will%20always%20be%20a%20Terrible%20Programmer.%20You%20will%20remain%20a%20Great%20Programmer%20for%20only%20as%20long%20as%20you%20acknowledge%20that%20you%20are%20still%20a%20Terrible%20Programmer.%22%2C%22If%20I%20tell%20you%20I'm%20good%2C%20you%20would%20probably%20think%20I'm%20boasting.%20If%20I%20tell%20you%20I'm%20no%20good%2C%20you%20know%20I'm%20lying.%22%2C%22Let%20me%20try%20to%20get%20this%20straight%3A%20Lisp%20is%20a%20language%20for%20describing%20algorithms.%20This%20was%20JohnMcCarthy's%20original%20purpose%2C%20anyway%3A%20to%20build%20something%20more%20convenient%20than%20a%20Turing%20machine.%20Lisp%20is%20not%20about%20file%2C%20socket%20or%20GUI%20programming%20-%20Lisp%20is%20about%20expressive%20power.%20(For%20example%2C%20you%20can%20design%20multiple%20object%20systems%20for%20Lisp%2C%20in%20Lisp.%20Or%20implement%20the%20now-fashionable%20AOP.%20Or%20do%20arbitrary%20transformations%20on%20parsed%20source%20code.)%20If%20you%20don't%20value%20expressive%20power%2C%20Lisp%20ain't%20for%20you.%20I%2C%20personally%2C%20would%20prefer%20Lisp%20to%20not%20become%20mainstream%3A%20this%20would%20necessarily%20involve%20a%20dumbing%20down.%22%2C%22If%20something%20isn%E2%80%99t%20working%2C%20you%20need%20to%20look%20back%20and%20figure%20out%20what%20got%20you%20excited%20in%20the%20first%20place.%22%2C%22Pay%20attention%20to%20opportunity%20cost%20at%20all%20times.%20Doing%20one%20thing%20means%20not%20doing%20other%20things.%20This%20is%20a%20form%20of%20risk%20that%20is%20very%20easy%20to%20ignore%2C%20to%20your%20detriment.%22%2C%22Seize%20any%20opportunity%2C%20or%20anything%20that%20looks%20like%20opportunity.%20They%20are%20rare%2C%20much%20rarer%20than%20you%20think...%22%2C%22I%20think%20that%20a%20lot%20of%20programmers%20are%20ignoring%20an%20important%20point%20when%20people%20talk%20about%20reducing%20code%20repetition%20on%20large%20projects.%20Part%20of%20the%20idea%20is%20that%20large%20projects%20are%20intrinsically%20*wrong*.%20That%20you%20should%20be%20looking%20at%20making%20a%20number%20of%20smaller%20projects%20that%20are%20composable%2C%20even%20if%20you%20never%20end%20up%20reusing%20one%20of%20those%20smaller%20projects%20elsewhere.%22%2C%22We%20tend%20to%20seek%20easy%2C%20single-factor%20explanations%20of%20success.%20For%20most%20important%20things%2C%20though%2C%20success%20actually%20requires%20avoiding%20many%20separate%20causes%20of%20failure.%22%2C%22Things%20which%20matter%20most%20must%20never%20be%20at%20the%20mercy%20of%20things%20which%20matter%20least.%22%2C%22I%20think%20the%20root%20of%20your%20mistake%20is%20saying%20that%20macros%20don't%20scale%20to%20larger%20groups.%20The%20real%20truth%20is%20that%20macros%20don't%20scale%20to%20stupider%20groups.%22%2C%22Argue%20with%20idiots%2C%20and%20you%20become%20an%20idiot.%20If%20you%20compete%20with%20slaves%20you%20become%20a%20slave.%22%2C%22Always%20dive%20down%20into%20a%20problem%20and%20get%20your%20hands%20on%20the%20deepest%20issue%20behind%20the%20problem.%20All%20other%20considerations%20are%20to%20dismissed%20as%20%5C%22engineering%20details%5C%22%3B%20they%20can%20be%20sorted%20out%20after%20the%20basic%20problem%20has%20been%20solved.%22%2C%22Don't%20have%20good%20ideas%20if%20you%20aren't%20willing%20to%20be%20responsible%20for%20them.%22%2C%22It%20is%20impossible%20to%20sharpen%20a%20pencil%20with%20a%20blunt%20axe.%20It%20is%20equally%20vain%20to%20try%20to%20do%20it%20with%20ten%20blunt%20axes%20instead.%22%2C%22If%20we%20wish%20to%20count%20lines%20of%20code%2C%20we%20should%20not%20regard%20them%20as%20lines%20produced%20but%20as%20lines%20spent.%22%2C%22The%20most%20damaging%20phrase%20in%20the%20language%20is%2C%20It's%20always%20been%20done%20that%20way.%22%2C%22Getting%20back%20to%20failing%20early%2C%20I've%20learned%20it's%20important%20to%20completely%20fail.%20Get%20fired.%20Shoot%20the%20project%2C%20then%20burn%20its%20corpse.%20Melt%20the%20CVS%20repository%20and%20microwave%20the%20backup%20CDs.%20When%20things%20go%20wrong%2C%20I've%20often%20tried%20to%20play%20the%20hero%20from%20start%20to%20finish.%20Guess%20what%3F%20Some%20projects%20are%20doomed%20no%20matter%20what.%20Some%20need%20skills%20I%20don't%20possess.%20And%20some%20need%20a%20fresh%20face.%22%2C%22The%20only%20thing%20a%20man%20should%20ever%20be%20100%25%20convinced%20of%20is%20his%20own%20ignorance.%22%2C%22The%20best%20people%20and%20organizations%20have%20the%20attitude%20of%20wisdom%3A%20The%20courage%20to%20act%20on%20what%20they%20know%20right%20now%20and%20the%20humility%20to%20change%20course%20when%20they%20find%20better%20evidence.%20The%20quest%20for%20management%20magic%20and%20breakthrough%20ideas%20is%20overrated%3B%20being%20a%20master%20of%20the%20obvious%20is%20underrated.%20Jim%20Maloney%20is%20right%3A%20Work%20is%20an%20overrated%20activity%22%2C%22In%20theory%2C%20there%E2%80%99s%20no%20difference%20between%20theory%20and%20practice.%20But%20in%20practice%2C%20there%20is.%22%2C%22Act%20from%20reason%2C%20and%20failure%20makes%20you%20rethink%20and%20study%20harder.%20Act%20from%20faith%2C%20and%20failure%20makes%20you%20blame%20someone%20and%20push%20harder.%22%2C%22Measure%20everything%20you%20can%20about%20the%20product%2C%20and%20you'll%20start%20seeing%20patterns.%22%2C%22Quality%20of%20the%20people%20is%20better%20than%20the%20quality%20of%20the%20business%20idea.%20Crappy%20people%20can%20screw%20up%20the%20best%20idea%20in%20the%20world.%22%2C%22The%20only%20constant%20in%20the%20world%20of%20hi-tech%20is%20change.%22%2C%22Write%20it%20properly%20first.%20It's%20easier%20to%20make%20a%20correct%20program%20fast%2C%20than%20to%20make%20a%20fast%20program%20correct.%22%2C%22You%20can%E2%80%99t%20get%20to%20version%20500%20if%20you%20don%E2%80%99t%20start%20with%20a%20version%201.%22%2C%22The%20wonderful%20and%20frustrating%20thing%20about%20understanding%20yourself%20is%20that%20nobody%20can%20do%20it%20for%20you.%22%2C%22When%20you%20have%20eliminated%20the%20impossible%2C%20whatever%20remains%2C%20however%20improbable%2C%20must%20be%20the%20truth.%22%2C%22In%20order%20to%20understand%20what%20another%20person%20is%20saying%2C%20you%20must%20assume%20that%20it%20is%20true%20and%20try%20to%20find%20out%20what%20it%20could%20be%20true%20of.%22%2C%22A%C2%A0journey%C2%A0of%C2%A0a%C2%A0thousand%C2%A0miles%C2%A0must%C2%A0begin%C2%A0with%C2%A0a%C2%A0single%C2%A0step.%22%2C%22C%E2%80%99s%20great%20for%20what%20it%E2%80%99s%20great%20for.%22%2C%22There%20is%20one%20meaning%20%5Bfor%20static%20in%20C%5D%3A%20a%20global%20variable%20that%20is%20invisible%20outside%20the%20current%20scope%2C%20be%20it%20a%20function%20or%20a%20file.%22%2C%22Processors%20don't%20get%20better%20so%20that%20they%20can%20have%20more%20free%20time.%20Processors%20get%20better%20so%20_you_%20can%20have%20more%20free%20time.%22%2C%22Understanding%20why%20C%2B%2B%20is%20the%20way%20it%20is%20helps%20a%20programmer%20use%20it%20well.%20A%20deep%20understanding%20of%20a%20tool%20is%20essential%20for%20an%20expert%20craftsman.%22%2C%22No%20art%2C%20however%20minor%2C%20demands%20less%20than%20total%20dedication%20if%20you%20want%20to%20excel%20in%20it.%22%2C%22The%20minute%20you%20put%20the%20blame%20on%20someone%20else%20you%E2%80%99ve%20switch%20things%20from%20being%20a%20problem%20you%20can%20control%20to%20a%20problem%20outside%20of%20your%20control.%22%2C%22State%20is%20the%20root%20of%20all%20evil.%20In%20particular%20functions%20with%20side%20effects%20should%20be%20avoided.%22%2C%22It%20is%20better%20to%20be%20quiet%20and%20thought%20a%20fool%20than%20to%20open%20your%20mouth%20and%20remove%20all%20doubt.%22%2C%22A%20tail%20call%20allows%20a%20function%20to%20return%20the%20result%20of%20another%20function%20without%20leaving%20an%20entry%20on%20the%20stack.%20Tail%20recursion%20is%20a%20specific%20case%20of%20tail%20calling.%22%2C%22Simplicity%20means%20the%20achievement%20of%20maximum%20effect%20with%20minimum%20means.%22%2C%22Normality%20is%20the%20route%20to%20nowhere.%22%2C%22The%20problem%20is%20that%20Microsoft%20just%20has%20no%20taste.%20And%20I%20don't%20mean%20that%20in%20a%20small%20way%2C%20I%20mean%20that%20in%20a%20big%20way.%22%2C%22Do%20you%20want%20to%20sell%20sugared%20water%20all%20your%20life%20or%20do%20you%20want%20to%20change%20the%20world%3F%22%2C%221%20-%20Creativity%20and%20innovation%20always%20build%20on%20the%20past.%202%20-%20The%20past%20always%20tries%20to%20control%20the%20creativity%20that%20builds%20on%20it.%203%20-%20Free%20societies%20enable%20the%20future%20by%20limiting%20the%20past.%204%20-%20Ours%20is%20less%20and%20less%20a%20free%20society.%22%2C%22Good%20work%20is%20no%20done%20by%20%E2%80%98humble%E2%80%99%20men.%22%2C%22Simplicity%20and%20pragmatism%20beat%20complexity%20and%20theory%20any%20day.%22%2C%22The%20proof%20is%20by%20reductio%20ad%20absurdum%2C%20and%20reductio%20ad%20absurdum%2C%20which%20Euclid%20loved%20so%20much%2C%20is%20one%20of%20a%20mathematician%E2%80%99s%20finest%20weapons.%20It%20is%20a%20far%20finer%20gambit%20than%20any%20chess%20gambit%3A%20a%20chess%20player%20may%20offer%20the%20sacrifice%20of%20a%20pawn%20or%20even%20a%20piece%2C%20but%20a%20mathematician%20offers%20the%20game.%22%2C%22Remember%2C%20always%20be%20yourself%20...%20unless%20you%20suck!%22%2C%22All%20great%20things%20require%20great%20dedication.%22%2C%22I'm%20always%20happy%20to%20trade%20performance%20for%20readability%20as%20long%20as%20the%20former%20isn't%20already%20scarce.%22%2C%22You%20have%20to%20write%20for%20your%20audience.%20I%20would%20never%20write%20(1..5).map%20%26'*2'%20in%20Java%20when%20I%20could%20write%20ListFactoryFactory.getListFactoryFromResource(%20new%20ResourceName('com.javax.magnitudes.integers').%20setLowerBound(1).setUpperBound(5).setStep(1).applyFunctor(%20new%20Functor%20()%20%7B%20public%20void%20eval%20(x)%20%7B%20return%20x%20*%202%3B%20%7D%20%7D))%20I'm%20simplifying%2C%20of%20course%2C%20I've%20left%20out%20the%20security%20and%20logging%20wrappers.%22%2C%22The%20definition%20of%20insanity%20is%20doing%20the%20same%20thing%20over%20and%20over%20again%20and%20expecting%20different%20results.%22%2C%22A%C2%A0no%C2%A0uttered%C2%A0from%C2%A0the%C2%A0deepest%C2%A0conviction%C2%A0is%20better%20than%20a%20yes%20merely%20uttered%20to%20please%20or%20what%20is%20worse%2C%20to%20avoid%20trouble.%22%2C%22I%20think%20it%20is%20wise%2C%20and%20only%20honest%2C%20to%20warn%20you%20that%20my%20goal%20is%20immodest.%20It%20is%20not%20my%20purpose%20to%20%5C%22transfer%20knowledge%5C%22%20to%20you%20that%2C%20subsequently%2C%20you%20can%20forget%20again.%20My%20purpose%20is%20no%20less%20than%20to%20effectuate%20in%20each%20of%20you%20a%20noticeable%2C%20irreversable%20change.%20I%20want%20you%20to%20gain%2C%20for%20the%20rest%20of%20your%20lives%2C%20the%20insight%20that%20beautiful%20proofs%20are%20not%20%5C%22found%5C%22%20by%20trial%20anf%20error%20but%20are%20the%20result%20of%20a%20consciously%20applied%20design%20discipline.%20I%20want%20you%20to%20raise%20your%20quality%20standards.%20I%20mean%2C%20if%2010%20years%20from%20now%2C%20when%20you%20are%20doing%20something%20quick%20and%20dirty%2C%20you%20suddenly%20visualize%20that%20I%20am%20looking%20over%20your%20shoulders%20and%20say%20to%20yourself%20%5C%22Dijkstra%20would%20not%20have%20liked%20this%5C%22%2C%20well%2C%20that%20would%20be%20enough%20immortality%20for%20me.%22%2C%22The%20general%20principle%20for%20complexity%20design%20is%20this%3A%20Think%20locally%2C%20act%20locally.%22%2C%22Programming%20is%20the%20art%20of%20figuring%20out%20what%20you%20want%20so%20precisely%20that%20even%20a%20machine%20can%20do%20it.%22%2C%22Hence%20my%20urgent%20advice%20to%20all%20of%20you%20to%20reject%20the%20morals%20of%20the%20bestseller%20society%20and%20to%20find%2C%20to%20start%20with%2C%20your%20reward%20in%20your%20own%20fun.%20This%20is%20quite%20feasible%2C%20for%20the%20challenge%20of%20simplification%20is%20so%20fascinating%20that%2C%20if%20we%20do%20our%20job%20properly%2C%20we%20shall%20have%20the%20greatest%20fun%20in%20the%20world.%22%2C%22Remember%3A%20you%20are%20alone.%20Every%20time%20you%20can%20get%20help%20from%20someone%2C%20it%20is%20an%20opportunity%3A%20you%20should%20eagerly%20size%20it.%20But%20then%2C%20promptly%20return%20to%20normal%20mode%3A%20you%20are%20alone%20and%20you%20must%20be%20prepared%20to%20solve%20every%20problem%20yourself.%22%2C%22Making%20All%20Software%20Into%20Tools%20Reduces%20Risk.%22%2C%22Some%20may%20say%20Ruby%20is%20a%20bad%20rip-off%20of%20Lisp%20or%20Smalltalk%2C%20and%20I%20admit%20that.%20But%20it%20is%20nicer%20to%20ordinary%20people.%22%2C%22C%20and%20Lisp%20stand%20at%20opposite%20ends%20of%20the%20spectrum%3B%20they're%20each%20great%20at%20what%20the%20other%20one%20sucks%20at.%22%2C%22Two%20people%20should%20stay%20together%20if%20together%20they%20are%20better%20people%20than%20they%20would%20be%20individually.%22%2C%22To%20the%20optimist%2C%20the%20glass%20is%20half%20full.%20To%20the%20pessimist%2C%20the%20glass%20is%20half%20empty.%20To%20the%20engineer%2C%20the%20glass%20is%20twice%20as%20big%20as%20it%20needs%20to%20be.%22%2C%22It%20is%20practically%20impossible%20to%20teach%20good%20programming%20to%20students%20that%20have%20had%20a%20prior%20exposure%20to%20BASIC%3A%20as%20potential%20programmers%20they%20are%20mentally%20mutilated%20beyond%20hope%20of%20regeneration.%22%2C%22Whatever%20is%20worth%20doing%20at%20all%2C%20is%20worth%20doing%20well.%22%2C%22Rules%20of%20Optimization%3A%20Rule%201%3A%20Don%E2%80%99t%20do%20it.%20Rule%202%20(for%20experts%20only)%3A%20Don%E2%80%99t%20do%20it%20yet.%22%2C%22More%20computing%20sins%20are%20committed%20in%20the%20name%20of%20efficiency%20(without%20necessarily%20achieving%20it)%20than%20for%20any%20other%20single%20reason%20-%20including%20blind%20stupidity.%22%2C%22We%20should%20forget%20about%20small%20efficiencies%2C%20say%20about%2097%25%20of%20the%20time%3A%20premature%20optimization%20is%20the%20root%20of%20all%20evil.%22%2C%22The%20best%20is%20the%20enemy%20of%20the%20good.%22%2C%22The%20job%20of%20a%20leader%20today%20is%20not%20to%20create%20followers.%20It%E2%80%99s%20to%20create%20more%20leaders.%22%2C%22The%20president%20was%20visiting%20NASA%20headquarters%20and%20stopped%20to%20talk%20to%20a%20man%20who%20was%20holding%20a%20mop.%20%E2%80%9CAnd%20what%20do%20you%20do%3F%E2%80%9D%20he%20asked.%20The%20man%2C%20a%20janitor%2C%20replied%2C%20%E2%80%9CI%E2%80%99m%20helping%20to%20put%20a%20man%20on%20the%20moon%2C%20sir.%E2%80%9D%22%2C%22Only%20make%20new%20mistakes.%22%2C%22You%20can%20recognize%20truth%20by%20its%20beauty%20and%20simplicity.%20When%20you%20get%20it%20right%2C%20it%20is%20obvious%20that%20it%20is%20right.%22%2C%22Talkers%20are%20no%20good%20doers.%22%2C%22Photography%20is%20painting%20with%20light.%22%2C%22Good%20artists%20copy.%20Great%20artists%20steal.%22%2C%22A%20guideline%20in%20the%20process%20of%20stepwise%20refinement%20should%20be%20the%20principle%20to%20decompose%20decisions%20as%20much%20as%20possible%2C%20to%20untangle%20aspects%20which%20are%20only%20seemingly%20interdependent%2C%20and%20to%20defer%20those%20decisions%20which%20concern%20details%20of%20representation%20as%20long%20as%20possible.%22%2C%22Vigorous%20writing%20is%20concise.%20A%20sentence%20should%20contain%20no%20unnecessary%20words%2C%20a%20paragraph%20no%20unnecessary%20sentences%2C%20for%20the%20same%20reason%20that%20a%20drawing%20should%20have%20no%20unnecessary%20lines%20and%20a%20machine%20no%20unnecessary%20parts.%20This%20requires%20not%20that%20the%20writer%20make%20all%20sentences%20short%20or%20avoid%20all%20detail%20and%20treat%20subjects%20only%20in%20outline%2C%20but%20that%20every%20word%20tell.%22%2C%22The%20problem%20is%20that%20small%20examples%20fail%20to%20convince%2C%20and%20large%20examples%20are%20too%20big%20to%20follow.%22%2C%22We%20are%20the%20sum%20of%20our%20behaviours%3B%20excellence%20therefore%20is%20not%20an%20act%20but%20a%20habit.%22%2C%22The%20purpose%20of%20abstraction%20is%20not%20to%20be%20vague%2C%20but%20to%20create%20a%20new%20semantic%20level%20in%20which%20one%20can%20be%20absolutely%20precise.%22%2C%22Every%20man%20prefers%20belief%20to%20the%20exercise%20of%20judgment.%22%2C%22It%E2%80%99s%20hard%20to%20grasp%20abstractions%20if%20you%20don%E2%80%99t%20understand%20what%20they%E2%80%99re%20abstracting%20away%20from.%22%2C%22That%20is%20one%20of%20the%20most%20distinctive%20differences%20between%20school%20and%20the%20real%20world%3A%20there%20is%20no%20reward%20for%20putting%20in%20a%20good%20effort.%20In%20fact%2C%20the%20whole%20concept%20of%20a%20%5C%22good%20effort%5C%22%20is%20a%20fake%20idea%20adults%20invented%20to%20encourage%20kids.%20It%20is%20not%20found%20in%20nature.%22%2C%22I%20find%20that%20the%20harder%20I%20work%2C%20the%20more%20luck%20I%20seem%20to%20have.%22%2C%22Don't%20stay%20in%20bed%2C%20unless%20you%20can%20make%20money%20in%20bed.%22%2C%22If%20everything%20seems%20under%20control%2C%20you're%20not%20going%20fast%20enough.%22%2C%22Chance%20favors%20the%20prepared%20mind.%22%2C%22Controlling%20complexity%20is%20the%20essence%20of%20computer%20programming.%22%2C%22The%20function%20of%20good%20software%20is%20to%20make%20the%20complex%20appear%20to%20be%20simple.%22%2C%22Programmers%20are%20in%20a%20race%20with%20the%20Universe%20to%20create%20bigger%20and%20better%20idiot-proof%20programs%2C%20while%20the%20Universe%20is%20trying%20to%20create%20bigger%20and%20better%20idiots.%20%20So%20far%20the%20Universe%20is%20winning.%22%2C%22A%20hacker%20on%20a%20roll%20may%20be%20able%20to%20produce%E2%80%93in%20a%20period%20of%20a%20few%20months%E2%80%93something%20that%20a%20small%20development%20group%20(say%2C%207-8%20people)%20would%20have%20a%20hard%20time%20getting%20together%20over%20a%20year.%20%20IBM%20used%20to%20report%20that%20certain%20programmers%20might%20be%20as%20much%20as%20100%20times%20as%20productive%20as%20other%20workers%2C%20or%20more.%22%2C%22The%20best%20programmers%20are%20not%20marginally%20better%20than%20merely%20good%20ones.%20They%20are%20an%20order-of-magnitude%20better%2C%20measured%20by%20whatever%20standard%3A%20conceptual%20creativity%2C%20speed%2C%20ingenuity%20of%20design%2C%20or%20problem-solving%20ability.%22%2C%22A%20great%20lathe%20operator%20commands%20several%20times%20the%20wage%20of%20an%20average%20lathe%20operator%2C%20but%20a%20great%20writer%20of%20software%20code%20is%20worth%2010%2C000%20times%20the%20price%20of%20an%20average%20software%20writer.%22%2C%22Measuring%20programming%20progress%20by%20lines%20of%20code%20is%20like%20measuring%20aircraft%20building%20progress%20by%20weight.%22%2C%22First%20learn%20computer%20science%20and%20all%20the%20theory.%20%20Next%20develop%20a%20programming%20style.%20%20Then%20forget%20all%20that%20and%20just%20hack.%22%2C%22To%20iterate%20is%20human%2C%20to%20recurse%20divine.%22%2C%22The%20best%20thing%20about%20a%20boolean%20is%20even%20if%20you%20are%20wrong%2C%20you%20are%20only%20off%20by%20a%20bit.%22%2C%22Should%20array%20indices%20start%20at%200%20or%201%3F%20%20My%20compromise%20of%200.5%20was%20rejected%20without%2C%20I%20thought%2C%20proper%20consideration.%22%2C%22The%20use%20of%20COBOL%20cripples%20the%20mind%3B%20its%20teaching%20should%20therefore%20be%20regarded%20as%20a%20criminal%20offense.%22%2C%22It%20is%20practically%20impossible%20to%20teach%20good%20programming%20style%20to%20students%20that%20have%20had%20prior%20exposure%20to%20BASIC.%20%20As%20potential%20programmers%2C%20they%20are%20mentally%20mutilated%20beyond%20hope%20of%20regeneration.%22%2C%22One%20of%20the%20main%20causes%20of%20the%20fall%20of%20the%20Roman%20Empire%20was%20that%E2%80%93lacking%20zero%E2%80%93they%20had%20no%20way%20to%20indicate%20successful%20termination%20of%20their%20C%20programs.%22%2C%22Saying%20that%20Java%20is%20nice%20because%20it%20works%20on%20all%20OSes%20is%20like%20saying%20that%20anal%20sex%20is%20nice%20because%20it%20works%20on%20all%20genders.%22%2C%22If%20Java%20had%20true%20garbage%20collection%2C%20most%20programs%20would%20delete%20themselves%20upon%20execution.%22%2C%22Software%20is%20like%20sex%3A%20It%E2%80%99s%20better%20when%20it%E2%80%99s%20free.%22%2C%22Any%20code%20of%20your%20own%20that%20you%20haven%E2%80%99t%20looked%20at%20for%20six%20or%20more%20months%20might%20as%20well%20have%20been%20written%20by%20someone%20else.%22%2C%22Good%20programmers%20use%20their%20brains%2C%20but%20good%20guidelines%20save%20us%20having%20to%20think%20out%20every%20case.%22%2C%22Considering%20the%20current%20sad%20state%20of%20our%20computer%20programs%2C%20software%20development%20is%20clearly%20still%20a%20black%20art%2C%20and%20cannot%20yet%20be%20called%20an%20engineering%20discipline.%22%2C%22If%20debugging%20is%20the%20process%20of%20removing%20bugs%2C%20then%20programming%20must%20be%20the%20process%20of%20putting%20them%20in.%22%2C%22Always%20code%20as%20if%20the%20guy%20who%20ends%20up%20maintaining%20your%20code%20will%20be%20a%20violent%20psychopath%20who%20knows%20where%20you%20live.%22%2C%22Everything%20that%20can%20be%20invented%20has%20been%20invented.%22%2C%22I%20think%20there%E2%80%99s%20a%20world%20market%20for%20about%205%20computers.%22%2C%22It%20would%20appear%20that%20we%20have%20reached%20the%20limits%20of%20what%20it%20is%20possible%20to%20achieve%20with%20computer%20technology%2C%20although%20one%20should%20be%20careful%20with%20such%20statements%2C%20as%20they%20tend%20to%20sound%20pretty%20silly%20in%205%20years.%22%2C%22But%20what%20is%20it%20good%20for%3F%22%2C%22There%20is%20no%20reason%20for%20any%20individual%20to%20have%20a%20computer%20in%20his%20home.%22%2C%22640K%20ought%20to%20be%20enough%20for%20anybody.%22%2C%22Windows%20NT%20addresses%202%20Gigabytes%20of%20RAM%2C%20which%20is%20more%20than%20any%20application%20will%20ever%20need.%22%2C%22We%20will%20never%20become%20a%20truly%20paper-less%20society%20until%20the%20Palm%20Pilot%20folks%20come%20out%20with%20WipeMe%201.0.%22%2C%22If%20it%20keeps%20up%2C%20man%20will%20atrophy%20all%20his%20limbs%20but%20the%20push-button%20finger.%22%2C%22Functional%20programming%20is%20like%20describing%20your%20problem%20to%20a%20mathematician.%20%20Imperative%20programming%20is%20like%20giving%20instructions%20to%20an%20idiot.%22%2C%22Its%20a%20shame%20that%20the%20students%20of%20our%20generation%20grew%20up%20with%20windows%20and%20mice%20because%20that%20tainted%20our%20mindset%20not%20to%20think%20in%20terms%20of%20powerful%20tools.%20Some%20of%20us%20are%20just%20so%20tainted%20that%20we%20will%20never%20recover.%22%2C%22Lisp%20is%20a%20programmable%20programming%20language.%22%2C%22I%20guess%2C%20when%20you're%20drunk%2C%20every%20woman%20looks%20beautiful%20and%20every%20language%20looks%20(like)%20a%20Lisp%20%3A)%22%2C%22Many%20of%20life's%20failures%20are%20people%20who%20did%20not%20realize%20how%20close%20they%20were%20to%20success%20when%20they%20gave%20up.%22%2C%22You%20must%20always%20work%20not%20just%20within%20but%20below%20your%20means.%20If%20you%20can%20handle%20three%20elements%2C%20handle%20only%20two.%20If%20you%20can%20handle%20ten%2C%20then%20handle%20five.%20In%20that%20way%20the%20ones%20you%20do%20handle%2C%20you%20handle%20with%20more%20ease%2C%20more%20mastery%20and%20you%20create%20a%20feeling%20of%20strength%20in%20reserve.%22%2C%22When%20you%E2%80%99ve%20got%20the%20code%20all%20ripped%20apart%2C%20it%E2%80%99s%20like%20a%20car%20that%E2%80%99s%20all%20disassembled.%20You%E2%80%99ve%20got%20all%20the%20parts%20tying%20all%20over%20your%20garage%20and%20you%20have%20to%20replace%20the%20broken%20part%20or%20the%20car%20will%20never%20run.%20It%E2%80%99s%20not%20fun%20until%20the%20code%20gets%20back%20to%20the%20baseline%20again.%22%2C%22Well%2C%20if%20you%20talk%20about%20programming%20to%20a%20group%20of%20programmers%20who%20use%20the%20same%20language%2C%20they%20can%20become%20almost%20evangelistic%20about%20the%20language.%20They%20form%20a%20tight-knit%20community%2C%20hold%20to%20certain%20beliefs%2C%20and%20follow%20certain%20rules%20in%20their%20programming.%20It%E2%80%99s%20like%20a%20church%20with%20a%20programming%20language%20for%20a%20Bible.%22%2C%22It%E2%80%99s%20a%20problem%20if%20the%20design%20doesn%E2%80%99t%20let%20you%20add%20features%20at%20a%20later%20date.%20If%20you%20have%20to%20redo%20a%20program%2C%20the%20hours%20you%20spend%20can%20cause%20you%20to%20lose%20your%20competitive%20edge.%20A%20flexible%20program%20demonstrates%20the%20difference%20between%20a%20good%20designer%20and%20someone%20who%20is%20just%20getting%20a%20piece%20of%20code%20out.%22%2C%22%5BHow%20friendly%20will%20this%20machine%20be%3F%5D%20Well%2C%20I%20don%E2%80%99t%20think%20it%E2%80%99s%20a%20matter%20of%20friendliness%2C%20because%20ultimately%20if%20the%20program%20is%20going%20to%20accomplish%20anything%20of%20value%2C%20it%20will%20probably%20be%20relatively%20complex.%22%2C%22Some%20people%20suggest%20that%20machines%20would%20be%20friendlier%20if%20input%20could%20be%20in%20a%20natural%20language.%20But%20natural%20language%20is%20probably%20the%20worst%20kind%20of%20input%20because%20it%20can%20be%20quite%20ambiguous.%20The%20process%20of%20retrieving%20information%20from%20the%20computer%20would%20be%20so%20time-consuming%20that%20you%20would%20be%20better%20off%20spending%20that%20time%20getting%20the%20information%20directly%20from%20an%20expert.%22%2C%22The%20only%20way%20of%20discovering%20the%20limits%20of%20the%20possible%20is%20to%20venture%20a%20little%20way%20past%20them%20into%20the%20impossible.%22%2C%22Any%20sufficiently%20advanced%20technology%20is%20undistinguishable%20from%20magic.%22%2C%22That%20is%20the%20inevitable%20human%20response.%20We%E2%80%99re%20reluctant%20to%20believe%20that%20great%20discoveries%20are%20in%20the%20air.%20We%20want%20to%20believe%20that%20great%20discoveries%20are%20in%20our%20heads%E2%80%94and%20to%20each%20party%20in%20the%20multiple%20the%20presence%20of%20the%20other%20party%20is%20invariably%20cause%20for%20suspicion.%22%2C%22Good%20ideas%20are%20out%20there%20for%20anyone%20with%20the%20wit%20and%20the%20will%20to%20find%20them.%22%2C%22A%20person%20won't%20become%20proficient%20at%20something%20until%20he%20or%20she%20has%20done%20it%20many%20times.%20In%20other%20words.%2C%20if%20you%20want%20someone%20to%20be%20really%20good%20at%20building%20a%20software%20system%2C%20he%20or%20she%20will%20have%20to%20have%20built%2010%20or%20more%20systems%20of%20that%20type.%22%2C%22A%20person%20won't%20retain%20proficiency%20at%20a%20task%20unless%20he%20or%20she%20has%20at%20one%20time%20learned%20to%20perform%20that%20task%20very%20rapidly.%20Learning%20research%20demonstrates%20that%20the%20skills%20of%20people%20who%20become%20accurate%20but%20not%20fast%20deteriorate%20much%20sooner%20than%20the%20skills%20of%20people%20who%20become%20both%20accurate%20and%20fast.%22%2C%22Training%20research%20shows%20that%20if%20you%20get%20speed%20now%20you%20can%20get%20quality%20later.%20But%20if%20you%20don't%20get%20speed%20you%20will%20never%20get%20quality%20in%20the%20long%20run.%22%2C%22Beware%20of%20bugs%20in%20the%20above%20code%3B%20I%20have%20only%20proved%20it%20correct%2C%20not%20tried%20it.%22%2C%22Wear%20your%20best%20for%20your%20execution%20and%20stand%20dignified.%20Your%20last%20recourse%20against%20randomness%20is%20how%20you%20act%20%E2%80%94%20if%20you%20can%E2%80%99t%20control%20outcomes%2C%20you%20can%20control%20the%20elegance%20of%20your%20behaviour.%20You%20will%20always%20have%20the%20last%20word.%22%2C%22The%20human%20brain%20starts%20working%20the%20moment%20you%20are%20born%20and%20never%20stops%20until%20you%20stand%20up%20to%20speak%20in%20public.%22%2C%22The%20trouble%20with%20the%20world%20is%20that%20the%20stupid%20are%20always%20cocksure%20and%20the%20intelligent%20are%20always%20filled%20with%20doubt.%22%2C%22Simple%2C%20clear%20purpose%20and%20principles%20give%20rise%20to%20complex%2C%20intelligent%20behavior.%20Complex%20rules%20and%20regulations%20give%20rise%20to%20simple%2C%20stupid%20behavior.%22%2C%22C%2B%2B%20is%20like%20teenage%20sex%3A%20Everybody%20is%20talking%20about%20it%20all%20the%20time%2C%20only%20few%20are%20really%20doing%20it.%22%2C%22Functional%20programming%20is%20to%20algorithms%20as%20the%20ubiquitous%20little%20black%20dress%20is%20to%20women's%20fashion.%22%2C%22Java%20and%20C%2B%2B%20make%20you%20think%20that%20the%20new%20ideas%20are%20like%20the%20old%20ones.%20Java%20is%20the%20most%20distressing%20thing%20to%20hit%20computing%20since%20MS-DOS.%22%2C%22For%20complex%20systems%2C%20the%20compiler%20and%20development%20environment%20need%20to%20be%20in%20the%20same%20language%20that%20its%20supporting.%20It's%20the%20only%20way%20to%20grow%20code.%22%2C%22Simple%20things%20should%20be%20simple.%20Complex%20things%20should%20be%20possible.%22%2C%22I%20invented%20the%20term%20Object-Oriented%2C%20and%20I%20can%20tell%20you%20I%20did%20not%20have%20C%2B%2B%20in%20mind.%22%2C%22All%20creativity%20is%20an%20extended%20form%20of%20a%20joke.%22%2C%22If%20you%20don't%20fail%20at%20least%2090%20percent%20of%20the%20time%2C%20you're%20not%20aiming%20high%20enough.%22%2C%22Revolutions%20come%20from%20standing%20on%20the%20shoulders%20of%20giants%20and%20facing%20in%20a%20better%20direction.%22%2C%22If%20it%20looks%20like%20a%20duck%2C%20walks%20like%20a%20duck%2C%20and%20quacks%20like%20a%20duck%2C%20it's%20a%20duck.%22%2C%22In%20OO%2C%20it's%20the%20data%20that%20is%20the%20%5C%22important%5C%22%20thing%3A%20you%20define%20the%20class%20which%20contains%20member%20data%2C%20and%20only%20incidentally%20contains%20code%20for%20manipulating%20the%20object.%20In%20FP%2C%20it's%20the%20code%20that's%20important%3A%20you%20define%20a%20function%20which%20contains%20code%20for%20working%20with%20the%20data%2C%20and%20only%20incidentally%20define%20what%20the%20data%20is.%22%2C%22It%20was%20Edison%20who%20said%20%E2%80%981%25%20inspiration%2C%2099%25%20perspiration%E2%80%99.%20That%20may%20have%20been%20true%20a%20hundred%20years%20ago.%20These%20days%20it's%20%E2%80%980.01%25%20inspiration%2C%2099.99%25%20perspiration%E2%80%99%2C%20and%20the%20inspiration%20is%20the%20easy%20part.%22%2C%22The%20greatest%20challenge%20to%20any%20thinker%20is%20stating%20the%20problem%20in%20a%20way%20that%20will%20allow%20a%20solution.%22%2C%22No%20matter%20how%20much%20you%20plan%20you%E2%80%99re%20likely%20to%20get%20half%20wrong%20anyway.%20So%20don%E2%80%99t%20do%20the%20%E2%80%98paralysis%20through%20analysis%E2%80%99%20thing.%20That%20only%20slows%20progress%20and%20saps%20morale.%22%2C%22%5BInnovation%5D%20comes%20from%20saying%20no%20to%201%2C000%20things%20to%20make%20sure%20we%20don%E2%80%99t%20get%20on%20the%20wrong%20track%20or%20try%20to%20do%20too%20much.%20We%E2%80%99re%20always%20thinking%20about%20new%20markets%20we%20could%20enter%2C%20but%20it%E2%80%99s%20only%20by%20saying%20no%20that%20you%20can%20concentrate%20on%20the%20things%20that%20are%20really%20important.%22%2C%22The%20ability%20to%20simplify%20means%20to%20eliminate%20the%20unnecessary%20so%20that%20the%20necessary%20may%20speak.%22%2C%22However%20beautiful%20the%20strategy%2C%20you%20should%20occasionally%20look%20at%20the%20results.%22%2C%22Genius%20is%201%25%20inspiration%20and%2099%25%20perspiration.%22%2C%22I%E2%80%99d%20rather%20write%20programs%20to%20write%20programs%20than%20write%20programs.%22%2C%22Heureux%20l'%C3%A9tudiant%20qui%20comme%20la%20Rivi%C3%A8re%20peut%20suivre%20son%20cours%20sans%20quitter%20son%20lit...%22%2C%22Side%20projects%20are%20less%20masturbatory%20than%20reading%20RSS%2C%20often%20more%20useful%20than%20MobileMe%2C%20more%20educational%20than%20the%20comments%20on%20Reddit%2C%20and%20usually%20more%20fun%20than%20listening%20to%20keynotes.%22%2C%22%3Anunmap%20can%20also%20be%20used%20outside%20of%20a%20monastery.%22%2C%22I%20had%20to%20learn%20how%20to%20teach%20less%2C%20so%20that%20more%20could%20be%20learned.%22%2C%22Workers%20of%20the%20world%2C%20the%20chains%20that%20bind%20you%20are%20not%20held%20in%20place%20by%20a%20ruling%20class%2C%20a%20%5C%22superior%5C%22%20race%2C%20by%20society%2C%20the%20state%2C%20or%20a%20leader.%20They%20are%20held%20in%20place%20by%20none%20other%20than%20yourself.%20Those%20who%20seek%20to%20exploit%20are%20not%20themselves%20free%2C%20for%20they%20place%20no%20value%20in%20freedom.%20Who%20is%20it%20that%20really%20employs%20you%20and%20commands%20you%20to%20pick%20up%20your%20daily%20load%3F%20And%20who%20is%20it%20that%20you%20allow%20to%20pass%20judgment%20on%20the%20adequacy%20of%20your%20toil%3F%20Who%20have%20you%20empowered%20to%20dangle%20the%20carrot%20before%20you%20and%20threaten%20with%20disapproval%3F%20Who%2C%20when%20you%20wake%20each%20morning%2C%20sends%20you%20off%20to%20what%20you%20call%20your%20work%3F%20Is%20there%20an%20%5C%22I%20want%20to%5C%22%20behind%20all%20your%20%5C%22I%20have%20to%2C%5C%22%20or%20have%20you%20been%20so%20long%20forgotten%20to%20yourself%20that%20%5C%22I%20want%5C%22%20exists%20only%20as%20an%20idea%20in%20your%20head%3F%20If%20you%20have%20disconnected%20from%20your%20soul's%20desire%20and%20are%20drowning%20in%20an%20ocean%20of%20%5C%22have%20to%2C%5C%22%20then%20rise%20up%20and%20overthrow%20your%20master.%20Begin%20the%20journey%20toward%20emancipation.%20%20Work%20only%20in%20such%20a%20way%20that%20you%20are%20truly%20self-employed.%22%2C%22The%20Work%20Begins%20Anew%2C%20The%20Hope%20Rises%20Again%2C%20And%20The%20Dream%20Lives%20On.%22%2C%22The%20hardest%20part%20of%20design%20...%20is%20keeping%20features%20out.%22%2C%22Before%20software%20can%20be%20reusable%20it%20first%20has%20to%20be%20usable.%22%2C%22The%20opposite%20of%20love%20is%20not%20hate%2C%20it%20is%20indifference.%22%2C%22Perpetual%20optimism%20is%20a%20force%20multiplier.%22%2C%22Be%20the%20change%20you%20want%20to%20see%20in%20the%20world.%22%2C%22The%20art%20of%20getting%20someone%20else%20to%20do%20something%20you%20want%20done%20because%20he%20wants%20to%20do%20it%20%5BLeadership%5D.%22%2C%22No%20one%20is%20all%20evil.%20Everybody%20has%20a%20good%20side.%20If%20you%20keep%20waiting%2C%20it%20will%20comme%20up.%22%2C%22Experience%20is%20what%20you%20get%20when%20you%20don't%20get%20what%20you%20want.%22%2C%22Luck%20is%20where%20preparation%20meets%20opportunity.%22%2C%22The%20greatest%20of%20all%20weaknesses%20is%20the%20fear%20of%20appearing%20weak.%22%2C%22It's%20easier%20to%20ask%20forgiveness%20than%20it%20is%20to%20get%20permission.%22%2C%22An%20investment%20in%20knowledge%20always%20pays%20the%20best%20interest.%22%2C%22Natives%20who%20beat%20drums%20to%20drive%20off%20evil%20spirits%20are%20objects%20of%20scorn%20to%20smart%20Americans%20who%20blow%20horns%20to%20break%20up%20traffic%20jams.%22%2C%22A%20CS%20professor%20once%20explained%20recursion%20as%20follows%3A%20A%20child%20couldn't%20sleep%2C%20so%20her%20mother%20told%20her%20a%20story%20about%20a%20little%20frog%2C%20who%20couldn't%20sleep%2C%20so%20the%20frog's%20mother%20told%20her%20a%20story%20about%20a%20little%20bear%2C%20who%20couldn't%20sleep%2C%20so%20the%20bear's%20mother%20told%20her%20a%20story%20about%20a%20little%20weasel...%20who%20fell%20asleep.%20...and%20the%20little%20bear%20fell%20asleep%3B%20...and%20the%20little%20frog%20fell%20asleep%3B%20...and%20the%20child%20fell%20asleep.%22%2C%22Never%20do%20the%20impossible.%20People%20will%20expect%20you%20to%20do%20it%20forever%20after.%22%2C%22Hire%20people%20smarter%20than%20you.%20%20Work%20with%20people%20smarter%20than%20you.%20Listen%20to%20them.%20Let%20them%20lead%20you.%20Take%20the%20blame%20for%20all%20failures%2C%20give%20away%20the%20credit%20for%20all%20successes.%22%2C%22Give%20up%20control.%20You%20never%20really%20had%20it%20anyway.%22%2C%22Only%20two%20things%20are%20infinite%2C%20the%20universe%20and%20human%20stupidity.%20And%20I'm%20not%20so%20sure%20about%20the%20former.%22%2C%22The%20important%20thing%20is%20not%20to%20stop%20questioning.%22%2C%22Do%20not%20accept%20anything%20because%20it%20comes%20from%20the%20mouth%20of%20a%20respected%20person.%22%2C%22Work%20as%20intensely%20as%20you%20play%20and%20play%20as%20intensely%20as%20you%20work.%22%2C%22A%20witty%20saying%20proves%20nothing%22%2C%22Sound%20methodology%20can%20empower%20and%20liberate%20the%20creative%20mind%3B%20it%20cannot%20inflame%20or%20inspire%20the%20drudge.%22%2C%22Do%20not%20spoil%20what%20you%20have%20by%20desiring%20what%20you%20have%20not%3B%20but%20remember%20that%20what%20you%20now%20have%20was%20once%20among%20the%20things%20only%20hoped%20for.%22%2C%22Nobody%20can%20make%20you%20feel%20inferior%20without%20your%20consent.%22%2C%22If%20you%20tell%20the%20truth%2C%20you%20don't%20have%20to%20remember%20anything.%22%2C%22You%20know%20you're%20in%20love%20when%20you%20can't%20fall%20asleep%20because%20reality%20is%20finally%20better%20than%20your%20dreams.%22%2C%22The%20opposite%20of%20love%20is%20not%20hate%2C%20it's%20indifference.%22%2C%22Life%20is%20what%20happens%20to%20you%20while%20you're%20busy%20making%20other%20plans.%22%2C%22Whenever%20you%20find%20yourself%20on%20the%20side%20of%20the%20majority%2C%20it%20is%20time%20to%20pause%20and%20reflect.%22%2C%22To%20be%20yourself%20in%20a%20world%20that%20is%20constantly%20trying%20to%20make%20you%20something%20else%20is%20the%20greatest%20accomplishment.%22%2C%22It%20is%20not%20a%20lack%20of%20love%2C%20but%20a%20lack%20of%20friendship%20that%20makes%20unhappy%20marriages.%22%2C%22In%20terms%20of%20energy%2C%20it's%20better%20to%20make%20a%20wrong%20choice%20than%20none%20at%20all.%22%2C%22Courage%20is%20grace%20under%20pressure.%22%2C%22Actually%2C%20the%20essence%20of%20boredom%20is%20to%20be%20found%20in%20the%20obsessive%20search%20for%20novelty.%20Satisfaction%20lies%20in%20mindful%20repetition%2C%20the%20discovery%20of%20endless%20richness%20in%20subtle%20variations%20on%20familiar%20themes.%22%2C%22Before%20enlightenment%2C%20chop%20wood%20and%20carry%20water.%20After%20enlightenment%2C%20chop%20wood%20and%20carry%20water.%22%2C%22Acknowledging%20the%20negative%20doesn't%20mean%20sniveling%20%5Bwhining%2C%20complaining%5D%3B%20it%20means%20facing%20the%20truth%20and%20then%20moving%20on.%22%2C%22Whatever%20you%20can%20do%2C%20or%20dream%20you%20can%2C%20begin%20it.%20Boldness%20has%20genius%2C%20power%2C%20and%20magic%20in%20it.%22%2C%22What%20we%20choose%20to%20fight%20is%20so%20tiny!%20What%20fights%20us%20is%20so%20great!%20...%20When%20we%20win%20it's%20with%20small%20things%2C%20and%20the%20triumph%20itself%20makes%20us%20small.%20...%20Winning%20does%20not%20tempt%20that%20man.%20This%20is%20how%20he%20grows%3A%20by%20being%20defeated%2C%20decisively%2C%20by%20constantly%20greater%20beings.%22%2C%22We%20fail%20to%20realize%20that%20mastery%20is%20not%20about%20perfection.%20It's%20about%20a%20process%2C%20a%20journey.%20The%20master%20is%20the%20one%20who%20stays%20on%20the%20path%20day%20after%20day%2C%20year%20after%20year.%20The%20master%20is%20the%20one%20who%20is%20willing%20to%20try%2C%20and%20fail%2C%20and%20try%20again%2C%20for%20as%20long%20as%20he%20or%20she%20lives.%22%2C%22Are%20you%20willing%20to%20wear%20your%20white%20belt%3F%22%5D%3B%0Alet%20search%3B%0A%0Aconst%20handleInput%20%3D%20(%7B%20view%20%7D)%20%3D%3E%20(%7B%0A%20%20view%3A%20(%3CView%20results%3D%7Bsearch(view.target.value)%7D%2F%3E)%0A%7D)%3B%0A%0Aconst%20View%20%3D%20(%7B%20results%20%7D)%20%3D%3E%20(%0A%20%20%3Cdiv%3E%0A%20%20%09%3Ch1%3EQuote%20Search%3C%2Fh1%3E%0A%20%20%09%3Cinput%20placeholder%3D%22Search%20query%22%20%40input%3D%7BhandleInput%7D%2F%3E%0A%20%20%09%3Cfor%3D%7Bresult%7D%20of%3D%7Bresults%7D%20name%3D%22ul%22%3E%0A%20%20%09%09%3Cli%3E%0A%09%20%20%09%09%3Cp%3E%0A%09%20%20%09%09%09%7Bitems%5Bresult.index%5D%7D%26nbsp%3B%0A%09%09%09%09%3Ci%3E%3Csmall%3EScore%3A%20%7BMath.round(result.score%20*%20100)%7D%25%3C%2Fsmall%3E%3C%2Fi%3E%0A%09%09%09%3C%2Fp%3E%0A%09%09%3C%2Fli%3E%0A%20%20%09%3C%2Ffor%3E%0A%20%20%3C%2Fdiv%3E%0A)%3B%0A%0A%0A%2F%2F%20Import%20Wade%20and%20start%20Moon%0Aconst%20script%20%3D%20document.createElement(%22script%22)%3B%0Ascript.src%20%3D%20%22https%3A%2F%2Funpkg.com%2Fwade%22%3B%0Ascript.onload%20%3D%20()%20%3D%3E%20%7B%0A%20%20search%20%3D%20Wade(items)%3B%0A%20%20%0A%20%20Moon.use(%7B%0A%09view%3A%20Moon.view.driver(%22%23root%22)%0A%20%20%7D)%3B%0A%20%20%0A%20%20Moon.run(()%20%3D%3E%20(%7B%0A%09view%3A%20(%3CView%20results%3D%7B%5B%5D%7D%2F%3E)%0A%20%20%7D))%3B%0A%7D%3B%0Adocument.head.appendChild(script)%3B">real-time search</a>.
Loading/Saving Index
To save an index as a String, use Wade.save
on a search function.
For example:
// Create the search function
const search = Wade(["Apple", "Lemon", "Orange", "Tomato"]);
const index = Wade.save(search);
// Save `index`
Later, you can get the same search function without having Wade recreate an index every time by doing:
// Retrieve `index`, then
const search = Wade(index);
index
is a String and can be saved to a file.
Processors
Wade uses a set of processors to preprocess data and search queries. By default, these will:
- Make everything lowercase
- Remove punctuation
- Remove stop words
A process consists of different functions that process a string and modify it in some way, and return the transformed string.
You can easily modify the processors as they are available in Wade.config.processors
, for example:
// Don't preprocess at all
Wade.config.processors = [];
// Add custom processor to remove periods
Wade.config.processors.push(function(str) {
return str.replace(/\./g, "");
});
All functions will be executed in the order of the array (0-n) and they will be used on each document in the data.
The stop words can be configured to include any words you like, and you can access the array of stop words by using:
Wade.config.stopWords = [/* array of stop words */];
The punctuation regular expression used to remove punctuation can be configured with:
Wade.config.punctuationRE = /[.!]/g; // should contain punctuation to remove
Algorithm
First, an index is generated from the data. When performing a search, the following happens:
- The search query is processed.
- The search query is tokenized into terms.
- Each term except the last is searched for exactly and scores for each item in the data are updated according to the relevance of the term to the data.
- The last keyword is treated as a prefix, and Wade performs a depth-first search and updates the score for all data prefixed with this term using the relevance weight for the term. This allows for searching as a user types.
In-depth explanations of the algorithm are available on the blog post and pdf.
Support
Support Wade on Patreon to help sustain the development of the project. The maker of the project works on open source for free. If you or your company depend on this project, then it makes sense to donate to ensure that the project is maintained.
License
Licensed under the MIT License by Kabir Shah