Store Kindle Clippings in SQL Server with C# and Subsonic 3's SimpleRepository

Jul
31
2009

Back in April, Shelly mentioned having seen a 2nd generation Kindle and that she really wanted one. She happened to say so on a day when I was already admiring them. So, I ordered one.

I liked hers so much that I ordered one for myself shortly thereafter and it's gone with me nearly every day, everywhere. You can read any of several hundred online reviews of the device itself. Of course, most of those will either recommend or pan the device on its own, with no real consideration of how you read.

Lots of the stuff that I saw in reviews before I bought mine goes on a list of features I couldn't care less about. For instance, in the 4 months I've had mine, I've wanted to look up precisely 5 words in the dictionary and NONE of them was in there.

At any rate, I like it and my use probably isn't exactly what people think of when the Kindle gets mentioned. See, for me, the killer feature is the ability to highlight a sentence or paragraph or entire page and save it for later. Most of what I read on it is non-fiction: technical books and stuff like Curious? and Ratio.

In print books, I've always dog-eared pages and taken notes, but retrieving that information is always less than convenient. So, when I found out that the Kindle makes clipping text from books easy, I was excited. After clipping a couple of things, I went looking at the file format. All of the clippings get dumped into a single .txt file.

While that's fine for opening and looking through or even searching through directly on the Kindle, I wanted something that made it a little more organized. So, I wrote a quick proof of concept app to parse the file and put its contents into SQL Server and thought I'd share it with you.

I'd been wanting to do a little more with Subsonic 3.x's new feature SimpleRepository, which functions somewhat similar to db4o, but still SQL underneath. It strikes me as particularly suited to quick prototyping applications just like this one.

Rather than setting up the database schema, you just create your plain old C# objects (POCO) and SimpleRepository takes care of creating the tables as well as retrieving and storing your objects.

My POC app puts each clipping/quote into the database once and avoids duplication on subsequent runs. The result is much easier to, for instance, pull together everything from one book. The Kindle stores the clippings in the order they were clipped, making a mess if you don't read books linearly. Once written, I can easily keep my database up to date with anything I want to save from anything I'm reading on the device. Now that it's in that form, it could easily sit behind a web front end or be re-mixed in other interesting ways.

Anyway, on to the sample console app. I named it IpseDixit, which is Latin for "he himself said it".
Read the rest of this entry »

The Project Launched: The Eye of the Hurricane

Jul
29
2009

So, last Wednesday, the first deployment of the platform I’ve been designing and working on since October went live. That project has been an intense scramble to basically build the plane in the air.

Projects like that are like hurricanes. While you’re racing to get things built, the wind is raging, rain comes in at you sideways and if you aren’t careful, you can watch a 2×4 go through your window.

Like many previous hurricane projects, this one consumed nights and weekends, and I’d be lying if I said that I didn’t enjoy the rush of taking on this kind of challenge.

But it wears on you and then, one day, the sky clears. Sometimes it’s the actual day of the launch (if things go well) and sometimes it comes after, but you can recognize it most easily by the absence of anyone standing in your cubicle asking when Feature XYZ will be finished.

When it hits, I often only realize just how intense it’s been leading up to the stillness by discovering that I’m leaning into the wind with my eyes squinted shut. With the sun shining, that suddenly feels absurd.

And, that moment is the time to take advantage of the clear skies. Just like a hurricane, the other side of the storm is coming. If you don’t take a bit of the time to re-stock supplies, clean up a little bit and relax, the back half of the storm is WAY worse.

So, that’s exactly what I took a 4 day break this past weekend and doing things like lots of payback of technical debt on the project before the wind and rain kick back in.

It’s probably obvious that this level of intensity in my professional life has it’s impact on projects like this site. It’s also hard to attribute whether the lack of writing here is 100% related to being in the project hurricane or the degree of impact of things like posting on Twitter. Who knows.

So, if you’re curious what’s actually going on with me, you should follow me on Twitter here.

July 4 is Just the Beginning

Jul
05
2009

So, yesterday was another Independence Day. I have made it a habit to read the entirety of the Declaration of Independence on the morning of that holiday. While I was doing so this time, one particular thought popped out at me: that noble document that we have celebrated for 233 years as the “birthday” of this country was just the beginning.

It was just the beginning because

  • July 4 is the day it went to the printer. It wasn’t read out loud until 4 days later.
  • 7 years of battles, defeats and victories, starving in the cold, lost lives, cities burned and following through on the consequences of signing that document were between July 4 and the end of the war.
  • 4 more years of bureaucracy, political wrangling and revising before the Constitution is written.
  • 1 more year before it gets ratified.
  • 1 more year before George Washington is elected president and Congress meets.
  • 1 more year before The Supreme Court is convened.
  • still 1 more year before the Bill of Rights is added to the constitution.
  • yet another 9 years before the capital settles into Washington DC.

In short, it took 24 (yes, twenty four) years from the time that document got signed until the thing we celebrate as having been “born” really reached the starting line.

There’s a story like this behind every “overnight” success I can think of. It’s exceedingly rare for big things to happen overnight. Too often, people act like just coming up with the idea, even if you write it out as a detailed plan, that somehow the difficult work is done.

People act like having the idea was the big breakthrough. The Declaration of Independence took just about a month to write and 24 years to get the initial version “out the door”. Many would say the 200+ years since has been continually working on implementing the idea behind that document.

I love coming up with ideas. But the real proving ground of an idea is the months and years of hard work that turn that idea into a reality.

 

J Wynia

For better or worse, I'm the guy who runs things here. I'm a web consultant, software developer, writer and geek from Minneapolis, MN. This site is a fairly wide cross-section of the things I'm interested in and enjoy writing about. If you'd like a more "real-time" slice of my thoughts, you should follow me on Twitter here.

Oh, and if you happen to be looking for hosting for your Subversion repositories or just web hosting in general, take a look at Dreamhost. It's what I use for Subversion and your signup helps me out.

Feeds and Links


www.flickr.com
This is a Flickr badge showing public photos from J Wynia. Make your own badge here.

Search


Pages

Archives

Computers Blog Directory
© 2003-2010 J Wynia. All original content is licensed under the terms of the Creative Commons Attribution license unless otherwise noted. Content from other sources is licensed under its original terms.