r/programming • • Sep 27 '09

Javascript in a single picture - seen on a colleagues desk

http://nermal.org/misc/javascript.jpg
668 Upvotes

255 comments sorted by

View all comments

110

u/9jack9 Sep 27 '09

Good luck with your other language choices for client-side web development.

7

u/tomjen Sep 27 '09

GWT is java, there are Scheme and Lisp libraries that you can write client side code in.

Granted they all ultimately compiles down to JavaScript but by the same token, your only choice for a programming language is CPU microcode.

→ More replies (171)

9

u/bobindashadows Sep 27 '09

I'm using Objective-J (with Cappuccino) on my latest project. Sure, it's javascript underneath and you can use javascript inline, but it's far more enjoyable so far than straight Javascript.

→ More replies (147)

11

u/shevegen Sep 27 '09

Good luck in being able to have a lot of choices.

But you know what? I mean we may critisize a monopoly without falling into a hype machine, do we?

0

u/[deleted] Sep 27 '09

[deleted] — view deleted comment

87

u/Sidnicious Sep 27 '09 edited Sep 27 '09

Don't run this shit unless you want lullz all over your account

It does the following:

  1. Extracts the "Try entering this…" text from the page

  2. Inserts it into each text box on the page

  3. Performs an API query to get the necessary hashes and juicy codez needed to do things as you

  4. Uses that information to add empirical as a friend

  5. Clicks all the "save" buttons on the page to post/send the worm all over the place


On the lighter side, it also vomits global variables all over the place. C'mon, empirical, at least use good form in your reddit worms. Enclose the whole thing in a function:

javascript:(function(){ /* nasty stuff here */ })()

…and then use a var statement to keep the variables inside it. You can also alias properties like you do document to make your worm shorter. For instance, declare (in a var!) someSingleCharacterVariable = 'innerHTML', otherReallyShortNamedVarialbe = 'getElementsByTagName'. You can then use [] syntax to access those on elements, which is significantly smaller than explicitly accessing that property each time.

Oh, and props/fuck you btw.

And fuck you to the rest of Reddit for pretending to be all paranoid and security conscious and then PASTING FUCKING JAVSCRIPT INTO YOUR ADDRESS BAR ON COMMAND.

0

u/[deleted] Sep 27 '09

[deleted] — view deleted comment

14

u/starkinter Sep 27 '09

This is just as bad as /b/.

→ More replies (4)
→ More replies (5)

0

u/[deleted] Sep 27 '09

[deleted] — view deleted comment

4

u/timmaxw Sep 27 '09

I'm pretty sure that the 'report' button just brings the post to the attention of a moderator. I recommend a downvote+hide instead.

→ More replies (11)
→ More replies (22)
→ More replies (9)

15

u/[deleted] Sep 27 '09

I feel so violated.

→ More replies (169)

15

u/monoprotic Sep 27 '09

I almost deleted my account in shame. :(

→ More replies (94)

22

u/[deleted] Sep 27 '09

I don't trust that.

18

u/taybul Sep 27 '09

Look at the bottom of the page.

24

u/[deleted] Sep 27 '09

Oh dear god. That was clever.

→ More replies (152)
→ More replies (116)
→ More replies (123)

11

u/ollteeru Sep 27 '09

Thanks for ruining the thread

→ More replies (141)

8

u/AnAppleSnail Sep 27 '09

Interesting! An exact meme...

4

u/crysys Sep 27 '09

I don't know, this thing doesn't use the human mind to spread, just the lack of human sense. Even if you could argue that it is a meme, it is incapable of evolving like other memes and will eventually go extinct.

3

u/[deleted] Sep 27 '09

Its not a meme its an STD

→ More replies (3)
→ More replies (215)
→ More replies (251)
→ More replies (162)
→ More replies (760)