Wednesday, May 28, 2008

Public Google Forms and Spreadsheets for Dummies

Here's step-by-step instructions on how to create and publish a Google spreadsheet, together with a web-based form that makes entries into it.

You could use this for everything from arranging rides to scheduling a party.
  • Go to https://docs.google.com
  • Click on New and choose spreadsheet.
  • Click on the title, "Unnamed Spreadsheet", and enter a title.
  • Enter column headings into row 1, across the top.
  • Click on the "Share" tab.
  • Under "Invite people:" choose "to fill out a form."
  • Click on "Start editing your form..."
You'll now see a form with the title you gave the spreadsheet, and a slot for each column.
  • Fill in the box below the title, which says "You can include any text or info that will help people fill this out."
  • Press "Next, choose recipients."
If you want email the form, fill in the To: list. Otherwise, just go on.

Now to embed the form in a web page,
  • Click on "Embed", in the upper-right-hand corner.
  • Copy the link location to that web page, as instructed.
Next, we publish the spreadsheet, which will change as folks fill out the form:
  • Go back to the spreadsheet and click the "Publish" tab.
  • Press "Publish now".
It will give you a URL where folks can see the spreadsheet, but that's not what you want yet.
  • Click the bottom link, "More publishing options."
A window will pop up called "More published formats."
  • Click "Generate URL."
  • Copy the link location and paste it into whatever web page you want to display the spreadsheet on.
You now have one web page with a form folks can enter data into, and another that's the spreadsheet to display the data.

Ta-da.

What are That Spreadsheet and Form About?

A couple of posts back, I have a spreadsheet and a form, with no explanation.

Here's why I posted them, and a how-to:

Last weekend, I went to a music festival put on by the New Mexico Folk Music and Dance Society (FolkMADs), in Socorro, NM. The weekend before, I went to a local festival, the Colorado Planters' Moon Festival, in Gold Hill, CO.

I had to arrange airport transportation for both. Last weekend, I had to get between Albuquerque to Socorro. The weekend before, I helped out-of-town folks get from DIA to Gold Hill and back. My arrangements for the MoonFest were ad hoc, but Lisa Bertelli published a spreadsheet with ride arrangements for New Mexico: one sheet with riders, one sheet with folks offering rides.

Lisa's scheme seemed much better.

I wanted to see how easy it would be to set up something like hers with a Google spreadsheet, because doing so would make it possible to embed the spreadsheet right in the website for a festival, where folks could fill in their needs or offers themselves.

It was dead easy, and the posts are a demo. The next post is a step-by-step.

Thursday, May 15, 2008

Working Under Test-Driven Development

We're trying to submit some u-boot patches at work. The maintainer, Wolfgang Denk, has given us several useful suggestions about formatting.

First-cut, I wrote a utility that, I thought, would reformat code correctly. Not enough.

Yesterday, Jim Black, who's making the fixes, told me that instead of a pretty-printer, he wanted something that would just tell him when there were problems. I can do that.

"Also, there's a lot more rules," he said, showing me his growing list.

This time, I decided to create the screening tool using test-driven development:
I'd write a test case and a test, then write the code. I'm not done yet, but I have a growing suite of tests that test a tool of growing capability.

And, as we learn new rules, I'll just add tests as I add the capabilities.

This morning, in the shower, I thought of a fundamental design change I want to make to the overall tool. When I do it, I'll just run it through the test suite, to make sure it works.

Stay tuned.

Wednesday, May 14, 2008

Interesting Blog Spam

I got two interesting pieces of blog spam today, on an older blog. Both looked like email from a real person, but with links to ads. Either someone's typing these in, or there's a marvelous piece of code out there.

Both were comments on google-calendar-related posts. The first reads only

italian property has left a new comment on your post "Google Embeddable Calendar Helper":

I use this and must say it is a great resouce.

The second is
Helen Siff has left a new comment on your post "Calendaria":

