Categories
Family

Happy Birthday to …

… the brother- who turned an undisclosed, non-remarkable number of years old today. Unless making it through another year is remarkable in someway.

Perhaps he can get someone to give him a birthday spanking.

Just not me.

Categories
Armoire Woodworking

Top Results

The top for the armoire ended up with slightly mixed results. Pictures are after the jump, but the quick and dirty version is the mitres came out very well, but the edge joinery ended up being off a little. In the end, I think my assembly procedure was in error.

Categories
Family

Being the Adult

We’ve signed the boy up for t-ball this spring. Not because I want him to play baseball, though that’s fine if he wants to, but mostly so he could do something with his chums at school. Plus, in our little nook up here, there isn’t a whole heckuva lot else going on for kids his age. At least, nothing that’s 15 minutes or less drive time.

Since we signed him up, we went and got him a real glove and a real bat and a real T-ball. Today he finally decided that he wanted to play catch and practice batting.

Categories
Family

Notes On the Boy

A couple of noteworthy things regarding the boy today.

After dinner, he beat his sister to the bathroom. When he was done, he walked out and flipped the lights off. This action upset his sister to the point of whiny tears. Noticing the rather pleased look on his face, I shot him a look communicating “Why?”, he responded:

I didn’t know I shouldn’t turn the lights off, so I did.

First off, yes it’s lame. The more amusing part, from my perspective, is that it’s clear he did it to aggravate his sister, whom played her part to the hilt. I then warned him to be careful, because anything he did to her she would repay him for later. When he claimed he would be too fast for her, I pointed out that he would never see it coming. He blew that off.

Having a younger sister, I know. He doesn’t.

But he will.

Categories
Politics

1 Trillion Dollars

The federal debt is in the trillions of dollars. As a service so to speak, here is a link to graphically illustrate how big $1 trillion is. Then keep in mind that our projected federal debt is 14 of those.

Categories
Armoire Woodworking

Armoire Blogging

drawer-fronts.JPG

That’s the current state of the armoire. All the drawers completed. Well, except for the cleanup portion of that program. I’ll have to trim all the corners flush as well as scrape the fronts. But for now, I’ve moved on to other elements of construction. The top to be specific. Not the top-top, the bottom-top. You know, the part that goes over the top drawer?

Categories
Computers

Gnucash

We’ve been Quicken users for quite awhile now. However, under the premise that there isn’t that much new under the sun in the world of personal accounting, we haven’t updated our version for about 5 years now. To compound my particular situation, I had fallen behind on the bookeeping by about 3 months. I’ve made up for more time before; but, frankly, I wasn’t in the mood to make it up.

Unfortunately, the version of Quicken we had did not support OFX direct connect. So we looked at getting Quicken 2010- probably the Deluxe version because it supported budgeting as opposed to the baseline version. I took a look at the price tag and wondered what the state of Gnucash was.

Categories
Dictionary

BEHOLD!!

Psgetty.

Update: bugzima.

Categories
Family

Good Advice

I had a terrible, awful, miserable racquetball match last night. I was so upset with how I played that I forgot my racquet at the club when I left. I didn’t even realize it until I got a call (I was over half-way home at that point) from one of the guys at the club who told me he’d stashed the stuff in his locker.

When I finally got home, the boy was still awake so I got a chance to say goodnight to him. He asked me how my match went. I told him not so good and that I lost all 3 games. Then he asked me:

Did you have any fun?

I told him, truthfully, no I didn’t.

Well, next time make sure to have fun. Right, Dad?

I kissed him goodnight.

I wasn’t so upset anymore.

Categories
Family

Asking Questions

The boy is sick today so he stayed home while the lass and I went to her dance lesson. She was in a snit by the time we left- even complaining that she didn’t want to dance because she didn’t like it. This was news to me and the answer to the riddle became obvious as I finished my cup-o-jo while observing them watching “Special Agent Ozo.” She was jealous that her brother was going to stay home and get to watch cartoons. So on the way up, I discussed the situation with her, being sure to emphasize that her brother was, in fact, sick; that he had barely slept the night before because of his being sick and he were he not sick, he would be in the car on the way to the Y. She seemed to understand that and well before we arrived at the Y, she was looking forward to her class.

When she was finished, we went to the car. As we climbed into the car that she had known all her life; the car that has taken here to the ocean and to her grandparents; the car that she prefers to the point of ridiculous screaming fits if I dare take the other car, she asked me:

Dad, is this our car?

Which, finally, brings me to my question. Do all kids ask questions that they HAVE to know the answer to? Both of mine do this and it drives me crazy= though I don’t let them know that.

If we’re on the way to Memere’s house, guaranteed one will ask:

Are we going to Memere’s house?

If it’s a bright sunny day, we’ll get the question:

Is it going to rain?

They’ve even asked if our dogs are our dogs.

If I’ve just explained something to them in words so simple, a 2 year old could understand it, they’ll repeat my answer in the form of a question.

It’s like a twisted form of Jeopardy or something.

