OMG I HATE Javascript, JQuery to the Rescue! Thu, 23 Apr 2009 20:22:24 -0400

Okay so as web developers we often run into issues. Okay lets call it like it is, we have to deal with IE. Well today I was working on the dreaded issue with making a menu that will close when you click or focus anywhere else on the page. This one is special because I have a text input field in the menu that is used in conjunction with AJAX to resort/filter the menu items by what is being typed. This would be relatively easy with jquery and an UNDERSTANDING browser.


function openMenu() {
    $('#menu').toggleOn();
    $(document).one('focus', function() {
        $('#menu').toggleOff();
    });
}

See how simple that is? It amazes myself, but that really is all it takes. Then you introduce IE, which only adheres focus to form elements. But aha! I found a way around it, this technique could be duplicated in other frameworks like MooTools, Prototype and plain jane Javascript.


function openMenu() {
    $('#menu').toggleOn();
    $('#menuFilter').one('blur', function() {
        $('#menu').toggleOff(150);
    }
    $('#menuFilter').focus();
}

The 150 timeout on the toggleOff gives time for any events, such as an anchor clicked to process.

0 comments. More...
Migrating Servers Mon, 20 Apr 2009 14:41:45 -0400

Okay, so I'm nearing a transition in life. Not only is my first baby due 1 month from yesterday, but I also have to migrate one of the largest site's I've ever managed. I can't give any details atm for what it is, or why. But I am moving everything to a cluster of servers configured in Amazon's EC2 Cloud using a few parts of their technologies, which will hopefully expand to some others, that should end up totally rockin, and way cheaper. Currently the binary database for this system is approaching 100 gigabytes. And there are other migration issues at hand in regards to the nature of the network and the data it maintains, but sufficient to say that there is some new data being imported at least every 10 minutes or less.

Each day has shown increase in load, as well to the fact that the imported data stands around 20 million records a day currently and that now we will expand the abstraction of said data from 1 table to 250+ tables. Thank goodness with EC2 I can quickly throw up more instances to handle any load and scale horizontally.

TBH this is probably the first technology that I've been really impressed with in a long time, now the only question is if it can stand up to it's promise.

This isn't my first time messing with the concept of shared resource processing networks. When I was 16 I built a beowulf cluster using computers that were being thrown away by my high school. Mostly Pentium's and 486, but considering I didn't have anything better and the electric bill was paid by my parents at the time I enjoyed the challenge. Granted I never was able to find a use for the network. Then a couple of years ago with 3tera launching their grid I began to research and came up with a couple of theories of how they had done this. I concluded they used a set of common GNU tools, the names of which have long escaped me. C'mon it was like 3 years ago!

Anyway, it's very cool and change is a comin so you better get ready for it!

0 comments. More...
Code Sections is back online. Fri, 20 Feb 2009 11:54:59 -0500

I just decided to finish this up. Looks better than before and is much more awesome than anyone ever realized ;)

Anyway to those that still referenced these old code sections, they are back online now.

0 comments. More...
No Power Wed, 28 Jan 2009 12:12:29 -0500

So today was a big ice storm, no working... no nothing. This sucks

0 comments. More...
Local Events Thu, 22 Jan 2009 09:51:40 -0500

Looking forward to joining this event in Louisville. After finding out about this new semi-local happening that surprised me Lexington KY hacker space meeting. Along with Louisville 2600 and KYOSS it appears Kentucky geeks are finally starting to find each other and network!

    Louisville Geek Dinner v0.6

    WHAT: A social networking event for those passionate about technology.
    WHEN: January 26th 2009, 6:00pm EST
    WHERE: Bluegrass Brewing Company (3929 Shelbyville Rd, Louisville)
    COST: FREE + Whatever you choose to spend on food.

    http://www.louisvillegeekdinner.com
0 comments. More...
  • Disclaimer
  • The ideas and opinions expressed here are mine.
  • I'm a Linux and BSD user, and lean heavily toward the use of OSS vs certain other commercial solutions.

Valid XHTML 1.0 Transitional

View the Ninja's profile on LinkedIn

:= RSS =: