Archive for February, 2006

What did you do with my div?

Tuesday, February 28th, 2006

I have been working on a site design for my new website and making good progress for the most part. This progress slammed to a halt on Saturday when I was coding the CSS for my navigation menu. I start off with something like:

#nav_bar_left {
background: url(/devsite/images/nav_left.gif);
width: 20px;
height: 29px;
}
#nav_bar_content {
background: url(/devsite/images/nav_background.gif);
width: 40em;
height: 29px;
}
#nav_bar_right {
background: url(/devsite/images/nav_right.gif);
width: 18px;
height: 29px;
}

But this just stacks the items one on top of another. That isn’t what I am looking for. Absolute positioning is not going to work because width of my nav_bar_content div will vary based on text size. Hmmm. Maybe if I make them inline:

#nav_bar_left {
display: inline;
background: url(/devsite/images/nav_left.gif);
width: 20px;
height: 29px;
}

Wait. Where the hell did my div go? There isn’t any content in the div, I am just using it as a placeholder for the graphics. That sucker just dropped out of here like a rock. It took me a bit, but I learned a fundamental feature of the box model that has always mystefied me to some extent. Any box that has a display type of ‘inline’ can’t have a width or a height. That is key. I have always had a bit of an issue with some heights and widths just not working, and that info is the key.

So, I changed my CSS just a bit and everything works like a champ:

#nav_bar_left {
float: left;
background: url(/devsite/images/nav_left.gif);
width: 20px;
height: 29px;
}

One more piece of the puzzle is now in place. I am gettting closer to doing all my design using CSS. I certainly use it much more than I used to, but under deadlines I will often fall back on table based designs because I know those bugs and can create table based layouts very quickly. With CSS if everything goes well it is so much quicker and better, but when things don’t go well I am not good enough to straighten it out quickly. But I am getting there.

gnubbs

Hard Week

Monday, February 27th, 2006

Last week sucked.  It was honestly one of the worst weeks I can remember.  My wife lost her job and it was very ugly.  We had seen it coming for a while now, and I forced the issues last weekend.  Two years ago we were warned not to mix business and family.  We didn’t listen but should have.

So, yeah, a shitty week.  It ended on a high note because Stephanie got a job offer for what appears to be a much better job.  She will have to see how things actually work out, but on paper it is definately an improvement.  Today was her first day so we will see how things go.

It was one of those weeks that felt a little bit like an entire year though.  When friday rolled around we were both exhausted and apparently a bit surly.  After that subsided the weekend was pretty good.  We watched 40 Year Old Virgin which was funnier than expected.  On Saturday we went out with Wes and his friend Amanda (not real sure what “my friend Amanda” means) to Efrain’s, watched Donnie Darko and basically got hammered.  That movie was very entertaining.

Sunday, JT and I went to the record store and the climbing gym.  I lead my first pitch in a long time which felt very good.  Will have to follow that up tonight or Wednesday with more lead climbing.

That is my update for now.  My current web design project is coming along, and I will post more about that process this week.  The website I am doing for my sister is close to being done, so I should have some links to that pretty soon too.  I played with some neat google maps stuff for her site.  www.sheetmusicco.com seems to be doing much better with thier new osCommerce powered store.  Being able to show what other people who bought an item bought is neat.  Sure, amazon has been doing it since 1999, but this is the first time a store I designed does it.

gnubbs

Something to toss around

Thursday, February 16th, 2006

Last night I went out and bought a baseball.  I am not planning on starting to play any organized team sports, but I still had a very real need for a baseball.  Why?  To toss around while I am thinking at work.  There are times when I need to do something mindless at work so that my mind can tackle the difficult task that I am working on.  It might look like I am staring off into space, but trust me, those gears are turning.

To date, I have sat staring off and tossed just about everything in my office.  Cell phones, mice, cds, and all those other things that have gone missing from my coworkers desks.  The problem is that none of those things are good for tossing or catching, and unfortuntely sometimes I will grad something sharp.  So, $3 for a baseball seemed a great investment.

Plus, have you seen The Great Escape?  If Hilts (Steve McQueen) can keep from going crazy during long stints in the cooler by tossing around a baseball, it can get me through till friday.

gnubbs

Rear Suspension Bolts — Sheared

Monday, February 13th, 2006

This week I am buying new wheels and tires for Stephanie’s Jeep Cherokee Sport (XJ if you will). I figured that if I am spending all that money on wheels, tires, and an alignment this would be a good time to deal with it’s ancient suspension. The XJ was rocking and rolling down the streets like James Brown, so it was easy to determine it needed new shocks.

Saturday morning I get up bright an early and head to the auto parts store. I pick up new front and rear shocks and a new steering stabilizer. Nothing fancy just Monroe Gasmatic — equal to or just a bit nicer than OEM. Remember, this car only gets driven about 50 miles a week so it doesn’t need anything super nice.

