Web Site of Rajiv Pant

Victory is winning others, not defeating others

Archive for the ‘software’ tag

How to Avoid Duplicate Search Results when using Apple Mail.app with Gmail

with 3 comments

I use Gmail’s IMAP feature with my Apple Mac OS’s built in Mail.app program. Mail.app keeps local copies (on all my personal Macs) of all my email messages that I’ve kept (since 1994). It enables me to:

  • Effectively work offline with all my emails (searching, reading and composing), when my computer is not online. That’s sometimes the case when I’m traveling, especially in places where Internet access is unavailable, unreliable, slow, insecure or too expensive.
  • Regularly back up all my saved emails using Apple’s Time Machine. It is also a precaution in case I someday no longer have my Gmail account and/or move to another email service. With email account theft rampant these days, it is important to have up to date backups of all your emails.
  • Send digitally signed and encrypted emails when needed.
  • Compose greeting cards and other visually rich emails with pictures on Mail.app’s stationary.

The Problem:

When you initially set up Mail.app to use Gmail via IMAP, you will observe that when you search your mail using Apple’s built in Spotlight feature, the search results will show duplicate (or more) copies of your email. This is because Gmail’s labels and special views (like “All Mail” or “Starred”) appear as separate IMAP folders in Mail.app. Messages in these seemingly “separate IMAP folders” appear to be duplicates to Mail.app and Spotlight search.

The Solution:

To solve this problem, I suggest showing only essential Gmail special views and labels as IMAP folders to Gmail and then telling Spotlight search to only index the master copies of the messages in Gmail’s “All Mail” folder. To accomplish this, I did the following.

Note: I do the labeling of my messages via the Gmail Web interface and do not need to see the labels applied to messages when I’m using Mail.app. My solution below hides all my custom Gmail labels from Mail.app and that’s fine with me.

In Gmail (via the Web interface)

Go to “Settings » Labs” and activate “Advanced IMAP Controls“. After enabling it, go to “Settings » Labels” and uncheck “Show in IMAPfor each custom Gmail label you have created. Also uncheck it for “Starred” since Mail.app shows to do flags in messages in other folders.

Leave “Show in IMAPchecked yes for “Inbox“, “Sent Mail“, “Drafts“, “All Mail” and “Trash” since these are system folders and Apple Mail.app should be configured to use them. Also leave it checked yes for a label folder called “Apple Mail To Do” which is an Apple Mail system folder.

On your Macs

Go to “System Preferences » Spotlight » Privacy“, exclude the following folders from appearing in search results. Where it says username@imap.gmail.com below, use your Gmail account name.

~/Library/Mail/IMAP-username@imap.gmail.com/INBOX.imapmbox

~/Library/Mail/IMAP-username@imap.gmail.com/[Gmail]/Sent Mail.imapmbox

Also, if you are displaying your starred folder via IMAP, exclude:

~/Library/Mail/IMAP-username@imap.gmail.com/[Gmail]/Starred.imapmbox

Now when you search messages in your Mac’s Mail.app, only results from your Gmail All Mail folder will appear.

Written by Rajiv Pant

March 28th, 2010 at 6:47 pm

Posted in Technology

Tagged with , ,

Owning vs. Renting Software

with one comment

At interviews, technology executives are often asked about build vs. buy. The question would be better articulated as own vs. rent. See, building and buying in the true sense are often part of the same ideology: owning. For example, Google bought Blogger and YouTube. As a result, Blogger and YouTube programmers (builders) became Google employees. When people ask about companies buying software, they are almost always referring to leasing or renting software.

I consider using open source to be in the own camp, because you can withing reason do as you please with your copy of the open source software and no one can take it away from you. Open source makes owning even better. It enables owning and sharing at the same time, which benefits the community.

Often technology executives answer this question ambiguously. They claim they have no preference towards either owning or renting software. To me, when a person provides such a noncommittal answer, it means they might lack leadership, vision, a clear philosophy, or the courage to give an honest answer to a prospective employer.

I generally prefer owning over renting. This applies not just to software, but to other things in my life like owning a home and owning a car. There are other people who prefer to rent apartments and lease cars. Neither philosophy may be better in general than the other, but one of them is always better depending on the circumstances. Circumstances by themselves don’t make the own vs. rent decision. That’s where people come in. A leader does not manage their company or department at the whim of circumstances. A leader has a style, has preferences and applies them to the situation. Leaders who prefer either one of owning or renting can be equally successful in the same organization and circumstances.

