Povert

It's Pronounced "Pah-vert." You povert.

Archive for the ‘WWW’ Category

This Blog’s “Design”

Thursday, May 31st, 2012

I really, really dislike this blog’s appearance. I hate the layout, the fonts, the titles, everything. There are a few things standing in the way of me changing it:

  • Not worth the trouble: almost no one reads it, and there isn’t much reason for anyone other than some friends and family to read it. There are a few posts that get regular hits, but it’s a very small number.
  • I have no taste. Or, to be charitable, I’ve not developed my taste beyond realizing that this looks hideous.
  • A new design will have to accommodate old posts. Image alignment, lists, maybe other things.
  • No time. What little free time I have I’m spending with my kid and wife, or sometimes on video games. Also, I try to read, so I can arrest or at least slow my descent into mental mediocrity (it’s not working).
  • I would be too ambitious. It would have to work in every browser in the history of the multiverse. It would be responsive. Et cetera.

Maybe I’ll buy a template? I don’t know.

highlight.js

Wednesday, December 8th, 2010

I’ve been working on a little bit of javascript in my spare time. The New York Times has recently employed a bit of code that allows you to highlight sentences or paragraphs using a hash in the story’s URL.

I think that’s a fantastic idea. I’ve thrown together some JS to do this. It’s available here. As a happy bonus, it allows for a range of sentences and it doesn’t require a page reload to highlight parts. The sentence selection, however, is terrible. So if anyone has any suggestions, please fork and put in a pull request.

My code does allow highlighting some stuff while jumping to another part, which I think is pretty neat. That is, “Read starting here, but really pay attention to this.”

(Also, Ken: No, you’re a nerd)

localStorage

Thursday, August 19th, 2010

I’ve been making plenty of use of localStorage in javascript apps lately.  It’s a very simple way of storing data in the browser that can persist across sessions.  If you want to learn more about it, check out the Local Storage chapter in the excellent Dive into HTML5 web site / future book.

Anyway, I’m using it on a new version of flappingcrane.com to get around the downside to a recent security fix in Safari.  I wanted to have the icons for skits that have already been watched by the user to be translucent.  That’s normally a very easy thing to do using CSS:


.skitIcon a:visited {
opacity: 0.5;
-moz-opacity: 0.5;
}

However, there’s kind of a clever security problem with this.  In a nutshell, I can list a bunch of links on a page and give some CSS property to visited links.  Then if you visit the page, a script can examine those links and see which ones have those properties, thus telling me which of those sites you have visited.

A recent version of Safari disabled styling on the :visited pseudo-element for this very reason.

Anyway, this is less of a concern on something like Flapping Crane.  We can track what skits you watch, how much of them you watch, how often you pause them, etc.  While that might creep some people out (we only track hits or plays, but I’m sure many, many video sites track a lot more), there’s no serious security issue with that.  I can tell that you’ve watched “Bugles” 145 times (weirdo), but I can’t tell what other creepy web sites you visit.

So, while we can keep track of what client IP has watched what, there are a variety of reasons why I really don’t want to do that in order to style a few links.  One, I like to keep DB interactions to a minimum (hah).  Two, it makes for some clunky, ugly interactions that seem like overkill for a little opacity effect.

I’m sure you can see where I’m going with this.

When you watch a skit (again, on the new site I’m working on), if your browser supports localStorage, it’ll record that you’ve watched it.  Since it’s stored in your browser, there’s no need for querying the database.  Then, when listing out the skit icons, ones that have been viewed get a “watched” class.  Any CSS I want can be applied to that.

This is nothing that couldn’t be accomplished by a variety of other means, but it is nice to have such a remarkably simple way of doing it.  I haven’t decided if I’m going to put in a way to do it with cookies, which have more limitations.

New Flapping Crane Site

Thursday, February 11th, 2010

The new version of Flapping Crane is up, along with a strange video to commemorate it.

You’ll notice that Pete mentions a new web site and says “2008”. Yup, been working on it for that long. Longer, even.

The site had stayed unchanged design-wise since at least December 2005. I was kicking ideas around for a new version at least since 2006.

In early 2008, I had a conversation with Shawn, who came up with this mock:

FC-2008-website-c2.jpg

It’s had a lot of changes since then (Alex had some ideas for simplifying the interface), but that’s basically the same as what is live now.

Part of what took so long was that early on I tried to do way too much. I later decided to drop “buy” and “pics”. They may come back later; I haven’t decided. We also drop a lot of the video categories. There were just way too many.

I’ve changed the way that “Most Popular” is determined — the top six skits were listed as the most popular for about 3 years. So now it displays the most popular from the last 2 weeks. It’s kind of interesting that way. It changes up a lot.

Anyway, for anyone interested in the nitty-gritty, the site uses YUI 2.6.0. I considered updating it for 2.8.0 or even 3.0, but I’d already Duke Nukem’ Forever’d this thing long enough. It also makes minor use of Modernizr, mostly to detect whether the browser supports h264. Eventually the site will support ogg theora too. That’s a lot of skits to convert. At the moment, Safari and Chrome will display the videos natively, while all other browsers will use flash (JW Player).

I’ve only done minimal fixes for Internet Explorer. It works in IE 6-8, though it doesn’t look as pretty. I’ll mop that up later. Maybe. See the FAQ on the new site for my attitude towards IE in general (IE 6 in particular).

Also note that the videos are much larger, screen-wise. They are 640×360 for wide and 640×480 for standard. I re-encoded almost every single Flapping Crane video, not counting outtakes, which aren’t on the new site anyway (at least not yet).

Finally, if you were bored enough to make it this long: Yes, there will be new skits. I bought a house, got married, got a dog, etc. Haven’t had a lot of time to edit videos and get this new site up, so it may be a while before any truly new skits show up. There are, however, some skits that haven’t been put up yet that I may sneak in *COUGH*toofies*COUGH*.

And yes, there will be actual new, recently shot skits up soon. Well, eventually.

Povert is proudly powered by WordPress
Entries (RSS) and Comments (RSS).