Matt’s Fall from Google

Everyone’s favourite version of Matt is no longer the number one Matt in the world. I heard he’s had trouble with the site since a small hacking incident. Hold on, Matt, you’ll be back up there in no time, hopefully.

Other Articles on this Subject:

Tags are not Categories

This shouldn’t be so hard to understand:
Tags are not categories.

Enough has been said about this already — I hate to be a semantics-fiend, and I dislike discussing things like tags with my hat on, all serious, but this one is clutching me by the throat.

Now the fact that wp.com reads the categories a post is assigned to as “tags” and tell technorati, ice-rocket and whoever else is listening that the tags for the post are the categories I put it in, it is terrible to think that I don’t really have tags. I would have “tagged” this very post with “tags” if I had real tags. I am not going to create a new category just so I can tag this post “tags” — kosher??

So categories can be tags but tags cannot be categories. Categories are like the huge signs you see on aisles in supermarkets - “Food”, “Hygiene”, “Frozen” etc, they guide you to sections where you can find what you are looking for. Tags are like the labels on the products themselves.

Categories organize, hierarchically. Tags need not. Tags provide meta-information, Categories need not. Tags cross-connect, Categories do not. By cross connect, I mean, when you go looking for posts tagged with “Flickr” on technorati, you find posts from various sources, all about Flickr. Now if you go searching for posts tagged with “administration” in technorati, you will find everything from system administration tips to posts regarding the NASA, the NSA, and general verbiage - largely due to poisoning from people who can’t get the difference between tags and categories straight, for the most.

Get your semantics right, wordpress.com folks - please :) If you don’t you are doing a disservice by poisoning so many indices that work by means of tags. Earlier today, for the nth time, I ended up with a wordpress.com blog as the result, and the entry was totally unrelated to what I was searching for on IceRocket.

And technorati, shame on you for saying

“A tag is like a subject or category. “

If I were in the business of earning my subsistence from the concept of tagging, I would try hard to make a distinction between the old and the new that I am offering, and to elucidate the advantages and novel uses of tags.

Other Articles on this Subject:

Registered Only Plugin Reworked

I finally got to rewriting the Registered Only plugin. The new version works on WordPress version 1.5.1 and 1.5. The older version had some issues. The new version is much lighter, and uses a core WordPress function, and so should work without any issues. If there are any issues, please report them at the wp-plugins.org issue tracker.

The registered only plugin restricts access to the WordPress weblog and site (including Pages, if any), to registered users who are logged in. This will be useful for those that want a private blog, or a blog restricted to friends and family. Consider it the WordPress version of a friends-only Livejournal or similar.

The latest version has the tag (version number) 2005-05-12-2000. I will be using a YYYY-MM-DD-HHMM (in UTC time) (based on the ISO8601) format for version numbers, since it seems easily sortable, and conveys information about the freshness of the version. You can download it from the wp plugin repository, save the file as registered-only.php and then upload it to your wp-content directory on the web server.

There is now a readme file with relevant details.

Many thanks to the many users who wrote in regarding this plugin over the days. Leave me a comment if you use the plugin and like, or better still, dislike it.

Update: This plugin does not protect your feeds. So you may want to delete the feed files.

Other Articles on this Subject:

Why machines filter spam better than humans

I couldn’t help laughing when I read Mako’s adventure with spam. What if a Nigerian email you, sincerely requesting collaboration on a project, or expressing a business interest in what you do? Well, this is what happens - your spam filter does not mark the mail as spam, while you do.

Mako’s blog makes me smile - almost always, and is now a daily read for me. How I wish he linked to individual entry pages from the title of posts. Each time I want to write about something he wrote about, I end up looking through the :

06:22 | reflections | # | Comments: 0

at the bottom of the post (for which I have to scroll down, first, or I don’t see them), and then i have to figure out which of those links is the right one for the post. WordPress has spoilt me, I tell you!

Mako’s blog is powered by Bloxsom, which is not GPLed, or as far as I can tell, distributed under a free-software license but is released under the MIT license, which enables folks to redistribute modified versions. It also does not put a “generator” tag in the source of the feeds it produces, and is the first tool I have noticed that doesn’t put that feed in there (there may be more). A discussion with Matt a long time ago had concluded with the reasoning that looking for the generator tag in the feeds was the best way to identify the tool used to publish a blog. Not any more, I guess.

Alright, so Mako, want to step into the wonderful world of WordPress? Moving is easy.

P.S. This post started heading towards one destination and ended up somewhere I never intended to end up when I started writing it. Sort of like how I spend my days - lots of things are accomplished but the plan usually goes out the window - have to fix this.

Other Articles on this Subject:

WordPress Easter Egg

No one’s talking about it, so let me do the honors :D

