Domain: davidflanagan.com
Stories and comments across the archive that link to davidflanagan.com.
Comments · 10
-
Re:soooo?
-
JQuery is for undisciplined programmers
O'Reilly 2nd and 3rd editions of JavaScript explained everything you'd want to know about JavaScript but, like any other book on a language, didn't teach programming. JQuery might be convenient but it isn't likely to add value to properly written code. If you knew what you were doing with JavaScript in 1999 and maintained your library from that point forward, the only thing JQuery would add is the overhead of getting to know someone else's code.
Maybe this book is different; maybe it really is documentation. That is, information for programmers without the self-righteous crap or the marketing nonsense inherent to the Perl books from that same publisher. The shoulders that need repair after all the self-praise must give sports medicine something to write about. (Sigh). If only David Flanagan would write a Perl book.
Comparisons of JavaScript code with JQuery to code without JQuery -- and that omit consideration of the quality (or lack thereof) of the plain-old JavaScript -- shouldn't give JQuery any credibility. But they do, it seems. How ex- paste-up editors write code -- code from any programmer with little engineering prowess -- doesn't seem to be a basis for comparing any tool (sugar).
As David Flanagan wrote on his blog: "Good algorithms are better than clever code".
http://www.davidflanagan.com/2009/08/good-algorithms.htmlAs long as the folks I work with insist on using it I'll be stuck with it -- since I didn't maintain my libraries after 2003. Good thing for JQuery that the best of the programmers I work with thinks highly of it. Maybe its just me -- he likes the Perl texts, too.
-
Re:Scalability?
Since you don't begin to define what you mean by scalability, I'll take that as FUD. However, scalability is one of the problems Ruby is trying to tackle. 1.9.0 marked the switch from green threads to os threads, but it' going to take awhile before extensions written in C are thread-safe. If you prefer the lightweight approach of green threads, take a look at fibers.
-
Why I Don't Use The prototype.js JavaScript Lib.
Here's an article from James Mc Parlane's Blog that describes the horrible problem with prototype.js and its ilk that define methods in Object.prototype and Array.prototype.
-Don
Why I Don't Use The prototype.js JavaScript Library
When it comes to JavaScript there is one issue for which there seems to be two polarised camps, and that is the question of extending the inbuilt JavaScript Array and Object types via the prototype object. There are those who do, and those who don't.
I am most definitely one of those in the "Don't, because it 'would be bad'" camp.
Now, thanks to the Web2.0/Ruby On Rails/Nuevo Bubble phenomena there is a widely used library that makes great use of the prototype object and that is Sam Stephenson's prototype.js library.
I ran into an issue 6 months ago and decided I would never ever use prototype.js, despite the fact, and I don't say this often, that after an examination of the code, prototype.js is an inspired work of art.
What I and many many others have discovered is that using the prototype object on the Array and Object inbuilt types increases the chances that your code will conflict with existing or external code. It makes your code not play well with others, so once you start using prototype.js, you have to keep using prototype's paradigm because by extending Array and Object via the prototype object it secretly modifies some of JavaScripts default behavior.
It's the crack cocaine of JavaScript.
This can be a good thing. If you don't want to waste time writing your own JavaScript libraries and learning how everything really works, then using prototype.js and the libraries that extend it (e.g. Open Rico) is a very good way of developing. You will save time and money and all you need to learn is "the way of prototype.js".
Now the entire tasty raisin for the MetaWrap JavaScript libraries is to allow others to easily remix MetaWrap applications via a client side API that can be invoked via XML. The result is that CSS, HTML and JavaScript can be injected into the application, or XML and HTML at any point in the rendering pipeline of the application.
So I simply had to reject prototype.js because, out of the box, the very first time I tried to use it - it snuck out and cut the throat of the JavaScript I was using that relied on performing a for(x in object) on the contents of an Array.
In JavaScript, value types are subdivided into primitives and objects. Objects are entities that have an identity (they are only equal to themselves) and that map primitive properties to other value types, ("slots" in prototype-based programming terminology) - see these testcase #5 - #7. Because of this behavior JavaScript objects are often mistakenly described as associative arrays or hash tables, while functionally they behave like an associative array/hash table, technically this is not their true nature.
Despite this the JavaScript programming world has come to rely on these objects behaving as predictable associative array/hash tables - and prototype.js breaks this.
There is no object more galactically useful than a good associative array/hashtable. There is no problem that can't be solved with a large enough hash table. In highly granular interpreted languages like JavaScript it provides a way to dip into pure native brute force computing power mostly unhindered by the language interpreter.
-
Re:oh let's not talk standards
Firefox supports counters, but they are implemented slightly differently.
-
Re:"JA Office"
You are correct that that is what it stands for.
And I am correct that that is nonsensical.
Did you look at this: http://www.davidflanagan.com/blog/2005_03.html ??
I'm guessing not. He points out how the acronym is a pile of stinking bullshit. -
"JA Office"
To be consistent, it should really be called JA Office. Ajax is a nonsensical buzzword.
-
Re:AJAX Cleaning power
But this doesn't make sense: systems that people call "Ajax" don't even use XML. There's no particular reason for them to use it, either. Saying you throw on the 'x' because you use "XMLHttpRequest" is ridiculous too, considering that XMLHttpRequest is misnamed -- it might as well just be HttpRequest.
Furthermore, you're coming up with justifications for the 'X' after the fact -- which is silly. The guy who came up with the term explains his whole irritating thought process. So if you wnat to know where the 'X' came from (and the retarded acronym, "AJAX"), you just read what he wrote. E.g.
Q. Some of the Google examples you cite don't use XML at all. Do I have to use XML and/or XSLT in an Ajax application?
A. No. XML is the most fully-developed means of getting data in and out of an Ajax client, but there's no reason you couldn't accomplish the same effects using a technology like JavaScript Object Notation or any similar means of structuring data for interchange.
So according to the Ajax master-blaster, you don't need XML to get shit in and out of an "AJAX" application.
Here's a nice piece by a guy who sees things my way, and explains it in detail, step-by-step, with references (OK, he's not totally pissed off the way I am but...) he covers my main points:
* AJAX was invented as a marketing term ("masturbatory acronaming")
* it doesn't have to use XML -
Re:Can't get my schadenfreude on.
Excellent point anthony. Those lunatic terrorosits MUST get caught & be brainwashed (if that is possible)every single time. It's human life that's at stake. You need peace to talk science & technology. Social security & well being comes. You can later fight & debate about who's stealing whose jobs.
btw, people in the us don't realize that, by outsourcing, it's the american companies that are making bigger bucks and bigger profits. => the richer corporates are getting richer & the average tech worker is out on the road on his ass. Absolute,extreme capitalism. The kind that dubyaman promotes. Americans have only themselves to blame for their current state and for voting such nepotists to power. They're solely responsible for the economic unrest & imbalance that the american society is winessing. And how did Mr.Dubya manage to come back to power?Through his doomsday prophecies and by painting bizzare pictures of victory over evil in Iraq. And how many american mothers have lost their sons in the process? Can you even count? And who's benefitting from all this? (Ever heard of halliburton?) Root out the evils in your own land before you ridicule people of another country trying to make a living. You can then compete on an even keel. -
It really is as easy as he says, heres how...US, try this:
http://www.davidflanagan.com/FaxSenate/fax.html
to fax your senator (which i assume is the thing to do).
If you live in the UK try the "Fax your MP" page at
to find YOUR MP and then type out what you would like and it will be faxed by their text to fax gateway. IT WORKS! I contacted my MP this way regarding that awful awful RIP bill, and got a reply within a few weeks with the guy's handwriting on.
Honestly, if enought people do this a difference will be made, I can feel another letter coming on about Mr. straw's evil DNA plans.
Believe it, it now really is as easy as bitching on slashdot (except maybe you have to be coherent).