Best part, from the header comment: "Seems to be perfect."
- Joel Webber
I like how it is all formatted for 80 char lines.
- Nick Lothian
There's a bit of code at Google that suffers from "ugly because of the 80-char line limit" syndrome. Seriously, who edits at 80 characters within the past 10 years?
- Joel Webber
They're filming the movie "Zombieland" in Decatur just down the street from my house. So want to hang with Woodie Harrelson -- that would be a truly crazy night, methinks.
- Joel Webber
from email
Well, I believe it may have been a Quick Trip at some point in the past. But it was then changed to "Hi Tech", which I've never seen anywhere else. They put up the Gas & Gulp signs for the movie, then took down all of them except for the medium-sized one above the pumps, which they've left for no obvious reason. So now it's *both* Hi Tech *and* Gas & Gulp! I just don't think they care...
more...
- Joel Webber
Thievery Corporation show in Atlanta last night. Fan-freaking-tastic. If this show doesn't get you moving, you must not have a soul.
Rob and Eric make great music. I'm jealous
- Andrew Bowers
Delta.com disaster. This simple little page contains 150k of CSS, and over 500k of Javascript split across 10 files. Oh, and it's completely broken on WebKit.
Notice how "credit card number" is selected, yet it's still prompting me for a SkyMiles number. I think this fairly well demonstrates how badly things go wrong when you use HTML templates and just "include a bunch of common scripts" that you might need on any page. God, what a mess.
- Joel Webber
650k for style and JavaScript... At that size one's better off with Flash ... xP
- Pandu ● IT Optimizer
from fftogo
And to make matters worse, probably 99+% of it isn't even used for anything on the page. I've seen so many apps like this, where template monkeys just started throwing random javascript into template headers, with no idea whether or where each script is needed. Then they have no decent tools to analyze it, so it just keeps growing, because everyone's afraid to pull anything out.
- Joel Webber
It's a beautiful 7-string monster. Unfortunately it's so much louder than the old one that I have to take it into the back yard to play if the baby's asleep...
- Joel Webber
Just discovered that getElementsByTagName('*') is on average slower, on most browsers, than implementing a trivial DOM walker in Javascript. A bit surprising, n'est-ce pas?
Ok, so the Javascript version's a little bit slower on IE6, but not by much. Does anyone know of a faster way to recursively walk all of an element's children? (jQuery just appears to use getElementsByTagName('*') afaict).
- Joel Webber
Somewhere over the past couple of weeks, Chrome/Mac became a *lot* faster. Window resizing, scrolling, and all that just jumped an order of magnitude in speed. So happy.
My previous post on this subject apparently offended some troll, for reasons I can't quite comprehend. If anyone has a spare moment, it would be great if they could have a look over this to make sure I'm not missing anything important. It's just in my nature, but trolls get under my skin, and I like to be *really* sure I'm right, and not dismissing legitimate concerns (however rudely expressed).
- Joel Webber
My impression of the previous commenter was that he basically said "your results don't jive with my assumptions, so I'll quote the spec at you". The test page linked from the second page is 404ing for me though.
- Matt Mastracci
Doing a search for Garrett Smith turns up several articles, Amazon reviews, and comments that are basically the same as what he posted on your site. It seems he's made it his life mission to tell everyone that they're wrong about JavaScript, but I haven't figured out where he gets that authority yet, though. Your article seemed reasonable, but I admit that I lack the knowledge base to provide constructive criticism on what you may or may not have gotten wrong.
- Mark Trapp
Thanks, all. I really shouldn't let the trolls bug me, yet somehow they always do. @matt: whoops, thanks. Forgot to upload the file. Will fix that momentarily.
- Joel Webber
I think your methodology and tests are fine and test exactly what you are looking at. My Chrome numbers are surprising (closure sometimes beat locals!) but I wouldn't but it past the JIT. My only thought here would be that you could up the # of tests an order of magnitude to help remove some of the timer jitter.
- Matt Mastracci
Yeah, I was surprised by the fact that closures sometimes beat locals on Chrome as well. But as you say, that JIT is pretty sneaky, so you never can tell. I may try bumping up the numbers at some point, but they don't jitter too badly averaging over 100 runs, so I'm guessing the variance isn't too high. If I weren't so lazy, I would set it up to calculate variance and confidence, but I *am* lazy :)
- Joel Webber
Hah yeah. I don't get much in the way of jitter on OSX. Maybe I missed the high-resolution-timer revolution, but browsers seem way better at timing these days. In the past I'd only ever get 15ms resolution on setTimeout() or Date stuff.
- Matt Mastracci
Interesting conclusion from your test: if you use a non-local more than twice (insert exact hand-wavy justification here), stuff it into a local.
- Matt Mastracci
That's a really good point. In general, I suspect there's some crossover point where it becomes better to declare a local cache for multiply-referenced globals. The scary implication of some of these measurements is that you'd have to do browser-specific code generation to get optimal results.
- Joel Webber
Just got my new MacBook Pro 17" set up. I might be annoyed with apple lately because of their obnoxious iPhone app policies, but damn this is a nice machine. It's fast as hell, the screen can only be described as epic (1920x1200 @17"), and it includes the largest battery I've ever seen in a laptop.
I was pretty shocked. I actually didn't even know about the battery improvement when I bought the thing. I knew about the sealed battery, and assumed it was a bit better, but that "5:13 remaining" is actually discharged about 10% or so. That's just scary. Now my biggest problem is that the screen resolution's so high that I keep having to zoom web pages. Or maybe I'm just turning into an old man...
- Joel Webber
Time to lobby for the Google Java code standards to change the line length to 120. ;)
- Matt Mastracci
Yeah, and to make matters even worse, we stuck with 80 in the GWT code base because that's what it was when we started. But I will say that I now believe line-length standards should really be based upon how wide it is in a tool like Rietveld (http://codereview.appspot.com/) when you've got two pages lined up horizontally to diff them.
- Joel Webber
Good point. If Rietveld understood Java and could re-wrap it appropriately, you could just split it based on the browser size and have readable, reformatted code.
- Matt Mastracci
My dell inspiron will do 6 hours comfortably. :) If I'm draconian enough with the settings :)
- Roberto Bonini
from iPhone
Hey, if the bible says it's wrong, then it should be illegal, n'est-ce pas?
- Joel Webber
It actually took me a minute to notice that it was a joke. But there are a few comments toward the end of the interview that make it pretty clear. Quite funny, actually.
- Joel Webber
If someone marries an armchair, goat or oak tree but later decides it was a mistake, they should be free to divorce!
- Matt Mastracci
Love him or hate him as a president, you have to admit that Carter is really an amazing model of an ex-President. He works tirelessly for what he believes in, and to this day is known to frequent Habitat for Humanity work sites, banging nails alongside everyone else.
- Joel Webber
That was my immediate reaction as well. At first I assumed it was just picked up there, but that appears to be the canonical version. You never know with Carter -- maybe the big US papers are peeved at him for telling inconvenient truths?
- Joel Webber
Interestingly, Jewish oral tradition includes a story of how god created a woman before he created man.
- Aram Zucker-Scharff
Just got my Clear wimax service set up at home, and it works like a champ (6M down, 0.5M up, and I get a USB dongle I can use with my laptop all over town). No more at&t, no more bellsouth, no more comcast, nada. The only wire connected to my house is power. I don't know why this makes me happy, but it does.
I'm interested in how you like it after some time. Clear is in Portland, but I'm so used to wired internet I'm skeptical to try it out. I'm interested in the usage cap question, too.
- Mark Trapp
Ah, but what is the ping latency? I won't take anything over 75ms, as it makes killing people online in first person shooters extremely difficult. :)
- Ray Cromwell
I wanted to get Clear, but they don't work in my immediate area. I was all excited about it too :(
- Rahsheen ™, Coach of FF
The ping times to relatively local servers tend to be around 70-80ms. Not a speed demon, to be sure, but I haven't played an online shooter in quite a while.
- Joel Webber
I've got a custom cross site linker for our website that loads script data in the global scope vs a closure. Might be interesting how the code generated by the two linkers stacks up.
- Matt Mastracci
from iPhone
I assume that you know you're not going to run into namespace conflicts on your own site. I was actually fairly surprised at how much slower access-via-closure was. I guess we're never going to be able to fully get rid of those bloody script frames if it makes that much of a performance difference :(
- Joel Webber
I always tell my kids to define Javascript variables in the basement.
- j1m
Yeah, our son always surprised us when he was little. It's easy to confuse lack of experience with lack of reasoning.
- Matt Mastracci
The newspaper worldview is so funny. One of the world authorities on baby cognition writes an article on the subject she's an expert on, and she's an "Op-ed contributor."
- j1m
The more I read about the lies and misinformation on both sides of the healthcare debate, the more it makes me want to support Lessig's "Change Congress" (http://change-congress.org/). If we don't change the way we fund elections, we're never going to be able to separate fact and fiction.
I find it funny when a site snoops my IP range (I assume) to offer me specialized extra advertising. Seems like a lot of trouble to go through manually for one group of employees. Should see if they do the same thing for other companies.
I've seen that for non-RSS referrals, like it shows up only if you didn't click on it in an RSS feed, but never based on IP address: I guess because I don't work for a large corporation. I don't particularly understand the point of it: I ignore it just like any other ad.
- Mark Trapp
I believe this happens when it is detected that someone is using Google Reader to get to your blog. It's a WordPress Plugin. [edit] Greet Box: http://omninoggin.com/project...
- AJ Kohn
It says so when you come from Google search too.
- Jérôme Flipo
Ok, all, I've been meaning to do this for a week or two: I've got 9 Google Voice invites. First 9 commenters have dibs. I'll post more as soon as I get them.
@Thomas, Jean-Lou, Rick: If you can DM or post your emails, I'll send out the invites. @Noah: I don't know that it's unusually cool, but it's pretty useful.
- Joel Webber
I just sent these out directly to FriendFeed email addresses. Please let me know if you have any problems accepting them in that form.
- Joel Webber
@All (except Rick, who already accepted): I've sent these to the @friendfeed.com email addresses. If that doesn't work for you, please send me your regular emails and I'll resend.
- Joel Webber
It would be nice to have Google Voice (actually, I got invite to it earlier but can't start to use it in since I'm not living in USA). I'm from Finland and while Google has their office and datacenter here, still no sign of Google Voice here.
- Daniel Schildt
@Daniel: I can't say definitively, but my guess would be that navigating the labyrinthine European telecom system, with its various entrenched monopolies, might take some time (it's bad enough here in the US). I suspect the team is working hard on this.
- Joel Webber