Tag: tutorials

Fun Tool To Learn More About Git Branching And Merging

Want to learn more about how to work with branches in git? Confused about what “git rebase” does? By way of a post on Google+ I learned about this great tutorial site at: http://pcottle.github.io/learnGitBranching/

Learn git branching

You can step through a whole series of guided lessons (type “levels”) that walk you through all different aspects of using git – or you can type “sandbox” and go into a private area to play. All from the comfort of your own web browser.

More information (and the source code) can be found on Github at https://github.com/pcottle/learnGitBranching. There is a neat aspect of this where people can (and I guess have) contribute additional tutorial levels.

Very cool tool!

How To Shorten a Web Address (URL) To Put In a Print Newsletter

macro pixels url cliche
Have you wanted to put a web address (technically called a "URL") in a printed newsletter, article or other document so that readers could go to that website? But when you look at the web address, it is a big long ugly address that no one in their right mind is going to type?

There's an easy solution!

Driven mostly by the character limitations of social networks like Twitter, there is an entire series of services out there that offer "URL shortening"[1]. The first that many of us found was TinyURL.com, which still works great. Personally, my choice these days has been bitly, primarily because it provides tracking statistics on the number of people who use your link. There are literally another 100 or so URL shortening services out there that you can choose from.

Regardless of what service you choose to use, the steps are basically the same.

1. Identify the long URL you want to shorten

For example, say that you wanted to include in a newsletter, article, church bulletin or similar printed document the link to this TIME Magazine special report on "The World at 7 Billion". Unfortunately, TIME's website uses absolutely hideous URLs:


That's a URL that not even an engineer could love! It's too long, so it will probably split across lines if it is in a printed newsletter... and it has all those numbers which would be extremely easy for someone to mess up if they were actually to try to copy this URL from the newsletter. Imagine if you were going to put this into a printed newsletter with text like this:

To learn more about challenges facing the world as we now have more than 7 billion people on this planet, read the TIME Magazine special report at http://www.time.com/time/specials/packages/article/0,28804,2097720_2097782,00.html

How many readers are really going to be able to copy that into their browser without any errors? How many will even try?

2. Enter the long URL in a URL shortening site

On you have identified the long URL, you just need to go to whatever shortening service you want to use (TinyURL in this case) and enter in the long URL (I just do a copy/paste from the browser address window):


Once you click the button to shorten the URL, you'll get back a screen like this containing your shortened URL:


In this case that big long hideous URL was shortened to just:


That's it!

3. Copy the short URL into your print newsletter/document

Now all you need to do is copy that short URL into your newsletter text. For instance, here's that same text as above:

To learn more about challenges facing the world as we now have more than 7 billion people on this planet, read the TIME Magazine special report at http://tinyurl.com/3hy8poy

MUCH better! Odds are that most folks can enter that URL successfully into their browser and get to the article.[2] You can, of course, even make it a bit more readable by dropping the "http://" off the front of the URL if you can safely assume of our readership that the "tinyurl.com" would clue them in that this is a web address.

You're done!

Bonus: Creating an even-more-readable custom URL

Now, "tinyurl.com/3hy8poy" is probably something that most people could easily copy over into their browser, but what if you could make it even easier for readers to remember the URL?

Note in the TinyURL.com site this box for a "Custom alias":

Tinyurlshortening alias1

What you can do is enter whatever text you want in that box, and, if that URL is available, the TinyURL.com service will use that text as the shortened URL. For instance, I tried "7billion" and "7billionppl" but both were already taken. However, "7billionpeople" worked:

Tinyurl alias2

So now I can give out this URL to point to the article:


Let's take a look at my proposed printed newsletter text again:

To learn more about challenges facing the world as we now have more than 7 billion people on this planet, read the TIME Magazine special report at http://tinyurl.com/7billionpeople

Now that ought to be something that people can easily remember and/or copy over into their browser without any errors.


... my customized URL was longer than the original shortened URL.

That's okay! It's far shorter than that big ugly URL used by TIME's website, and it is far more "readable" than the random group of letters and numbers originally provided by TinyURL.com.

Remember... the goal is to put something in print that people can actually be successful in typing into their browser address window. If you have to make it a little bit longer in order to make it more readable, that may be okay.[3]

One final note - URLs from a shortening service generally CANNOT be re-used. Once the shortened URL (custom or randomly generated) has been created, it is fixed forever and always to point at whatever longer URL was entered in the service. I say this because if you are playing around to see what kind of custom URLs might be available, you need to make sure that the real longer URL is what you are shortening... because you won't have a second chance.

