John Lindal’s Blog
Why I’m not a plumber — Part 2
November 23, 2005 on 7:29 pm | In House | No CommentsI also finally unclogged my bathroom sink drain. Not very difficult, but not very fun either, given that I discovered a 1.5 mm thick mat of what I think was algae coating the inside of the drain…
The more interesting part is the shape of the drain itself, however. My initial response was, “What kind of clown put this together?” because the drain looks like a roller-coaster.
On further thought, however, I have to respect the plumber who managed to make it work. The sink drain is not aligned with the pipe from the wall, and they are also too close together, so one cannot simply plug them together with a trap, even at an angle. Instead the trap is parallel to the wall, and then feeds into a nightmare of elbows and short pipe segments that twist around through 270 degrees before connecting to the pipe leading into the wall!
I can’t snake this with my little toy, but professional snakes are more flexible, so I hope it is covered by the home warranty. Of course, if I clean out the drain regularly, I hopefully won’t have to worry about it.
I also use BioClean regularly. My previous plumber, who is only “previous” because he doesn’t like our current home warranty company, highly recommended it, and I can’t see how it can hurt, even if it doesn’t help as much as he claimed it did.
Why I’m not a plumber
November 23, 2005 on 6:41 pm | In House | No CommentsSo I finally got around to re-attaching my toilet to the floor. It had been loose for a couple of weeks, but never leaked, and the home warranty program refused to cover the repair, so I had to figure it out myself. It was an interesting learning experience.
The toilet bowl rests on the floor, and a wax ring seals the connection between the bowl exit and the sewage line. Originally, I thought that the grouting was supposed to hold the toilet in place, but it’s really the bolts on each side of the bowl that are supposed to do this. Whoever installed the toilet hadn’t bothered to tighten the bolts, so it was the grouting that was holding the toilet steady, until it came loose…
During my research, I went looking under the house for the business end of the bolts that stick out of the floor, but was unable to locate them. I can only assume that they are sandwiched between the layers of wood that appear to have accreted under the floor. The house was built in the 1920′s, so I guess anything is possible.
At least I didn’t see any signs of moisture under the floor, which I hope means that the wax ring did not deform significantly while the toilet was shifting around.
And I can only hope that I didn’t overtighten the bolts… Mainly, I’m worried about the wood in the floor. If there are no washers under the bolt heads, the bolts may come popping up out of the floor! Hopefully, the home warranty company will cover that situation, if it occurs!
JavaScript unmasked
November 23, 2005 on 6:11 pm | In Programming | No CommentsI love my job. I learn something every day. Yesterday, I learned that JavaScript is the most misleadingly named language in history. (I disagree with those who want to rename C++ to C- -.
)
Having been forced to use JavaScript on the web site that I currently develop and maintain and also in my experiments with Google’s map API, I was beginning to suspect that there was something, well, strange about the language.
Yes, the syntax looks sort of like Java, but as it turns out, it’s really a functional language with static scoping. The basic concept is that an object is just a hashtable, so there are no class declarations or definitions. Each object is built at run-time to contain whatever it needs, either from scratch or by copying an existing object. Functions are treated as objects, so an object can contain functions, and a function can contain objects. That second one is pretty weird, but I suppose I’ll get used to it!
So my nagging suspicion that enforcing rigid coding guidelines would be a really good idea, even more so than in other languages like C++, Java, Perl, and PHP, turned out to be correct. It boggles the mind that the JavaScript compiler will silently replace linefeeds with semicolons in order to try to work around errors that it encounters! I realize that they did this because it allows non-programmers to put each statement on a separate line and never use semicolons, but this just shows that the designers haven’t learned the simple lesson that programming languages for non-programmers always end up causing more problems than they solve.
At least I’ve found a tool that helps with coding style: JSLint. Unfortunately, it’s not as helpful as I would like, since a lot of my JavaScript code is generated by PHP code.
I’m sure I’ll have more to say on this topic as I delver further into JavaScript and start working with AJAX…
Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds.
Valid XHTML and CSS. ^Top^