I use an electronic calender with reminders today it beeped to tell me of my doctors appointment and again about one and half hours later that I need to buy my home base furniture, I could not live without my calender it is so useful.
They're really different from one another -- one only has a link in the commenter's name, the other right in the comment. The second message also has much more content.

Both are calendar-related. Both have spelling mistakes. Still, they're pretty interesting pieces of work.

Tuesday, May 13, 2008

Git Stash Lets You Snapshot All Your Stuff

I keep the home directory on my laptop under git.

Last night, I read a trick in a good article, Git from the bottom up, by John Wiegley, that I tried out this morning.

git stash stashes away the current state of your world (the index), and replaces it with the HEAD. git stash apply restores the stash. The pair snapshots your work, but leaves it unchanged.

I now run this command as an hourly cron job:
#!/bin/bash
# snapshot the current repository

git stash
git stash apply
Here's the crontab entry:
# | hour (0-23)
# | | day of the month (1-31)
# | | | month of the year (jan-dec)
# | | | | day of the week (sun-mon, with 0=sun)
# | | | | | command
# | | | | | |
#

01 * * * * ~/bin/snapshot &> /dev/null
The snapshots, however, are all accessible through the reflogs, which means that my states are stashed, hourly, invisibly to me, but I can get them back pretty easily.

If there have been no changes, git stash notices, and does nothing, so the hourly job doesn't fill my logs with irrelevant entries.

Very nice.

Monday, May 12, 2008

FontStruct Lets You Build Your Own Fonts

I'm hoping for a review of the free, font-design service, FontStruct, from my font guru, Jeff Copeland.

I found out about it from LifeHacker, which is always chock-a-block full of useful tips.

Sunday, May 11, 2008

Open Office Breaks Out

Now that I've started seeing OpenOffice being pimped on everyday blogging sites, I know that the battle's over.

It's not being advertised as cheaper than Word, it's being advertised as better.

Can't get better than a plug on Instapundit. I think the OpenOffice folks should give him a free copy.

Update:

Stephe Walli reminds me to post this link.

Saturday, May 10, 2008

Bash "nohup"s Background Jobs

In the old days, if you had a background job running, and you accidentally killed your terminal window, the job was killed with it. A special command, nohup ("no hangup"), would prevent this; it detached the job from the terminal's process group.

You can still find /usr/bin/nohup, but bash now automatically nohups all background jobs. Try this from a new terminal window:
$ { sleep 20; echo DONE > /tmp/OUT; } & sleep 1; exit
The window will die, but if you look in another window (or, after 20 seconds, in /tmp/OUT), you'll see the backgrounded job continues.

I say this because I still see admonitions to nohup jobs.

Friday, May 9, 2008

Firefox 3.05beta Grayout

My Firefox 3 beta goes gray annoyingly often. Last night, at BLUG, Kevin Fenzi said that it's a bug related to SQLite, and the workaround is to uncheck the tracking of problem sites, in the Preferences menu.

I haven't decided whether to give that a try, or just wait for the upgrade.

I also notice that someone, on the Google Group used to track Gears tasks inside Google, claims to have fixed the Gears/Firefox 3 incompatibility. I'll believe that one when it shows up. I like the idea of Gears, so it's a pity I can't use it now.

Wednesday, May 7, 2008

Patching U-boot: an Excursion Into the Open Source Process

Yesterday, Jim Black had our first open-source patch rejected -- this one to u-boot.

We'd expected it to be rejected, since we don't know what we're doing yet. We're climbing the learning curve.

Our troubles began when we discovered we needed a public ftp site, which the company didn't yet have. (You could argue that our troubles began when we started doing software, but that's too snarky.)

Dean Johnson, our sysadmin, spent some time Monday night getting one set up, and it was down by the next morning. We couldn't figure out why, so we set up another, on a different box and used it to submit the patch. By the time Denks picked it up, an hour or so later, it was down, too.

