?

Log in

No account? Create an account

Rubik's Cube and HTML - The online computery journal thingy of a turtle

Aug. 10th, 2008

10:34 pm - Rubik's Cube and HTML

Previous Entry Share Next Entry

If you say, even jokingly, that you "just peel the stickers off", then you are Not A Cuber.




<img src="" width="" height="">

Why are "image" and "source" abbreviated to "img" and "src", but "width" and "height" are not abbreviated at all? I'd love to type w="" h="" instead of width="" height="".

And I've been making a point of typing them because I've heard that when people set their LJs to use placeholders for large images, LJ uses the width and height tags to determine the size of the image, and if they're not present, it'll placeholder out the image even if it's small.

Comments:

[User Picture]
From:awolf
Date:August 11th, 2008 04:17 am (UTC)

Peeling

(Link)
Peel the stickers off? But they lose their sticky!

The right way to cheat is by yanking the freaking thing apart and recombining it in the right order...

Trickster
(Reply) (Thread)
[User Picture]
From:kinkyturtle
Date:August 11th, 2008 04:44 am (UTC)

Re: Peeling

(Link)
Right!

Of course, a true cuber doesn't need to cheat, but might need to take it apart to lube it for speedcubing.
(Reply) (Parent) (Thread)
[User Picture]
From:awolf
Date:August 11th, 2008 02:09 pm (UTC)

Re: Peeling

(Link)
Riiiiiight... That's why I lube them, for, um, "speedcubing".

^o.o^;

Trickster
(Reply) (Parent) (Thread)
(Deleted comment)
[User Picture]
From:orv
Date:August 11th, 2008 07:02 pm (UTC)
(Link)
I'm thinking maybe by the time they added "width" and "height", network speeds and storage space had increased enough that it was no longer worth making it harder to remember just to save four or five bytes per tag.

I'm reminded of the perennial complaints about the UNIX "passwd" command, where the abbreviation saves two keystrokes on a command you might type once a month at most, while making it harder to remember. (In that case, though, the real reason is that some early systems were limited to six-character filenames.)
(Reply) (Parent) (Thread)
[User Picture]
From:octan
Date:August 12th, 2008 01:20 am (UTC)
(Link)
Wow. Given UNIX's propensity for compact command names one would expect them to go with "pwd." Unless that was already taken.
(Reply) (Parent) (Thread)
[User Picture]
From:orv
Date:August 12th, 2008 01:54 am (UTC)
(Link)
pwd is Print Working Directory, but I don't know if that predates passwd or not. I think passwd was actually a name carried over from some other OS, possibly Multics.
(Reply) (Parent) (Thread)
[User Picture]
From:kinkyturtle
Date:August 12th, 2008 01:57 am (UTC)
(Link)
So passwd pwnd pwd?
(Reply) (Parent) (Thread)
[User Picture]
From:aatheus
Date:August 11th, 2008 06:13 am (UTC)
(Link)
*spoken in an Ahnold voice* I am nut a cubeh!
(Reply) (Thread)
[User Picture]
From:electronin
Date:August 11th, 2008 01:21 pm (UTC)
(Link)
I used to speak a little Cube, but it's been awhile.
(Reply) (Thread)
[User Picture]
From:kinkyturtle
Date:August 11th, 2008 09:18 pm (UTC)
(Link)
Really? L2 R2 D2 L2 R2 F2 B2 D2 L2 R2 F B- U2 D2 F- B !
(Reply) (Parent) (Thread)
[User Picture]
From:thecanuckguy
Date:August 12th, 2008 09:07 pm (UTC)
(Link)
My mother did *what* to R2D2??????
(Reply) (Parent) (Thread)
[User Picture]
From:linnaeus
Date:August 11th, 2008 04:00 pm (UTC)
(Link)
IANAC, but who over the age of six would try taking the stickers off? Turn one row 45 degrees, and use a screwdriver or similar tool to pry one of the middle pieces with two colors on it, off. The rest of the pieces will come easily from there. Reassemble as desired, then go play with the Rubik's Snake, which is fun for a while, or the pyramid shaped one, which is way easy.
(Reply) (Thread)
[User Picture]
From:kinkyturtle
Date:August 11th, 2008 09:10 pm (UTC)
(Link)
Yeah, exactly!

But you'd be surprised how many people think they're being funny by saying, "Oh, I know how to solve that! My solution involves peeling off the stickers..."

