Thursday, February 13, 2014

Random geeky shit

As some of my vast readership knows I moderate over at Sadly, No!. About once a week somebody has trouble with linking or otherwise bolding/italicizing comments so I wrote this up as a comment over there. It was long enough for a post of its own (slightly tweaked for context) for posterity, so, here you go:

Here's what all that angle bracket shit you're using for linking/bold/italic/etc. means.

This is about HTML. Now I'm sure most of you have heard those letters before, and many will know what they mean, this isn't for you. Stop reading.

Really. Stop. Fine, it's your brain.

HTML stands for "HyperText Markup Language" which itself used SGML, the "Standard Generalized Markup Language" to define its concrete syntax.

Basically what that means is that's where the angle brackets (<>) that we use to mark the text for special consideration come from. Beyond that SGML is mostly just historical at this point and you should read the wackypedia if you care.

The markup that FYWP (and Google/blogspot, also, too, mostly) allows us to use in comments is a very small subset of HTML -- quoting, italics, bold, strikeout, etc. All of the markup we use has its corresponding tag. A "tag" is what marks the beginning and ending of "special" text -- stuff we want to make bold or turn into a link. Tags start with a left angle bracket (<) a.k.a. "less than" and are immediately followed by one or more characters. In the case of the link tag, it's "a" as in "anchor." That's what it was called back in the day as its main use was to "anchor" one part of a document to another so you could jump back-n-forth glossary/index style. Nobody gives a shit about that anymore.

After that opening bit some tags can be immediately closed with a closing right angle bracket (>) a.k.a. "greater than" (e.g. <i>) -- other tags (e.g. <a ) should be followed by one or more attributes. An attribute is just that, more stuff that describes the tag, and so affects the human-readable text inside the tag's opening and closing markers.

Links can have a few different attributes, but the one we really care about is "href."

The "href" attribute specifies the "hyperlink reference" that the anchor points to -- just a fancy name for what we know as a link, a.k.a. "URL" -- "uniform resource locator" (or "URI" -- "uniform resource identifier" more currently correct).