Here I present my viewpoint on why sometimes a philosophy of renting software as much as possible runs companies into trouble. There are numerous examples of vendor solutions in search of problems. A vendor will often wow a team of executives with a product presentation and demo. The company will agree to rent the software at a high cost. Later, the company will find it wasn’t worth the investment, even though they may not admit it or even like to talk about it.

When a company owns a software product core to its business, it can use it towards a competetive advantage. When you own the software product, you also have control over your data. When a vendor hosts and manages your data, in most cases you have practically relinquished control of your data even though your contract may say on paper it is yours.

When you own the products you use, it is generally easier to integrate with other systems. Your timelines are less at the mercy of vendors.

However the future of software may be changing. With web applications becoming popular, even home users may be renting software on a pay-per-use basis. I’ll have more to write on that subject. Stay tuned.

Written by Rajiv Pant

March 24th, 2007 at 10:06 pm

I now use WordPress publishing software for this site (Product Review)

without comments

Managing blogs and news content with WordPress is a Zen-like experience. The inner-beauty of a product is felt when it becomes almost unnoticed, allowing the site authors and editors to focus on publishing content and providing useful interactive functionality to their readers and customers.

I say this as someone who has been immersed in web content management for major news media companies since 1995. I have spent over a decade leading teams evaluating, implementing, maintaining and developing content management and publishing systems, including some industry award winning ones. My teams (including me personally) have been working closely with writers, editors, designers, photo/multimedia staff, sales and marketing folks at companies whose livelihoods depend on publishing content. I’ve also maintained my personal web sites since 1994.

It is impressive how well WordPress has worked as a CMS for the blogs and pages on this site. It is simple to use and painless to configure, manage and upgrade. It minimizes overhead and maintenance work.

WordPress plays well with others. It doesn’t require you to convert all your static content and pages powered by other CMS systems and custom scripts into WordPress. This allows you to conveniently migrate content to WordPress over time, preserving the URLs and keeping your site functional.

No wonder so many non-technical people and technologists alike use it for their sites: I switched to WordPress inspired by reading the personal blog of a colleague and CTO at another major media company who had also switched to WordPress. It is one of the best solutions for personal web sites and small to medium size organizations.

WordPress also powers the blogs of several major media companies with millions of daily page views. It has an well-designed architecture that makes it an excellent choice for large-scale use. It is used by a large and growing number of sites, including CNN, Fox News, Wall Street Journal, Yahoo, General Motors, Southwest Airlines, People Magazine, Apple Computer, Sony PlayStation US, C|Net, NY Times, Ziff Davis, Xerox, Delta Airlines and many others.

WordPress is a great choice because

  • Simple to use for writers and editors
  • Quick and simple to install, maintain and upgrade for systems administrators
    • E.g. automated daily backups to remote systems using a plugin
  • Good architecture for programmers to extend functionality if needed
  • Search engine-friendly and people-friendly URL structure
  • Dynamic publishing model of content managed in and served from a relational database. Content management and delivery are seamlessly integrated.
    • Presentation, as in design, is well separated.
    • This is a superior approach compared to other blog / CMS systems that recommend publishing static files.
      • In the file publishing model, those files are then served directly by the web server or processed by a web application server / CMS. That architecture, used by other blog platforms does not scale well and has been found to be error-prone, especially under heavy publishing/editing/commenting use.
    • If needed, external caching1 can be used that provide all the benefits of static file publishing without the drawbacks.
  • Excellent content management in a relational database
  • Rich feature set for advanced web publishing needs
  • Large and growing user base, well-supported and actively developed by the community
  • A large and growing number of plugins that add functionality to WordPress
    • WordPress is used by so many people that it is often likely that someone has developed a good solution for what you require. The WordPress directory is teeming with plugins, themes and other extensions developed and given by the community.
    • For example, support for OpenID as a client and server, site usage tracking with web analytics.
  • Plethora of third-party commercial support options available if needed
  • Free of license costs. Simple to operate and operate. Low total cost of ownership. An economical solution.
  • Reliable. Good performance. Scalable. Secure.
  • Open source

