Posted by Tom Moertel
Tue, 30 Jun 2009 02:57:00 GMT
I recently purchased a Kindle DX, mainly to read PDF documents that contain math and comp-sci formulas. Still, I couldn’t resist the temptation to try out the instant gratification of purchasing a “Kindle edition” ebook, so I ordered a sci-fi novel I had read as a child, Alan Dean Foster’s The Tar-aiym Krang.
The Good
The purchase and download via the ever-so-branded “Whispernet” wireless network went without a hitch. The Kindle DX, itself, was great and made reading easy. The text looked good, the navigation seemed intuitive. There was just one problem.
The Bad
The production standards of the content destroyed any chance of convincing me that I was reading something akin to a real book. I found numerous typographical errors, something that just doesn’t occur in real mass-market books, which have been subjected to professional review after typesetting. By far, the most common error was the substitution of a left open single quote for what should have been an apostrophe, an error that I don’t think Amazon missed an opportunity to make. For example, when shortening computer to ’puter:
The brilliant fix (no need to thank me, Mr. Bezos)
So, if you’re Jeff Bezos, you’re probably wondering what you can do to improve the quality of Kindle edition books. After all, you spent all that time, effort, and money on the Kindle itself, getting the look and feel just right, crafting the perfect book-reading experience, even insisting upon seamless “Whispernet” downloads to encourage impulse purchases of Kindle editions. You certainly wouldn’t want the content owners, the lovely folks who supply you with typo-ridden source documents, to undo all that you have worked so hard to achieve with the Kindle, to destroy the immersive, luxurious reading experience that you are so close to delivering, to unweave the spell that convinces readers that the Kindle is just as good as – if not better than! – a real book. Somehow, you must fix the content problem, but you know, you just know, the content owners are going to screw it up for you.
So, here’s what you do, Jeff. Let the content owners screw it up – you know that’s what they’re going to do, anyway – and fix the errors yourself. How? With an army of focused, motivated proofreaders: your customers!
Seriously, this idea would work miracles for you, Jeff. You know how the Kindle lets you make annotations to the Kindle editions you read? Just extend those annotations to include corrections. Then when those annotations are saved to Amazon’s servers, extract the corrections, combine them with the corrections from other readers, maybe verify them with a quick third-party review (a perfect job for the Mechanical Turk, wouldn’t you say?), and then automagically distribute the relevant, approved corrections to every Kindle reader who could benefit from them. Further, to make your readers happy that they found mistakes in the Kindle editions that they purchased, offer them a bounty, say 25 cents, for the first report of each correction found.
In one fell swoop, all your problems with production quality are fixed:
- customers who find errors are no longer angry but happy
- most Kindle editions will be corrected quickly, ensuring a blemish-free reading experience for the bulk of your customers
- even if the content owners give you garbage for source documents, and even if they won’t allow you to change those documents one iota (they are pretty controlling, after all), you can still deliver perfection to your customers: apply corrections on the “client side,” correcting the pristine, yet error-filled source material, on the fly, right in the Kindle itself
And there’s one big bonus I didn’t mention. This capability would make Kindle editions better than real books. Not just marketing-copy, in-theory better, but really better. As in, now we have a compelling reason to switch from paper: to get the benefits of collaborative, peer-augmented reading and correction, in which each reader’s contributions enrich the reading experience for all who follow. Think about it, Jeff, it’s a big deal.
No need to thank me.
Posted in reviews
Tags amazon, bezos, books, kindle, peer, reading, review
4 comments
no trackbacks

