Sometimes the Ubuntu software updater finds it doesn’t have enough temporary space to download and apply updates – you get a message like this:
And even running the “sudo apt-get clean” doesn’t help.
I like the Rails to_sentence method on String class, which converts an array to a comma-separated sentence where the last element is joined by a connector word.
It makes it easy to take a list of names, for example, and make them human-readable, without having to fiddle with join words and last-item-is-special-case stuff:
['one', 'two'].to_sentence # => "one and two" ['one', 'two', 'three'].to_sentence # => "one, two, and three"