So to put that all together, we add a space after our "<a" then add our attribute and its contents. The attribute name must be followed by an equals sign (=), that's the separator that tells the parser that this attribute contains a value and isn't just an on/off flag, and that should be followed by a quote character (single or double, doesn't matter) to delineate the actual start of the attribute's contents, the URL.

A URL can be a very complicated thing, so I'll just describe the most basic use, pointing to a simple file/resource on a web server. Such a link needs to start with "http://" because that tells us we want the "HypterText Transport Protocol" and not something else, like FTP ("File Transfer Protocol") or something. There are other protocols, but you don't care about those (or any of this, really. Why are you still reading?) After the dual slashes (again used as delimiters and also required -- just one doesn't cut it) we have the name of the internet server (domain name) e.g. "www.google.com". Yes, of course you could use the server's IP address instead of its domain name, why couldn't you? Do you really want me to get into IPV4 notation too? IPV6? You monster!

Ahem.

The name (yes, or address) is followed by another delimiting slash. And then you get to the actual stuff you want to look at on that particular server -- the path that points to the file and/or actual resource you're looking for, (e.g. "/the/internet/is/a/silly/place.html"). There are lots and lots of things that can be contained in that string, but since most of you wankers are just copying and pasting them from somewhere, you don't care.

Anyhoo, the URL is then followed by the closing quote character -- of course it has to match the opening character -- symmetry! -- and the closing right angle bracket >

All that just gets us our opening tag. See, it's easy when you don't think about it!

To recap, what we have so far:

<a href="http://a.server.name/the/internet/is/a/silly/place.html">

After the opening tag, you put whatever you want to actually be displayed to be clicked on, typically:

PENIS

That's the "contents" of the tag. The human-readable shit that we're meant to see. Get it? We have like, these magic pairs of less-than/greater-than doohickys with things in them that tell the computer what to do, and we put human readable shit in-between pairs of these other pairs. We good so far? No? Tough, you shouldn't even be reading this anyway.

Now... wait for it... we need to close the tag. Guess what that is? Yep more brackets and slashes and shit. Closing tags don't get attributes, so at least we have that going for us. In our example, it's simple -- we need to start the tag with our left angle bracket (<), then tell the parser that this is going to be a closing tag by putting yet another slash (/) in there. Then that needs to be followed by the corresponding type of tag we're closing -- it's an "a" for "anchor" remember? -- and then we close the closing tag (yes, what of it?) with that final, delightful, right angle bracket (>). That combination should look like this if you've forgotten already: </a>

That's it, we have a link, it should look like this:

<a href="http://a.server.name/the/internet/is/a/silly/place.html">PENIS</a>

Now, to really blow your minds, we can nest that shit to combine it all together. You can figure that part out, the key is symmetry and matching the opening and closing pairs.

If you read this far, guess what you get?

Yep, it's a PENIS:

Friday, February 7, 2014

Stop

The sign says it all: this can stop anytime now.  Please.

Friday, January 17, 2014

Gourmet

This is what happens when your wife goes out with her friends and you get to make ridiculous food for yourself:

Frito Pie.

That's Fritos®, a can of chili, Tillamook® cheddar, and pickled jalapeños.

And yes, that's a paper plate.  It just seemed... appropriate,  somehow.

Fucking. Delicious.

Monday, January 6, 2014

Hoppy New Year, Belated Edition

Now that this new year is almost a week old and my very relaxing, almost-entirely-away-from -the-internets vacation is over I've discovered I should probably have an even longer break. I'm short on vacation time, have 17 metric shit-tonnes of work to do my "real" job, and a whole bunch of new brewery equipment (Conical! 1+ barrel per batch! Glycol cooling! Digital control! Shiny shiny!) is taking up the rest of my free time. I think I'm gonna just have to let this little mostly-unread corner of the intarwebs languish a bit for a while.

I'll be around, likely occasionally dropping ill-conceived drunken comments at the usual haunts, and continuing to delete idiotic troll comments over at Sadly, No! There will probably be some hideous photoshopped monstrosity that yearns to be created that brings me back sooner than I should be. Otherwise, drop a comment on this post if you have some silliness that won't wait.

Later, taters.

Thursday, December 19, 2013

War On Christmas: Battle Of The School Concert

It was a brisk, drizzle-filled night, as the troops marched toward the festively lit auditorium. The mood was generally light and upbeat, as the least religious place in the country did not expect the other side to put up much of a fight. Oh how we were wrong. So, so wrong.

It started innocently enough, with a packed house facing an undecorated stage filled with chairs for the band and a raised choir platform. A few of the troops glanced suspiciously at the decorated tree next to the sound board, but didn't think much of it. A generally optimistic platoon chatted lightly as some students took the stage.

Then, suddenly, we were under assault! Without even a chance to realize what was happening, the choir broke into "Oh Come All Ye Faithful." I watched veterans wince and writhe in agony, some barely able to hang onto their seats as the onslaught battered them. How was this happening? We knew no battle plan survives after the first shots are fired, but we were so unprepared for this. How could we be so naïve?

The strong among us fought back, glaring and grimacing menacingly at the stage until this first volley was past. Expecting our valiant troops to fire back with shouted boos and hisses, we hardened veterans were shocked to see our fellow soldiers applauding heartily! What is this treachery? Had we been infiltrated unknowingly by Christmas troops? It's like they knew our every move before we could react. This was going to be a bloodbath.

At this point the more experienced among us realized we must hold our ground as best we could and hope for a chance to retreat and regroup. This was a wholly unexpected attack from heretofore unknown quarters of the enemy, somehow secreted away in our former bastion of safety. Was everything we knew a lie? They had recruited our own kin against us! This must not, cannot, be allowed to succeed!

As the troops exchanged worried glances, the next assault began... But lo, what is this!? It's "Winter Wonderland"! Huzzah! All is not lost -- to arms! To arms!

Buoyed by this turn in the battle, we knew we still had a chance. Our children had not fully succumbed. The battle would go on... and on... and on...

After an hour and forty minutes of back-and-forth, the troops on both sides were bloody and bruised. Some had slumped in their seats, either dead or feigning so to avoid further agony. Overall the battle was almost even with many casualties on both sides, but we had the upper hand. Then the choir appeared alone, with hardbound books cradled gently in their outstretched hands. What is this? What fiendishness do they have planned now?

The grinning choir leader then announced... A LATIN MASS! But how... why... This just isn't possible. The dejected remaining troops were visibly taken aback, a stunned silence reigned, but we held firm. We couldn't let them beat us, not after making it this far.

Oh, were we not prepared for what followed. Endless indecipherable Latin, ebbing and flowing, rising to a hopeful crescendo of "Hallelujah, hallelujah" -- this certainly must be the end -- no, there are still more pages in that dastardly book of theirs. It went on... and on... and on...

...

And on... and on... until finally, after 20 long minutes of brutality, it was over. We sat stunned, shocked at this terrible savagery. Where could this have come from? Here, in our stronghold? It was inconceivable. How could they win here of all places? We were ruined.

And then, just as we prepared to gather the dead and retreat, defeated, the choir leader approached her microphone... What, is it not done? What horror can you further inflict on us, you MONSTER? We braced ourselves, we were surely all doomed... What is she preparing to say? Just get it over with!

"Have a nice night, happy holidays!"

Huzzah! The battle was long and many were lost. In the end, we managed the ultimate victory! Oh the joy, the relief!

This day will live forever as one of the greatest battles in this long war. May our valiant troops around the world take heart and never give up. Stay strong warriors, stay strong!

Happy holidays indeed.

Friday, December 13, 2013

The Reverse Boehner

Tengrain over at Mock Paper Scissors posted the original video of Weepy McStagger, but I wanted to see what it looked like reversed:

Now I think it looks like he's saying "I think I did a pretty good job?" which is even more appropriate. And the look at the end is priceless. Alternate ideas of what he might be saying/thinking in this reverse universe are of course welcome.

Friday, December 6, 2013