Tag Archives: Blog

Swiftkey Flow Rocks

One of the coolest innova­tions I have seen in recent times is Swiftkey Flow. This is a keyboard input method that is geared towards touch­screen devices, where the user enters text by sliding a finger across the letters of the word to be input. With a little help from predic­tive technology, this method is simple, accurate, fast and intuitive.

On a Samsung Galaxy Note 2, you can enable this on the “Samsung Keyboard” through the “Settings” menu. If you’ve also setup one-handed opera­tions (the keyboard moves over closer to one side) you could be typing long letters or blog posts with just your thumb and your brain for hours.

Compared to other forms of input such as voice, what makes this so compelling is how easy and seamless it is to handle errors. With dicta­tion, there are bound to be mistakes unless you contin­u­ally keep looking at the screen to see what gets typed (which you wouldn’t want to be doing if you were talking). With the onscreen keyboard, it is completely intuitive to pay atten­tion to the words you have input, and switch back to conven­tional typing temporarily when there are errors. It doesn’t hurt that Swiftkey normally figures out the right words to enter without the user having to try too hard, so errors are much less frequent. (This normally happens when you hesitate while spelling out the word.)

Windows Live Writer

I’ve always liked the idea of using a desktop client to post to my blog. (Somehow, Google never managed to sell me on the browser-as-an-OS idea.)

Now that I have a laptop with Windows 7 on it, I’ve decided to give Windows Live Writer a test-drive. Here goes nothing.

Excuses

Pick up ten random blogs on the Internet and at least one of them is sure to have an apolo­getic note from the author explaining why there have been fewer than usual updates recently.

Gather some statis­tics and add a punch­line, and I’m sure this will be a great xkcd strip.…

Minimizing Downtime

Now that this site is hosted on my own server, I wanted ensure that the server is up and running most of the time. Although five 9’s is not my avail­ability target, I needed some mecha­nism by which changes and updates that I made to the site were not reflected in the produc­tion website (can I call it that?) until the right time.

The solution is a simple one: run a devel­op­ment website in parallel, so that all changes can be tested on that first. Updating the primary website would be like flipping a switch. Here’s how I managed this:

  1. Set up a new virtual host for the devel­op­ment site.
  2. Set up a new database for the devel­op­ment site and populate it with existing records.
  3. Update the WordPress config­u­ra­tion file to select a different database based on the current working directory.
  4. Set up server authen­ti­ca­tion for the devel­op­ment website.
  5. Write an init script to copy (rsync) all the files from the devel­op­ment site to the primary one. Exclude the authen­ti­ca­tion files like htpasswd, of course.
  6. Set up a depen­dency on the new script in Apache, so that restarting the service also restarts Apache (this is useful at times).

It’s as simple as that!

Scripting Magic

It’s amazing how much can be achieved with the help of a few scripts. If you come to think of it, scripts are the original mashups that Web 2.0 has vener­ated in recent times.

Today, I decided that I would have a “Now Listening” box shown on my blog — I’m not sure if it is visible at this moment — which would display the name of the artist of the currently playing track on my computer. So here’s what I came up with -

  1. A Bash script that would use DCOP to query Amarok, deter­mine the currently playing song, and update a tempo­rary file accordingly.
  2. A small PHP script that would read the file and display this infor­ma­tion, but only if it is available.
  3. A set of CSS rules to format the gener­ated XHTML.
  4. A cron job to execute the script every minute.

Voila! It’s done…almost like magic.

A Fun Way To Spend A Saturday

Don’t try this at home, kids.

  1. Open a console window on your trusty old Linux box.
  2. Find a WordPress plugin you don’t need.
  3. Start typing rm -fr /path/to/wordpress/plugin-name.
  4. Instead, type rm -fr /path/to/wordpress and press enter.
  5. Oops.
  6. Spend a few hours setting up your blog all over again.
  7. Sleep.

Step #5 is the part I love the most.

Time For Change

I know that the title of this post sounds like an election slogan, but that’s not what this is all about. This change is all about domain names and CNAME records, but I won’t say too much about it. The bottom-line is that I decided to host this site on my own server, rather than on a shared webhost, and with that change, I also decided to start the blog afresh. You may rest assured that this had nothing to do with being too lazy to port the old blog to a new location, but you’re not going to believe me are you?

If the site seems to be too slow to load, please leave me a message and I will urge my server to work harder. Don’t worry, it listens to me.