Posted on Leave a comment

Week Long Programming Debacle

I’ve solved it! A week ago started a series of unfortunate events that program progress on my application to a screeching halt. My efforts and work did not quit but every fix seemed to reveal another bizarre issue. But surely a professional programmer could figure all this out in a day rather than a week? No. Problem solving isn’t always that simple. This was akin to hiring a contractor to add a room to the back of the house but in starting to dig his foundations he discovers an old septic tank buried behind the house and in trying to remove it he discovers a cave under that. My problem began with a test when I cleared all my cookies.

On problem set off another. The development server, long overdue for an upgrade, lost its mind but this wasn’t immediately evident to me so I did a line by line inspection of the code searching for the answer to some really whacked out behavior. Eventually I realized the server was shot and moved to another server. After fixing several issues either hidden and discovered in the line by line inspection or caused by experimentation in attempts to fixed the oddities caused by the flaked out server, I eventually discovered the source of the original issue. In short, jQuery’s .filter gets overridden by jQuery’s .listen plugin so it appears.

jQuery has a built-in traversing function called filter() but handlers for events get bound only on the initial rendering of the DOM. If the DOM is modified dynamically, for instance if content is added with AJAX, then the newly added event handlers will not be recognized by filter(). Fortunately, Ariel Flesler stepped up and created a plugin called listen() (use the 1.0.3 version!) which registers the handlers for the matching events and this works for new content added via AJAX or other DOM manipulation. It seems, unless I am misinterpreting something, that listen() overrides filter() so if you have both filter() and listen() on the same page, your filter() events will never fire.

Posted on Leave a comment

Snow Day!

The Weather

Yesterday started off beautiful and almost spring like but the forecast said we were at the high for the day and the children were just getting off to school. As the high schooler left in a t-shirt and no jacket I suggested that she was making a mistake.

Our routine

Cathy and I have a routine that makes having 5 children in 5 schools work without anyone losing their sanity. I’m a morning person and Cathy is a night owl. So I get the duty of waking the children, making sure they are ready for school, and seeing them off. Sometimes this cuts into my morning productivity so at night when Cathy is getting the children bathed and ready for bed, I am often downstairs typing on my computer in the evening. I drive the children in the mornings; Cathy picks them up in the afternoons. I cook the dinners; Cathy does the dishes and laundry and lays out the children’s stuff for the next day. (Yes, the children help and have chores..to listen to the children, they have so many more chores than their friends…)

The Drive In

Yesterday, I took Evan to pre-school. As we drove, Spring turned to rain. Rain became mixed with snow. Evan arrived at school 18 minutes late (9:18). I left noting that Weigel’s had gas at $1.629 per gallon. I was on fumes but thought I’d buy at Sam’s. I forgot and drove right past it because by now the mix of snow and rain had turned completely into large, fluffy snowflakes. It was beautiful!

The Cancellations

At 11:00am, the pre-school calls to say that Knox County Schools is considering canceling and wants to get a jump on it. Cathy is caught off guard having only downed half her daily dose of caffeine so I’m off to pickup Evan. [Update: I am reminded that Cathy couldn’t drive because Evan hid her driver’s license..which we just found today.] I test the road in front of our house and it is already slick. I achieve a 15 foot slide with ease. Noting that I need gas badly, I pull into Weigel’s. The gas has rocketed to $1.779/gallon! I put just a little in and decide to fill up at Sam’s. We are out of milk so I look like a snow panicer as I go in for a gallon. The tertiary roads are a bit scary and the secondary roads are slushy (that’ll become ice!). The primary roads are fairly clear. While picking up Evan, Knox County Schools officially cancels at 12:30 (an hour away) so Cathy and I debate pulling Sarah out early.

Bearden High School Clusterduck

I drive to the high school and the line is already long. The elementary school calls to say some buses cannot get the children and they are asking all parents to come pickup the kids. As I sit in line pointing uphill on Gallaher View Road, the slush compresses and turns to ice under my tires. Each time we nudge forward, my wheels try to spin and slide. The high school makes a royal mistake and instead of having their duty officer directing traffic, he is inside directing parents into the office. See, since school isn’t officially canceled for another 40 minutes, parents still have to walk into the school and check out their children who are on the break of becoming adults. The duty officer and a couple of others should have been directing traffic and someone with a clipboard and a radio should have been letting parents sign their children out from the cars ala drive-thru. They could have done the paperwork as the cars entered the parking lot and radio’d the office to send the child out. That would have prevented road rage, dangerous situations and sped the process along. As it was I ended up parking on the grass and walking into the school to find that the line for the office was about 20 minutes long. At this point, the students would be dismissed in about the same time. Evan has played in the snow in front of the school, shoes wet, socks wet, and pants soaked to the knees. He and I give up on the high school and start driving to the elementary school. Traffic at the high school has backed up onto Kingston Pike and is now interfering with the normal flow of traffic.

Rocky Hill Elementary

Cars are backing up traffic on Morrell Road as they try to either turn into the bus lane or go against traffic to turn into the carpool lane. Why don’t these parents just drive to Northshore and turn left at the CVS? The line is lengthy but no more so than a normal carpool line. You can tell the parents who never drive their children because they keep hopping out of their car to look up the road trying to figure out what is taking so long. The road behind the school has a 90° turn. Snow melt from the tires has covered that corner and traffic has me stop in the turn. When traffic begins to move, the van doesn’t. Oops. After some gentle encouragement, I am moving again but I worry about the cars behind me bouncing off one another as they try to navigate that turn.

Teenage Drivers in the Snow

