
FuckItJS: Runs your javascript code whether your compiler likes it or not. - tomkin
https://github.com/mattdiamond/fuckitjs/
======
jackcviers3
The software license is the best part:

"If you are caught in a dire situation wherein you only have enough time to
save one person out of a group, and the Author is a member of that group, you
must save the Author."

~~~
51Cards
Brilliant... This is going in every software license and terms agreement I
write from here on out. What a tremendous insurance policy if I perhaps hit on
the next Facebook. 1/7th of the planet responsible for saving lil ol' me.

~~~
kozlovsky
Just keep in mind: widespread adoption of this license can lead to race
conditions, when two concurrent authors of simultaneously used products happen
to be in the same group

~~~
TheBiv
Our QA group is hiring

------
Periodic
Reminds me of Failure-Oblivious Computing [1]. It takes advantage of the fact
that in many programs errors have a short error propagation distance as they
are often written as a main event loop and as long as you can get to the next
iteration of the loop the error won't corrupt state. For example, if your
server crashes on one request, it will probably be fine if it just gets
invalid data instead, discards it as invalid, and then waits for the next
response.

I'm not sure if this applies well to JavaScript. We might observe that most
JavaScript is a set of disjoint event handlers. If one doesn't work right it
probably won't break the rest of the site.

I played around with implementing FOP dynamically through DynamoRIO [2] as a
class project but only got through a proof of concept and quickly remembered
why I hate x86 assembly.

1: <http://en.wikipedia.org/wiki/Failure-oblivious_computing>

2: <https://github.com/periodic/Shady>

~~~
aboodman
This is exactly what browsers do already. If one event handler has an error,
that event is aborted. But the event loops continues, and js will continue to
run.

------
gfosco
I love a good tongue-in-cheek git repository... Reminded me of:
<http://html9responsiveboilerstrapjs.com>

~~~
josscrowcroft
That is the funniest thing I've seen all month!

 _"2. How do I install this?

Um... are you stupid or something? Just attackclone the grit repo pushmerge,
then rubygem the lymphnode js shawarma module – and presto!"_

~~~
eragnew
+1

------
md224
Original Author here... for reasons I can't fathom, someone has created a
Drupal module:

<http://drupal.org/project/fuckitjs>

~~~
mey
Which contains this gem <http://drupal.org/node/1657944>

~~~
staticshock
Interestingly, the Bad Judgement module looks like it's a legit check on other
non-serious modules:

 _This module provides an explicit dependency for modules whose usage requires
bad judgement. Joke modules often require "bad judgement"._

------
themstheones
I realize that this is a joke, but I can't help but wonder if there is a
possible valid use for it. I could imagine needing something that fixed bad js
for a crawler that needed JS on a poorly coded site, but I can't think of an
occasion where discarded bad code would ever be useful. Maybe if a site
deliberately injected bad JS to prevent crawling it would be worthwhile.

~~~
tyler_ball
I've used this library for loading horrible, third-party javascript:

<https://github.com/gregersrygg/crapLoader>

------
crazygringo
> _1\. Include jQuery, because everything requires jQuery_

I love it! :P

Great sense of humor.

~~~
ericcholis
Also, "Note: This is ALPHA software and may result in irreversible brain
damage."

~~~
fferen
This is ALPHA software and will routinely bully other software to assert its
dominance.

Sorry, couldn't resist :)

~~~
derleth
This is ALPHA software and will give you a squeaky voice if you have enough
electrons on hand.

------
cabirum
For completeness, it should use WTFPL license.

<http://en.wikipedia.org/wiki/WTFPL>

~~~
blasten
+1

------
estebank
First thing I thought when I see it: Why!?

Second thing: Why not call it OnErrorResumeNext!?

~~~
crazygringo
Ah... bringing back the memories :)

I think I'll go add an "Option Explicit" to the top of the file I'm working
on, right now, just for fun...

Since it's not valid JavaScript, I'm sure FuckItJS will just skip over it.

------
modarts
How would I go about integrating this as a step into my build process?

~~~
raverbashing
this is probably like integrating a car crash into your daily commute

but you can probably integrate into Jenkins for continuous jury-rigging

------
wetmore
> Through a process known as Eval-Rinse-Reload-And-Repeat

ERRAR. I like it.

~~~
emiliobumachar
Intentional or not, that is Portuguese for "to make a mistake".

~~~
chc
It's also a netspeak spelling of the English word "error." (For some reason
it's considered humorous to transform -er and -or into -ar.)

~~~
eridius
It is? I can safely say I've never seen anyone say "errar", ever.

~~~
chc
It's a general thing some people do. Anything that ends in an -er sound can be
replaced with -ar for apparent hilarity. I think the most common (and maybe
first) example is "winnar," though there are many more.

------
pfisch
I feel terrible for the person who takes a contract job and is handed some
code that depends on this. Also I hope it isn't me.

------
JoeCortopassi
Dupe: <http://news.ycombinator.com/item?id=4148287>

~~~
tomkin
My apologies. I submitted, but when it has been submitted before it usually
just redirects you to the previously submitted one. Not sure why it didn't do
this for me this time!

EDIT: Seems to be "http" vs. "https".

~~~
samwillis
No need to apologise. If something is missed the first time, people see it the
second time and it gets voted up to the front page then people want to see it.
With the voting system if it truly is a "dupe" it wont get voted up...

------
dag11
I read the source before I read the readme, and was thoroughly mindfucked.

I love it.

------
nnq
...but still, what does `FuckIt.moreConflict()` actually do and when would I
use it? (I just desperately feel the need to use a function named
`moreConflict`... don't ask!)

~~~
samuellevy
It overwrites ever property on the 'window' object (except for 'location')
with FuckIt.

------
esalman
Pardon me but I don't get any alert when I run the test script.

------
caster_cp
//@ TODO: give a shit

epic comment, in an epic app

~~~
aklofas
Yep, the commits are funny too:
[https://github.com/mattdiamond/fuckitjs/commit/001b146fc9dc6...](https://github.com/mattdiamond/fuckitjs/commit/001b146fc9dc68bce3071774006f50582a603a79)

------
acuity12
One of the best laughs I've had in a while.

------
eragnew
+1 for creative name

------
meggar
Nice.

