DOM optimizations with jQuery

I really do enjoy optimizing applications. Up until this project most of my experience was in MySQL and PHP optimizations so optimizing a client side applications written in JavaScript is a new challenge to me. The product I am blogging about contains a custom work order entry screen which utilizes the JQuery library extensively. It does heavy DOM manipulations and event bindings to speed up the entry process for the user.  We began noticing some slowness on large work orders with over 50 lines. No big deal though until you hit 200 and then it becomes very noticeable. On these large record sets the browser is spending 42.8 seconds (I’ll use numbers from this outlier throughout this blog entry) modifying the DOM. After optimization this was cut to 4.9 seconds. In development I didn’t realize I’d be working with such large sets. Nor did it occur to me that accessing the DOM could be this slow. Here’s how I fixed it. (more…)

Tor Relay

It’s over 3 weeks into 2014 and most of you have failed at your new years resolutions. It’s okay so have I. My resolution was to make and accomplish at least 1 goal a week, thats 52 resolutions! My first goal was to setup a tor relay. Which seems easy enough. I use Linux exclusively and documentation is readily available. Still here I am, 3 weeks into the new year and no Tor Relay. Why? (more…)

I sold my first business and here’s what I learned

I remember when I first learned how to ride a bike. I was eager to ditch the training wheels and hit the road (okay sidewalk). So one day we removed the training wheels and my Mom held onto my bicycle seat as I got my balance right. I slowly moved forward, picking up speed, and then she let go and I was off. There I was riding around our apartment complex in Parsippany, New Jersey. It was probably one of the first times I actually felt free.

Of course one crucial thing was left out in my bicycle 101 course from Professor Mom, she had neglected (or perhaps I had not listened) to teach me about brakes. It was a simple back-pedal brake, but for me the idea of “going backwards” with my feet was unnatural. So I just continued riding around in a circle while my Mom chased after me.

Then it started getting dark. Since I couldn’t grasp the pedal brake; I decided that a crash landing was in order. I slowed to a moderate pace, leaned in to my left, and crashed into the grass. I incurred some minor scrapes, a little crying, but it worked. In the morning I’d learn the importance of brakes (I actually ended up needing to crash land a few more times).

I did a bit of adult crash landing recently when I sold my first successful business on Flippa. I wanted to share some things with everyone that I had learned about running a small bootstrapped business and selling it. (more…)

So Netflix Search Sucks

So Netflix has the worst search capability ever. I can’t even adequately search for a genre such as “history channel” without returning results like Cars Toons: Mater’s Tall Tales and Charge. Seriously, that’s one of the top results. So I decided to see if they have an API so I can write my own program to return legit results. Of course Netflix has closed their public API. Netflix, you’ve reached a new level of “suckitude”. (more…)

Using jQuery ajaxError to Automatically Handle Session Expiration and Server Side Errors

A question I get asked a lot is “What is the best way to check for expired sessions in an Ajax application”. A lot of developers end up polling the server every few minutes to validate the users session is still a live. This is a messy approach that has a low probability of actually catching an expired session. Outside of the server pushing these notifications to the client the next best solution is to become familiar with jQuery ajaxError.