Thursday, June 25, 2009

On Mistakes

Out of the blue, I found a great insight on mistakes, on stackoverflow, of all places! S.Lott:

The Mistake (House)Image via Wikipedia

As a musician and a software geek, let me tell you that mistakes must happen. The question isn't "am I going to make a mistake?" The question is "when I make my usual mistake, [how] will I recover gracefully?"
Reblog this post [with Zemanta]

I am the love child of Daffy Duck and Goofy

First of all, if my life was made into a movie, I would spend the rest of my life attempting to destroy all extant copies of the movie. Too embarrassing.

Daffy Duck and Porky Pig in Robin Hood DaffyImage via Wikipedia

If you could mix Daffy Duck, Donald Duck, and Goofy, that would be a pretty close character to me. Make him look like Porky Pig, and you got something there. The plot would be like the ol' Tom and Jerry cartoons: I tease and torment my wife at the beginning, and then I am pummeled and punished back all throughout the rest of the cartoon. My daughter would join in a bit, helping mommie put the silly man back in his place.

Goofy, as he appears in the Kingdom Hearts ser...Image via Wikipedia

My wife works (hard, very hard), and drives our daughter to & from summer day school 30 minutes away, and cooks up a storm 5 days a week. And she still found time to make me a big bowl of yummy oatmeal before I woke up. I always am amazed the distance between the life I deserve and the life I have. I would thank God, but I think She would prefer I work harder on myself to close the gap. Get on your knees to ask for help, and offer gratitude.

Reblog this post [with Zemanta]

Wednesday, June 24, 2009

Foot in Mouth disease: Everyone else's answer is much better than mine...

I am not a big fan of my nasty stinky mouth. I am that stereotypical nerd that blurts out sociopathic garbage. The only reason a few people still hang around me is that I take all criticism of myself seriously - I really try hard to give it a fair hearing, and if somebody has a beef with me, I am willing to meet them more than half-way to understand their viewpoint. Also, I much prefer open hostility to faked smarmy niceness - a fake smile really puts me on edge, and I can much better deal with somebody who openly hates me. Err, so I am just talking around the Plinky prompt... I am much better now that I am trying to build my self-esteem from an authentic place. Grouchiness can lead to "foot-in-mouth-disease" as well. Self-absorption leads to grouchiness.

Superb Fairy-wren, Malurus cyaneusImage via Wikipedia

I tell my daughter to think once, think twice, think three times before saying something that isn't a compliment to somebody. And if you cannot say anything nice, then don't say anything at all. My daughter rightly thinks: "Do as I say, not as I do" And Steven Covey talks about being loyal to those not present - don't ever talk about anyone behind their back.

“Instant Karma!” coverImage via Wikipedia

If it is any consolation to those I may have offended - my wife can really lay into me if I say the slightest thing from the corner of my stinky mouth, about her. Instant Karma - Yeeouch...

Reblog this post [with Zemanta]

Monday, June 22, 2009

Why "We Three Kings" make me cry? Never been beat up by Wise Man or Camel!

Slam man absorbing a hit.Image via Wikipedia

I am not 100% sure about these song selections. I am in a very different place now than I was even 2 years ago. My emotions are all focused on making my everyday life match my highest aspirations, so I have very little emotional energy left for where music can take me emotionally. During the dark times of my life, the music I listened to was too self-absorbed, and I threw them all away a long time ago, because I just couldn't risk wasting any more time.

We Three Kings by The Roches

This song is the only one that can make me cry. I have no idea why. I don't have any strong sad feelings about Christmas or Christmas music. Must be the melody. If I had some musical ability, I could state what it was unique about that melody.

There Is A Light That Never Goes Out by Smiths

I don't cry, but I do feel very melancholy. The first quarter century of my life was quite lonely - I had things to share, but I hadn't yet processed that I was on a unsustainable self-destructive path when it came to my relation to the outside world. There is nothing like *almost* hitting rock bottom to change self-destructive behaviors. I still have some unsustainable self-destructive behaviors, but I traded up to a better set of garbage behaviors, and I am self-aware and working on them daily.