Back at home I jack up the car, pull the front wheels and go to work on the front struts. All goes relatively well except the top bolt on the drivers side is damaged so I have to cut it off. No big deal though. JT shows up around this time and starts helping out on the other side of the car. In pretty short order we have the new front struts in. This is going well. Next up the steering stabilizer.

This gets a bit more difficult. One side pops right off, but the other side is attached to a stud that goes through the steering linkage and is bolted down on the other side. We try and get that stud out but don’t have any luck. We decide it is time for lunch so we grab some food and then stop by JTs to get his propane torch. Heating up the linkage doesn’t help loosen the bolt at all. After looking at it a bit, it hits JT. This looks just like the end of a tie rod, maybe a tie rod puller will work. Back to his place to get his tie rod puller, and two minutes later the front stabilizer is removed and the new one is in place. Right tool…

JT heads off to work about now, and I start work on the rears. I get the lower connection on the passenger side rear shock off, and attempt to remove the two bolts holding the top to the frame. SNAP! The bolt shears off in the frame. Shit. The shock has to come off for me to deal with that, so I try the second bolt. SNAP! Shit. I figure I should go all in at this point and try the other shock. Now I have four bolts sheared off in the frame of the jeep. My night just got really long.

I head to the hardware store and buy new bolts, and the tools to either extract these bolts or drill them out and retap. After I give my penetrating oil a couple of hours to soak, I try the extractor. I drill through the bolt, turn in the extractor, and it bites beautifully. I turn on it, and the bolt doesn’t budge. Try again. SNAP! Shit. Now I am done for. I try and drill out the broken extractor but my drill bits barely scratch it. I head upstairs thinking I am going to have to take this to a mechanic to get those bolts out.

After reading online a bit, I discover that this happens to a very large number of XJ owners when attempting to work on the rear suspension. Then I run across this page

Accessing the rear bolts from above

Basically it details how to cut access panels from the body above to get at the bolts. This is exactly what I need. I head back down to the garage, get out my trusty dremel and start cutting into the jeep. In short order I am looking down at the nuts welded to the frame. A while longer cutting off the welds and I break the bolt loose and am looking at a clean whole that I can attach my suspension to. Awesome. It is now 11pm, and with my proof of concept I call it a night.

The next morning I head to the hardware store to get some new nuts and bolts for mounting the rear shocks, and more cutting discs for my dremel. An hour later the new suspension is installed. I paint the body on the edges where I cut, throw down a couple layers of dynamat to seal it, and roll the carpeting back in place.

I take it for a spin and everything feels much better. The jeep is much more stable, doesn’t roll as much when turning, and doesn’t bounce and jostle so much after hitting a bump. The suspension feedback through the steering column also feels more damped. That might just be psychological though.

This job that I expected to take a couple of hours in the end took about 12.  Why does that always seem to be the case when I am working on cars….  Oh well.  Everything is installed and works and it only cost me about $200 in parts and tools.

gnubbs

Temporarily Derailed

Monday, February 6th, 2006

I have been screwing around trying to get rails up and running on my production web server.  In the end it turned out that a very simple sysadmin oversight was preventing me from making progress.

When access the project pages I would get 404 or 403 errors.  Trying to directly access dispatch.cgi left me with an error in my logs saying ExecCGI was not enabled for my rails directory.  Hmmm.  I spend some time looking through my .htaccess file in public, but can’t seem to find anything wrong.

I double check and make sure that mod_rewrite is loaded.  It is.  I look at my .htaccess file again.  Everything really does look correct.  Some google searching leads me to this helpful page about getting Wordpress permalinks working. Not exactly my problem but I see some hints in there for when your .htaccess isn’t being read.  It hits me.

I don’t have AllowOverrides set for my rails directory.  Change my apache2.conf and restart the server.  RAILS!  Pefect.  Two changes to my .htaccess and I have FastCGI running.  So, it is only 1:30pm and I have had a productive day.

gnubbs

Getting a site to validate

Friday, February 3rd, 2006

Check out Mike Davidson’s post on SEO and page validation. It is pretty interesting. I appreciate his warnings that this was very unscientific, but the results were at the very least interesting. So, I decided to see how The Sheet Music Company would fare. Ouch. 104 errors can’t be good.

So, I have decided that this weekend I am going to go through and fix the errors that can be easily fixed. Since I won’t be being paid for doing this, I am only going after the easy errors. I will let you know how this goes. I am working to ensure that my next project uses both valid HTML and valid Stylesheets. Since I am building that one from the ground up, it should be easy for me to ensure that I do it right.

Am I jumping on the CSS only, valid code, semantic html bandwagon? Ya know, I think that I am. I think that it is the right thing to do. I hate using the wrong tool for a job when I am working on my car, I don’t know why I should view working on the web any differently.

gnubbs