Posted by Tom Moertel
Fri, 22 May 2009 05:59:00 GMT
I know, the economy sucks, and everything is expensive these days. It’s even worse for you, a polyglot programmer with a serious programming-language obsession. You prowl Proggit, lounge at LtU, and occasionally step on over to Stack Overflow. But it’s just not enough. You need more. You need to hang out in meatspace with other fascinating programmers, diving into modern object systems, getting mechanical with crazy VMs, hacking on code like the wild code-hacking beast that you are.
Sure, it’s a nice dream and all, but how are you going to make it happen? And even if you could in theory make it happen, how could you afford to do it now, in this down economy?
Well, my friend, let me share a secret: You can make it happen. And you can afford it. Here’s how: Just be at the 10th Anniversary Yet Another Perl Conference. It’s day upon day upon day of jam-packed programming-language goodness of all sorts, not “just” Perl – and this year it’s the one conference you can afford.
Seriously, I did a little price-checking, and YAPC is about the most underpriced programming-fest on the planet:
| Conference |
Price |
| JavaOne |
$1,995 |
| RailsConf |
895 |
| PyCon |
450 |
| RubyConf |
200 |
| YAPC |
125 |
Wait, you’re not into Perl? No problem. The Perl community has always embraced diversity, and there’s a lot more than just Perl at YAPC. Check out the tag cloud for talks and you’ll see what I’m saying. At YAPC, the good stuff comes in enormous buckets, plenty for programming aficionados of all stripes. Here’s a taste:
- There’s the Parrot Virtual Machine Workshop. That’s right, YAPC comes front-loaded with a thunderous, 2-day, under-the-hood hackfest, all devoted to a modern VM – Parrot – that’s optimized for your favorite dynamic languages.
- You’re serious about keeping track of your code, right? Well, YAPC’s got talks about Git, too.
- Into objects? Then consider a barrel of talks about the Moose object system, which builds upon great ideas from Perl 6, CLOS (of LISP fame), Smalltalk, Java, BETA, OCaml, and Ruby – and sports roles, delegation, and a meta-object protocol.
- Are you into testing? Well, Perl culture is positively infected with testing. At YAPC|10, there are half a dozen talks about it. (Also: find out why you ought to be harnessing the power of TAP, even if you never program in Perl.)
- And, of course, there’s a little Haskell love, too: What Haskell did to my brain.
See, YAPC is for you.
Am I trying to persuade you to join us at YAPC? Yes. But I’m only doing it because I care about you. YAPC is a fascinating conference, packed with hackers from around the world, all eager to share interesting things, things many you would find delightful, if only you knew about them. So I’m letting you know about them, right now, so you don’t miss out.
Do yourself a favor. If you can figure out how to get your brain to Pittsburgh in the 4th week of June 2009 – yes, only 4 weeks away – then by all means register now for YAPC|10. It’s a great conference at a great price, and it’s something no discriminating hacker ought to be denied.
I hope to see you at YAPC|10.
Update: If any Haskellers are reading this and want to meet up at
YAPC, let me know. I’m trying to put together a
BOF session.
Posted in perl
Tags conferences, haskell, moose, parrot, perl, pittsburgh, programming, tap, yapc
13 comments
no trackbacks

Posted by Tom Moertel
Thu, 07 May 2009 17:55:00 GMT
I confess: I like puns. So I was delighted to discover that Twitter’s 140-character limit offers an interesting new opportunity for pun writers: the abbreviation pun. A recent attempt:
Chairs kill? Bad news for coders. “These data demonstrate a dose-response ass’n between sitting time and mortality.” http://bit.ly/19RR6R
(Does tweeting stuff like that make me a reprobate?)
Posted in humor
Tags humor, puns, twitter, writing
2 comments
no trackbacks