He asked us to submit the patch via email, and immediately pointed out a variety of style-and-formatting problems -- spaces instead of tabs, lines that are over 80 characters, and so on.

We think we've fixed those, and will re-submit another try this morning. Stay tuned.

Sunday, May 4, 2008

My New, Easy-to-Use, Mac ftp Client

"Can you show me how to do ftp on my Mac?"

That was the question from my pal, Spider, which popped up in my "chat-in-gmail" window yesterday afternoon.

"Sure."

I don't happen to know the GUI Mac ftp clients, but that's no barrier. Just go to the "ftp://" URL in firefox. Works for me.

For her, it hangs.

Back to basics. Let's see if she has /usr/bin/ftp.

"Open a terminal window."

"How do I do that?"

Now she's fumble-fingering things because of time pressure. Turns out she's asking for help in a panic, because she's got to get out the door and she needs to retrieve some publications from the web.

I have a Mac next to me, so now I'm trying everything out before I tell her, so as not to miss any steps.

She has ftp. Good. She can make the connection. Good. She miss-types a few things, but finally gets in. Good. Something's still not working. She's ready to give up.

"Wait," I say. "I know how to do this."

I do the ftp. I attach the files to an email message. I send it to her.

"Thank you, honey," she says, as she prints them and heads out the door.

I think I'll call it jftp: Jeff-tp.

Saturday, May 3, 2008

Github and Lighthouse

Since Git is the new hotness, and all, I needed to start expanding my brain.

One thing I need to do is play with the hosting services that are coming out -- the analogues to CVSDude for CVS/SVN.

There are a couple, so I started with Github, which is hosting Ruby on Rails, the old hotness. Unsurprisingly, their site is built on Rails, and looks very web-2.0-y.

Github boasts integration with both Lighthouse and Basecamp, two services folks might want to use to track defects and other project-related information, so I wanted to give it a shot. I started with Lighthouse, because I'd used Basecamp before.

Mmmf. The documentation sucks. It took a couple of hours of playing to get even the simple stuff to work. You need to set up a post-commit hook, which they provide -- they offer a pair of choices, actually, but I don't yet know the difference. You download the code, install it in .git/hooks/post-commit, and fill in the blanks. But with what? The directions aren't clear at all, either to me or to other folks using them. And, because it's two independent sites interacting, it's not even clear who to ask for help.

The verdict: potentially nice stuff, which I'll try out some more, but certainly not yet cooked.

Friday, May 2, 2008

Git Delta Chains

I've been playing with git, the new hotness.

One thing I've been puzzled by is the packs; they seem to be almost undocumented. Git stores objects, at request and periodically, in compressed form, in packs. (It also looks like it packs before doing transfers among clones.) These packs are indexed, for better access, but it's a standard, space-time tradeoff.

What's explained in even less detail is the delta chains. Some files in the pack are stored as deltas against other files. These deltas aren't history-based, they're just done by-guess-and-by-golly, and how compressed the pack is depends on how much time you give git to generate them.Link

This all sounds cool, but I wish I could find more documentation. If you see any, let me know.

Thursday, May 1, 2008

Hardy Heron Work-Arounds

I got my world clock to work by choosing "Denver" as my location, instead of "Boulder." I suspect it just knows about airports, since there's a list of sub-places for Denver, and they all look like airports. Still, that doesn't completely explain it, since Boulder has an airport, too -- it's just smaller.

Checking Place Windows, to select that compiz-fusion plugin (System->Preferences->Advanced Desktop Effect Settings) fixes the "windows open under the panel" problem.

After a huge amount of unsuccessful hacking, I finally made my desktop box at work completely unuseable. adamk, in #compiz-fusion, on Freenode (IRC), showed me what to remove and install to get the right drivers. "Then reboot and cross your fingers." When it came back up, it all just worked.

Well, except for printing, but that never works. :-) Maybe today.