i am dustin diaz

a JavaScriptr...

boosh.

don't worry about it.

Me on Photography and JavaScript

I figured the only way I can keep someone's attention on this blog while talking about Photography is to also talk about JavaScript. Since I have a vested interest in both, and with very good reason, they make a good pair. As some of you might have remembered, I wrote a post not too long back on Photography where I discussed some of the basics and also a brief comparison of JavaScript and Photography. With that said, if you like one and not the other, this should still at least be entertaining and educational. If you like both, then you're in for a treat of nerdy euphemisms and theories.

Hold on a sec... Photography? Really?

Yes, really. If you haven't noticed, I've started my very own 365 Project where I take at least one photo a day, and post it there. There's even a handy RSS feed you can drop into your favorite Reader. Anyway...

Photography and JavaScript are similar because...

  • They are expressive: This is almost a no-brainer. Since the beginning of having the ability to take a picture of something, the expression "a picture says a thousand words" has held true to this day. This also great for people who aren't fantastic with words. This spills into JavaScript because it is one of the smallest object oriented languages on the planet and allows you to express behavior and action in a variety of ways. The mere fact that we have such a plethora of JavaScript libraries these days is testament to how expressive it really is, especially since most of them pretty much do the asme thing! Just differently.
  • They can be as simple or as complicated as you make them: I've always said that JavaScript is the closest thing we have to a ninja, but in written lexical structure. As previously mentioned, it's a small language. But it can be very, very complicated at times, especially when you dive into JavaScript Design Patterns and begin to learn about subclassing, information hiding, prototypal inheritance, and all that other fun good stuff. Same holds true for photography in that the scientific break-thru of capturing light (onto film or a digital sensor), and modifying it by means of shutter speed and aperture, is so simple that anyone can get started taking pictures on a manual camera. On the flip side, you can turn it into a really complicated and complex hobby (or profession) by introducing flash, wireless remote systems, then umbrellas, soft boxes, snoots, grid spots, gobos... there's also a giant pile of lenses you could buy; macros, telephotos, wide-angles, primes, zooms... the list can go on. There's a reason why there are dedicated camera stores like B&H Photo, Calumet Photo, unfortunately there aren't exactly stores like this for JavaScript ;) — I guess that's what Apress and O'Reilly are for (which sells both photography and JavaScript books :)
  • they are both object oriented and subject driven: Clearly, JavaScript is object oriented, there's no argument on that (seriously, don't get us started), but often the subject of what we're programming for drives how we use the language. When you're building a library, you'll most likely use the languages object oriented features. When you're implementing interfaces and dealing with simple tasks, you'll use more functional JavaScript. Same goes for photography where the subjects should drive the type of photos you'll take. When I'm going to shoot a small plant, I'm not going to pull out my wide angle, I'll pull out a macro or telephoto. When I'm doing portraits, I'll grab my prime 85mm. For more serious work, I can begin to create my own light with strobes. Maybe even two or three of them. And of course the real reason photography is object oriented, is because it evolves around taking pictures of objects. Of course don't call people objects (which is slightly inappropriate), they are more or less subjects.

And so the list goes on

I could probably continue on, but I'm pretty sure most of the point has been proven. This stuff is fun for a reason, and I've always known that in one way or another, the two have been connected. Something about my brain latches on to simplicity with the ability to evolve. Kind of like Gmail (but this is not the forum for that). Cheers everyone, and happy Friday!

this is who i am

Hi, my name is Dustin Diaz and I'm an Engineer @ObviousCorp. Previously @Twitter, @Google, and @Yahoo, author of Strobist® Info co-author of JavaScript Design Patterns, co-creator of the Ender JavaScript Framework, a Photographer, and an amateur Mixologist. This is my website. Welcome!

On this site I write about JavaScript. You can also follow along with my open-source work on Github.

This site is optimized and works best in Microsoft Internet Explorer 6.