Isolation RoomImage by Victor V via Flickr

This song captures a feeling of self-imposed isolation.

Brian Wilson by Barenaked Ladies

Again, no waterworks, but a feeling of melancholy. Again, a song about isolation. My isolation was profound during my collage years. I desperately wanted help. But my foolish pride kept me from examining my personal faults. I was playing an elaborate game to preserve my self-esteem, even though that self-esteem was fraudulent, and destructive. Bleh..

~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~

Brian WilsonBrian Wilson via

Lying in bed, just like Brian Wilson did...

Reblog this post [with Zemanta]

Thursday, June 18, 2009

Teeth falling out in my dreams

I cannot muster the effort to remember my dreams, but I can tell you some recurring themes and snippets:

Models of human teeth as they exist within the...Image via Wikipedia

Teeth feeling loose or falling out, or having to pull them out. I hate this one. My mind must be telling me to floss more often.




Gyeonggibuk Science High School, a specialty h...Image via Wikipedia

High school friends, going back to high school because failed one credit, going back to college because failed one credit. Annoying. I am always optimistic that I will be able to handle myself better, knowing what I know now, I guess that is good.

[Check out this cool high school plaque from Korea!] I have a lot of dreams where I have to control a car from the back seat (somehow working the steering wheel from back there, or quickly maneuvering into the drivers seat). Or driving, but instead of the normal view out the front windshield, for some strange reason I can see my own car, far ahead of myself, and I have to control it much like a remote control car, from a long distance, and with great difficulty.

My dreams feel a lot like my life: overcomplicated by my attempts to cope with my own run-away anxiety. I hate it. The situations are so complicated, I must admit they are quite interesting. Sometimes I look forward to sleep just so that I can ruminate over the peculiar situations I experienced in my dreams when I finally wake up.

High Anxiety album coverImage via Wikipedia

Heh, there comes a time when you finally out-grow scary movies, because, compared to the pressures of your grown-up life, being chased by a serial killer or monster would be the most relaxing thing to happen in a long time. That realization is why I don't have nightmares like that, like I did when I was a kid. Being tortured by a serial killer would be a nice break from things exploding at work, and my lovely wife lowering the boom when I screw up at home.

Reblog this post [with Zemanta]

Wednesday, June 17, 2009

My sixth grade daughter is already smarter than I am... but here goes...

A typical imaginary raygunImage via Wikipedia

I wonder what would happen if the Plinky server droids broke into my house, and questioned my daughter directly about how good, or how lame, her old dad is when it comes to giving life lessons. Robotic metallic Plinky server droids, eight feet tall, menacing over our dining room table, where we work on school's homework every week-night, asking my daughter about her estimation of my parental skills. I may end up getting zapped on the butt with a laser gun, because I run off my fool mouth. (I have caught my daughter rolling her eyes more than once...)

Problem Solving

One thing I suffered from as a kid was "learned helplessness". I just saw, too soon and too often, why my problems were completely hopeless. So when my daughter senses a problem, I try to just calmly talk her through some viewpoints where she, herself, can see the logical first steps to solving the problem. Does it help her? My wife and my daughter are strong women, so their complaining about a situation is usually an attempt at initial stress release, before they roll up their sleeves and dive in to solve the problem themselves. So I wouldn't be surprised if my daughter said I just run my mouth. She would not be the first to so accuse me.

Getting Along with People

The social skill of meeting people, not half-way, but *MORE* than half-way. And getting a friend by *being* a friend. My daughter just points out how I don't seem to have too many friends. (Hmm, she has got a point there...)

Hard work counts more than smarts

I had a little bit too easy a time when it came to schooling. A casual observer might mistake me for somebody with brains. But anyway you slice it, you can find a lot of failures that are long on brains and short on hard work. And if you think you have met a successful man who didn't have to work hard, just wait, the situation will soon reverse itself. My daughter points out that for somebody who claims to see the value of hard work, I do a pretty tiny amount of it. (Grr...) She has got the brains, and the hard work, already, so I am confident she will go far.

People with a sense of entitlement never go far

