Log in

No account? Create an account
Previous Entry Share Next Entry
The return of jQuote
In a recent conversation, I was reminded of our old, original quotefile from college -- it didn't exactly plumb the deepest wells of wit, but there was a lot of sentimental value to it. And it reminded me that, y'know, I really *enjoy* the quote-collecting game, and used to be really into it. Sufficiently into it that, when I found myself out of work for seven months during the dot-com crash of 2002, I spent the last month or two writing a fancy shareware package to manage them.

jQuote is a fun tool: a quotefile program for the hardcore quotes geek. It hooks into Windows, so that you can press ctrl-shift-q from any program and insert a randomly-chosen quote at the cursor position. It defines a special XML format for quotefile management, including all sorts of capabilities that most people don't even think about, such as categories, filtering, and permission tracking. The intent was to foster quotefile trading, so that the geeks could really go at it.

And then, of course, I got a real job -- the graveyard of fun projects. To be fair, jQuote had succeeded at its primary purpose: to give me enough serious C# experience to serve as a major resume booster. But I never got around to fixing the last major bug. (Which I still haven't figured out: it seems to interfere with Windows shutdown somehow. ETA: But Google comes through: here's the answer. Hopefully that'll fix it.) And since it was intended to be a beta, I'd coded an expiration date into the package. When that computer died a couple of years later, I didn't get around to installing C# on the next one; when jQuote finally expired, I didn't have an easy way to recompile it. So the project simply died. That was five years ago.

But y'know -- I still enjoy the silly quotes game, and I still enjoy those thousand-plus quotes I've got in jQuote format. Dreams of shareware fortune aside, I wrote the tool because *I* wanted it. So I've just downloaded the free version of C#, spruced up the code slightly (and removed that stupid expiration date), and gotten it running again. I'm not worrying about the damned installer (which was more trouble than the program itself), but if there's interest from people who want to just download and run the program manually, I ought to be able to put it somewhere on one of our websites.

And so, the Random Quote du Jour, my signature from days of yore, returns. I probably won't use it as consistently as I once did, but it's fun to have it around again, allowing me my moments of random Zen...

Random Quote du Jour:

"The real question for 1988 is whether we're going to go forward to
tomorrow or past to the -- to the back!"
-- Vice President Dan Quayle

  • 1
Sounds fun. I'd like a copy if you want to share.

Want. My current workflow for this is way too clunky.

"Where sex is concerned, the *highest* risk activity is unprotected
anal sex. Unprotected vaginal sex is also *risky*. Oral sex is much
*less* risky. And *kissing* is pretty safe. *Hugging* is safe as
houses. And writing letters is about as risk-free as you can *get*."
-- Death Talks About Life

One of the reasons I like this quote is because it implicitly says "houses are not completely safe".

"Perfectly safe" doesn't work in a universe with the second law of thermodynamics.

Okay, useful to know. I need to do a bit of sprucing up, and I may move things over to a Sourceforge project, but I'll get it together. Note that you'll probably need to port your quotefile to my XML format, but the project includes a sample tool for that, which I might generalize a bit...

Hmm. What's the file format like? I've written various ad hockery over the years; currently I'm using a Python script which just has the quotes hard-coded into it, but I keep thinking I should have them server-side, for a single point of editing. (This last version was a major step forward on that front, since it's the first time I've put the quotes under version control.)

Server-side also opens up the intriguing possibility of having a client configured with multiple quote sources. Hmm.

The format is a fairly ad-hoc XML one, but clean enough for real use IIRC. Data is cleanly separated, with distinct concepts of the quote text itself vs. the attribution vs. notes vs. categories vs. permission status.

The whole thing could use a re-examination in light of modern paradigms. The filtering UI is currently field-by-field, and really ought to be replaced by a more-current general "search" mechanism. The Categories are already essentially modern Tags, and I should probably rename them accordingly. The UI has too many pop-up windows, and probably ought to be more pane-oriented instead. The content is currently all plaintext: it would be better for it to have optional HTML, and be smart about how it pastes. But it's a good, functional start, and works fine.

The main thing it *doesn't* yet have is a client-server approach to things: the program tacitly assumes that the data is a flat client-side file. (Although I suppose that letting it access a server-side data file via HTTP wouldn't be hard at this point.) Eventually, I'd like to move to a true client-server web-service architecture, with a clean separation between the two sides, but that's a much bigger project. (Among other things, it implies writing the server in something other than C#, coming up with a real DB back-end, and so on.)

But to the point at hand: the current format is good enough to serve as a strawman data-interchange format. Could use some improvements -- for instance, "permission" really ought to be an attribute of "quote" rather than a sub-node -- but it's a good first draft given that I wrote it in 2002...

The content is currently all plaintext: it would be better for it to have optional HTML

I was thinking about this one, and the problem is that it's got to be HTML that can reasonably be rendered into plaintext. So <em> or <ul> are reasonable, but <table> is iffy, and <embed> is right out. The list I came up with for a start was <em>, <p>, <ol>, <ul>, <li>, <q>, <blockquote>, <sub>, and <sup>. Maybe <a>.

The alternative would be to support all HTML, and let the query system specify which tags the client could handle.

The access protocol could just be RSS.

(Among other things, it implies writing the server in something other than C#, coming up with a real DB back-end, and so on.)

Have you tried App Engine yet?

Possible, but IIRC it's JVM-based, and I'm famously unfond of Java. (And my understanding is that the Scala support is still so-so.)

Also, honestly, it's *wildly* proprietary (right?), so I'm unlikely to code to it for the time being. In general, this is my major complaint about the cloud: lots of vendors competing with engines, all of which have implicit lock-in to their platform. That's actually even *less* appealing to me than being .NET-dependent on the server side...

Welcome back, Justin's Random Quotes. I've missed you %^).

  • 1