What WordPress currently lacks

  • A simple, standard way to place a widget in the main content area of a blog post or WordPress page. Currently plugins that need to place a widget there require putting in some special markup whose syntax varies with each plugin. Many use an HTML <!–comment–> syntax in the Code editing mode. Some use a syntax of [commands in braces] in the Visual editing mode.
    • A good solution would be for wordpress to allow widget placement and manipulation completely within the Visual content editing mode. Behind the scenes, in the code view, all plugins would use consistent markup syntax and it would be editable using a menu option in the Visual editing mode.
  • A way for certain widgets to only appear in the sidebar(s) of particular WordPress Pages or particular blog posts.
    • A good solution would be to have the ability to place a widget only on certain URLs that match a regular expression. Also, the edit form should have an option to include a widget only on a particular post or Page.

Alternatives

Another excellent choice for a blogging CMS is MovableType. I’ve had extensive experience with it and like it a lot too. MovableType and WordPress are the two leading products in their category.

If you are looking for a full-fledged content management system, consider Drupal or Plone. After a successful run for many years, my own Java-based Cofax is heading towards retirement.

If you need to build your own custom CMS, build using frameworks like Python with Django, Ruby on Rails or Groovy with Grails.

Rating: ★★★★★

  1. E.g. content delivery network like Akamai, an accelerator/cache like Squid or Varnish []

Written by Rajiv Pant

March 24th, 2007 at 3:06 pm

List of Open Source or Free Software for Home and Business Use

without comments

Here is a list of some open source or free desktop software that you can use for personal use at home or at your business. Using open source software can save you thousands of dollars that you’d spend buying proprietary software. I’ve chosen software here that is comparable in ease of use, maintainability and upgrades to similar pay-for software. Keep in mind that the total cost of ownership includes more than just license fees. There will always be costs in time and/or money to install, maintain, reconfigure and upgrade the software over time.

Useful for most computer users:

  • OpenOffice.org – Productivity suite competing with Microsoft Office, includes word processor, spreadsheet, presentations, database and drawing software
  • Grisoft AVG Anti Virus (free for personal use only, not open source)
  • Mozilla Firefox – Web browser
  • Mozilla Thunderbird – Email client
  • GIMP – GNU Image Manipulation Program, an alternative to Adobe Photoshop. Also consider GimpShop and CinePaint.
  • 7-Zip – Decompresses and compresses files and folders. An alternative to WinZip.
  • JEdit – A powerful text editor

For relatively technical users:

The Free Software Foundation’s GNU Project has a large collection of open source software in a variety of categories. You will find things ranging from business productivity software to games there.

A web site called Open Source Alternatives helps you find open source software alternatives to well-known commercial software.

This list was inspired by my friend Karl Martino’s list of some software he uses.

Written by Rajiv Pant

November 25th, 2006 at 2:32 pm

Google Web Toolkit: Develop and Test in Java, Deploy as AJAX

without comments

I’m building a pull-down-menu navigation for the rajiv.com site using the Google Web Toolkit (GWT) and I’m impressed by this Google product.

It allows you to create user interface (UI) widgets and dynamic functionality for your web app using the Java programming language. You develop and debug your app in the Eclipse Integrated Development Environment, just like you do any other Java app. When you are done, GWT translates the Java app into AJAX technologies: JavaScript, HTML, CSS and XML. This gives you the advantages of both worlds: You program and test using the robust Java platform and the final output is in AJAX (no Java applets at all) which works consistently across most modern web browsers.

Developing a web page UI using GWT, Eclipse and Java saves a lot of time over the alternative of coding all the AJAX (JavaScript, HTML, CSS, XML). GWT also takes care of issues like cross-browser compatibility and the AJAX UI not conflicting with the browser’s back button, which would otherwise have to be extra coding and testing work if developed in AJAX.

What’s also great is that the generated HTML pages are clean and nicely documented using comments, all automatically done by GWT.

Java programmers should welcome GWT since it gives them the ability to create rich dynamic HTML functionality in the robust environment they are familiar with. You can view the Java source code here.

Written by Rajiv Pant

May 28th, 2006 at 7:58 am

Java Progammer? Use BeanShell

without comments

BeanShell is a fully Java compatible scripting language, capable of interpreting ordinary Java source files. You can also use it for working with Java interactively like an interpreted Unix Shell or Perl. You can try out Java’s object features, APIs, GUI widgets and other libraries hands on.

BeanShell is free and also ships bundled with popular applications such as BEA Weblogic, Forte for Java and the NetBeans IDE.

Written by Rajiv Pant

August 8th, 2004 at 6:44 pm