American web developer Matt Diamond (Matt Diamond) has written a JavaScript library called
FuckItJS . If you insert the FuckIt method into the code, it will force the worst script to be executed, “whether the compiler likes it or not.”
In general, FuckItJS works like this: all lines are cut out of the script, to which errors have jumped. The process is repeated until the script (or whatever is left of it) does not compile without errors. To survive in this cruel world, FuckItJS reboots after each iteration.
FuckIt (file_path)
Standard method with reference to the crappy script. It can be used in the code several times.
FuckIt.noConflict ()
“Do you use two FuckIt libraries? - asks the author. - Fuck it, but then run the FuckIt.NoConflict method. Of course, in fact, this does not help, because FuckItJS is constantly rebooting and continuously updating the global variable FuckIt, but damn ... at least you will feel that you have done something clever. "
')
FuckIt.moreConflict ()
“Tired of hiding from conflicts? Ready to overwrite every single property in the global Window object, even if it crashes the browser? Then this method is for you, ”says Matt Diamond.
The author really does not know what to write in the obligatory field “Browser Compatibility”, and generally he jokes on the project page for the full program. The commits there are also funny, in general, the page of humor on Gitkhab.
Diamond's joke came to the taste of web developers: see the
FuckItJS integration module for Drupal .
Matt Diamond is sure that he wrote “the worst plug-in in history”, but in fact a similar error-avoidance principle is used when writing
software that is resistant to hardware failure , a very promising direction, without jokes.