Friday, June 29, 2012

I keep forgetting the word leitmotif.

It's starting to annoy me. It's one of those very useful words that refer to something specific that just slips my mind when I want to use it. I also recently forgot the word Procrustean much to my dismay. I'm tempted to use ixperienceness at some point but I think the one place I saw it made it up "I experience ness".

Tuesday, June 26, 2012

That was quick.

I went from think that's stupid to oh, hm, that's right in about 3 seconds.

Researcher argues that plants see.

What, plants don't have eye... --  “A plant sees what we see. A plant sees light.” -- Oh, wait, plants are all about the light, and the direction it comes from and moving towards it and smelling particular things and communicating. So much for my eye ball fetish. If you have a bunch of leaves I don't see how I can't accept that they are a massive number of light sensing organs.
ZOMG, an atheist blogger I've never heard of decided that a malformed question was too hard to answer and converted to Christianity.

This made the news.

There's a reason why this makes the news. It's man bites dog. Serious, religious person becomes an atheist. That happens all the time. Most atheists *ARE* former religious people. That's dog bites man. But, an atheist become Christian that's dog bites man. It's rare and it's rare for a reason. Religion (yours included) typically looks obviously wrong from the outside. So RA's conversion, or Patrick Greene's half conversion, or Flew's descent into dementia, actually gets some coverage because it's a rare enough event to care about, but only because Christianity is wrong enough to make it that rare.

In short, though this seems like a win for Christianity. The fact that it's report worthy is a failure for Christianity. It shows how rare your successes are. It's like that time when the Iraq war had zero US soldier casualties for a month. The fact that that got reported, is actually, viewed in a larger context a bad thing overall.

Thursday, June 21, 2012

Why are nigeria scammers upfront with the whole they are Nigerian Scammers thing?

http://research.microsoft.com/pubs/167719/WhyFromNigeria.pdf

The bad spelling, the claiming to be from Nigeria thing, this is suppose to reduce false-positives. The last thing they want are people who are fooled enough by the well done font and professional looking design and the seemingly legit promises to respond initially and then take up their very real time and then balk at the part where you wire money to Nigeria. It turns out if you make it obvious, only the very very stupid will respond, and that's exactly the target demographic.

Wow. I wouldn't have thought of that.

Tuesday, June 19, 2012

Of suns and designers.

“It's natural to think that living things must be the handiwork of a designer. But it was also natural to think that the sun went around the earth. Overcoming naive impressions to figure out how things really work is one of humanity's highest callings.  (Can You Believe in God and Evolution? Time Magazine, August 7, 2005)” ― Steven Pinker

I see the sun it's like two inches wide. The earth is all around us and doesn't move. That stupid bright spot spends all day moving. It's obvious why people think the sun moves around the Earth, because it's obvious!

Now, why is it that evolved natural-selected things look so much like the handiwork of a designer? Why is that view the naive view. We can concede it's both the naive view and the wrong answer, but why are humans so inclined to think it's the right answer. What's the two-inch dot vs. panorama of planet reason why we think design is a good explanation for life, even if we scientifically know it's Darwin all the way back?

Monday, June 18, 2012

I'm excessively proud of this...

In reference to my propensity to argue with wrong people for a long time, a comparison was made to Don Quixote.

"I'm quite quixotic like that. I see a what may be a wayward intellectual giant that I can help, so I tilt my sharp wit and pointed remarks at what inevitably turns out to be a grinding experience by something dumb as a rock and powered by hot air."
 You see, it's making the whole attacking giants which turn out to be windmills thing into a parallel statement. It's overly impressive. Especially because I fear it will fall flat. 

Monday, June 11, 2012

Oh My Darling Clementine

Final Stanza

How I missed her, how I missed her,
How I missed my Clementine,
Til I kissed her little sister,
And forgot my Clementine.

Friday, June 8, 2012

How Absurd and Scary (more Java coding).

I wrote a class that scares me. It makes nodes into widgets and calls itself recursively.

import java.awt.Image;
import java.awt.Point;
import java.beans.BeanInfo;
import java.beans.PropertyChangeEvent;
import java.util.ArrayList;
import java.util.Collection;
import javax.swing.Action;
import javax.swing.JPopupMenu;
import javax.swing.SwingUtilities;
import org.netbeans.api.visual.action.ActionFactory;
import org.netbeans.api.visual.action.PopupMenuProvider;
import org.netbeans.api.visual.layout.LayoutFactory;
import org.netbeans.api.visual.widget.Scene;
import org.netbeans.api.visual.widget.Widget;
import org.netbeans.api.visual.widget.general.IconNodeWidget;
import org.openide.nodes.*;
import org.openide.util.Lookup;
import org.openide.util.lookup.Lookups;

public class NodeWidget extends IconNodeWidget implements PopupMenuProvider, Lookup.Provider, NodeListener {
    Node node;
    boolean vertical;
    public NodeWidget(Scene scene, Node node) {
        this(scene,node,true);
    }
   
    private NodeWidget(Scene scene, Node node, boolean vertical) {
        super(scene);
        this.vertical = vertical;
        this.node = node;
        Image icon = node.getIcon(BeanInfo.ICON_COLOR_32x32);
        if (icon != null) {
            getImageWidget().setImage(icon);  
        }
        getLabelWidget().setLabel(node.getDisplayName());
        if (vertical) {
            this.setLayout(LayoutFactory.createVerticalFlowLayout());
        }
        else {
            this.setLayout(LayoutFactory.createHorizontalFlowLayout());
        }
        if (node.getActions(false) != null) {
            getActions().addAction(ActionFactory.createPopupMenuAction(this));
        }
        refreshChildren();
        node.addNodeListener(this);
    }

    @Override
    public Lookup getLookup() {
        return Lookups.proxy(node);
    }

    @Override
    public JPopupMenu getPopupMenu(Widget widget, Point point) {
        JPopupMenu pop = new JPopupMenu();
        for (Action action : node.getActions(false)) {
            pop.add(action);
        }
        return pop;
    }
   
    private Collection childnodewidgets = new ArrayList<>();
    private void refreshChildren() {
        if (!SwingUtilities.isEventDispatchThread()) {
            SwingUtilities.invokeLater(new Runnable() {
                @Override
                public void run() {
                    refreshChildren();
                }
            });
            return;
        }
        for (Widget widget : childnodewidgets) {
            widget.revalidate();
            widget.removeFromParent();
            revalidate();
        }
        childnodewidgets.clear();
        Widget widget;
        if (!node.isLeaf()) {
            Children c = node.getChildren();
            for (Node n : c.getNodes()) {
                widget = new NodeWidget(getScene(), n, !vertical);
                childnodewidgets.add(widget);
                addChild(widget);
                widget.revalidate();
                revalidate();
            }
        }
        getScene().validate();
    }

    @Override
    public void childrenAdded(NodeMemberEvent nme) {
        refreshChildren();
    }

    @Override
    public void childrenRemoved(NodeMemberEvent nme) {
        refreshChildren();
    }

    @Override
    public void childrenReordered(NodeReorderEvent nre) {
        refreshChildren();
    }

    @Override
    public void nodeDestroyed(NodeEvent ne) {
       removeChildren();
       removeFromParent();
    }

    @Override
    public void propertyChange(PropertyChangeEvent evt) {
    }
   
}


 That's spooky. And looks terrible-ish. I'll remove that recursive children part and actually use it. But, it uses Virtual Library and cross connects Netbeans display Nodes. I dragged a directory out of favorites (and had an AcceptAction in the scene to grab nodes) and the sucker did an entire directory display all over the place.