There is almost no limit to what they will attempt to “verify” despite knowing what the answer is. Initially, I just assumed it was a phase or something. But they’ve been doing it for long enough now that I wonder if they have some kind of insecurity issue or something. The only other explanation I’ve thought is it just became a habit from when they were younger and the behavior was, I assume, natural. Like picking your nose.

We’ve tried a number of responses, including telling them we’re not going to answer the question because they know the answer. I’ve even resorted to sarcasm. This morning, I told the lass it was someone else’s car that my key just happened to work in. By the time we got out of the parking lot, she was pretty sure it was our car. But I never verified the fact for her.

I’m still fairly sure it’s a phase that they just haven’t come out of yet. Which makes me wonder, when will it be over?

Categories
Misc

Testing Some Something

This post is so I can exercise my blogclient. The following piece of writing:

Is a blockquoted section with code and lists.

This is a nested blockquote.

  • This is list item 1 in the nested bq
  • This is list item 2 in the nested bq
  • This is list item 3 in the nested bq

Back to original blockquote

  1. This is an order list in the bq
  2. This is item 2 of the ordered list in the bq
  3. This is item 3 of the ordered list in the bq

That should be a pretty good test. I expect most of these will fail for the time being. I’ll work out those kinks in good time.

While I’m at it:

  1. Ordered list item 1 in a p-tag

    This is a second paragraph under item 1.

  2. Ordered list item 2 in a p-tag

    This is a second paragraphc under item 2.

  3. Orderes list item 3 in a p-tag

That should be enough for now.

Categories
Computers Programming Python

Python Unicode

I’ve been working on a piece of code to convert a blogpost into Markdown text. Yes, I’m aware of the html2text.py module (mine is html2md, so nyeah!) All I’ll say is how the heck does one learn anything if they keep relying on other people’s work?

Anyway, I’ve got a naive implementation working now (won’t handle more complicated nestings like lists in blockquotes) when I ran into a snag involving unicode. Upon retrieval of a particular post, I got the following error:

UnicodeEncodeError: ‘ascii’ codec can’t encode character u’xa0′ in position 174: ordinal not in range(128)

It came up in the context of passing a string to the iterparse function of the cElementTree module. The character in question is a ‘non-breaking space.’ Frankly, I wasn’t sure how it got there, but I verified it’s presence in the string and then set to figuring a way to deal with it. I believe this is an instance of mixing strings and unicode together, rather than dealing solely in one or the other.

I found the unicodedata module for a solution. There is a function call normalize which will map unicode characters to the local encoding. In this case, ASCII. Now this solution is far from perfect, since special characters (say, from the Russian alphabet or characters with tildes above them) are just converted to rough ASCII equivalents.

The following code additions fixed my problem:

import unicodedata as ud
    .
    .
    .
uthml = ud.normalize('NFKD', unicode(html))

Where html is a string of html directly from the website. I can then pass uhtml to the iterparse function and the error is gone (because the u’xa0′ characters are translated to ASCII space characters) and the rest of the program is able to do it’s thing.

I don’t know if this will be the final solution, but it allows me to continue with the development I had been originally interested in. I was aware of the potential for unicode issues, but had hoped they wouldn’t crop up. This gives me a simple 2 line way to deal with it for the now.

Categories
Family

Just When You Think You Know Them

We’ve signed the kids up for a YMCA sponsored soccer camp. It’s six-weeks long and started yesterday. I figure there is no better way for them to learn the inferiority of the game than to actually play and learn it. Once they get exposed to a real sport, they’ll never have any question as to why they never went back to soccer. (No, I won’t define “real sport”- where’s the sport in that?)

So last night was the first night for the camp and the kids were having a grand ol’ time kicking balls around with the other kids prior to the start of class.Then the class started and the instructor had all the kids gather in the middle of the gym floor, followed by a quick jog around the outside of the gym.

The lass made it 3/4 of the way around the lap, before diverting off in tears and running to the Wife. She steadfastly refused to get back involved.

The boy, on the other hand, was having the time of his life. This, in spite of earlier comments, when told what they’d be doing for the evening. that he already knew how to play soccer and hated it.

Categories
Computers Programming Python

Learned Something New

I’m in the process of learning how to use lxml- a fast, powerful XML parser for python that relies on libxml2. I don’t know much in the way of details regarding xml so I got stuck as soon as I got started.

I was passing straight markdown generated XHTML into the various xml parser methods and objects for lxml. All of them were dying with the same error. The only parser that worked was the HTML parser.

The xml parsers kept coughing up the following error:

lxml.etree.XMLSyntaxError: Extra content at the end of the document, line 1, column 222

I really had know clue as to what this might mean. Since the output was from markdown, I reasoned there was little likelihood of malformed XHTML or some such. Besides, I knew that it rendered fine on web pages. Liekly, there was some significant detail I was missing. Unfortunately, my lack of xml knowledge meant I didn’t have anything to fallback on for solving the problem.

Finally, I turned up a comment thread where I learned that xml documents require a “root element.” I had seen the term “root” but only had a vague notion of what it meant. Now, I know exactly what is meant.

Prior to passing the markdown string to the parser, I performed the following operation:

rootedhtml = "<post>%s</post>" % html

Where html was the markdown output. I then passed rootedhtml to the parser and it no longer chokes.

