Pew Pew Laser Blog

Code. Glass art. Games. Baking. Cats. From Seattle, Washington and various sundry satellite locations.

Past Blogs

Lines From the 48 Hour Film Project.

6.28.2011

I now present (slightly dramatized for brevity and amusement) some things overheard during Brainful Productions' 48 Hour Film Project from this year.

We're cutting the belly dancer.

Last year, we cut the mermaid.

I'm writing the software to do that this week.
Later: I found a bug in my software. It deleted all my files.
Your inspiration is Honey Badger Don't Care.

Cutting the Cable.

6.22.2011

In February, the husband and I ditched our Comcast cable. I am happy to report that there has been no insanity, and no loss of happiness, and no one has died. And we get to keep an extra $60 a month.

Sure, it was tough saying good-bye to Mythbusters, The Soup, BBC America and everyone over at The Food Network. But it's been very peaceful simply turning the TV off, rather than leaving our guilty pleasures (such as House Hunters, Storage Wars and Attack of the Show) on all the time.

Our transition was helped by a friend and new neighbor moving in just 2 blocks away from us. She's got a satellite dish, and gracefully allowed us to come over and watch Chopped All-Stars. We even turned the series finale into a Chopped-style competition, where my dish was roasted blue potatoes crusted with Goldfish crackers, and a chocolate dipping sauce.

The best thing about having cable (since Battlestar Galactica ended) was having a Digital Video Recorder. After much research, the husband found a suitable replacement DVR: the Sezmi. It's a pretty reasonable deal at $150 to buy the unit and $5 a month for the TV listings service. It records over the air broadcasts so that we can watch when we're ready, and even learns your preferences and records more of what you want (like a Tivo). So far, the Sezmi discovered that the husband likes Star Trek: The Next Generation, and that I like Let's Make a Deal.

A small confession: we technically still have cable. It was $1 cheaper per month to keep the most minimal cable package and bundle it with our internet service than to get rid of all cable completely. The only extra channel this gives us is Discovery, and it's currently only connected to the bedroom's TV. So it's just like we don't have cable, except sometimes when I'm folding laundry.

Next on the agenda, we will buy our own cable modem instead of renting one from Comcast for $7 a month.

Cube Glass Paperweight.

6.19.2011

Cube Glass Paperweight Two years ago, I made this paperweight in my first glassblowing class. I flattened the edges by letting the glass rest on the marver for a few seconds on each side. The inner blue color is twisted scrap color (pieces from other work which broke), and the red dots are frit on another layer of glass.

Even though they can be quite complex, abstract paperweights are popular form in beginner's classes.

In a paperweight, just a little bit of color will go pretty far. Different of color (or bubbles) can be layered onto a paperweight by dipping the piece into clear glass.

Remember When?

6.12.2011

Remember the time before cell phones, when you couldn't be instantly contacted by everyone in the world? Remember a time when answering the phone meant identifying who you were, not where you were?

getElementsByClass.

6.6.2011

You know about getElementById(), and getElementsByTagName(), but what about getting elements by class?

Yes, there is a native JavaScript function getElementsByClassName(). It is supported by FF3+, Safari 4+, Chrome 4+, Opera 10+, but not IE6, IE7, or IE8.

Here's a simple way to take action on all elements with a given class:

var theScript = document.createElement('script');
<h2 class="myAwesomeClass">My Awesome Header</h2>
<p>This is a paragraph.</p>

<script type="text/javascript">
elems = document.getElementsByTagName("h2");
for ( i=0; i<elems.length; i++ )
{
if ( elems[i].className == "myAwesomeClass" )
   { elems[i].style.color = "red"; }
}
</script>

For the HTML shown, the JavaScript creates an array of all elements with a given tag name. A for loop checks the class of each element in the array, and performs some action on that element if its class matches. (If your class occurs on multiple types of elements, just specify "*" for the class name. )

This is a pretty good solution for just a few lines of code. For lots more flexibility with just a few lines of code more, Dustin Diaz has written his own getElementsByClass function.

Oh! Chocolate.

6.1.2011

Truffles from Oh! Chocolate Last year, I used one of my Groupons at Oh! Chocolate - a Seattle chocolatier / confectioner with locations in Mercer Island, Madison Park and Bellvue Place. I got the lovely box of truffles in this picture, and a delicious bag of "mistakes". The truffles were quite good, but I enjoyed the mistakes (which featured some chocolate-covered marshmallows and fruit) even more.

Last Month

Next Month