I am not sure I have ever said this to my daughter. I repeat it to myself, over and over, but I don't think I have ever had reason to say it to her.

KISS: Keep It Simple, Stupid

Uh, I have never said this to my daughter. My wife says it to me, repeatedly. My daughter has picked it up from my negative example. (Sigh...) I complicate everything I touch, to the point that simple tasks get so complicated I have to abandon them in despair. This Plinky prompt is getting more depressing...

Always be improving your morals and integrity

I talk out loud to my daughter on this, about my own challenges, because I know that I have to actively work on improving my morals and integrity. I guess that is a pretty good way to express this, by honestly and openly working on this yourself, as a parent.

After School Homework with DadImage by NJLA: New Jersey Library Association via Flickr

Neatness in homework counts

I will stop here, because, at last, I have arrived at something where my daughter still has a way to go. Messy, messy writing. Her problem is that she can get good results just rushing and powering through the homework, but I hope she can learn to take time, because the care will pay off.

Reblog this post [with Zemanta]

StratPlayer on "Self-Reliance"

I liked this Plinky post by StratPlayer on "Self-Reliance":

Loudon Wainwright IIILoudon Wainwright III via

Years ago a singer song writer named Loudon Wainwright III wrote this lyric: My father thinks I’m no good for nothing I’ll never amount to much But he doesn’t know my secret weapon I can count on myself in the clutch

Fender StratocasterImage via Wikipedia

My first wife always looked for someone else to see her through the tough times. All of my children grew up with that ethic. They have been in trouble all their lives.
Jess said:
There's a song by The Hives where they say "You get what's given to you", and it's about the kind of people who blame everyone else for their problems and have this sense of entitlement they present to the world. My mother is like that. I hope it didn't spread.
My comment:

Wild BokehImage by L Lemos via Flickr

The scariest, for me, is when I know darn well nobody is coming to my rescue, but I still act like I can goof off today, because tomorrow something will take my problems away. I have to work really hard to internalize the idea that nobody is coming to my rescue, ever. But I better not overdue my worry, half of "count on myself in the clutch" is not blaming anyone else. If it was easy it would hardly be worth doing.
Reblog this post [with Zemanta]

Tuesday, June 16, 2009

Tod Browning's "Freaks"

FreaksImage via Wikipedia

A friend on Plinky, StratPlayer, wrote a post on the examination of human cruelty that is Tod Browning's "Freaks". Written poetically:
This isn’t a goodie, it’s a diatribe a harangue on mans inhumanity to man. It is as inhumane as any genocide or nuclear device. All the same well done.
My comment: I'm not 100% in agreement. I hear what you are saying about cruelty, but there are two sides to the coin. Some carnival freaks appreciated their lifestyle. In the modern politically correct world, people with profound physical disfigurements are now supposed to stoically and noiselessly blend into the walls - is it dignity or is it facilitating being ignored?.

Image via Wikipedia

I hate the concept of "you must be a silent humorless sexless sinless quiet noble potted plant, so we can feel virtuous about pitying you for a few moments, before we completely forget and ignore you". If I was a freak, I would work hard to be the best and most disturbing freak I could be. If I wasn't constantly being chased by villagers carrying torches, I would know I was underachieving.
Reblog this post [with Zemanta]

Monday, June 15, 2009

Dive Into Python 3 - httplib2

Fantastic writing on a fine HTTP library "httplib2" by Mark Pilgrim. Dive Into Python 3 - HTTP Web Services Shows the value of the feature set of HTTP - compression, caching, getting around local and third-party caches, temporary and permanent redirects. "httplib2" supports them all, by default, so you can be a good HTTP-Citizen from the word GO. I read the Reddit comments on this article, and it was pretty depressing. There is a weird reaction to a well designed piece of library code - the better designed and more comprehensive a library is, the more vocal and numerous the irrational criticism for it is.

Arthur SchopenhauerImage via Wikipedia

