I know, that there are a lot of people having problems with orkut.com, errors like "object expected" and named objects missing. When loading the site can generate some 10 errors, and still just leave a blue page - seems like it heavily rely on JS. Still, me and friends having problems and orkut seems just to ignore it.
I am sure, that other poeple have problems, and I really wonder what kind of problem it is.
The odd thing is, that it works some times, someplaces - makes think the problem is in my computer. Secondly, when using my work email on groups.google.com, then going to orkut, then it works. Next, I sign out, and then in using my private email, and I get a blue page. Though, as of now, that does not work. This makes me believe, that it is some part of included JS for my profile, which fails heavily. Hence, the problem is in their scripts.
This reminds me of a problem I once had with a site of mine, where the included .js file did not have proper permissions and could not be loaded.
Have anyone been thinking about this and bad JS coding in general? To me, orkut is an example of how pages should not rely entirely on JS.
> I know, that there are a lot of people having problems with > orkut.com, > <snip> > I am sure, that other poeple have problems, and I really > wonder what kind of problem it is.
Henry wrote: > On Sep 23, 4:07 pm, jodleren wrote: >> I know, that there are a lot of people having problems with >> orkut.com, >> <snip> >> I am sure, that other poeple have problems, and I really >> wonder what kind of problem it is. > <snip>
> If its Google then it must be incompetence.
/* satire mode on */
Yes, I agree. And if something is Microsoft then it must be incompetence.
In fact, in my opinion every employee in those companies is incompetent, each and everyone of tens of thousands of people, without an exception.
As soon as a person is not employed by the Evil Companies, and writes posts in c.l.j, he might become competent, expert, provided he has never worked for the Evil (and hopefully never will.)
Perhaps therefore it is very important to post here with one's real name so that even their former employees can be recognized as evil, incompetent people.
If an incompetent Google-person writes
var i = 1;
then the code is wrong, incompetent, idiot's work, the performance is questionable, and there are sure to be evil spirits involved in the lines.
If a c.l.j expert writes
var i = 1;
then the code is admirable, following standards, correctly posted with correct signature and quotation, with correct software and there are good spirits in it, glory glory halleluja .
> then the code is wrong, incompetent, idiot's work, [...]
> If a c.l.j expert writes
> var i = 1;
> then the code is admirable [...]
The first variant is more geared towards situations where high performance is paramount. It sacrifices clarity and maintainability for raw speed, which makes sense in a website that's visited by millions of people every day.
The second form is more classical; it's simple, robust, and easy to maintain and modify, but it can also act as a bottleneck. This is canonical form. This is how it's taught in the exclusive (and very expensive) elite programming courses, which many of the regulars of this group attended. Personally, I also find the style more elegant compared to the cramped alternative used by Google.
Hope that cleared it up for you. Next week we can discuss the difference between i++.
> Henry wrote: >> On Sep 23, 4:07 pm, jodleren wrote: >>> I know, that there are a lot of people having problems with >>> orkut.com, >>> <snip> >>> I am sure, that other poeple have problems, and I really >>> wonder what kind of problem it is. >> <snip>
>> If its Google then it must be incompetence.
> /* satire mode on */
> Yes, I agree. And if something is Microsoft then > it must be incompetence.
> In fact, in my opinion every employee in those companies > is incompetent, each and everyone of tens of thousands > of people, without an exception.
> As soon as a person is not employed by the Evil Companies, > and writes posts in c.l.j, he might become competent, expert, > provided he has never worked for the Evil (and hopefully > never will.)
> Perhaps therefore it is very important to post here with one's real > name so that even their former employees can be recognized as > evil, incompetent people.
> If an incompetent Google-person writes
> var i = 1;
> then the code is wrong, incompetent, idiot's work, the performance > is questionable, and there are sure to be evil spirits involved in > the lines.
> If a c.l.j expert writes
> var i = 1;
> then the code is admirable,
There is no need to conjecture about code that Google employees may or may not write when you can look at code that they actually do write, and goes unchanged and unnoticed for year after year. An adequate illustration can be found at:-
- where viewing the source of the served page reveals:-
| <script language="javascript"><!-- | | // ---------------------------------- | // used for dynamic function generation on event handlers | | var loaddef = ""; | var resizedef = ""; | | //----------------------------------- | // Browser detection and support | | var agt = navigator.userAgent.toLowerCase(); | var is_opera = (agt.indexOf("opera") != -1); | var is_ie = (agt.indexOf("msie") != -1) && document.all && ! is_opera; | var is_ie5 = (agt.indexOf("msie 5") != -1) && document.all; | window.agt = agt; | window.is_opera = is_opera; | window.is_ie = is_ie; | window.is_ie5 = is_ie5; | | // ---------------------------------- | // cross-browser functions | | var IE_all_cache = new Object(); | function IE_getElementById(id) { | if (IE_all_cache[id] == null) { | IE_all_cache[id] = document.all[id]; | } | return IE_all_cache[id]; | } | | if (document.all) { | if (!document.getElementById) { | document.getElementById = IE_getElementById; | } | } | | | | //---------------------------------- | // Timezone detection (sets cookie) | | try { | document.cookie = 'GTZ=' + (new Date()).getTimezoneOffset() + | ';path=/;expires=Mon, 01-Jan-2024 00:00:01 GMT'; | } catch(e) {} | | | // --------------------------------- | // shelled functions for old javascript | function tog() {} | | //--></script> | <script language="javascript1.3"><!-- | | // ---------------------------------- | // visibility functions | | function tog() { | // tog: toggle the visibility of html elements (arguments[1..]) | // from none to arguments[0]. Return what should be returned | // in a javascript onevent(). | display = arguments[0]; | for( var i=1; i<arguments.length; i++ ) { ... and so on.
Disregarding user agent string based browser sniffing, the undeclared variables that should be local (- display = arguments[0]; -) and the perverse and redundant (-window.agt = agt; - with a previous global - var agt = ... -), here there is an attempt to do something that, if it were effective, might be admirable. Specifically, the use of various forms of language="javascriptX.X" attributes in the SCRIPT elements in an attempt to gain controlled outcomes in older browsers. Somebody has obviously identified this as desirable and attempted to implement it (or have someone else implement it).
Two language versions are employed by SCRIPT elements in the page's source; version 1.3 and the generic language="javascript", which means any version from the first. Most of the code above is the main language="javascript" element where we see, for example, an implementation of a substitute - document.getElementById - method for IE 4 (IE 4 did not have that method and would not load language="javascript1.3" SCRIPT elements). We also see a dummy - tog - function defined so that these older browsers will not error when intrinsic event handlers attempt to call that - tog- function. The real - tog - function is defined in a subsequent language="javascript1.3" SCRIPT element.
There are two problems with this. The first is the logic of the targeted language versions. JavaScript 1.3 first shipped with Netscape 4.06 so from that versions on Netscape browsers will be loading language="javascript1.3" SCRIPT elements, and either producing syntax errors as they attempt to interpret the code or runtime errors when they attempt to execute it. Even if people are still using Netscape 4 the odds of them using a pre 4.06 version are extremely low (particularly as, while they were still distributing it, Netscape recommended that nobody use a pre 4.78 version due to serious security flaws in earlier versions).
The second problem, and the totally fatal one, is that sitting in the middle of the language="javascript" SCRIPT element (the one that is supposed to provide the fall-back) is a try/catch block, and try/catch was introduced in JavaScript 1.4, JScript 5 and ECMAScript 3, which translates to Opera 5+, IE 5+, Netscape 6+ (and Mozilla/Gecko/ Firefox). Try/catch is a syntax error in all previously language versions, and the code in elements that contain any syntax errors will never be evaluated. Thus, on (all off) the very browsers that will not process the language="javascript1.3" the SCRIPT element that is supposed to be providing their fall-back will never be evaluated due to the syntax error, rendering the whole exercise self-defeating.
A competent javascript developer would see this within a few seconds of starting to try to understand what the javascript on the page does. Obviously its author(s) did not know enough to avoid writing code that defeated its own best efforts, but that is not unusual in itself as the individual doing a job like that could be quite junior. The significant indication of this is that whoever is in charge of this authoring effort, the most senior/knowledgeable developer involved, did not see this mistake (whether through not looking or looking but not knowing enough to recognise it when seen), and that is incompetence. It is also the norm for Google javascript authoring.
(The apparent absence of any (effective) QA prior to deployment might also be the subject of criticism, but that is Google management's incompetence not its web developer's)
> following standards, correctly posted with correct signature and > quotation, with correct software and there are good spirits in > it, glory glory halleluja .
That only detects the time zone in winter-time. The identifier getTimezoneOffset should not have contained the substring "zone". JavaScript upgraders please note.
-- (c) John Stockton, nr London, UK. ?...@merlyn.demon.co.uk Turnpike v6.05. Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
On Sep 23, 1:44 pm, "optimistx" <optimistxPoi...@poistahotmail.com> wrote:
> Henry wrote: > > On Sep 23, 4:07 pm, jodleren wrote: > >> I know, that there are a lot of people having problems with > >> orkut.com, > >> <snip> > >> I am sure, that other poeple have problems, and I really > >> wonder what kind of problem it is. > > <snip>
> > If its Google then it must be incompetence.
> /* satire mode on */
> Yes, I agree. And if something is Microsoft then > it must be incompetence.
When it comes to the Web, yes. Why do you think they were so hot to buy Yahoo!?
Last I checked, all of their frameworks used server side browser sniffing. What is that stupid tool called? BrowserPigeon or something? It is hard to believe that a company with so many resources could produce such incompetent products, but there it is. And don't get me started on Windows.
>> Yes, I agree. And if something is Microsoft then >> it must be incompetence.
> When it comes to the Web, yes. Why do you think they were so hot to > buy Yahoo!?
> Last I checked, all of their frameworks used server side browser > sniffing. What is that stupid tool called? BrowserPigeon or > something? It is hard to believe that a company with so many > resources could produce such incompetent products, but there it is. > And don't get me started on Windows.
> [snip]
> What an idiot.
May I interest you in one of the *.advocacy or *.evangelism groups out there? Judging from your last posts, you have some serious hatreds, and I'm sure you'd feel right at home in one of those groups.
> >> Yes, I agree. And if something is Microsoft then > >> it must be incompetence.
> > When it comes to the Web, yes. Why do you think they were so hot to > > buy Yahoo!?
> > Last I checked, all of their frameworks used server side browser > > sniffing. What is that stupid tool called? BrowserPigeon or > > something? It is hard to believe that a company with so many > > resources could produce such incompetent products, but there it is. > > And don't get me started on Windows.
> > [snip]
> > What an idiot.
> May I interest you in one of the *.advocacy or *.evangelism groups out
Hardly.
> there? Judging from your last posts, you have some serious hatreds, and > I'm sure you'd feel right at home in one of those groups.
Never mind your judgment or what you feel. It's all OT here.
David Mark wrote: > On Sep 23, 1:44 pm, "optimistx" <optimistxPoi...@poistahotmail.com> > wrote: >> Henry wrote: > sniffing. What is that stupid tool called? BrowserPigeon or
What is wrong with BrowserPidgeon?
> something? It is hard to believe that a company with so many > resources could produce such incompetent products, but there it is. > And don't get me started on Windows.