Now I can get back to solving my original problem.

Categories
Misc

Did You Know…

It’s impossible to sneeze with your eyes open?

Go ahead, try it.

Categories
Computers Programming Python

Python-markdown Strike

I’ve incorporated markdown into my blog client and in the course of doing so, I saw that it could be extended. So I thought I’d give it a go and see if I could add a ‘strike’ extension to the markdown module.

It turned out to be almost trivially simple thanks to the documentation. I chose to use a double hyphen around a word to create the strike. I looked elsewhere and double tildes seems to be another nice way to do it. The code below shows it for the double hyphen but the code would be identical in either case except for the RE definition.

Here’s the code:

import re

import markdown
from markdown import etree

STRIKE_RE = r'(-{2})(.+?)\2'

class StrikeExtension(markdown.Extension):
    def extendMarkdown(self, md, md_globals):
        md.inlinePatterns.add('strike', markdown.inlinepatterns.SimpleTagPattern(STRIKE_RE, 'strike'), '>strong')

def makeExtension(configs = None):
    return StrikeExtension(configs = configs)

That’s it.

The SimpleTagPattern object is a general purpose object that’s part of the markdown library and it’s used to create text rules involving inline patterns such as emphasis or strong. That’s all my version of the strike rule is.

I implemented my extension as a module, so I had to put it in the ‘extensions’ directory of my markdown library. It’s also possible to just incorporate the extension in project code and make markdown aware of it, but I haven’t tried that yet.

Categories
Politics

An Intemperate Rant

During the course of my normal blog readings, I came across this quicky. Naturally, I followed the link to Mr. Bartlett’s blog and read his entry quickly. The post that started it all was by Glenn Reynolds. Since then, a other bloggers have piled on to such as Matthew Yglesias and Mark Thoma. Mr. Sullivan has since followed up with this little beauty.

I am not going to defend Glenn Reynolds, he doesn’t need my help. But the arrogant, dismissive, “I’m-so-much-your-superior-that-I-don’t-have-to-prove-it” tone of the other bloggers just pissed me off.

Categories
Computers Misc

Using PGP

Those of you who receive emails from myself may have noticed that my emails now have some funny business attached to them. There is a simple explanation- I’m using PGP to sign my outgoing emails. Ultimately, I’d like to start exchanging emails using full encryption, but it takes two to tango.

Here is my public key. Using this, it’s possible for email software to verify my signature. Further, the public key can be used to encrypt email text so that only I, with my private key (no, you can’t see- it’s PRIVATE) can decrypt and read what’s been sent to me.

I’ve been checking around and it appears that gmail is experimenting with PGP support through their web interface. Additionally, just about any email program (Thunderbird and so forth) can be setup to use PGP. Therefore, those out there using 3rd party email clients should take the time to install GnuPG and join the encryption bandwagon.

The hardest part is the initial setup. Once that’s done, composing and sending email is more or less the same as it ever was.

Categories
Family

Tooth #6

The Tooth Fairy is going to get tired of trekking out here this winter. Whileout at dinner, literally just prior to the food arriving, the boy exclaimed “Mytooth came out!” and spat it out into his hand.

Bakugan from the TF this time around.

He doesn’t have anymore loose ones at this point. But this one makes it thefour front teeth across the bottom and his 2 top fronts that are gonzo.

If he were to maintain his current pace (3 in the last month, I believe) hewould need a set of falsies. Or a liquid diet…

Categories
Misc

Kids and Video Games

Being a reformed video game junky, I can attest to the notion that life has a wicked sense of humor.

We got the kids a Wii video game system last Christmas. Now, having familiarity with video games growing up, I was well aware of the possibility that the kids would be smitten with it to the point of obsession. Fast forward a year later and I have the following conversation with each kid almost daily:

Child: Dad, can I play the Wii?

Me: No.

Child (whining): OHHHH, I want to play the Wiiiiiiiii. Why can’t I play the Wiiiiiiiiii?

Me: Because I said so.

Child (still whining): That’s not fairrrrrrrrrr…. I want to play the Wiiiiiiiiiiiii

On a few occasions, I strayed from the above script by taking the time to explain that they need to find other ways to play. That they have other toys and games that they need to explore. That they should be using their imagination to invent worlds and scenarios and whatever else they can come up with. The Wii substitutes someone else’s imagination and it isn’t healthy for them to play the Wii all the time, or even some of the time, at their tender age.

Every now and again, the boy will try reverse psychology on me:

The Boy: Dad, I’ve been trying to think of something else to play and all I can think of is the Wii.

Me: Well, try harder.

The Boy: Don’t even tell me what else I can do. All I can think of is the Wii.

Me: Well, that’s the problem.

The Boy: Can I play the Wii?

Me: Nope.

The Boy: GRRRRRR!!!! (stomps off in frustration)

When I really want to flummox them, I go all Zen and tell them that they can only play the Wii when they don’t want to play the Wii. That’s usually good for a confused look, an eye roll, or a huff as they stomp away.

So, based on my experience, I would advise parents to save themselves a headache and put off video games for as long as possible. The headache of putting it off pales compared to the headache of keeping them from it.