Sarah calls for the pickup plan while I wait in the elementary school line. I had told her to walk to Downtown West so that I wouldn’t have to fight the high school traffic mess. She and her mother adjust the plan to have her walk to the mall. Sarah gets her boyfriend to drive her to the mall; his father is following behind. She asks if the boyfriend can driver her home. Both his father (whose parents live in our neighborhood) and I firmly say, “NO!” My neighborhood is a bit like an Alpine slide in the winter and is the last to see any road clearing equipment from the city or county. I agree to letting the father, a Philadelphia native, drive her home. Evan is miserable from his cold, wet wait in the car. I drive Amy and Evan home. Sarah arrives a couple of minutes later.

Bearden Middle School

The middle school buses cannot run until all the elementary school students have been bused home. I debate picking Noah up. One phone call later I learn he is already on a bus en route so I take some pictures of the jolly children and dogs enjoying the snow, then I retreat to the basement to do some programming. Telecommuters don’t get snow days.

Conclusion

Knox County Schools made the right choice to wait and see what would happen with the weather. They made a poor choice by not anticipating the rush of parents to the school when it got out that they were debating canceling schools. The schools need the equivalent of an evacuation plan for handling heavy traffic when closures happen. The plan should include traffic direction, separate entrances and exits to the school to avoid congestion, allowing children to use cell phones, and keeping parents in their cars rather than having them exit and go to the office. Here’s how the high school should have worked: The Gallaher Road entrance becomes exit only with a patrol car directing traffic to the south entrance of the school. The Kingston Pike entrance becomes an exit only. This forces all traffic to the Gleason Road entrance with the possibility of congesting traffic on Gleason but takes advantage of being able to create a much longer line of cars on school property in a single file rather than having any merging. Traffic direction has the line of cars S through the ROTC parking lot to maximize the number of cars off the city roads and on the school property. Traffic direction has cars go north beside the stadium, left past the bandroom, north beside the western side of the building, right in front of the school and then immediately left out to Kingston Pike or Gallaher View Road. Students should be allowed to contact their parents by cell phone or text message. If a student says, "my parents are waiting in line" they are dismissed on their honor to the office (not out of school) rather than waiting for contact from the parent to bring them down. Students contacted by cell or called over the intercom convene in the common area until their ride pulls up out front. A parent volunteer, teacher, officer, or other school staff with a radio in hand and a signout clipboard will be positioned far enough down the line to be able to call children out of class such that when the car gets to the front of the school, the student is already there. IDs are checked at the car, signatures taken at the car, and the loadout goes like clockwork. I was in the car for three hours trying to pickup children from schools and I only went to 3 of the 5 schools my children attend. The children really enjoyed the snow! And today is another snow day!

Posted on 7 Comments

Coding Horror Appears To Be Hardware

The other day some bizarreness slipped into my code. It made no sense. The problem could not be reproduced on the production machine but all the recent changes had not been migrated to it. I examined and tested and pulled hair out and pounded head against wall after wall. Finally, I went to the old staging server and cleaned it up, removed all the code, wiped the database, then made an exact copy of the development code and data on the staging server. Surprisingly enough, I could not reproduce the problem. On examining the development server, I noticed that the hard drive was almost out of space. Could this be a swap space problem? Doesn’t matter. This development server has done its time and needs to be retired. I need a new machine! On the positive side, I can quit chasing ghosts and start moving forward on my application again.

Posted on Leave a comment

(Don’t) Panic!

I don’t know when the panic attacks began. I did not have them in my single digits. Up until 10 years old, I was a relatively happy go-lucky kid. I don’t remember panic attacks or anxiety in my early teens either even around 14 years old when I thought my parents were heading for divorce. But that’s a different a story. When I was 14, 15 and 16 I lived in New Jersey and my dad’s driving or perhaps the other people’s driving or perhaps just those crazy traffic circles scared the living daylights out of me but that wasn’t panic, that was fear. I had become very aware of my own mortality. But that’s a different story. Late teens, college years, first career, no panic attacks. There was stress but not irrational anxiety or panic.

Ah, I do know when the panic attacks began. They began in 2000 when the life I had known collapsed around me. Two years prior I had been laid off from a great job with a predictable decent salary and an aggressive debt reduction plan including a cute little graph that showed the day I would throw a huge party to celebrate not owing money to anyone. My first wife left me. Routine and structure were gone. All my dreams vanished. There was no more money. And when I would wake up enough to try to visualize a solution to all the problems, anxiety would set in and all I could do is hide in bed and try to sort it out, a full blown panic attack.

I am sure panic attacks are different for different people. Even for me a panic attack could vary from a clouded head just wanting to hide from my problems to a brainstorming problem solving session. Usually it was the brainstorming problem solving sessions that got me. My mind would rush through different scenarios trying to solve all the problems. If I did A, B then C certainly D, E and F would happen but what if B didn’t go as planned then instead of C I might end up at L and I certainly cannot get to D from L so lets plan for the L, M, N, O scenario but what if B did go as planned and it was C that didn’t work I still wouldn’t get to D because I would be on the T, U, V, W plan. That’s similar to trying to play the whole game of chess out in your head before making your opening move. That’s what my mind used to do a lot and still occasionally does. The problem with this extreme forward thinking is that nothing happens because instead of making move A you are laying in bed thinking about it instead of doing. And lack of action exacerbates the problems.

For the most part, I don’t have panic attacks anymore. I have had several interesting life developments as well as some great teachers and guides help free me of the habits I used to imprison myself. However, this morning I did wake in a panic attack. It was more of an irrational fear than a planning session. Panic attacks leave you feeling stressed, tired, and a bit hollow inside. It was a reminder that I really don’t want to slip back into my old ways.