• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Collapse

You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:

  • You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
  • You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  • If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Previously on "Learning Javascript"

Collapse

  • xoggoth
    replied
    scripting languages are good for providing the glue between high level components created in proper programming languages
    Indeed. jscript runing within a .NET based browser is very powerful in my view, at least for the sort of educational interactives I am interested in. What you can't do in the jscript alone, just trigger the browser code. You can, for instance, move the mouse over a visible picture on a webpage while the .NET tracks it over a different one with hidden codes. If the jscript can't handle it, just call the .NET, save to a database, save a file, open another application, get proper print preview etc. Big advantage is that you can update a game with just a webpage, all the complex stuff is general purpose routines in the executable.

    Leave a comment:


  • Sysman
    replied
    Originally posted by VectraMan View Post
    I have to admit in my (slightly drunken) rant the other night I hadn't considered the Swiss.


    It isn't just the Swiss. Almost every non-English keyboard I've come across suffers from this affliction.

    Leave a comment:


  • VectraMan
    replied
    Originally posted by Sysman View Post
    There's a very good reason for hating brackets, and that is non-English keyboards. My Swiss keyboards for example require various combinations of Alt, Alt Gr and Alt + Shift to get at curly or square brackets, the pipe symbol and so on (and of course with subtle differences between laptops and external keyboards, Apple and PC keyboards... I bought a US keyboard to get around that.
    I have to admit in my (slightly drunken) rant the other night I hadn't considered the Swiss.

    Leave a comment:


  • d000hg
    replied
    Originally posted by NickFitz View Post
    Which also proves his complete ignorance of both.
    I don't know there is a metric which establishes how good/crap a language is objectively. For mainstream application development I think JS comes close though... it's just a mess where code errors are hard to find and dev tools are lame.

    Leave a comment:


  • russell
    replied
    Originally posted by VectraMan View Post
    I never said either were crap, just equally horrible. They're both scripting languages, and scripting languages are good for providing the glue between high level components created in proper programming languages. The problem is people have started to think these scripting languages can be used for proper programming, which whilst technically is true, doesn't mean that it's a good idea to do so.

    Python seems to be based on the premise that there are some people for whom brackets and semicolons are terrifying, and whilst I can kind of understand why some people might think like that, that doesn't mean it's a better language than all the C-syntax based alternatives. And like all these scripting languages, the real killer is the lack of static types. I've had to maintain bits of complicated Python, and I can't understand why anybody thinks it's a good idea to use a language where you can't work out what anything is. I suppose at least it has classes (Javascript's equivalent is ludicrous), but without static types you lose 90% of the benefit.

    Which brings us back to ECMAScript4 / ActionScript or whatever you want to call it, which had proper classes and static typing (like most of us have been doing for 20 years), as well as scripting style dynamic properties for when that's appropriate. And it was being produced by the official standards bodies ready to go into all the browsers and become a proper powerful modern object-oriented language for the web. But no, Apple and co (okay so it wasn't just Apple, but it seems appropriate to blame them) decided that it was too powerful and useful.

    And the double irony is that all the recent Javascript engine speed hype (I was reading something today about IE10's improved JS performance) largely centres on clever techniques to detect the use of classes and object oriented programming at runtime (because all the analysis shows this is how serious programmers work) and convert the dynamic types back to static ones. If they'd just built it into the language a) it'd work much better, and b) it would have saved a whole lot of effort.

    But as somebody who's written a JS interpreter, and integrated Microsoft's, Google's and QT's JS engines into not-a-browser applications, and done a load of JS programming for Flash, I'm probably just showing my ignorance. Sorry.
    Proper programming language I would suggest you delete that post it makes you look clueless.

    Leave a comment:


  • Sysman
    replied
    Originally posted by VectraMan View Post
    I never said either were crap, just equally horrible. They're both scripting languages, and scripting languages are good for providing the glue between high level components created in proper programming languages. The problem is people have started to think these scripting languages can be used for proper programming, which whilst technically is true, doesn't mean that it's a good idea to do so.
    There are arguments for both approaches. Back in the 1980s/90s I would use a scripting language for one-offs and prototyping. Once that occasional one-off became indispensable or a prototype was accepted, it was taken for granted that you would rewrite it in a proper language, for performance, robustness and ease of maintenance.

    However Increased hardware performance and an attitude that "good enough" will do has decreased emphasis on performance and robustness.

    PHP is another example here. Late last year I was seeing concerted attacks on Wordpress and I thought to myself
    • Do I need to run the risk?
    • Do I need the hassle of monitoring it and keeping it up to date, all for the sake of a blog where weeks can go by without me writing a single post?


    I found A plea for baked weblogs (which ironically took ages to load for me today), and New publishing system / tour of my head.

    One item in the second link appealed to me in particular: because you have the static HTML sitting on your laptop/desktop, you can index it and use your favourite search tools.

    The popular PHP based CMS products out there have limitations in their search engines and it's sometimes a real pain to find something you yourself have written via the inbuilt search tool. For example vBulletin won't search for anything less than 4 characters and I had to use a circuitous method to dig out my earlier link to a post on LUA.

    Originally posted by VectraMan View Post
    Python seems to be based on the premise that there are some people for whom brackets and semicolons are terrifying, and whilst I can kind of understand why some people might think like that, that doesn't mean it's a better language than all the C-syntax based alternatives.
    There's a very good reason for hating brackets, and that is non-English keyboards. My Swiss keyboards for example require various combinations of Alt, Alt Gr and Alt + Shift to get at curly or square brackets, the pipe symbol and so on (and of course with subtle differences between laptops and external keyboards, Apple and PC keyboards... I bought a US keyboard to get around that.
    Last edited by Sysman; 16 June 2012, 13:30.

    Leave a comment:


  • VectraMan
    replied
    Originally posted by NickFitz View Post
    Which also proves his complete ignorance of both.
    I never said either were crap, just equally horrible. They're both scripting languages, and scripting languages are good for providing the glue between high level components created in proper programming languages. The problem is people have started to think these scripting languages can be used for proper programming, which whilst technically is true, doesn't mean that it's a good idea to do so.

    Python seems to be based on the premise that there are some people for whom brackets and semicolons are terrifying, and whilst I can kind of understand why some people might think like that, that doesn't mean it's a better language than all the C-syntax based alternatives. And like all these scripting languages, the real killer is the lack of static types. I've had to maintain bits of complicated Python, and I can't understand why anybody thinks it's a good idea to use a language where you can't work out what anything is. I suppose at least it has classes (Javascript's equivalent is ludicrous), but without static types you lose 90% of the benefit.

    Which brings us back to ECMAScript4 / ActionScript or whatever you want to call it, which had proper classes and static typing (like most of us have been doing for 20 years), as well as scripting style dynamic properties for when that's appropriate. And it was being produced by the official standards bodies ready to go into all the browsers and become a proper powerful modern object-oriented language for the web. But no, Apple and co (okay so it wasn't just Apple, but it seems appropriate to blame them) decided that it was too powerful and useful.

    And the double irony is that all the recent Javascript engine speed hype (I was reading something today about IE10's improved JS performance) largely centres on clever techniques to detect the use of classes and object oriented programming at runtime (because all the analysis shows this is how serious programmers work) and convert the dynamic types back to static ones. If they'd just built it into the language a) it'd work much better, and b) it would have saved a whole lot of effort.

    But as somebody who's written a JS interpreter, and integrated Microsoft's, Google's and QT's JS engines into not-a-browser applications, and done a load of JS programming for Flash, I'm probably just showing my ignorance. Sorry.

    Leave a comment:


  • NickFitz
    replied
    Originally posted by d000hg View Post
    Perhaps re-read his post and you'll spot he never suggested any similarity except they were both crap.
    Which also proves his complete ignorance of both.

    Leave a comment:


  • NickFitz
    replied
    Originally posted by fullyautomatix View Post
    Javascript is pretty powerful as a language but its limitation is that it runs on the browser.
    However, that limitation was removed in 1995: LiveWire Developers' Guide

    Leave a comment:


  • Durbs
    replied
    Originally posted by d000hg View Post
    Or you can just run JS outside the browser anyway. Though it seems a weird choice to me.
    Went on a Microsoft Win 8 developer camp recently and JS is a big well supported option for creating Metro apps. Wouldnt fancy it myself like, I went the C#/XAML route, much more civilised. Dude next to me was using JS and it looked awful to my eyes. I may give the JS Metro tutorials a go but for me, JS has always been ugly to read, hard to debug, but a necessary evil for my job.
    Last edited by Durbs; 15 June 2012, 12:12.

    Leave a comment:


  • d000hg
    replied
    Or you can just run JS outside the browser anyway. Though it seems a weird choice to me.

    Leave a comment:


  • Sysman
    replied
    Originally posted by fullyautomatix View Post
    Javascript is pretty powerful as a language but its limitation is that it runs on the browser.
    If scripting outside the browser is what you are after see Nick F's reply to a post I made about LUA:

    It looks extremely similar to JavaScript (which it pre-dates) - in fact, most of the example code snippets on the Wikipedia page would be valid JS with the addition of nothing more than ()s, {}s and ;s and would function identically, particularly the ones relating to closures and lambdas.

    Leave a comment:


  • d000hg
    replied
    Originally posted by russell View Post
    Python is nothing like Javascript, have you ever programmed using it?
    Perhaps re-read his post and you'll spot he never suggested any similarity except they were both crap.

    Leave a comment:


  • Malcolm Buggeridge
    replied
    Originally posted by d000hg View Post
    JS and webby stuff may be in vogue but is ugly and there are a gazillion code-monkeys out there who can do it. It's the one area I've always stayed away from where possible.
    I use Javascript a lot but actually write very little as there seems to be a jquery plugin for prectically everything I want to do.

    Leave a comment:


  • fullyautomatix
    replied
    Javascript is pretty powerful as a language but its limitation is that it runs on the browser. But as a dynamic language it can get really powerful if you know how to use it. Book wise try to read Secrets of the Javascript Ninja by John Resig.

    Leave a comment:

Working...
X