Wednesday, November 24, 2010

Tenneseans, I hope there's no disaster, but if there is, you're welcome.

 In 2005, there was a hurricane which forever changed New Orleans. But not only that, it woke up many people who were in the business of ensuring that poor people affected by those disasters had access to funds and services to which they were due by their government, their employers, et cetera. My wife was one of those people. As far as I can cobble together, disaster legal services was a much more organized and effective years before that, and it went in to a bit of a decline. Until we met Katrina.

So my wife, a former disaster legal aid attorney, asked if there was a way I could help coordinate communication between different groups. "Something like a listserv." I still find it adorable that she calls it a listserv. So I set up a mailing list so people around the country could share information. Nothing much, really, but it helped get people together.

I have come to find out that the Memphis Bar association has a nice condensed disaster relief legal assistance reference guide for volunteer attorneys. Stuff like this:
Q. 7 I received my check for rental assistance, but there are no places to rent. 

If you are eligible for housing assistance from FEMA but are unable to find a rental house or apartment within a reasonable commuting distance of your damaged home, please contact FEMA at 1-800-621-FEMA (3362) or visit a nearby Disasater Recovery Center. FEMA will evaluate your situation, and, if appropriate, may authorize a travel trailer or mobile home.
Going back to the title page it says:
With special thanks to the following contributors:

...
Robert Konigsberg
I didn't do much, but it's nice that it helped.

Thursday, November 11, 2010

Replacing my Mac Keyboard with a Logitech Internet Navigator

(Second in my Luddite Internet Technology Series)

The Caps Lock key on my Mac keyboard was not responding so I pulled out the first keyboard I could find lying around: the Logitech Internet Navigator keyboard. You know the type: the one with buttons labeled "Search", "Shopping", "Favorites". It probably came with a machine I bought long back when. But you know what? I love it.

It has some nice features I came to expect from my Mac keyboard: volume controls, and media play/rewind/pause buttons. All those work as you would expect. There's also a little scroll wheel on the keyboard which I don't really need since I have a scroll wheel on my mouse. Even the "Sleep" button brings up the sleep dialog box. The only thing missing is a replacement for the eject button. (Update: downloading the Logitech Control Center for OSX did the trick. Now the only thing missing is a USB port.)

