johnk's blog

Not Quite

I don't know what it is with college students these days. They were pretty illiterate when I went to school, but, today, they're displaying their ignorance online.

Learn Capitalism: Bank Implode-O-Meter

The Bank Implode-O-Meter is an interesting way to learn captialism: by watching it fail. This sector blog/news/community is crazy.

Lazy Evalutation in PHP (sorta)

This is a nice little example that will show you how to do something really useful and cool. It'll also show you how PHP kinda sucks:


function f( $x )
        say("function f called with $x...");
        return create_function( '', " return quote('$x'); ");

function quote( $s )
        say('quote called...');
        return '***'.$s.'***';


$x = f( 'hello, world' );

say('$x defined as '.$x.'...');

print $x();

///// utility funcs
function say( $s ) { echo $s.'

'; }

The results look like this:


function f called with hello, world...

$x defined as �lambda_6...

quote called...

***hello, world***

Anti-Microsoft Post to Tech Republic

There was a thread on TR lionizing Bill Gates. As usual, a lot of incorrect information was being spread about the Richest Man On Earth. I had to post this corrective:

Gates and Microsoft have had some legal problems.

In the late 90s, there was the "permanent independent contractor" problem, when ICs and temps were working at MS for years, inside their offices, during regular business hours. This was against the law. (If you're in this situation, your "client" aka "boss" is breaking the law.)

See Vizcaino v. Microsoft.

Newtown, Portsmouth, Virginia, USA

Stolen from tje Washington Post

Portsmouth, Va.: An Olde but a Goody

By Diane Daniel
Special to The Washington Post
Wednesday, March 26, 2008; Page C02

My Aunt Margaret was aghast. A couple of years ago, I introduced her to a friend and mentioned that she and my mother had grown up in Norfolk.

"Portsmouth!" Aunt Margaret barked. She was used to people getting the two confused or, more often, simply overlooking Portsmouth for larger and wealthier Norfolk. But her own niece?

Solar Tips

I'm not a solar pro, or even a fan, but my friend asked about solar power generation. He's got it in his head to get a PV array to save money and maybe make money.


Here's what I told him:

  1. First, reduce energy consumption by conserving power.
  2. Second, solar water heating pays back faster than solar electricity. Get that first.
  3. Third, before getting a solar array, see what appliances can be replaced with DC-power equivalents, or natural gas powered equivalents, and what they cost. Plan the PV purchase around these upgrades. You lose energy when DC is converted to AC (and then back to DC in the electronic appliance).
  4. Fourth, get the panels in, and start buying the upgrades.

Routers Hacked via Browser

This is uncool: Router hacked through a web browser.

A page will log into your router and force an update with a bad firmware. The only fix would be to reload good firmware, and then fix your router to be less hackable.

I just started on a network where the router had been hacked, but only inasmuch as the DNS was pointing to a nameserver that resolved bad addresses to a Ukrainian search engine.

HSA, MSA, FSA, Medicare

Last year was pretty heavy with medical expenses, so here's a compilation of links to reading material about the current government health care services.

First, some inspirational/depressing informatin, "Doggedly Persistent, Untying Medicare Knots for the Elderly from the NYT.

FSA - Flexible Spending Account - a savings account that will give you a debit card to pay for copays, drugs and other medical things. It saves money, but, you need to spend the total amount saved every year. You also need to turn in receipts.

Mike Huckabee on Pastor Wright

And one other thing I think we've got to remember: As easy as it is for those of us who are white to look back and say, "That's a terrible statement," I grew up in a very segregated South, and I think that you have to cut some slack. And I'm going to be probably the only conservative in America who's going to say something like this, but I'm just telling you: We've got to cut some slack to people who grew up being called names, being told, "You have to sit in the balcony when you go to the movie. You have to go to the back door to go into the restaurant. And you can't sit out there with everyone else. There's a separate waiting room in the doctor's office. Here's where you sit on the bus." And you know what?

Daylight Savings Time Misconfigurations between Computers Can Lead to Cumulative Data Errors

Symptom: my web app starting losing a day whenever I edited some data records. This app was working fine for a while, then, in March, it started losing time. Because my time was quantized to days, it looked like I was losing a day every time I saved the record.

The environment was a shared web hosting account, with PHP for the app, and a MySQL database behind it, on a separate machine.

According to a new law, starting in 2007, DST starts three weeks earlier than it has in the past.

I suspected that the problem is that one machine has the old style DST timezones, while the other machine has the new DST settings. So I created a test script to simulate the effect of multiple edits on a record.

Salary Surveys for Information Technology

2008-03-12: a report on Tech Republic. It's done by Global Knowledge

Web dev salary survey on Zeldman's A List Apart

Another popular survey is done by SAGE.

Reading Stuff: Vista Hobbles Microsoft, Social Nets "Like Air", Work

Strange story. MS execs were upset about problems getting their new Vista computers to function well. @NYT.

Good article. Social networks will be like air

The sad state of the labor department, which now dislikes workers.

H. Ross Perot's Giant Sucking

Once again, a break from tech to do some politics.

Remember H. Ross Perot, founder of Perot Systems and EDS? When he ran for President, he played the American people like a fiddle. Said that NAFTA would send jobs away, which it turned out, it did, in a big way, and hurt a lot of workers.

Well, in 2006, his company set up shop in Mexico, to help American companies outsource tech support.

Giant Sucking Sound: Perot Systems Outsources To Mexico

Watada, Resister

I don't really do the political thing too much on this blog (intentionally), but this is a good video by Curtis Choy. It's living history. The next video is interesting - do college kids know about the internment camps.
Syndicate content