Showing posts with label frogs. Show all posts
Showing posts with label frogs. Show all posts

Friday, April 10, 2015

Listen to the Spring Peepers

This week I was able to hear one of my favorite sounds again - the Spring Peepers. Not some weird hipster music group, but the small chorus frogs Pseudacris crucifer.

I love listening to the chorus of these tiny amphibians every spring here in central Pennsylvania. When I was a child I lived next to the Tuscarora Creek where it was easy to listen to them every evening. Now I am a bit more removed from a suitable habitat and don't get to hear them nearly as much as I'd like. And they don't seem to last as long as they used to. It seems like I only get to hear them for a week or two in April, although they supposedly will call until June.

If you don't live in the eastern United States you may have never heard these little frogs. Listen to these audio files and hear what you've been missing.

The sound of a single frog: 

The whole chorus of frogs: 

If I hadn't told you they were frogs, you might mistake them for some kind of insect or something. Maybe even a bird, if it called at night. But most birds don't call at night. Only owls.

They might not be spring peepers, but my comic frogs can also entertain you today. For a few minutes at least.

Amphibian.com comic for 10 April 2015



Wednesday, August 20, 2014

An Interview Question

Here's a great interview question, well, assuming that you're interviewing a software engineer.

What is the easiest way to determine if a given string is the rotation of another string?

First, I guess there could be some question of what rotation of a string even is. If you were to take letters off the end of the string and stick them on the beginning one at a time, you would be making a rotation of the string. For example, the following are all rotations of the string "obfuscate"
ateobfusc
fuscateob
scateobfu
eobfuscat
There are lots of ways you could try to determine if one string is a rotation of another. You could easily rule out some strings by checking to make sure the lengths are the same first. Then you could maybe start at the first character and attempt a character-by-character comparison and move your pointer back to the front if you reach the end...or some other complicated algorithm.

But there's a really easy way to tell if a string is a rotation of another string. Engineers who value the simplest way to solve a problem will do it this way.

Stick one of the strings together with a copy of itself and then see if the other string appears inside that new string. Like this, using the examples above:
ateobfuscateobfusc
fuscateobfuscateob
scateobfuscateobfu
eobfuscateobfuscat
You still need a sanity check for length, because you can find "ob" inside of "fuscateobfuscateob" but that doesn't make it a rotation.

Here it is as a JavaScript function.

function isRotation(a, b) {
    return (a.length === b.length) && ((a + a).indexOf(b) !== -1)
}

That's all there is to it. You can do it in one line. I think it's a good question.

Amphibian.com comic for August 20, 2014

Friday, August 1, 2014

Web Comic Launch

Today I launch my web comic, which I have so creatively titled Amphibian.com. I've wanted to do a new comic for years, but I was waiting for the right inspiration. Unless you live in central Pennsylvania (inside this area) you probably don't know that 20 years ago I published a comic about a frog in a local newspaper. But newspapers are dead. Print comics are dead. My comic was barely alive in the first place. What's changed?

Web Comics Made with 100% Real Web


If you've ever read a comic on your computer or mobile device, you may have noticed that most of them are pretty much just print comics converted to a JPG or PNG and stuck on a web page. Most are probably made by talented artists, working with some artisty tools, maybe on a computer but maybe still on paper. Anyone who's ever seen my work knows that I am not a talented artist. But I am pretty good with the technologies that make web sites. And I have been drawing a frog so for so long that it looks like an almost legitimate frog.

So I decided to make a web comic that was made with real web technologies. I designed it to be optimized for mobile devices, and easy to share with your friends. Here's a breakdown of what it's made of.

  • HTML + CSS: The comics are just HTML markup and CSS styling. I didn't draw a box and then draw some stuff in it, I style a <div> to have a border and then position individual <img> objects in it to arrange the scene. Even the speech balloons are just <p> tags with appropriate styles applied.
  • SVG: I take responsive design to a whole other level. When you look at the comics on your phone, not only is the page header and navigation being restyled to fit the smaller screen, the comic images themselves are scaled down as well. Have a retina display? Make the page as big as you want, my frogs won't get all pixelated on you. And with Gzip compression, most of the images are actually smaller downloads than a large PNG would be.
  • JavaScript: In both the client and server, I'm using JavaScript to make things better. In your browser, jQuery lets me animate parts of the comic scenes easily. I can make things change when you click (or touch) the characters in the cells. These can be part of the jokes or just for silly fun. The back-end is made with Node and the Express framework. The part that you don't see is an editor that combines client-side goodness with REST web services to enable me to take the ideas from my head and put them in the comics with ease.
Comic Editor

Why Would Someone Do This?


Are there advantages to this approach to a web comic? I think there are many.

First of all, using web technologies to make web comics really uses the medium to its fullest. Web sites don't just look like newspaper pages (at least not anymore) so why should comics? We have all these great features in our web browsers and we are barely using them. I want to use them just a little bit more.

Second, comics made this way are mobile-friendly. They read top-to-bottom and don't require you to pinch or swipe or poke or jab or jump or anything. If you've ever tried to read a "normal" comic on a mobile phone in it's typical configuration - a.k.a. portrait mode - you know what I'm taking about. My comics scale to your device without giving up image quality and can be enjoyed with just your thumb on the phone.

Also, the HTML content can be read by the crawlers and even translators. Like I mentioned, the words my frogs speak are just normal HTML paragraph tags. The contents of my comics will be picked up by the search engine spiders and make it easier to find my stuff. And a tool like Google Translate can show you the comics in lots of other languages. I'm not sure if the jokes make sense in Swedish, but the words might!

Take My Code, Please


As always, my code is open source and on GitHub. My frogs and jokes aren't, but you probably don't want them anyway.


Amphibian.com comic for August 1, 2014


Friday, August 23, 2013

We're Kickstartering

Great news! My wife's company, Syslark, Inc., has decided to use Kickstarter to raise the funds to take my FFZ game from amusing prototype to finished game on the OUYA!

She's participating in OUYA's Free the Games Fund, which provides matching funds for games that will be OUYA exclusives for 6 months after launch.



So everyone please have a look and back her if you like what you see.