Edited at 2008-08-11 09:46 pm (UTC)
(Reply) (Parent) (Thread)
[User Picture]
From:kinkyturtle
Date:August 11th, 2008 10:02 pm (UTC)
(Link)
Actually, I know of one good reason to peel the stickers off a cube.
(Reply) (Parent) (Thread)
[User Picture]
From:octan
Date:August 12th, 2008 01:23 am (UTC)
(Link)
The colorspace one is one of those delightfully nerdy things I would love to own just for the novelty of it. It's like tie-in merchandise for the entire computer world!
(Reply) (Parent) (Thread)
[User Picture]
From:thecanuckguy
Date:August 11th, 2008 05:15 pm (UTC)
(Link)
And I've been told that "width" and "height" aren't necessary/ideal/recommended because different browsers display them different ways (the bane of any web designer). I haven't used them for a long time (or at least, rarely), when I need a differently sized image from the original, I can quickly resize in Paint Shop Pro (my preferred graphics program, still haven't gotten the hang of all the bells and whistles of Photoshop, but they can do most of each other's stuff I've found) and use the resized image where warranted. (Take a look around the source page of www.homepagesplus.com or any of my clients and experiment if you want to find a large repository of non width/height tagged images*

*Note, when I'm lazy/pressed for time/working with a bit difficult code, I do use Dreamweaver to web design, and it seems to automaticaly put in width/height tags, so if you do find one on one of my pages, it may have been added by DW.
(Reply) (Thread)
[User Picture]
From:orv
Date:August 11th, 2008 07:00 pm (UTC)
(Link)
I think "width" and "height" are OK if you're just using them to inform the browser of the actual image size. Using them to ask the browser to resize an image is usually a bad idea, though.
(Reply) (Parent) (Thread)
[User Picture]
From:toonygal
Date:August 11th, 2008 07:57 pm (UTC)
(Link)
You shouldn't use width and height to specify different dimensions for the image, but in some cases it's actually a good idea to tell the browser the width and height of your images.

Many people surf the web with images turned off. In some cases, your page layout could be compromised if width and height aren't specified. In other cases, if your image is small with long ALT text, defining the width and height could cause the ALT text to be hidden. But I see no reason not to specify it if you have a medium to large sized image with short ALT text.

And in KT's case, it's clearly beneficial for him to define the dimensions.
(Reply) (Parent) (Thread)
[User Picture]
From:akseawolf
Date:August 12th, 2008 04:19 am (UTC)
(Link)
There is a huge difference between omitting height and width tags of an image on some random website and in a Livejournal post. Namely this: Image

My friends page is full of dozens of Image, mainly from syndicated RSS feeds and people posting in communities. Want to see how bad it is for yourself? Just go here and select Image placeholders.

At least KT does it right so I can see his images without any extra work.
(Reply) (Parent) (Thread)
[User Picture]
From:kinkyturtle
Date:August 12th, 2008 05:02 am (UTC)
(Link)
I think it was you talking about this previously that made me decide to always include the width and height tags. And, my rant about abbreviations notwithstanding (whatever that word means), it's easy enough to do. First I type the angle brackets:

<>

Then I hit left-arrow and fill in the element and tag names:

<img src="" width="" height="" alt=""> (Yes, people, it's worth adding the alt tag too.)

Then I look at the image, select-copy the URL, memorize the width and height values (which is usually only six digits total), come back and fill them in, and then write the alt text. It's assembly-line efficiency, which especially comes in handy on a project like my Q&A cartoon post!
(Reply) (Parent) (Thread)
[User Picture]
From:discopanda
Date:August 12th, 2008 09:35 am (UTC)
(Link)
I think techincally you'rew supposed to include the alt attribute even if you leave it empty. And if you do use the alt attribute for something you want to pop up when someone hovers over it, a matching title attribute is often suggested - some browsers ignore it otherwise.
(Reply) (Parent) (Thread)
[User Picture]
From:thecanuckguy
Date:August 12th, 2008 09:13 pm (UTC)
(Link)
Yes, "alt" is at least one tag I like to add all the time, for several beneficial reasons. However, I don't use it for images that are things like mere design choices (like for example, a quarter circle placed at the corner of a text box to give it a rounded look. But images that have a purpose and are there to illustrate, yes, I do try to have alt tags. (The most recent project I did though I was in a bit of a hurry to finish and didn't put alt tags in, time to go back and fix that I guess!)
(Reply) (Parent) (Thread)
[User Picture]
From:toonygal
Date:August 13th, 2008 03:28 am (UTC)
(Link)
Yeah, you are supposed to add it. If you're writing HTML 4.01 or above, your code won't validate without it.
(Reply) (Parent) (Thread)
[User Picture]
From:akktri
Date:December 11th, 2008 06:53 pm (UTC)

Rubik The Amazing Cube

(Link)
And if the bad guy only knew that peeling off the stickers is all he had to do, he would have been able to harness Rubik's amazing powers and get rid of those kids once and for all. Getting rid of Menudo would have been a tad more difficult, however.
(Reply) (Thread)