People are so terrified to learn a new library, because of a lack of unallocated healthy plastic brain neurons, and because they are terrified of their meagre mental gifts being so publicly obvious, that they have to publicly use all the the odious tools of the Art of Controversy to denigrate it. "EasyInstall" and "Eggs" in Python seem to suffer the worst from this - EasyInstall is hardly perfect, but it helps smart people with tricky Python packaging problems, and it will certainly play a part, in some future incarnation, to the issue of Python packaging for all who wish to do it well. Because of that, and because of Python programmers with a lack of unallocated healthy plastic brain neurons who are terrified of their

A scan of the brain using fMRIImage via Wikipedia

meagre mental gifts being so publicly obvious, you get a lot of trash talk and irrational criticism of the "EasyInstall" library. (Phillip Eby's personality is no help here, and I am hardly his best apologist for his personality defects, but the man does some good work.) The Reddit comments of Mark Pilgrim's "httplib2" write-up is the nittiest of nit-picking, and conflating of pertinent issues. Some idiot was trying to argue that local disc caching is sometimes higher latency than caching on a local network call. I guess some weird local network with a massive RAM cache and only a single workstation user. Dumb stuff. Then some idiot complained that httplib2 does too many "correct" things by default, and it was interfering with him writing a mobile device application, badly.

The human brainImage via Wikipedia

All you can do is call it like you see it, and hope the silent crowd of competent developers recognize the garbage comments for what it is. And maintain healthy brain tissues.
Reblog this post [with Zemanta]

Run a lingerie shop while blushing, stammering, hiding from wife

I am not sure how I would manage to run a lingerie shop while blushing and stammering and being incredibly self-conscious about having a visible erection. I am not sure how I would run a lingerie shop without my wife finding out. Instead of selling, I would spend all my time hiding from my potential patrons and my wife - hiding in the back of the shop amongst the boxes of frilly underwear.
LINGERIE 2009 085
Having a store is difficult, in any economy, because of the fixed expenses, especially rent. That is why the Apple store is so impressive. I admire Steve Jobs for pulling it off. Took my daughter there to buy a colorful case for her iPod Touch, and the store was packed, and people seemed happy and employees where easy to find. I searched around for a extended battery for her iPod, and she planted herself in front of a workstation running a kid's game. Very well run store. The other stores we visited at the mall just didn't seem to have the same amount of product being moved. It is all about Gettin' Paid, Baby!

If I had a store, it would have to be a labor of love, where even if I wasn't moving tons of product, the store would be full of enthusiasts, which is nice. Maybe a knife and cutlery store, where I also do reasonably priced sharpening, while patrons wait. The mechanics of a properly sharpened knife or cutting tool are interesting, and sharp knifes are less dangerous than dull knives, because a dull blade leads to excessive force to cut leads to the knife slipping and stabbing leads to somebody getting really hurt. People instinctively treat a well sharpened knife carefully, as well. Maybe a very large selection of protective covers for all kinds of cutlery, so people could walk in with their nice cutlery, get it sharpened while they wait, and leave with a snug fitting protective cover, so their knives stay sharp and safe in the drawer. And they would also walk out with new cooking utensils, because they browse while they wait.

4 Thanksgiving Turkeys by Mother and Son!Image by cobalt123 via Flickr
Also, sell brined turkeys, deep-fat-fried turkeys, smoked turkeys - because those are difficult to do with a large bird, keeping the temperature correct, and also because deep-fat-frying turkeys can be very dangerous. I think people would appreciate it, because a properly brined turkey is a very moist and tasty treat, and gives good leftovers.

My wife always talks about opening a restaurant. She is a very fine cook, of many different types of food, of many different types of cuisine, and instinctively knows how to cook efficiently so that the courses of food get in front of the patrons at the right time. But if any customer complains, she will cleave their head open with a butcher's knife. (My baby is a little sensitive to criticism.) Probably best to serve from a open window on the side of a building, so people take their yummy food and split, or otherwise focus on take-out. Reduce the chances of homicide of complaining customers.
Enhanced by Zemanta

Friday, June 12, 2009

Jp Calderone knows how to override __eq__. Do you?

Took me a while to find this, so let me blog it now, for prosperity:

CPythonImage via Wikipedia

How to override comparison operators in Python Jp Calderone goes into much more detail than just how to write proper "__eq__" and "__ne__" methods for your own Python classes, but it is surprising how well hidden the details for correctly implementing "__eq__" and "__ne__" are. I believe the issue is less critical in Python3, because it does the correct thing when only "__eq__" is implemented. Here is the sample code:
class A(object):
    def __init__(self, foo): = foo
    def __eq__(self, other):
        if isinstance(other, A):
            return ==
        return NotImplemented
    def __ne__(self, other):
        result = self.__eq__(other)
        if result is NotImplemented:
            return result
        return not result
If you want an immutable object that can be used as a dictionary key, you will want to implement "__hash__", along with "__eq__" and "__ne__". If you are implementing inequality comparisons - Be Careful - supply the full complement of inequality comparisons and take care when using "NotImplemented". The default implementations of "less-than __lt__" "less-than-or-equals __le__" "greater-than __gt__" "greater-than-or-equals __ge__" aren’t very useful - they compare by address using id(). This default inequality comparison can introduce intermittent bugs in your comparison code. If there is no meaningful comparison between different types or classes, raise a TypeError, so there is no risk of falling back on the terrible default inequality comparison implementation. This problem will be fixed in Python3. The fastest and most complete solution is this code from Raymond Hettinger - Python Cookbook recipe 576685: Total ordering class decorator.
def total_ordering(cls):
    'Class decorator that fills-in missing ordering methods'    
    convert = {
        '__lt__': [('__gt__', lambda self, other: other < self),
                   ('__le__', lambda self, other: not other < self),
                   ('__ge__', lambda self, other: not self < other)],
        '__le__': [('__ge__', lambda self, other: other <= self),
                   ('__lt__', lambda self, other: not other <= self),
                   ('__gt__', lambda self, other: not self <= other)],
        '__gt__': [('__lt__', lambda self, other: other > self),
                   ('__ge__', lambda self, other: not other > self),
                   ('__le__', lambda self, other: not self > other)],
        '__ge__': [('__le__', lambda self, other: other >= self),
                   ('__gt__', lambda self, other: not other >= self),
                   ('__lt__', lambda self, other: not self >= other)]
    roots = set(dir(cls)) & set(convert)
    assert roots, 'must define at least one ordering operation: < > <= >='
    root = max(roots)       # prefer __lt __ to __le__ to __gt__ to __ge__
    for opname, opfunc in convert[root]:
        if opname not in roots:
            opfunc.__name__ = opname
            opfunc.__doc__ = getattr(int, opname).__doc__
            setattr(cls, opname, opfunc)
    return cls
For a lower tech solution, consider using this Mixin class for inequality comparison special methods [from Fuzzyman:]
class RichComparisonMixin(object):

    def __eq__(self, other):
        raise NotImplementedError("Equality not implemented")

    def __lt__(self, other):
        raise NotImplementedError("Less than not implemented")

    def __ne__(self, other):
        return not self.__eq__(other)

    def __gt__(self, other):
        return not (self.__lt__(other) or self.__eq__(other))

    def __le__(self, other):
        return self.__eq__(other) or self.__lt__(other)

    def __ge__(self, other):
        return not self.__lt__(other)

Monty Python's Flying Circus album coverImage via Wikipedia

[Aside & Plug] Let me take this opportunity to give a plug to the book IronPython in Action, by Michael Foord (Fuzzyman) and Christian Muirhead. The publisher, Manning, has a great service to Python Programmers on the book's website:

FuzzymanImage by Michael Foord via Flickr

Python Magic Methods I was a little disappointed (and surprised) that this great Python magic methods reference didn't give more tips about "__eq__" and "__ne__". But, otherwise, this is all great material and this is all new material, not just a re-hash of the original on-line Python docs. The best summary I have seen; even better than Alex Martelli's Python in a Nutshell.
Reblog this post [with Zemanta]

Wednesday, June 10, 2009

[Public Service Message] Jury Nullification: Please inform yourself about this fundamental right

[Public Service Message] Jury Nullification: Please inform yourself about this fundamental right

First a public service message... Please inform yourself of the right of Jury Nullification. This is a fundamental right you posses as a juror, that doesn't get a lot said about it. If the law is unjust, you have the right to acquit - to say "Not Guilty" - even in the face of the defendant's violation of the letter of the law.

This is Swampyank's copy of Image via Wikipedia

You can read more about Jury Nullification here: I will not lie - exercising your right to Jury Nullification takes guts. I have never yet practiced jury nullification. In my jury duty career I have only had the guts to admit to the prosecuting attorney during jury selection that I could not find any defendant guilty of a drug offense, even if the defendant was a drug dealer (which was the nature of this trial). I was excused, and all I did was make the jury selection for this particular drug trial slightly harder to complete. I felt a little conspicuous back in the juror duty waiting room, when I returned, because the majority of people in my area are very conservative, and I don't welcome people pointing at me behind my back. But in the end, I felt not too bad, because through the whole process I was simply being completely truthful. If I was a twelfth juror, I am not sure I would have the guts to be the lone holdout and have the whol

cover of the pulp novel, I, the JuryImage via Wikipedia

e weight of the trial proceedings on my shoulders. So, what I did was a compromise, by being truthful to the prosecuting attorney during jury selection. But no matter what your personal values, it is important to not throw away your right to Jury Nullification, without some consideration first. After consideration, you can proceed as you see fit. OK, done with the public service message...

The book I would take if I had jury duty today would be Judea Pearl's _Causality: Models, Reasoning, and Inference_, because I have to review the book again (and review the notes I wrote in the margins in my own copy). It is a very difficult book - I was only able to read about six pages a day. The book is about Causality -- effect following cause. We take the concept for granted, but it has been on shaky ground since David Hume in the 18th century. But now, because of researchers like Judea Pearl, it is on solid footing. Here is the 5 minute summary: Write down all the possible causes and effects on a piece of paper - we will call these "points". Draw arrows from things you think are direct causes to the things you think are direct effects. Now you will have a bunch of "points" and "arrows" between those points. Look for loops - search for any "loops" that can be made by tracing your finger from point to point, always tracing your finger from arrow tail to arrow head. Are there zero loops? If so - good! - you have a description of causality, and you can use this diagram to understand the casual effects and interactions. Now, how can you tell if your diagram is, in fact, representative of the real world? Well, on the points of the graph, there is a "DO operation" linked with a manipulation you can do in the real world. Manipulations can be like fixing different variables in a scientific experiment, or like making a careful experiment that isolates the object of interest from anything that might mess things up. Consider these points: (A) Lawn Sprinkler near sidewalk; (B) Rain cloud over sidewalk; (C) wetness of sidewalk; (D) slipperiness of sidewalk; (E) number of people falling on slippery sidewalk Consider these arrows: (A -> C); (B -> C); (C -> D -> E) Draw it, run finger over graph, cannot find any loops - good! - ready to begin. We will try the DO operation on (C). On the graph, I just set "wetness" to "very wet" or "very dry" or whatever, and make a prediction. In the real world, I can either water down the sidewalk with a garden hose, or shield the sidewalk from the sprinklers with a tarp and shield from rain with a canopy and dry the sidewalk with a towel then a hairdryer. If the predictions match between the graph and number of people falling on the slippery sidewalk, I feel good that I have a graph representative of the real world. (This is a dumb example, because humans can handle the casual analysis of this situation with no problem. It only gets interesting as the graph gets more complicated.) Check the book out of your nearest university library (there is a 2nd edition coming out soon, but I wouldn't worry about it - no major revisions). Read only the last chapter, which is the text and slides from an informal lecture Judea Pearl gave. It is enough. The rest of the book is very difficult, or at least it was for me. I will probably have to read it two or three more times, on top of already reading it once carefully, to fully understand everything developed. My copy is heavily marked up, and I think I made a lot of mistakes, because I needed to think through it all more. So you probably don't want to borrow my marked up copy (not that I would actually lend it to you - the guy who lends out my books is sick today :P )

Reblog this post [with Zemanta]