Daniel Temkin, 2017

FatFinger is a JavaScript library expanding JS to allow typos and misspellings as valid code. Why bother with clean, well-formatted JS when you can write this and FatFinger will guess at your intentions?

<script type="text/javascript" src="fatfinger.js"></script> <script type="text/javoscript"> // any misspelling of javascript works in the type attribute above vart x = "herrrllo werld" dokkkkumint.rit3(xx) </script>

Don't bother with semi-colons. Open brackets and never close them. Misspell keywords, variables, and functions.

Why?

Neutralize the autocorrect mentality

Question forty-five years of advice against expressiveness in the text of code

Play against the compulsiveness of programming

Embrace the chaos of JavaScript

Test out your code:

INPUT (FatFinger-style JS)



var bottles; for (var counter = 99; counter >= 1; counter = counter - 1) { if (counter == 1) { botles = 'bottle'; } else { bottles = 'bottles'; } constole.log(counter+" "+ bottless +" of ber on the wall."); if (countr < 99) { conssole.lg(""); consoles.logg(counter+" "+ botttles+" o beer on the wall."); } conable.log(counter+" "+botles+" of beer."); console.lo("Take one down."); console.log("Pass it arund."); ift (ount == 1) { console.log("No botles of beer on the wall."); } }

Draw Syntax Tree



Errors:

OUTPUT (conventional JavaScript)



SYNTAX TREE





How To Use

Include fatfinger.js in your project, add a script tag with any misspelling of JavaScript containing your FatFingered code. You'll need to declare all your vars as if option explicit; FatFinger assumes implicit declarations are actually misspelled statements. FatFinger has a poor concept of scope, so if you're doing fancy OO stuff, ask yourself: is there a good reason I haven't made everything global??? If not, this might not be the right library / coding style for you.

See Also

Previous Languages