Archive for the ‘wordpress’ Category

Formatting source in blogs hosted on WordPress

September 6, 2007 3 comments

I sometimes post snippets of code on this blog. I have been searching for a way to provide proper syntax highlighting for the code I post here. There are many wordpress plugins which provide proper syntax highlighting, but since I use the hosted WordPress service, I cannot use any of those. GNU Sourcehighlight is the standard program people use of generating source highlighting, but for some strange reason I could not get that to compile on my iBook.

While looking for alternatives on the web, I noticed a package called Highlight. Highlight can generate syntax highlighted HTML files from program source files. It supports over 120 programming languages! I tried it few months ago, but soon ran into a limitation. Highlight output uses CSS classes and style definitions; to make it convenient to post code here, I needed a package that generated inline CSS styles.

I wrote to André Simon, the author of Highlight, requesting this feature. Today I got an email from André informing me that the new 2.6.3 release of Highlight has an option to generate inline css! I tried it out and it works well.

$  highlight -i -o HelloWorld.html --inline-css

And here is the snippet Highlight generated for me:

public class HelloWorld {
    public static void main(String[] args) {
         System.out.println("Hello, World");

Thanks and congratulations to André Simon!

Categories: blog, tech, wordpress

Outbound Links: Nielsen’s vision is here!

January 15, 2007 Leave a comment

In his 1999 classic book “Designing Web Usability“, Jakob Nielsen writes on marking outbound links from a site:

A second option would be to show a pop-up with additional information about the link.

Nielsen’s outbound link example

In the example image on page 69, I am showing the title of the destination page (retrieved from a proxy server) as well as the name of the remote site (possibly retrieved from a site definition or from the title of the home page). The arrow pointing to the site name can change color depending on whether the user has been to any pages on that site before. As shown by these two simple examples, web browsers have a long way to go with respect to supporting users’ navigation behavior.

Browser vendor’s haven’t yet implemented this feature, but I think Nielsen’s vision is here – and it is called Snap Preview Anywhere (SPA). If you are reading this post on the WordPress website, you might notice that hovering over an outbound link shows a small popup showing a preview (or “snap”) of the linked website. WordPress has enabled it for its hosted blogs – and I think this feature is a tremendous improvement in web user-experience.

Cheers to WordPress folks!

Categories: tech, usability, wordpress

Hello, World!

April 5, 2006 2 comments

It was about 5 years ago that I got introduced to the world of blogs. I started reading Java-related blogs on jroller. These days, blogs are major source of tech-related information for me.

At various times, I have toyed with the idea of starting to write a blog myself. Many people I know do write blogs – Vineeth, PC, Swathi etc. People who have known me over the years tell me that I am a very opinionated person. But I am a very lazy person too; hence I have never bothered to set up a blog and start writing so far. 🙂
Not anymore!

Categories: wordpress