Posted by Tom Moertel
Sat, 25 Apr 2009 14:28:00 GMT
My wife and I are on vacation. We spent yesterday at Longwood
Gardens in eastern Pennsylvania.
It’s beautiful: words don’t do it justice – you really do need to
see the photos. That’s why I took about 500 photos yesterday. At
least, that’s what I thought until I got back to our bed & breakfast
and tried to download the photos from my camera to my laptop.
Crap! About a quarter of the photos were missing! I wasn’t sure what
had happened, but I suspect that my budget 16-GB SD card had started
throwing bad blocks. There go my priceless vacation memories, right
down the technological toilet.
But maybe those photos weren’t irretrievably flushed. Maybe the data
behind most of them was still on the SD card, if only I could get at
it. Hey, I’ve got Perl on my laptop: I can get at that data.
Here’s how it went down.
First, I scanned the raw blocks of the suspected-faulty SD card,
looking for the markers that indicate the start of a JPEG file. My
laptop runs Linux, so it was easy to access the blocks. I just read
the device file corresponding to the SD card’s filesystem. I used a
Perl script to walk through the file in block-sized steps,
hunting JPEG headers. Here’s the meat of the script:
while (my $bytes_read = sysread($fh, $buffer, $READ_BLOCKS*$BLOCK_SIZE)) {
for (my $offset = 0; $offset < $bytes_read; $offset += $BLOCK_SIZE) {
my $tag = substr($buffer, $offset + 6, 4);
if (grep $tag eq $_, qw(JFIF Exif)) {
print $pos + $offset/$BLOCK_SIZE, "\n"; # emit "interesting" block
}
}
$pos += $bytes_read/$BLOCK_SIZE;
}
I handled the second half of the rescue mission with another Perl
script. This script grabbed the data starting at each interesting
block, as determined by the first script, and tried to decode the data
losslessly as a JPEG file, writing the result to a new file on my
laptop’s hard drive. Here are the tasty bits of that script:
$SIG{PIPE} = 'IGNORE'; # pipe will break on damaged images
while (my $target = <>) {
# seek forward until we hit the desired block
while ($pos != $target) {
my $diff = $target - $pos;
$diff = $MAX_SEEK_BLOCKS if $diff > $MAX_SEEK_BLOCKS;
sysseek($fh, $diff * $BLOCK_SIZE, 1);
$pos += $diff;
}
# read the data starting at that block, attempting to decode as JPEG
if (my $bytes_read = sysread($fh, $buffer, $BLOCK_SIZE*$DATA_READ_SIZE)) {
my $outfile = sprintf("%s/%010d.jpg", $outdir, $target);
open(my $pipe, "|jpegtran -copy all -outfile $outfile")
or die "can't open pipe: $!";
print $pipe $buffer;
close($pipe);
$pos += $DATA_READ_SIZE;
}
}
With these two scripts, I was able to retrieve almost all of the lost photos. That’s 120 more priceless memories that I can post to Flickr to annoy my friends. Yay, Perl!
(BTW, if you want to see some of the rescued photos, see my Longwood
Gardens, Spring 2009 photo
set on
Flickr.)
Posted in perl
Tags perl, photography, vacation
12 comments
no trackbacks

Posted by Tom Moertel
Tue, 21 Apr 2009 03:03:00 GMT
Hey! All you Perl hackers out there, don’t forget to submit your talk proposals for the 10th Anniversary Yet Another Perl Conference.
Wait, you don’t know about this great opportunity to share cool Perl stuff with your peers? Then, by all means, read all about it. That’s right, you don’t want to miss the chance to give a talk at the big 10th Anniversary YAPC.
So submit a talk or two. But do it now. The deadline is approaching fast.
Seriously, why not submit a talk right now? Don’t put it off: seize the day.
Your pal,
Tom
Posted in perl
Tags perl, yapc, yapc10, yapcna2009
no comments
no trackbacks

Posted by Tom Moertel
Wed, 25 Feb 2009 02:03:00 GMT
Just a quick note to all the wonderful Perlfolk who are eagerly
awaiting news of YAPC|10. (That’s the 10th-anniversary Yet Another
Perl Conference, to be held June 22-24, 2009, in Pittsburgh, Pennsylvania, where it all
started back in 1999.) Ahem:
Your beloved organizers have been hard at work and will be making
some announcements shortly. Stay tuned to yapc10 on
twitter for the latest and greatest.
Until then, don’t worry: be cool. When it comes to conference
planning, we’re a little less conversation, a little more action.
That’s just how we roll.
Hugs and kisses,
Tom
Tag: YAPC::NA::2009
Posted in perl
Tags elvis, perl, pittsburgh, yapc, yapc10
no comments
no trackbacks

Posted by Tom Moertel
Wed, 04 Feb 2009 04:45:00 GMT
After reading about the ordeal a paying customer went through attempting to
get Adobe to fix a simple
mistake, I
was reminded of why I lost my faith in proprietary software. After a
bad experience reinstalling
Win2k, it
dawned upon me that software vendors could waste my time, make me jump
through hoops, and sell me barely functional crap, and all I could do,
as a paying customer with a valid license, was take it.
This poor guy, for example, ordered a Mac OS X version of Flash CS3
and got sent a Windows version by mistake. Not his fault. But he’s
the guy who ended up wasting weeks fighting Adobe’s ineffective
customer support trying to get what he paid for in the first place.
This guy is a paying customer. He paid for that treatment.
Look, folks, the world of open source isn’t perfect, but it’s better
than that. Since dumping Windows for Linux, here’s how much
time I’ve wasted on stupid vendor hoop-jumping: None. Nada. Zero.
In the world of open source, you never have to worry about getting
stuck with the wrong version of software. That’s because you are
always free to download the right version. No need to ask for vendor
approval, fax in your “Letter of Destruction”, or wait for an
activation code. You just type in “yum install whatever”, the software installs, and you go back to work. That’s it.
Until I switched to the open-source lifestyle, I never realized how
much time (and blood and sweat) I had wasted on the side effects of
proprietary software. If you’re still in the proprietary world, take
a moment to consider how much time you have wasted and how much time
you will waste in the next few years on stupid vendor crap. Maybe
it’s time to stop jumping through hoops. Maybe it’s worth your while
to give open source a shot.
Go ahead, grab a Fedora Live
CD and test drive it for a few
days. What have you got to lose but a world of hurt?
Posted in rants
Tags adobe, fedora, freedom, linux, proprietary
20 comments
no trackbacks