Again, there are at this point literally hundreds of URL shortening services out there. They all work pretty much the same and will let you make your print newsletters/documents MUCH more readable - and make it so that readers just might actually type in the link and go do the site you are referencing!

[1] For those who want more details about the "URL shortening" process, there is a lengthy Wikipedia article on the topic.

[2] One reason that I'm a fan of using bitly for URL shortening versus TinyURL.com is that bitly tracks who actually uses your URL and shows you statistics and charts so you can see that your URL is actually being used. Now, unlike TinyURL, you do have to register for a free bitly account in order to use their service.

[3] And I could have spent some time trying to find a shorter URL that wasn't taken... but there's a tradeoff between shortness and readability. "7billipeople" was probably available, too, but people aren't going to recognize that

Image credit: chrisdlugosz on Flickr

If you found this post interesting or useful, please consider either:

Amusing Video Tutorial: Let’s Suck at Github Together

If you want to learn more about using git and Github, or are a fan/user of git/Github (as I am) and want to pass along a video tutorial for others to see, you may enjoy this episode from Chris Coyier entitled “CSS-Tricks #101: Let’s Suck at GitHub Together“. As you can tell from the title, Chris doesn’t mind poking some fun at his own abilities – and his own aversion to the command-line and preference for GUI utilities.

For me personally, I’m rather “old skool” and typically prefer the command-line, but I appreciate that many people don’t… and I enjoyed Chris’ entertaining episode. Sure, as some commenters noted, there were a few minor inaccuracies/faults… but overall it did the job well in helping introduce people to what git and Github together can do. I can’t embed the video here, but if you click on the image below you’ll be taken to his site where you can view the episode…

Csstricks github video

And if you are over on Github, you can follow me there as github.com/danyork.

Video: How To Create a Simple DocBook document using oXygen XML editor

Recently I’ve needed to get back into creating some DocBook documents and needed to refresh my knowledge of the latest tools. Back about 10 years ago, I did a great amount with DocBook and spoke about single-source publishing at conferences and created a few tools and vimrc macros. However, since that time I’ve not done much with DocBook – and obviously the tools and toolchain have evolved a bit.

In looking around, I’m quite impressed by what the oXygen XML editor can do with DocBook. oXygen looks quite powerful! It’s also got a bit of a price tag… on the other hand, I know that putting together the pieces to create your own toolchain can take a bit of work. The ever-present tradeoff between your time and your money…

I think I’ll certainly try out the 30-day trial to see what the writing experience is like.

This video shows how to create a simple DocBook document using oXygen and certainly makes a compelling argument for how easy the editor can be:


Do any of you use oXygen? Have you found it worth the price?

Great Resource -> Felix’s Node.js Guide

FelixnodejsguideWant to learn more about Node.js? Felix Geisendörfer recently rolled out a site with a series of guides to help people get started:


So far he has these guides available:

  • Node.js Beginner Guide
  • Node.js Style Guide
  • Node.js Community Guide
  • Node.js Convincing The Boss Guide

and promises more to come. He is nicely using a Github repo for the development of the guides and you can monitor that repo to see what is in development.

Documentation and training are always critical elements of helping people get started with a new language, so it’s great to see initiatives like this one. I’m definitely watching the Github repo and have been reading through his guides already.

Thanks, Felix, for putting these docs online!

Video: Intro to Node.js by Ryan Dahl at SF PHP Meetup on Feb 22, 2011

Here’s a great video introduction to Node.js by creator Ryan Dahl at the San Francisco PHP Meetup Group on February 22, 2011. He steps people through building apps in a great style:

Node Tuts – a video podcast tutorial on learning Node.js

In my continued interest to learn more about Node.js, I was recently pointed to an enjoyable set of video podcasts called “Node Tuts” and available at:


In each episode, host Pedro Teixeira walks you through how to perform some task using Node.js. He uses a combination of the command line, TextMate (to view the code) and his web browser. I have only started working through the series, but so far I have already picked up a few tips and learned about a few new modules to check out.

These episodes are recordings of Pedro hacking away and do include mistakes he makes (and corrects). This actually was okay because it helped me check my own knowledge. There was one show where I thought “he didn’t declare that module” and sure enough he had to go back and correct that. The rawness of the recording, though, was helpful in understanding how you could debug code in Node.js.

I do also like that each episode builds on the previous one (so far). It provides a useful way to expand your knowledge based on what you just learned.

As I mentioned, I am only starting to work through the recordings, but so far I have found them quite helpful!