Closet Stats Junkie

Here is my public admission that I am a bit of a stats junkie. I LOVE NUMBERS AND DATA! As one of my good buddies would say…

“INPUT!!!!”

Reasons why I think I am addicted to stats:

  1. I love tracking statistics within my applications to know what is going on
  2. Built my own stats API to easily track what my Kynetx apps are doing in JavaScript
  3. I have been checking http://tweetstats.com/graphs/mikegrace for over a year
  4. I installed DD-WRT on my router mostly for the statistical functionality and for geek cred
  5. Built my own round robin style load tracker for my server so I could better understand its load http://status.michaelgrace.info/
  6. I built my own JSON interface to the command line top program to monitor who and what is creating the most load on my server
  7. This blog post by the etsy engineering team about tracking everything made me drool http://codeascraft.etsy.com/2011/02/15/measure-anything-measure-everything/
  8. Even though I didn’t really enjoy the homework, I absolutely loved my statistics class in college.
  9. Sites like onetruefan.com that give me stats about what I do on the web make my geeky heart beat faster
  10. Purchased a wall plug that would tell me stats on how much electricity my different appliances use

As you can see I am fairly addicted to numbers and stats and I haven’t even listed everything here.  I wish that more stuff was webhook enabled so I could gather meaningful statistics and build cool apps that tied more of my ‘stuff’ together in meaningful ways like Kynetx envisions. Here is to a future where life is made better and more interesting through the application and correlation of meaningful data.

JavaScript Delayed Search Like Google Instant

While working on building a search tool for a documentation site I came up with this demo. I wanted to be able to execute the search much like how Google Instant currently waits for a pause in the users typing to execute the search. This is an example of how I am accomplishing that. You can check out the live demo at

http://mikegrace.s3.amazonaws.com/geek-blog/sandbox/delay-search.html

This is what the demo looks like even though the code is the fun part:

Tested on Mac 10.6.6 with Firefox 3.6, Chrome 9.0, Safari 5.0, and Opera 11.01

Double Key Press Activation State Machine Thingy!

I’m working on building a documentation search tool based on QuickSilver and Alfred App. I needed a way to activate the search so I built this demo in preparation for finishing the search tool. You can check out the live demo at

http://mikegrace.s3.amazonaws.com/geek-blog/double-tap/double-tap.html

This is what it looks like even though the code is the fun part:

The demo code will shift states as you press the ‘s’ key. If you press the ‘s’ key quickly enough back to back it will switch to the activated state and stay there until the ‘esc’ key is pressed causing it to reset. The code also won’t change state if the focus is in a textarea or input to prevent activation while a user is typing in an area they don’t want to be interrupted in. I will have to add an exception for the search tool input box when I implement this to allow the ‘esc’ key to reset and hide the search tool while inside of it. You can use the code if you like and I would love to hear any feedback that anyone has about it.

Tested on Mac 10.6.6 with Firefox 3.6, Chrome 9.0, Safari 5.0, and Opera 11.01

JavaScript Performance Hit Calling Function vs. Inline

I know there is a performance hit when calling a function vs just running the code right there but I was curious how much that would be in different browsers. I went over to one of my favorite JS testing sites, http://jsperf.com/ , and setup a simple test. Running a few tests on a few different browsers suggests that there is about a 50% performance hit when calling a function with a small task.

You can check out the most recent results at http://jsperf.com/function-call-vs-inline and test your own browser.