Posted by Tom Moertel
Mon, 02 Feb 2009 17:22:00 GMT
Do you use Emacs? Do you use Git? If so, check out Magit, a delightful Emacs
mode that provides a convenient interface to working with Git. Unlike
many VCS modes, Magit is fully Git-centric: It understands the Git
way of branching, staging, committing, history-rewriting, tagging,
merging, pushing and pulling. It even knows about the reflog and has
some git-svn support.
If you’re a Fedora user,
just install the emacs-magit package. The package is currently in
testing, so install it with the following command:
$ sudo yum --enablereo=updates-testing install emacs-magit
One more thing, Fedora users: please don’t forget to provide
feedback on the package. It’s easy:
- Just visit the emacs-magit page in Bodhi
- Click on the package you installed (e.g., the Fedora 9 or 10 flavor)
- Add a comment, selecting “Works for me” or “Does not work” as appropriate
Hack on!
Posted in programming
Tags emacs, fedora, git, magit
1 comment
no trackbacks

Posted by Tom Moertel
Wed, 07 Jan 2009 20:08:00 GMT
Here are three Emacs tips that I seem to have a hard time
remembering. I’m posting them here to help them stick to
my brain.
Align
Emacs has a number of powerful align commands, but most times the following incantation will suffice to magically align text into neat columns:
C-u M-x align
Repeat
I don’t know how I manage to forget this handy helper, but I do. The following will repeat the most-recently executed command:
C-x z
Continue hitting “z” to continue repeating.
Recursive edit
While you are in the middle of doing something in Emacs, such as
a query-replace-regexp, you can put that something
on hold, do some editing, and then return to what you were doing.
This maneuver is accomplished with Recursive Editing. In short:
C-r (enter recursive edit)
C-M-c (exit recursive edit)
C-] (abort: exit all nested recursive-edit sessions)
Posted in programming
Tags emacs
no comments
no trackbacks

Posted by Tom Moertel
Thu, 09 Oct 2008 01:04:00 GMT
The 2008 Pittsburgh Perl Workshop is this
weekend! I can’t wait. (BTW, there are still seats available. If you
can somehow get yourself to Pittsburgh this weekend, by
all means, grab a PPW
ticket now.)
I’m on the organizing committee, so I get an advance look at the
talks, and I’m continually impressed by the quantity and sheer
interestingness of the things that the Perl community has to say.
When leading members of a community volunteer their time to talk to
you about something they’re passionate about, that something is
usually fascinating.
This year is no exception. There are tons of talks I want to see. Check out the schedule for
Saturday and
Sunday,
and you’ll see what I mean. (You’ll note that there are even
talks on programming GPUs and adorable BUG embedded hardware.)
In addition to technical talks, there are three courses being
offered this year. Daniel Klein is once again leading his From Zero
To Perl introductory course, which was widely praised at last year’s
PPW. Author and Perl trainer Peter Scott is offering Maintaining
Code While Staying Sane, which is all about maintaining legacy code,
something most programmers must do for a (surprisingly) large chunk of
their careers. Finally, the ever-knowledgeable brian d foy is
offering his Mastering Perl course for coders interested in learning
how to reliably write professional, enterprise-quality Perl programs.
(I think there are openings for some of the classes, too. If you’re interested,
click one of the links above and try to grab a spot.)
This year we’re expanding on the Hackathons, too. We actually have
allocated a dedicated “Hackathon Room” – and we’ve arranged for
freshly ground, freshly brewed coffee all day long to fuel the
hacking. :-)
All in all, it’s shaping up to be another fun-filled, festive PPW.
I hope to see you there!
Posted in perl
Tags perl, ppw, ppw08
no comments
no trackbacks
