Java Authors: Dana Gardner, Carmen Gonzalez, Brian Vandegrift, Pat Romanski, Elizabeth White

Blog Feed Post

Using URL Shorteners in Technical Documents

I spend a large portion of my time preparing courseware materials, writing books and technical documentation. These documents include hyperlinks, and some of them can be a 100+ character long. Do you include the long URLs in your docs? The immediate answer is to use one of the services like bit.ly, tinyurl.com, is.gd and the like.Beside shortening URLs the may offer other services like click-stats or real-time analytic data.

But all of these services are backed by rather small companies. What if your preferred URL shortener is out of business, but thousands of your books are being sold by the booksellers? This is a bummer! What if all your courseware is sprinkled with these short URLs? Need to schedule an extra time for producing and publishing a revised version of the courseware.

If one of the big guys like Google or Microsoft would acquire such a shortener, I’d sleep a little better. Meanwhile, the only suggestion I can make to use the full title of the linked article in your technical writings. In this case if the hyperlink gets broken, the readers can google up the article by title.

For example, here’s the original 160-character URL of the article about default methods in Java:

If you are familiar with Web programming, you can try to get rid of everything after the question mark, which will shortet the URL till 59 characters:


It worked fine with this URL. Using bit.ly shortener will turn it into a 22-character URL:


And here’s what you should not do in your technical document:

“Dear reader, to get familiar with the default Java methods please read this Web page“. If for any reason the bit.ly service is not operational, the readers of your document has no clue of how to find it. But if you use the shortened URL providing the title of the article, most likely that the reader will be able to find it:

“Dear reader, to get familiar with the default Java methods please read the article Java 8 Default Methods: What Can and Can Not Do?” by Peter Verhas. This leave the reader with enough keywords for the article lookup even if the link is broken. Besides, you are doing a good thing by mentioning the name of the author of the article.

What’s your tae on using short URLs?

Read the original blog entry...

More Stories By Yakov Fain

Yakov Fain is a co-founder of two software companies: Farata Systems and SuranceBay. He authored several technical books and lots of articles on software development. Yakov is Java Champion (https://java-champions.java.net). He leads leads Princeton Java Users Group. Two of Yakov's books will go in print this year: "Enterprise Web Development" (O'Reilly) and "Java For Kids" (No Starch Press).