Cool

Jul 12, 2009 02:12

Javascript...

I seem to have the basics down although I probably just used them to create a godawful bad UI...

I'm also guessing that for most of the things people use it for, they just end up copying one of a bunch of standard pieces of code...

... also what the hell is with firefox doing image scaling by point sampling.

Leave a comment

Comments 9

slgarrett July 12 2009, 13:31:38 UTC
I took a class on Javascript at the local community college. Eventually the instructor basically just left me alone because I'd figured out the whole language in a couple classes. At the end we had to do a class project and the other students were like, "Were you even taking the same class? Where did you learn how to do all that?" It was strange because at CMU I developed an inferiority complex about my computer skills because I was so used to being surrounded by truely brilliant computer people. Then when faced with the rest of the world, I was shocked to discover how far ahead of everyone else I actually was.

Reply


angelbob July 12 2009, 13:58:58 UTC
It's scaling by point sampling because for some effects (notice that "bigger on hover" thing?) it needs to do them really quickly, but not particularly well. There are many fine ways to do similar things and have lots of stuff resize very quickly, so FireFox chooses the sloppy route.

That's not a terrible UI, though the "bigger on hover" thing in a dynamic layout is something I personally find annoying. You're also getting really long URLs with all those parameters -- there are some ways around that. But I'm biased, I usually use Javascript along with Ruby on Rails, so my server can do some of the work, and I can hide a lot of magic.

But yeah, overall, not bad at all.

Reply

r_transpose_p July 12 2009, 16:23:38 UTC
Interesting : It doesn't work on Google Chrome.

I'm going to assume the mistake is on my end...

Reply

tgies July 13 2009, 06:40:43 UTC
Seconding the bit about the "bigger on hover" thing; it's inadvisable to have mouseover effects that cause the page to reflow.

You could put the images in fixed-size containers so they don't reflow the rest of the page.

Reply


angelbob July 12 2009, 14:02:22 UTC
Also, have you discovered the whole prototyped inheritance thing? That's probably the coolest feature of Javascript from my point of view.

Reply


tgies July 12 2009, 18:50:23 UTC
Is it point sampling? Most browsers were using point sampling/nearest neighbor until recently, when they all switched to bilinear at once. I don't know what version of FF you have where you still get nearest neighbor.

Personally, I preferred it when they were using nearest neighbor.

Reply

seriously? r_transpose_p July 13 2009, 02:51:34 UTC
Are you just pulling my leg, or do you have actual reasoning for this (like you care more about getting a pixel-accurate view of the image you're looking at rather than a view of what it represents)

The point sampling done by firefox has always annoyed the piss out of me.

I actually e-mail administrators of websites who use the "height" and "width" tags to downsample their images rather than downsampling with gimp/photoshop/whatever.

Oddly : upsampling by 5/4 on my browser looks hideous, downsampling by 3/4 looks fine. So, naturally, I use the "my image downsampled by 3/4 using tags" as the "small" image in that example (I could also have two images, one for "not moused over" and one for "moused over")

Reply

Re: seriously? tgies July 13 2009, 06:39:06 UTC
Nobody should be using the height and width attributes to resize an image.

However, some people have been doing so for (semi-) good reason. Since the dawn of time, every browser has used nearest neighbor to resample images. Some designers take advantage of this (whether they should or not is another question), when the "pixelated" look is desirable, by drawing tiny images and displaying them at some integer multiple of their actual size.

Suddenly, every browser decided to start using bilinear resampling (which looks like crap for a whole other set of reasons) or "soft" resampling (nearest neighbor with a Gaussian blur applied). This simultaneously made everything that was resizing images in-document look quite unlike it was intended to, and encouraged people to resize images in-document wildly since the resampling artifacts aren't as noticeable for most content now. Horrible.

Reply

tgies July 13 2009, 06:43:41 UTC
(clarifying what I meant here: in my Firefox, 3.5 on Win32, it's using bilinear resampling)

Reply


Leave a comment

Up