The only change I had to make for it to work well with OSX was to swap the behavior of the Command and Option keys (Pressing Command was sending Option and vice versa.) So thankfully the OSX keyboard settings allow me to reprogram the function of those keys, so I implemented a modifier swap. (Update: Once I installed the Logitech Control Center, the keys were swapped once more, Restoring original behavior of keyboard modifiers did the trick, effectively making this paragraph "Remember to install the Logitech Control Center and do nothing else."

As for general keyboard behavior, the keys have a nice tactile feel, you don't feel like you're constantly hitting the bottom of the keyboard tray as you do when using the Mac keyboard. It comes with a keypad on the right side, which I've come to expect with all my keyboards. The keys are slightly more smooshed together. But hey, nothing is going to do it for me quite like my IBM Model M. I just wish in this case that for "IBM Model M" the M stood for "Macintosh."

In retrospect, the keyboard and mouse that came with my Mac Pro were probably the first two such peripherals that I have ever thrown out due to mechanical defect. Oh, and their earbuds. And on the other side of that is Logitech: with the exception of one piece of hardware, I've never been disappointed with their products, and as of today I'm no longer disappointed with that one exception.

It's nice to be able to bring a 2002 peripheral with so many silly buttons to just work naturally with a modern OS. Back in 2002, all those buttons were pie in the sky. Today they're launching my apps.

Sunday, November 07, 2010

Making a Table of Contents for Sites with Google Apps Script

At work I was building a document using Google Sites. While building them, the section headings were given their own numbers, like so:

Introduction
Part 1: Apples
  Introduction
  1.1: Fuji
  1.2: Macintosh
  1.3: Cameo
  Summary
Part 2: Pears
  Introduction
  2.1: Bosc
  2.2:D'Anjou
  2.3:Warden
  Summary

Yes, of course there's already a gadget you can use to create a table of contents for your page (Menu > Insert > Table of Contents). It's a rather nice gadget, but because I've intentionally numbered some sections and not others, there's a mental mismatch.

As you see, the Table of Contents generator gave section numbers to everything, so depending where you look, 2.2 is either Fuji apples or Bosc pears.

I didn't want to remove the section headings, and there was no real way to remove them via the Table of Contents gadget.

If you're not familiar with Google Apps Script, it's as you think: a scripting engine for Google properties. It's particularly powerful for scripting spreadsheets, and. as of October 22, you can process Google Sites with Google Apps Script.

Before going any farther, let me show you what I generated with Google Apps Script:

I'm no HTML Picasso, but it's not bad. Not bad at all. The links work, thanks to Google Sites automatically injecting <a name> tags with every <h[1-6]> tag.

The code

Let me share the code with you. First, here's how it's invoked:

function run({
  createToc(
    'https://sites.google.com/site/sitename/source-page',
    'https://sites.google.com/site/sitename/destination-page');
}



Yes, so you can specify a page from which to read and generate a second page with the table-of-contents included. (Side note: This actually gives me lots of ideas about workflow -- envision if the source URL was a private site where drafts were written, you could use Google Apps Script as a way to push from a staging area to production.)

OK, the code. It's mostly processing XML and generating HTML.

// I do not warrant this code in any way.
// If you break something important, don't come crying to me.
// Actually, check your Sites revision history first.
// Then go cry.

// Load content from fromUrl. Find the table of contents, and stick it in the document
// Save at toUrl.
function createToc(fromUrltoUrl{
  var page SitesApp.getPageByUrl(fromUrl);
  var content page.getHtmlContent();
  var doc Xml.parse(contenttrue);
  var root doc.getElement();
  var toc=[];
  parse(tocroot);

  var prefixDiv "<div id='kberg-toc'>";
  var postfixHtml "</div><div id='kberg-toc-coda'/>";
  var codaDiv "<div id='kberg-toc-coda'/>";

  var html prefixDiv tocToHtml(tocpostfixHtml;

  var index content.indexOf(prefixDiv);

  var newContent;
  if (index == -1{
    var "<div dir='ltr'>";
    index content.indexOf("<div dir='ltr'>"x.length;
    Logger.log("3: " index);
    var outdex index;
    newContent content.substr(0indexhtml content.substr(outdex);
  else {
    var outdex content.indexOf(codaDiv);
    newContent content.substr(0indexhtml content.substr(outdex codaDiv.length);
  }
  var newpage SitesApp.getPageByUrl(toUrl);
  newpage.setHtmlContent(newContent);
}

// Recurse through the XML, finding <h[1-5]> tags.
function parse(tocelement{
  var name element.getName().getLocalName().toUpperCase();
  if (name == "H1" || name == "H2" || name == "H3" || name == "H4" || name == "H5"{
    var level parseInt(name.substring(1));
    var anchorChildren element.getElements("a");
    var anchorText (anchorChildren.length 0)
        anchorChildren[0].getAttribute("name").getValue("";
    
    var item {
      level level,
      anchor anchorText,
      description element.getText(};
    toc.push(item);
  else {
    for each (var child in element.getElements(){
      parse(tocchild);
    }
  }
}
     
// Convert the table of contents entries into HTML.
function tocToHtml(toc{
  var html =
      "<div style='width: 250px; background-color: #e8e8e8;'>\n"
      "<br/><b>Contents</b><br/><br/>\n"
  for each (var entry in toc{
    var html2 indent(entry["level"]"<a href='#" entry["anchor""'>" +
        entry["description""</a><br/>\n";
    html html html2;
  }
  html html "<br/></div>";
  return html;
}

// Given an indentation level, return (2 * (level - 1)) non-breaking spaces.
function indent(level{
  var "";
  for (var 0level 1i++{
    "&nbsp;&nbsp;";
  }
  return x;
}


Final Thoughts

The remaining issue is triggering this script. Google Apps Script does have an event notification mechanism (e.g. run this script when the spreadsheet opens) but right now, Google Sites only has a time-based trigger (e.g. run this script every n minutes/hours.) To be honest, if an onSave trigger was written, would createToc(url, url), which would save the TOC to itself, trigger another onSave event? No big deal, if it results in a no-change, I could tweak the code accordingly.

But the lack of an onSave trigger makes this just slightly usable for me. Having this run every two minutes is too frequent for when the site isn't updated. I don't know the plans for the Google Apps Script team and/or the Google Sites team, but this is a good use case for onSave.

I wonder how hard it would be to hide the default TOC renderers' section numbers with clever CSS, or just write my own Google Gadget...

Tuesday, November 02, 2010

My new iPod Nano 6g

I wear out equipment pretty quickly. In fact I'm surprised my Nexus One has lasted for almost a full year without a major scratch. But iPods, well, those I wear out pretty quickly. And in the last two years I've really started to listen to podcasts and audio books, and so my iPods have been well loved.

My last one, the iPod Nano 4g had one newer feature that I really relied upon: sleep mode. I'd put something in the dock, and set it to sleep in 30 minutes. By then I'd be fast asleep. It was a good, reliable pattern.

Then my Nano broke. I pulled out a 2G Nano which worked, well, it worked OK but didn't have the sleep function. I'm still not ready to go all-out with my Nexus One. The battery life isn't quite ready for it, and, let's face it, I break stuff like that, and I'd rather keep it around for phone calls.

So I ordered the iPod Nano 6G.

In short, I just love it. Engadget has a review that covers the iPod's features; feel free to read that for something thorough.

The good:
  • The new UI is snappy and easy to use. The replacement of a the scroll wheel with a touch screen makes for easy interaction. I didn't have to learn how things worked, I figured it out naturally. It's meant to look like iOS, but isn't iOS. For instance, if my research is right, you can't write apps for it.  Given that there are five, pages for apps in the home screen and only fifteen apps, there seems to be natural room for expansion in future firmware updates.
  • Radio! When I showed this to my wife, she brought out her iPod envy. It's got a sufficiently workable radio receiver.
  • Pedometer. Nice feature, it's even gotten me to walk more. Allegedly you can publish your pedometer data to some Nike service, but I'm not particularly interested.
  • Sleep Mode is still there. Given that they removed so many other features (see below) I was glad to see the sleep mode was still there. It took a while to find it (it's in the Clock application.)
  • Also, When it's showing a clock face, it feels a bit like a pocket-watch. A very lightweight back-lit faux-analog pocket watch, but a pocket-watch nonetheless.
The bad:
  • Clumsy buttons. The use of more hard buttons on the iPod Nano feels like a bit of a cop-out, and even on my smaller hands, they're a bit hard to fumble with.
  • No video playback. Not even for video podcasts.  I don't mind much, they're clearly drawing a line between iPod and iPhone (or iPod touch.)
  • No games, no video camera, no contacts, no notes. I don't care about most of those, well, except for games, but I can always fall back on my phone if needs must.
  • Clumsy access to the dock connector. The headphone jack is so close to the dock connector that you have to remove the headphones before disconnecting the iPod. It's an irritating usability fumble, but understanding given the tiny form factor.
  • Tiny Engraving. I opted for engraving the device with my email address in case it gets lost. It's difficult to read the engraving without a magnifying glass. I'm guessing it's a 6-point font for a 20-character message.
The fact that they've removed features that might make someone more likely to purchase an iPod touch makes this feel much like the IBM PC Jr (a little nod to my fellow dinosaurs.) In some ways, it's like the PC Jr (replace chicklet keyboard with clumsy buttons.) Sure, they want you to buy an iPod Touch, but I'd rather have the lightweight device, and I already have a large bulky video-playing computer.

In short, this is great as a companion lower-power-consuming audio device.

Thursday, October 28, 2010

Plot Predictions for Avatar 2 and Avatar 3

Barron's reports that James Cameron has been given the go-ahead to produce two sequels to Avatar, to be released in 2014 and 2015. Here's my prediction of the critical plot points for next two films. These are not jokey predictions, I'm going for gold.

Avatar 2: The Na'vi are slowly rebuilding their home world. Sully is struggling to find his place on Na'vi, not only on this new world, but in his new body. The RDA returns, with a larger army, but also mega-avatars that are bigger and stronger. Also the technology is much better; the projection devices are portable. They're prepared, and ready to do business. In order to provide key defensive support to the Na'vi, which is shown to us as a threat to the now pregnant Neytiri, Sully is led by a yet-unknown Na'vi spiritual leader who restores Sully's original human (and paraplegic) form. Sully realizes this was a mistake, and manages to become a mega-Navi himself to, along with several new friends, destroy the mega-avatars. Sully fully accepts his Na'vi identity.

Avatar 3: Neytiri and Sully have their baby. Sully is also now an established leader among the Na'vi, but now things are turning political, and frankly, irritating. This was not what he expected in this new world! Sully's struggle is now with Neytiri. A couple of domestic fights and Sully turns all these negative feelings inward. There are some Na'vi who dislike the way Sully wants to lead the Na'vi, some of whom have strong spiritual powers. One of them feigns friendship and dupes him into a mystical event that creates a spiritual clone of the new mega-Sully, made only of his anger and fear. It also saps him of the power that makes him strong and confident, leaving him being less than half of himself. Sully needs to learn to trust in himself before the evil Sully can destroy Pandora ... which of course he does.

Come back here in 2016, tell me if I'm wrong.

(Credit: Louis Gray's share on buzz)

Thursday, October 14, 2010

On Teaching Ultimate Frisbee to Children

In September I started teaching co-ed Ultimate Frisbee to local middle school children. I spend three hours a week every Sunday assisting the coach, an impressive woman who balances teaching skills against just having fun, and somehow manages to corral the 30 boys and girls into doing drills and wearing pinnies.

And I don’t know if you’ve seen middle school children recently, but it's scary to be an isolated adult surrounded by 30 kids you've never met. What if they don’t listen to you? What if they don’t like you? So I laid back, helped the coach, and focused on very basic things: throwing, catching, one-on-one attention and congratulating good effort.

I saw a girl look dejected on her first day. I asked her what was wrong but I already knew: the boys weren't throwing to her, and when the disc was at her feet, another boy on the field would tell her to not pick it up so he could throw it. There wasn’t too much I could do about getting the boys to throw to her; that’s a problem anyone who's played any co-ed sport can understand (though I explained to both sides that you're less likely to score when you only look to throw to your friends). But when the Frisbee is at her feet?

“Just ignore them and pick it up!” I said.

Two weeks later during a pick-up game the Frisbee fell at her feet. She turned to get away from it when I yelled “Pick it up!”

She threw to another girl for a goal.

Another boy had the opposite problem.

“Nobody on my team picks up the Frisbee, and I have to pick it up every time!” he complained.

Apparently he didn’t like being forced to put the disc in play. OK. Simple advice, of course. Don’t pick it up! Someone else will eventually get it. He picked it up twenty minutes later.

“Hey! I thought you weren’t going to do that anymore.”

A third child is quite a good player. He likes making farther-distance throws, but long unfocused throws have a low-percentage chance of being caught. So his skill isn't translating into completed passes. I suspected his problem was a lack of focus and a desire to huck the disc (colloquial for winding up and letting go), so after his third low-percentage throw I spoke with him.

“The next throw you make, I don’t care how far it goes, I want it to connect.”

He looked shocked. But sure enough, his next throw was a good high percentage throw. But it was blocked! Someone on the other team was on the ball and blocked it. He turned to face me and yelled “It wasn’t my fault!”

“I know, I know. Good throw!” I yelled back.

His next two throws were excellent short-distance throws that found their targets.

The thing I had to remember is that kids that age are more emotionally delicate than they let on, so negativity has no place there. And I have to hand it to them: none of the kids call each other bad names, and nobody gets chastised over making mistakes.

This past Saturday the kids had their first scrimmage of the season against another team. I helped by motivating the team with non-stop encouragement and high-fives. Near the end of the game, I caught a player from the other team defending by blocking an area with his arm. A potentially illegal move, and an un-spirited play! I got angry! What a little punk! I let the anger dissolve and spoke with the other team’s coach so he would know to help the boy understand the non-contact rule. The coach explained. “Sure thing. But so you know, he’s only been playing for two weeks.”

I was relieved that I waited before speaking and awful at how poorly I read the situation.

After the game I approached the boy.

“Hey, nice game! You played well!” I said.

“Really?” he asked. He spoke with a soft voice. Such a boy!

“Sure! Did I hear you have only been playing for two weeks?”

“Yes.” Again with the soft voice.

“Well I wouldn’t have known. You play like someone who knows what he’s doing. Keep it up!”

“Thanks,” he said.

I am looking forward to next Sunday.

Wednesday, September 08, 2010

Desktop specs for the entry level programmer

A friend recently asked for advice. His son is looking to become a professional computer programmer and wants specs for a new desktop computer. I'm no longer up to date on the subject, but that didn't stop me from writing a 900-word opinion on the matter, which I present to you know.

---

This is a tough question to answer in a specific sort of way, made more difficult since I hardly buy desktops anymore. You can get an idea for basic specs by looking at any development IDE package (e.g. Visual Studio.) Here are some overall suggestions, though:

Important items: CPU, Memory, 7200RPM disk (as opposed to 5400 RPM), expandability
Less important items: Video card, audio card, USB ports, Firewire, hard disk quantity.

CPU +

CPU is important, not necessarily because of clock speed, which has recently been topping out, but because of the "number of cores" or "number or processors". Cores and processors aren't the same thing, but for the sake of this conversation let's say they are. More processors means more things the computer do at the same time. This can sometimes be valuable when you're writing software. But don't let yourself get carried away, particularly with a starting computer. If there's only one processor, I'm sure your son will do fine.

Memory +

This is pretty important, particularly as you deal with larger pieces of software. Developer tools can take up lots of memory, it's certainly possible. That depends on how large the products are that your son plans to write. But don't let 'budding professional programmer' get in the way here. I think getting memory is good. And you don't need to max it out now. Memory always gets cheaper (In the as houses always increase in value, well, not really, the takeaway from that is I really mean "mostly always" instead of "always")

Disks +

Disk: Disks are cheap. I mean, wow I can't believe how cheap they get. Unless your son is planning on processing lots of video (in which case a better video card might be necessary, but only might.)  When it comes to disks, though, performance can matter a great deal. Think about how long it takes to load Microsoft Word, for instance. You could think about it for a looooong time. Disk drives operate like platters, which is why they're measured in RPM, just like LP records, but instead of 33 1/3, 45, 78 RPM, we're looking at 5400 and 7200 RPM. So drives that spin at 7200 RPM spin 33% faster than those that spin at 5400 RPM. That's useful.

Most desktop PCs will support 7200 RPM disks, shouldn't be a problem.

Expandability +


I hesitate to put this on the list, because sometimes you find that the idea of expandability is nice, but in reality, by the time you expand anything more than memory, you're out of room, and you need a new motherboard to keep up with new operating systems anyway. But at the same time, I've always appreciated the ability to make room for a second disk somewhere.

Video card -

High quality video cards are good for playing games, or writing games, writing complex graphics software (memory and more CPUs help here as well.) Even then, I'm sure you'll do fine for an entry level computer with almost any video card they give. I'd probably do some research personally on video card technology to supplement it, but honestly, he can do fine with almost any entry level video card.

Audio -

Take the standard, get something better if he's specializing in audio, which means games or music.

Ports, Firewire -

Most of that is expandable and can be after market purchases.

Disk Capacity -

Not critical for getting started. Nowadays, hard disk quantity is usually taken up my media files such as video and audio. If the upgrade for more hard disk space is small, then, sure, go for it, but don't stress about it.

---

And even after all of this, more questions linger: memory is more than just "How Many Gee Bees?" One computer advertises its memory as "8GB Dual Channel DDR3 SDRAM3at 1333MHz - 4 DIMMs." Which of that matters and why? Whooooo, I'm getting woozy just thinking about it. (Hint: a DIMM is what you might call a single memory "chip", the thing you stick into the computer. If the computer supports up to 4 slots, then 8GB taking up 4 DIMMs (at 2GB apiece) means you can't upgrade, well, at least, not without pulling out one of the 2GB DIMMs. But an 8GB DIMM taking up a single slot means you can add much more memory. But watch out: 1 8GB DIMM is more expensive than 4 2GB DIMMs, sometimes much more expensive.)

Of course, this is vanilla advice for programming. Your son may be interested in hard core video games, in which case you need much better graphics capabilities, and even more memory. Or just playing games, which requires less so, but still. And while I didn't give a concrete number, splurge on 8GB of memory, with room to expand. If you find yourself spending close to $1K you ... well I spend $3K on my last machine, but $1K for a starting development machine is probably more than enough. As a reference point, the Dell Studio XPS 8100 is a decent starting point.

So, that's my advice. It's all over the place, lacks a reference to current standards, yet somehow has the gall to pass itself off as authoritative. You should do fine.

Sunday, August 22, 2010

Presenting the Google/Eclipse/Enterprise talk in Reston VA Oct 13

Brief note: I'm excited to be presenting the talk "Eclipse in the Enterprise: Lessons from Google" at Eclipse Enterprise Days on Oct 13 in Reston, VA.

This looks like a great conference for people who support large Eclipse user bases -- you know who you are -- if you attended the Eclipse in the Enterprise BoF at EclipseCon, this conference is for you. From the conference page:
"Attendees must be an employee or contractor of an "Enterprise User" of Eclipse technology. Enterprise users typically are responsible for the use of Eclipse by hundreds and even thousands of developers in their organizations."
Are you planning to attend this conference? Let me know.

Wednesday, August 04, 2010

Proposition 8 Overturned in Federal Court

Congratulations California! Your attempt to legislate a gay marriage ban has failed. The battle goes on, and I don't know what a victory at this level means, but even if it means marriages may resume in advance of further rulings higher up, then congratulations to every gay couple that gets married here on out.

This just felt like a good time to express my happy satisfaction.

Tuesday, August 03, 2010

Back from the dead-tris

Short version

I found copies of the two lost Tetris clones that I wrote in 1990 and 1991. [download] Now it's time to reminisce.

Long Version

In 1990 I was a college Junior. For extra money I worked as a student consultant in the computer center. The consultant's office had two computers, a DEC VT220 and an IBM PC AT. We put a couple of games on the PC. My two favorites were Level 42, which I can no longer find, and a Tetris clone called Nyet. In fact, everyone in the office loved Nyet, and we all played for hours on end.

I was the fourth best Nyet player among the consultants. I know this because three people always inhabited the top ten high-score list, and I fought hard to get my spot on it. Occasionally I would manage to wrangle my way to the number seven spot, only long enough to brag about it before the other three would attain new high scores effectively pushing me off the list.

By Spring Break of 1990, I was tired of being unable to gain a solid foothold in the top-ten spot, so I did the only thing I could think of, I wrote my own Tetris clone. Armed with Turbo Pascal and a quiet week on campus, I wrote The Soviet Block. I added an extended block set, and some other nice features, making it sufficiently attractive to play.


Surely, if it was my own version of Tetris, I should have a spot in the top-ten, right?

Wrong, of course. The same three people dominated the top ten spot. So I wrote another one.

Every good game needs a sequel

But this one was going to be a competitive two-player version. This sounds like old hat, but in 1990 there was no such thing as a competitive two-player version of Tetris. I envisioned it as a game of tug-o-war, where players faced off on opposite sides of the board. Bricks didn't move down, but toward the center. By clearing blocks you would actually shift the whole board toward your opponent. You win when your opponent loses the game, but more interesting is when you shift the board far enough into your opponent's space that it reaches a goal line, which ends the round.

The game board has almost shifted entirely to the end-of-round markers on the left.

Buying game features for the next round.
By ending the round, you could use "dollars" accumulated by doing things like clear multiple rows simultaneously to buy features. For instance, you could slow the rate your pieces fall to the center for $3, but for $4 you do the opposite to your opponent. From there you start again with an empty board, pieces move slightly faster, and you need to clear more rows before being able to shift the playing area.

One of the interesting facets of this game was that once you started losing, you kept losing. It was tough to recover from being slightly behind. On the other hand, if the opponents were well matched, they were in for an exciting fight for survival during the tug-o-war, where both sides tried to lay bricks as quickly as possible without making a serious round-ending blunder, or worse, a game-ending one.

Here's a brief demonstration of Head-to-Head-tris in action.



I brought Head-to-Head-tris to the consultant's office, and, after long last, nobody could beat me! Only one person gave me a run for their money, and it had the desired exciting feeling of a back-and-forth tug-o-war. We were well matched.

I'm pretty proud of Head-to-Head-tris. It's a fairly playable game.

By May of 1991 I graduated, and moved on. As the years went on I lost my copy of The Soviet Block and Head-to-Head-tris, source code and all, until some time last  year, when I found it sitting somewhere on the net. The source code is still gone, but now you can play the lost DOS classic of the 1990's.

To play

Start by downloading the DOS binaries and doc files.

On the Mac I use the DOSBox emulator.

Soviet Block is kind of tough to play nowdays, because I wrote it to work with a specific subset of processor speeds. You know, like, 4.77 MHz, but Head-to-Head-tris uses a processor-speed-free mechanism for its timing mechanism.

You're also likely to need to reset the keys, and remember to turn off the music. It's fun after the first game, after that, it is not.

Head-to-Head-tris is understandably more fun with another competitor, but you can play it alone. After all, that's how I tested it. Better still, let's meet in meatspace and play together.

Saturday, July 17, 2010

Stepping back in to Firefox

The last week or so I have found myself spending much more time in Firefox than Chrome. In fact, not only am I writing this post inside a Firefox tab, but I'm no longer using Chrome, except to refer to tabs I've saved in the past.

I've left Chrome for one reason only: Firefox restores much more easily when recovering from sleep mode on OSX. When I restart my Octocore desktop machine from sleep, Chrome can sometimes take up to a minute to become responsive, maybe more,  Firefox, just a few seconds. Because I rely on putting my machine to sleep on a regular basis, this turns in to real time lost.

Sure, I miss Chrome's deft tab handling. But not so much as to give up so much of my time.

Thursday, July 15, 2010

Eclipse Day at the Googleplex redux: Mr. Grumpy hits the big time

At the request of the Google Open Source Programs Office ... no wait, that's wrong. At the advice of the Google Open Source Programs Office ... no ... start again.

Due to an offhand comment by someone who just happens to work at the Google Open Source Programs office, I turned Ms. Wise and Mr. Grumpy into a big screen hit. You thought it took no time to turn $%$@ My Dad Says into a TV show. We're working at the speed of thought, here.

If you loved the Mr. Grumpy script, enjoy watching a computer try to pronounce "Aniszczyk."

Why wait to register for Eclipse Day at the Googleplex?

Ms. Wise and Mr. Grumpy were chatting over some tea:

Ms. Wise: Mr. Grumpy, aren't you excited for Eclipse Day at the Googleplex 2010?

Mr. Grumpy: No. Grump.

Ms. Wise: No? But Mr. Grumpy, why not?

Mr. Grumpy: Grump. I don't have any money.

Ms. Wise: But it's free!

Mr. Grumpy: Grump. I don't know when it is.

Ms. Wise: Wait, I can tell you: it's
Thursday, August 26, 2010
9:00am - 5:00pm
And it's at the Googleplex!
Mr. Grumpy: Grump. Nobody interesting is presenting.

Ms. Wise: Now I know you're being silly, Mr Grumpy. We've got Chris Aniszczyk. He's like the voice of Eclipse. And there's Xavier Ducrohet from Google, who's going to tell us about the new tools in Android development (I hear The Android is very hot these days.) There's a speaker from Tasktop -- they bring us Mylyn, and Ed Merks -- he's like Mr. EMF. (Does EMF stand for Ed Merks' framework?) And of course, Wayne Beaton, who at least once jumped into an icy river. He's so crazy, who knows what he's going to say? Honestly, the list goes on and on.

Mr. Grumpy: Grump.

Ms. Wise: And did you see the Ignite session on the schedule?Just when you can't imagine getting any more useful information - blamo!

Mr. Grumpy: Grump. I want to go to Google for the food.

Ms. Wise: Mr. Grump. Oh, Mr. Grumpity Grump. Google is providing lunch! And did I say the event was free?

Mr. Grumpy: Grump. I don't know where to register.

Ms. Wise: Listen, Grumpton McGrumpinator. it's right there at http://wiki.eclipse.org/Eclipse_Day_At_Googleplex_2010. It's as easy as sending an email.

Mr. Grumpy: Grump. Those are all good points.

Ms. Wise: Then will you attend?

Mr. Grumpy: No. Grump.

Ms. Wise: But, Mr. Grumpy. Senior Grumhold Grumbling Grumpillious Grumper. Why? Why won't you attend?

Mr. Grumpy: Grump. Because Robert Konigsberg isn't presenting this year.

Ms. Wise: Oh ... yeah. Yeah. I forgot about that. Grump.

---

Don't be like Mr. Grumpy!  This is our best slate of speakers yet. Go attend Eclipse Day at the Googleplex 2010. Mention my name for 10% registration discount and a chance to win a new car!*

* New car is speck-sized and only available in invisible. It may or may not be an actual car. It may only be a firm handshake.

UpdateThis compelling story is now a full motion picture! Enjoy.

Thursday, July 08, 2010

How I bought a car and did not get screwed

Update 13:37 EST: added additional comment about the fear of soliciting bids.

One of the most important things I needed to do doing my leave of absence this summer was buy a new car. This was the first time I was going to be the sole buyer (the first two times with the aid of my father and stepfather) so I opted for competitive bidding.

There's a good chance you've seen the fantastic Ignite Talk called How To Buy a New Car (embedded at the bottom of this post.) I resolved to use the techniques in the video to purchase my next car. Here are my notes.

Selecting the car

The first important pieces of advice on buying a new car are
  • Spend two full weekends selecting your car
  • Narrow it down to exact model and features
Thanks to New Jersey Blue Laws, car dealerships are closed on Sundays, so "Two full weekends" can also mean "Four full Saturdays." But instead I did an incredible amount of research online. IMHO the two best starting points for buying a new car are Consumer Reports (paid subscription -- worth its weight in gold) and US News and World Report.

Long story short, this turned out to be an emotionally difficult process, and even resulted in selecting an entirely different vehicle the day before the purchase. It was a good decision in the end, but could be its own blog post.

Soliciting Bids

Once we selected the vehicle, I found the eight closest dealers. Here are the two tools I needed:
  1. A sticky note on the monitor that said:

    You Will Feel Like An Asshole.

    This was a reminder from the Ignite Talk. "If you don't feel like an asshole, you're not doing it right! 'Why don't you want to sign this form? Everyone signs it!' I could refer to the note while soliciting bids"

  2. A notebook.

    Before starting any calls I dedicate one page per dealer, and initialized each page with
    • Dealer Name
    • Dealer Phone
    • Dealer City
    After talking with a salesperson I added the salesman's name and additional phone phone number, if it was offered.
  3. A spreadsheet.

    Even though most of the information between the notebook and spreadsheet were the same, having two formats was useful.
    1. I used a background color in the final column to indicate the color of the car being offered. In the example above, the second offer included all sorts of extras I didn't care about, but I used them for reference.
    Some notes about soliciting bids:
    • I called eight dealers. Only five dealers called back.
    • Only one dealer complained about competitive bidding. He wanted me to call the other dealers and come back to him with a price. "Why are you haggling over one or two hundred dollars?" Just let me know your best price. Feeling like an asshole, I insisted he participate with all the other dealers. This dealer did not call back with a price.
    • One dealer gave me sticker price, and so was clearly not interested in competing.
    • Some dealers failed to give FINAL prices. Whenever a dealer gave a price, I would ask: "Is this the number I would put on a check?" Some dealers said "No", some more than once. I felt like an asshole sending them back for a new price. That meant I was doing it right.
    • Update: Starting this process was probably the most frightening part of the whole thing. I wasted about 45 minutes with additional preparation and dawdling, some of which was useful, but was mostly a delay tactic. I chose a dealer location as my first one and shaking, started the call. That the salesperson gave me no trouble boosted my confidence and the remaining process was worry-free.
    Closing the deal

    From the five bids, one bid was $500 less than the next lowest, and I was set to close with that dealer. I brought an iPod and a book, prepared for the waiting game that was closing the deal. I also prepared for the deal to fail. Amazingly, everything went according to plan, with the exception of $60 all-weather floor mats. I caved on that last item -- the next lowest bid was $500 more, so fighting over $60 didn't make sense. (The next lowest bid was $500 more, but it had more add-ons, such as a cargo net. Even without all the add-ons the next lowest bid was $350 more.)

    Truth in advertising

    The Lifehacker post introducing the video is called Buy a car without getting screwed." That's accurate. After all, the post isn't titled "By a car and screw the dealer." In the end I got a fair price (independently verified by a friend who does not believe in competitive bidding.)

    Tuesday, June 22, 2010

    Downloading Eclipse via Bittorrent == Community (Helios edition)

    Tomorrow is the public release of Eclipse 3.6, a.k.a. Helios. I reminded you last year why I prefer downloading via bittorrent. It bears repeating.

    Those of us that have become Friends of Eclipse are eligible to download it today. Like last year, I'm using the bittorrent links. (If you're not a Friend of Eclipse, you'll have to wait until Wednesday.)

    But here's why using bittorrent to get your Eclipse distribution is a contribution to the Eclipse community:
    • Downloading by bittorrent means you can seed many other users.
    • This gives the rest of the community faster access than a standard download.
    • For extra credit, download more distributions than you need, providing even more seeds. For instance, I don't use Windows, but many people do. I can make a difference for those users, too.
    • Any bandwidth you contribute so someone else can download Eclipse results in less bandwidth required by the Eclipse Foundation. In other words, you're saving money for the Eclipse Foundation
    • It gives me a chance to do another 48-hour analysis.
    So, please, download via bittorrent. And, really, have you made your donation to become a Friend of Eclipse? Please don't make me get Ira Glass to ask you.

    Friday, June 11, 2010

    Third Anniversary with Maggie

    Three years ago we adopted Maggie. Today is our third anniversary. It took about a month for us all to get in a comfortable rhythm. Now after three years we can't imagine what life would be like without her. (I recognize that it's a little odd for some people for a dog to be treated like a member of the family. Case in point: Act Two of the This American Life episode titled True Urban Legends. Alas, I'm digressing.)

    In celebration of this day, we took her to the beach and ran her in to the ground.



    She's so tired that not even the lure of a stuffed squirrel can keep her from sleeping.


    Thanks, you good, sleepy, dog.

    Tuesday, June 08, 2010

    Ruler Off Target

    I bought a wooden 12" ruler from Target.


    I like rulers for drawing straight edges on paper.

    Does this ruler look like you can use it to draw straight edges?



    This pen has some straight edges. Does this ruler look like it draws straight edges?



    I made some ad-hoc graph paper against which I could mark the path of the ruler's edges. (I couldn't use standard rectangular graph paper on an 8.5x11" sheet since the ruler was 12", so I made one this using GIMP.)


    My measurements were made by placing the corners of the ruler edges along the center long line and drawing the path. The short lines help identify the degree of error.

    A good ruler would not deviate from the center long line.


    Let's see what path the inches edge makes.


    Can you see? Perhaps a close-up would help:


    Here's the path of the centimeter edge.



    Here's a closer look:


    Looks like the centimeter side goes about an eighth of an inch off target. Well, I can't be certain - I measured that with my arc-y ruler.

    Where did it come from?


    Too bad. I don't blame the Chinese manufacturer for this crappy construction. I blame Target for accepting it.

    And to be clear, the reason I dislike this so much is that people buy their school supplies from Target. How many students have rulers that just suck? A student can't understand geometry when their tool is this bad. Will a poor student have the money to replace it?