If you use wordpress 1.2, go to http://example.com/wp-admin/options.php?option_group_id=all
(where example.com/wp-admin is the URI of your wordpress wp-admin folder), for all the buttons and levers you’ll ever need.

Remember, too much change is not a good thing, and don’t blame me if you break something. ;)

Other Articles on this Subject:

get_posts upgraded

The function get_posts is very useful, and in my opinion under-utilized. It also was incomplete, so I went ahead and completed it.

You can view and use my spanking new functions.php file if you want a complete get_posts.

get_posts is what should be used to get a bunch of posts (or even just one post) outside the wordpress loop (The Loop). It takes 5 arguments :

  1. numberposts - the number of posts you want returned
  2. offset - the number of posts you want to skip (like saying skip the first n posts from the results)
  3. category - the category from which you need these posts
  4. orderby - order the post by date, or name of any one of the posts table columns
  5. order - arrange the results in ascending (ASC) or descending (DESC) order

For example,

<?php
$posts =
get_posts('order=ASC&category=4&orderby=name&offset=10&numberposts=6');
foreach ($posts as $post) :
?>
<li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>

will retrieve posts in category 4 sorted by name in ascending order and give you posts 11 through 16, formatted as specified in the code.

If you are using a nightly of v1.3, here’s the diff.

You can sure put get_links to some innovative and interesting use. The FAQ page uses that to display the 5 most recent answers, for example. Other uses could be to pull up the most recent n posts in each category for display in your “menu”, and so on.

Have fun! Now I get back to C++ programming, to solve what seemed like a small problem a week ago. Small problem indeed! I am firing all my neurons and yet there is no perceivable improvement.

Other Articles on this Subject:

Post to WordPress from the Command Line!

CLI PHP5 - WordPress Blogger — Now post to WordPress from the command line! Does the fun never end? If you are all Keyboard friendly and wont be bothered to press buttons, or use a GUI (Graphical User Irritation? as GIMP calls it), then this is what the Doctor recommends. Hell, I find so many WP related news links, I don’t post half of them for fear of converting this blog to a wordpress pimp blog. Maybe I should start a blog dedicated to WordPress related news, what do you say to that, kind reader?

Other Articles on this Subject:

Look who’s talking

WordPress IRC map

A map of connections between the members of the #wordpress IRC channel, updated to the second. Neat, eh?

Other Articles on this Subject:

Plugin : Registered Users Only

Update: Please get the plugin from the wp-plugins.org repository. You can file bug reports there as well. It makes it a lot easier for me to manage the plugin’s development.

I was gonna call this plugin “Bouncer” but settled for a more explanatory name instead.

This plugin will allow only registered users of your blog to view the blog. If you have a wordpress powered blog that you don’t want your parents, or the secretary in your office, or the POTUS, to read it(okay, well, I can’t guarantee the last one :P), then View source and save or Download the .zip file to start using it. This will effectively password protect your wordpress blog, and also prevent search engines from indexing the pages in the blog.

Instructions :

  1. Save the file registered_only.php to your wp-content/plugins folder
  2. Activate the plugin from the plugin administration page
  3. Relax

