1. Client Side Testing: a Baseline

    30 Jun 2014 by obsidian

    Those who well know me and my work understand my passion for coding things right the first time. Take a little extra time to architect something, and you will save yourself hours, days or – in some cases – weeks of development time down the road. What better way to assure your code is meeting your own exacting standards on the client layer than to establish some good testing practices.

    In an attempt to aid developers with less testing experience in setup and execution of client testing, I have created a new repository on Github to help with a testing baseline from which each can develop his own processes: Client Testing Baseline.

    The only prerequisites is installation of NodeJS. See the README file in the repository for details on what test environments and additional code assistance tools are included.


  2. Triggering True onChange Event for Text Fields

    27 Mar 2013 by obsidian

    Something I’ve run into on multiple occasions is the desire to be able to trap the change event of text fields and textareas – not just on blur but when their value actually changes. I will assume some basic understanding of how DOM elements behave and that, while the input and textarea nodes have change events, they don’t actually fire in all browsers until you move away from them. This led me to thinking that there has to be a somewhat optimal way to trigger an event on those fields only when their value changes. If you’ve ever tried something like this before, you may have settled for a combination of listening to keypress and keyup events to get your desired behavior across all browsers, but once again, you have to attach this to all. elements on which you wish it to behave. jQuery once again allows us to develop a very simplistic solution in a relatively tiny bit of code:
    (more…)


  3. WordPress Plugin: Ajax and WYSIWYG Comments

    21 Nov 2012 by obsidian

    I spent a good bit of time on Google and the WordPress Codex trying to figure out the best way to customize comments to use Ajax for posting. I finally decided to write my own plugin to solve the issue, since there are a lot of ideas but no real concise nor comprehensive solutions that worked across the board. Additionally, I wanted to offer the capability of using a custom version of the built-in WYSIWYG editor (TinyMCE) to users for comment modification as well. If you have some time to check it out and leave me some feedback, I would appreciate the input!


  4. Custom Google Voice Widget Creation

    4 Nov 2012 by obsidian

    If you use Google Voice, you may be familiar with the option of creating widgets that you can place on your website which allow people to enter their phone number and request to be connected to your Google Voice number. There are several benefits to this type of behavior, but the best of these is that you can offer people the opportunity to call you without ever publicly displaying your phone number. What’s more, each new widget creates a unique buttonId associated with it that allows you to record a custom voicemail response for users of that widget.

    Of course, the downside to use of the widget system is that it is not customizable at all, and it is only available in the form of a rather large Flash button to place on your site. After some digging and research, I finally figured out how to post requests to your unique buttonId via standard HTML forms. Taking this to the next level (and much more usable, I might add) lets us create a manual Ajax handler that will make our request to connect the user without ever leaving our page.
    (more…)


  5. A Starbucks Conundrum

    2 Nov 2012 by obsidian

    Something I have noted in my relatively regular visits to Starbucks for my morning dose of goodness-in-a-cup is the nearly overwhelming mispronunciation of the 20oz drink option. As you may or may not be aware, this size designation is a venti, which actually means “20″. We can also see that the pronunciation, as expected, rhymes with tee or bee, but the baristas who serve me inevitably repeat my drink order as a vente instead. I was bothered by this for a while – up until the cleverly disguised sarcasm began to sink in. Wittingly or not, each of these baristas has just confirmed that I indeed had paid for a “wait” with cream, allowing them to take as much time as needed to prepare – since that is what I asked for after all. Kudos to you, Starbucks, for coming up with a naming convention that, however pronounced, will make me happily vente for my venti.


  6. Seahawks, Packers and Refs: Oh, My!

    25 Sep 2012 by obsidian

    I was one of the stunned Seahawks fans left in a very uncomfortable position after Monday night’s contested win against the Green Bay Packers – excited over the win but with a sour taste over how it went down. If you’re living under a rock somewhere and haven’t heard about the controversy, or if you simply care absolutely nothing for football and are reading this out of sheer boredom, let’s review the tension in the league building up to this climactic altercation.

    Back in August the NFL refs union began negotiating with the NFL once again, but as everyone in the football world can tell you, it was too little, too late. The season began with the NFL bringing in inexperienced replacement refs who have been, shall we say, struggling to meet the challenge and call clean games – though in their defense, I’m sure they’re doing the best job they can under the circumstances. Suffice to say that there has been tremendous pressure poured out on these refs, and they have been the focal point of mounting tensions as questionable calls have been piling up during these first few weeks of the season.
    (more…)


  7. Customer Service is STILL Important

    20 Sep 2012 by obsidian

    In this day in age, with all the technological advancements from entertainment to dining, many companies seem to lose track of the simple fact that customer service is still important. I know first hand how many companies have (or are) letting the simple principle of “the customer is always right” be slowly outshone by the new principle of “the customer is privileged to do business here.” I worked retail for many years in different venues from shoes to computers, and I saw this slip first-hand when I compared the divergence between what was taught during training and to what standard management expected on the sales floor. Thankfully I now work for a company that still values the customer above all, and though I’m no longer in sales, I have had opportunity to sit with customer service for an entire day and watch first-hand how things are handled – and it makes me proud to work here.
    (more…)


  8. BackboneJS: Dynamic Override of sync() Method

    27 Jun 2012 by obsidian

    As with any good solution, there needs to be a valid problem you’re trying to solve. In this case, I ran into a challenge at work and wanted to share the concepts of what I needed to accomplish in case anyone else has run into similar troubles.

    I was assigned the task of integrating a new UI with a preexisting backend API, which is really not that big of a deal in and of itself. However, as I wanted to use BackboneJS as our client MVC framework and the API was by no means RESTful nor consistent, I quickly became aware that I would need to manually override the sync() method of nearly every one of my models in order to have things function properly. Again, in and of itself, this is not a problem, but working in an environment where maintenance and change are the rule, I wanted to figure out a way to extract the customization in such a way as to be extremely easy to manage.
    (more…)


  9. Nighttime Photography

    21 Oct 2011 by obsidian

    On the street where you work

    Well, the title might be slightly misleading, since this is actually early morning photography, but I wanted to share it nonetheless. I dropped my brother in law off at the airport at 5am one morning this week and decided I would take the opportunity to drive around downtown and look for something to shoot. Finally, I ended up just setting up at the end of the street where I work, and this was the result. I think I’m going to have to do more extended exposure stuff – it’s just plain fun!


  10. Custom Event Management in JavaScript

    27 Sep 2011 by obsidian

    If you have used any JavaScript libraries before, you are most likely quite familiar with the concept of binding functions to specific events within an object, but have you ever considered creating your own custom events for your JavaScript classes to allow users even more flexibility in implementing your code? Binding listeners to user events (such as click or mouseover) is a necessity for robust coding, but what happens when I want to allow developers to execute a specific bit of logic only when my library element has been rendered to the page? I need to build my code in such a way as to give “hooks” to the coder in the form of events for which they can listen.
    (more…)