Sitemap with Rails
I finally got around to generating a sitemap for this site. I used these instructions for creating sitemaps in rails. Very simple and straight forward instructions.
Unfortunately, the sitemap created isn’t valid according to google. The xml document created has <link> tags instead of <loc> tags which google webmaster requires.

I am guessing that these errors mean that my sitemap is useless to Google. Still looking for a solution and will post an update as soon as I find one.
A Collection of Uses for Google Sets
Have I mentioned I love Google Sets? Something about ostensive defintions just makes me all warm and fuzzy inside! Here are some practical uses of Google Sets (and similar apps) that I have gathered from around the net:
I found these in this O’Reily article:
Enter the name of the company you work for. Enter the name of one of its main competitors. Click “small set.” Voila! There’s how the web classifies your company.
You’re packing for a weekend trip and you want to check if you’ve forgotten something? type in five items you remembered to pack (toothbrush, towel, etc.) and then generate a list..
You’ve just moved to a new house and you want to be sure you’ve notified everyone who cares about your new address – type in a few things such as electricity, comcast, post office etc. and then generate a list—you’ll be surprised at the number for things you forgot.
There’s this tip from Google Groups
And here’s an inspired few from me:Music related searches – I like Band X…. find me similar
- Tired of the same old breakfast food, commute activities? Get suggestions on what to eat for breakfast or what to do during your commute.
- Writers can search for synonyms or topic ideas
- Can’t remember the seven deadly sins?
- Use the app as a part of a parlor game. One group has to create a list of four related items. The second team gets points for guessing what Google Sets will produce… kind of like 10,000 Dollar Pyramid.
There is also Query by Example. Look at the Popular searches on this site. There are lists of planets, constants, business schools, alternate spellings, colors, rock bands, oceans, prime numbers, political parties, and tons more. Great for writers, anyone looking to make some creative connections or simply as a reference. Very useful!
Google Sets + Sed = Quick Keywords for Meta Tags
I know there is alot of talk about search engine optimization. Additionally, I have no idea whether or not keywords in the meta tag do anything to help people find your site. With that said, I want to share how to quickly generate and format keywords for the meta tag.
To generate keywords for a website, go to Google Sets. Enter some small group of keywords that describes your site. For example, if I were maintaining a site on machine learning, I might enter the following terms: machine learning & artificial intelligence. This search returns 40 to 50 keywords related to machine learning.

Copy these keywords into a text file and delete any that aren’t relevant or that are misleading.
Now, if you were to simply cut and paste this list of keywords into your HTML document, your document would be UGLY (eew!) and difficult to read. Who wants to read a file with that many carriage returns?
The solution is to replace all end of line characters with commas (except the last EOL), so that things look relatively nice and neat in an html or rhtml or whatnot file.
To replace the end of line characters with commas, use the following two linux commands:
- sed ’/$/,/’ file1 > file2
- paste -sd ’\0’ – file2 > file3
You don’t have to create two extra files, but I do because often I have compiled keywords from several searches and wouldn’t want to repeat the process if I messed up the sed and paste commands. Besides after I have inserted the keywords into my html, I simply delete the files.
After getting all of the keywords on one line, paste them into the ”<META name=”keyword” content=””> statement.
UPDATE
For Windows users, there are two things I can recommend you do if you would like to use these commands.
-
First, if you are running a website that is on a server running linux, you can ssh into the server, upload the text file you would like to convert (file1 in my example), and then run sed and paste on that text file.
Second, you can try to run GNU Bash shell on Windows or install Cygwin. I haven’t tried either of these options because both my Windows laptop and desktop died (RIP my sweet babies) a few months ago.
