Programmer nerd post

I'm finally making myself learn JavaScript and the DOM.  

Whilst reading about the same-origin security policy I thought "I wonder if you can dynamically insert a script tag into the DOM and the browser will download whatever URL you put in as the src and bypass the same-origin policy."  

If this works, I'm going to be nerd-famous!

Then I read some more and find out someone else thought of this 8 years ago and it even has a name:  JSONP.

Google+: View post on Google+

Leave a comment ?

10 Comments.

  1. As one JS developer to another: Expect that to happen a lot. Your first impulse, upon getting a brilliant idea, is to google it. 🙂

  2. Awesome teach me now 🙂

  3. So many years later and I still can't wait for something to outdo Java already.

  4. +Shawn Qureshi
    A: Java is to JavaScript as car is to carpet.
    B: Java ain't no great shakes as a programming language unless you're addicted to insanely long class definition names and XML.v Try out Scala, Clojure or Groovy for better languages that use the JVM.
    C: JavaScript has its flaws, but in the hands of a skilled programmer (like the team I work with) it can do some pretty marvelous things.

  5. +Gert Sønderby that's also true of assembler language.  It's not what you can do, it's how easy it is for the average programmer to produce well-enough-structured code.  Raw javascripts == fail.  Or is that === fail?

  6. Then the average programmer needs to get Crockford's book about it, and start using jslint. 😉

  7. This is exactly why we can't have nice things – bigoted assholes who pretend their shit don't stink.

  8. If you think a preference for, and willingness to defend, a programming language that appeals to you is 'bigotry', then you must live a somewhat sheltered life. What, then, do you call bomb threats against Planned Parenthood, or treating people of color badly?

    Seriously, bro. Just because a language is slightly difficult to learn, does not mean it's bad. Just because you use a language does not mean it's good.

    Oh, and I've seen the code the 'average' programmer writes. It sucks balls, because precious few people take the time to learn the craft properly and take pride in writing clean, maintainable code. It ain't even hard, it just requires taking the time to clean up after yourself. This is true no matter the language – in fact especially in so-called 'easy' languages.

  9. I'm relearning Javascript myself, used it some in school but never seriously or professionally, yet.

    I want to be a full time developer so bad.

  10. +Malik Al-Malik Let me recommend Douglas Crockford's Javascript: The Good Parts to you, then. That, and a healthy does of thinking in terms of functional programming. Do you know any languages like ML, Scheme, LISP or the like? JavaScript has similarities to those, despite a syntax more like that of C.

Leave a Reply