i am dustin diaz

a JavaScriptr...

boosh.

don't worry about it.

Stop coding right now!

Whatever it is. Whatever you're working on. Whatever last piece of code snippet you just wrote. STOP! And ask yourself these questions. Are you solving any real problem? Is this going to be helpful to real people? Are you advancing something, one thing, anything? Is that last line of code you wrote going to make an impact? Not sure where to start? Try this exercise:

Word of caution

Before doing this, make sure you have time. If you have a deadline coming up, then don't read this. This is not for you; right now.

Ok, open up your code editor

That's right. Fire that puppy up, and open that last file you were just working on. To make this easier on yourself, most text editors come with a open recent document feature so pick one of those that has been the most interesting to you within the last {n} number that are listed. Now that you have that open, pick a line number between 1 and the total amount shown. Or if you know the document too well and that's not going to help the random factor, try scrolling up and down the document using your mouse while keeping your eyes closed. After an arbitrary amount of seconds, stop, then point your finger in the middle of the screen to a line of code. Now, what's the sole purpose of that line of code? Why did you write it? Did it solve anything? What about the code that is immediately surrounding it? Is that code solving any real problem?

The point?

This is just a friendly reminder to not forget that writing code should have a purpose. Too often as developers and engineers we get caught up in making things superfluous in our code that we lose site of the actual problems we're trying to solve. That's it. That's all. Now have a good day.

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.