Usage Notes:

  1. If you really want your defense against unscrupulous readers to be strong, then disable the “Anyone can register” option in Options->General in your WordPress administration interface.
  2. If you want google and other search engines to be able to index your blog pages, then comment(add two // in the beginning of) the line
    echo '<meta name="robots" content="noindex,follow" />'; . This, however, would mean that the search engines might index your pages and if you want a “private” blog, then this would not be suitable, which is why is it uncommented by default.
  3. If you are getting a “headers already sent” warning, then try adding the following one line to your .htaccess file (create a file called .htaccess if you don’t have one already) :
    PHP_FLAG output_buffering on

This plugin is basically the auth.php file that ships with WordPress 1.2, adapted to fit needs, and is distributed under the GPL license.

Other Articles on this Subject:

What wordpress brings my way

My ambition was to set a science fiction book in as far into the future as I could imagine, while not assuming anything presently known to be impossible.

- John C. Wright. (from Jef’s web files). What can I say about a man, who has two children called Orville and Wilbur Wright? Or who, when asked “What writers influenced your novels?”, replies “Whom am I copying, you mean?”. Interesting, perhaps?

I started finding out a little after I ran into a post at Ryan Boren’s blog about the Golden Transcendence, and my first thought was, “What a pompous title!”. I did, however stop by at the Amazon page for that book, read a few reviews, searched a bit and promptly decided I will not be a peace till I read the books and make up my mind as to how good the books are.

Ah! but we are digressing! I helped Ideal Rhombus move to wordpress by writing a hacked version of an import script for Matt, the blog’s owner. He was kind enough to do the most inexplicable thing - show appreciation of my work. He has bought me not one, not two, but all three of the books by John C. Wright that I wanted to read. Thank you, Matt.

I was able to help Alan move, too, and he has promised me some Mexican tamarind candy in the mail. Alan is a graduate student in Chemistry at Berkeley, and has an awesome collection of Soda bottles and other bottled drinks from all over the world. I look forward to getting him a “Goli” Soda when I next go to India. Oh the joy of learning the art of drinking from those bottles without getting the latest contagious disease!

All this may sound exciting, but what really made my day was reading a hundred things about Nuclear Moose. Craig is the funniest, most lovable member of the WordPress crew, and I was really surprised to find that he took the time and the effort to type a list that long, in reply to a comment I left on his blog.

All this makes me feel like a thousand people hugged me (and I don’t mean “crushed”).

Other Articles on this Subject:

Terminal

I saw this movie, Terminal yesterday. Wonderful movie. I noticed that in a close up shot, Catherine Zeta-Jones’ face is shown in bad light, and the imperfections in her skin show up, but besides that, this is a movie that is different from the regular hit movie. A bit too oh-so-perfect what with all the arranged unbeleivable coincidences and all, but parts of it were truly hilarious.

Jazz greats at harlem

Thanks to psasidhar I got to know of The history of Jazz in a picture. This is not the first time a close friend has blogged about something which is very much on my mind, as if on cue, but actually through a pure coincidence.photomatt likes Jazz, and that is among the reasons why Wordpress v1.2 is called “Mingus”. Ever wanted to see what the real Mingus looked like? There you go!

Now you must be wondering why I mention WordPress, and Terminal in the same post. Go see the movie! As it is, this post is enough of a spoiler.

Other Articles on this Subject:

Bob Bemer is to blame.

I had fun helping Jennifer fix a sinister problem with the entries she imported from Movable Type, yesterday. The backslashes were missing. I cannot describe what a backslash(a.k.a Reverse Solidus, or Reverse Virgule or Reverse Slant) looks like, cause I cannot type a backslash and have it appear in this post*. That is because WordPress runs on backslashes.

Yes, it has remained a closely guarded secret, and I will let it out. WordPress is powered by backslashes. WordPress eats backslashes.

An unsuspecting user left a comment on a WordPress FAQ entry, and he mailed me expressing desperation at the mysterious disappearance of the backslash from both the post and the comment.

Bob Bemer is the man to blame for the extra work the WordPress devs have been putting in lately, especially Ryan Boren (who has been systematically working towards eliminating this problem.)

To get to the point, Bob Bemer added the backslash to ASCII to be able to represent the logical symbols for logical AND and OR in ALGOL. An interesting read.

* Just kidding: WordPress users can represent a backslash in their posts using “& # 0 9 2 ;”(without the spaces or the quotes, thus : \

Other Articles on this Subject:

Fixing WordPress “Press It” for FireFox 0.9

While trying to use the Press It! bookmarklet with FireFox 0.9, I got the following error :

Deprecated method document.getSelection() called. Please use window.getSelection() instead.

So I fixed the bookmarklet to be :

...createRange().text:window.getSelection();}void(window.open('http://...
where it said
...createRange().text:document.getSelection();}void(window.open('http://...

(changed document.getSelection() to window.getSelection() )

To fix yours, if you are using FireFox 0.9, right click on you Press It bookmarklet in the BookMarks toolbar, click on “Properties” and edit the code as I did above in the “Location” field.

Other Articles on this Subject:

How to import your bookmarks/favorites from your browser into WordPress’ Link Manager

I thought it would be neat to be able to import Bookmarks/Favorites/Whatever-the-browser-calls-it into a WordPress weblog, and so I wrote this script that does just that, with some help from another website. I started on this since a user (Grod) on #wordpress wanted an xbel importer.

XBEL(XML Bookmark Exchange Language), is one of the formats in which one can save bookmarks. Galeon uses the XBEL format to save bookmarks. The reason why I expect the script to be useful, though, is because LinkaGoGo offers a free service that converts bookmarks/favorites from most of the browsers’ format to an XBEL file. So, in short, using LinkaGoGo and the script I link to here, you can import your bookmarks into the WordPress link manager.
Thanks to Roberto Giungato, for making his script available. That saved me a lot of time.

Steps:
1. Convert your browser’s bookmarks/favorites to the xbel format using the LinkaGoGo Converter.
2. Upload the .xbel file that results to the wp-admin directory in your WordPress installation.
3. Download xbel.phps, rename it to xbel.php, read it, follow the instructions to edit one line in it to specify the name and location of the xbel file on your server, and then upload it to your wp-admin directory.
4. Access the import-xbel.php file you uploaded, using your browser (eg: http://example.com/wordpress/wp-admin/import-xbel.php)

The importer does not import duplicates, and creates new link categories corresposing to the “folder”s in the xbel file.

As always, if you use this, let me know how it turns out :)

Other Articles on this Subject:

Next Page »