Showing posts with label user interfaces. Show all posts
Showing posts with label user interfaces. Show all posts

Saturday, 20 December 2014

No-one expects the...

... unexpected!

I pasted some text into an open C comment and whilst closing the comment, I found that '/' does 'undo'.

Wot?

Aha, the ctrl key was stuck and it turns out that C-/ is short for M-x undo or C-x u.


YEEHAW!

Saturday, 21 June 2014

It Seemed Like a Good Idea at the Time

My latest idea for the svn --diff-cmd can be seen here.


Let's hope it does better than this guys' great idea!

Thursday, 29 May 2014

A script for Exaile: bedtime-story.sh

As much as I like Exaile, it sadly lacks the option of turning a recording off after n minutes.

But, who needs a feature for the Exaile GUI when a script will suffice?

So, set your story up to play in the GUI, then use this:

bedtime-story.sh:

# turn the screen off
xset dpms force off

sleep $@ > /dev/null 2>&1

if [ $? = 1 ]
then
    # turn the screen on
    xset dpms force on
    echo "Fade out Exaile playback after a defined time, using the computer's volume control."
    echo ""
    echo "Usage: bedtime-story NUMBER[smh]..."
    echo ""
    echo "Each argument is a number followed by a unit."
    echo "The units are: s (seconds), m (minutes), h (hours)"
    echo "Example: bedtime-story 20m 10s"
    echo "The screen will be turned off, move the mouse or press a key to turn it back on."
fi

# grab current spot and volume, then gently fade and pause
c=$(exaile --current-position)
v=$(pactl list | grep Volume | cut -d ":" -f 3 | cut -d "%" -f 1 |\
 sed -n '1p' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
for((i=$v;i>=0;i--)) do
    sleep 1s
    pactl set-sink-volume 0 ${i}%
done
exaile --play-pause

# return volume to former setting
pactl set-sink-volume 0 ${v}%
echo "The current track was faded out beginning at $c."

Now I can go to sleep in style, whilst listening to the Internet's longest history podcasts. (in parts).

Saturday, 14 December 2013

The UNIX command line explained simply for UNIX experts

Seasoned UNIX users and developers of software often forget how mindbogglingly complex their creations are, because they use and work them every day, and --- it's just ever so obvious, right?

Why do newbies and even experienced users have such difficulty in grasping the timeless elegance and simplicity of a well-formed UNIX command line?

Well.  Allow me to put you, the expert, into the newbie's position for a moment :)

In the UK and Australia, there exists a particular fiendish form of crossword puzzle:  the cryptic crossword.

Here is a classic example of the type of mystifying clue such a puzzle offers:
15D Very sad unfinished story about rising smoke (8)
is a clue for TRAGICAL. This breaks down as follows:
  • 15D indicates the location and direction (down) of the solution in the grid
  • "Very sad" is the definition
  • "unfinished story" gives "tal" ("tale" with one letter missing; i.e., unfinished)
  • "rising smoke" gives "ragic" (a "cigar" is a smoke and this is a down clue so "rising" indicates that "cigar" should be written up the page; i.e., backwards)
  • "about" means that the letters of "tal" should be put either side of "ragic", giving "tragical"
  • "(8)" says that the answer is a single word of eight letters.
If the above maketh your mind go carroussel and gives your brain slight vertigo, you now know how most newbies and other mere mortals feel about the UNIX command line and the many cool options your software can be used with :-)

Example taken from The Guardian crossword of Aug 6 2002, set by "Shed", found in the Wikipedia explanation of Cryptic Crosswords.

Ps.: Brit and Aussie geeksters  who are crossword fiends will of course not be fazed at this attempt to demonstrate the users' head space, and I'll wager that at least one of them will now probably feel inspired to set a cryptic crossword with UNIX clues :-)

Thursday, 31 October 2013

This task only takes 2 minutes!

...but if that 2 minute job occurs 1000 times, it's 33 man hours.

That's only 100 users doing the same thing 10 times each.

If you have 1000 users who need to do this once every day at work, that's 200 times per person per year,  or 6 1/2 hours per year per person, and per 1000 users this is 6666 hours or 277 full 24 hour days or 833 8-hour work days, days, or 4 employee years (@200 days per year) + 33 days.

So the 2 minute task is quite the time (and money) sink!