Monthly Archive for February, 2007

Time for a Correction

One of those Newton’s Apple-type trivia bits I tend to trot out with reasonable frequency (and have for as long as I can remember, practically) is that glass is “supercooled liquid”.

Now Garret points me to this article which actually shows us that I was ill-informed:

When glass is made, the material (often containing silica) is quickly cooled from its liquid state but does not solidify when its temperature drops below its melting point. At this stage, the material is a supercooled liquid, an intermediate state between liquid and glass. To become an amorphous solid, the material is cooled further, below the glass-transition temperature. Past this point, the molecular movement of the material’s atoms has slowed to nearly a stop and the material is now a glass. This new structure is not as organized as a crystal, because it did not freeze, but it is more organized than a liquid. For practical purposes, such as holding a drink, glass is like a solid, Ediger says, although a disorganized one.

Good enough. Lesson learned and all that.

Amorphous solidit is.

Chimps With Pointy Sticks!

Senegalese chimps appear to manufacture and use spear-like implements.

In one case, Pruetz and Bertolani, from the Leverhulme Centre for Human Evolutionary Studies in Cambridge, UK, witnessed a chimpanzee extract a bushbaby with a spear.

In most cases, the Fongoli chimpanzees carried out four or more steps to manufacture spears for hunting.

That’s just great.

When were humans first making spears? At least now we can write up a timeline for when to expect the Simianistas to take over completely.

PostgreSQL INSERT RETURNING Rocks My Socks

A common need for web apps is to insert something into a database table and then immediately find out which ID got assigned to your new thing so that you can refer to it later in the script (probably while inserting more data).

A lot of folks start out doing something along the lines of:

INSERT INTO Addresses (address, city, state, postalcode) VALUES ('123 Main St.','Springfield','MA','01109');
SELECT max(id) as ID FROM Addresses;

After that, the folks on Microsoft SQL Server tend to discover the combination of SET NOCOUNT ON and @@IDENTITY:

SET NOCOUNT ON;
INSERT INTO Addresses (address, city, state, postalcode) VALUES (’123 Main St.’,'Springfield’,'MA’,'01109′);
SELECT id = @@IDENTITY;
SET NOCOUNT OFF;

Now, at my new gig, we use PostgreSQL. Today, I finally found myself wondering if/how I could achieve the NOCOUNT/@@IDENTITY behavior. Turns out, it’s super easy and almost even sexy (since version 8.2, I guess):

INSERT INTO Addresses (address, city, state, postalcode) VALUES ('123 Main St.','Springfield','MA','01109') RETURNING id;

That, my friends, is HOTT.

Sure, it’s non-standard SQL, but what’s the point of picking a particular RDMS if you don’t use the magic that it offers?

Big Men Can’t Spin

Oh, but they can!

If you had told me, I never would have believe that Shaquille O’Neal could ever do a windmill spin. I wouldn’t believe he could have done it when he was young and strong, much less at his current age (he’s two months younger than I am) and decrepitude (he’s starting to get the Kareem Shuffle thing going).

Well done Shaq!

Totally unrelated YouTube silliness: My generation’s answer to Ian AndersonThe Beatboxing Flautist (doing the Mario Bros. theme, no less).

To Read

How Not to Talk to Your Kids by Po Bronson (Interesting considering some gossip I’ve heard regarding how Bronson’s kid is handled day to day.) With nice extras in Po’s blog.

Then the students were given a choice of test for the second round. One choice was a test that would be more difficult than the first, but the researchers told the kids that they’d learn a lot from attempting the puzzles. The other choice, Dweck’s team explained, was an easy test, just like the first. Of those praised for their effort, 90 percent chose the harder set of puzzles. Of those praised for their intelligence, a majority chose the easy test. The “smart� kids took the cop-out.

As a so-called “smart” kid, I can recognize that. Luckily, my upbringing also offered example after example of work ethic and perseverance.

Pharm Animals Crank Out DrugsEw… I’m generally fairly pragmatic about stuff like this, but yeesh this makes my skin crawl.

This might be scarier, though.

This is awesome!

The Telephone Consumer Protection Act of 1991, signed into law by George Bush the elder, led to creation of the ragingly popular Do Not Call List. But tucked away in the bill was another important provision that entitles consumers to take what’s called a “private right of action.” For each violation of the act, consumers can sue for a $500 penalty. Violations include calling after a consumer has told a company to stop, or failing to provide the consumer with a copy of the firm’s Do Not Call policy.

That’s almost enough to make me start answering those “Unknown Name / Unknown Number” calls I get every day.

The Lesson

Never bet against Boston University in the Beanpot.

After falling behind early, Boston College took control of Monday’s championship game halfway through the second period and outshot Boston University 26-10 through the last 40 minutes of regulation.

“We looked like we were waiting to lose,” Terrier coach Jack Parker said.

But in overtime — after playing relatively little through the last two periods following an injury to Eric Thomassian — junior Brian McGuirk picked an opportune time to score his first goal of the season, burying a high wrister glove-side off a faceoff at 5:06 of overtime to give BU a 2-1 win and yet another Beanpot championship.

Sweet! (I’m bummed that I forgot to listen to the game, but it’ll be OK.)