Happiness Just Might Be a Warm Cup of Coffee

March 3rd, 2010

Rocky Raccoon may have been satisfied reading that book placed by the Gideons in his hotel room, but I have something better for your reading list.  I read this book  a while back and am just now reminded to say something about it with all this hubbub about Starbucks and guns.

The book (by John R. Lott, Jr.) is called More Guns Less Crime (Understanding Crime and Gun Control Laws).  It is the most comprehensive analysis of crime statistics I have ever seen.

The gist of his argument is that when a certain kind of liberal concealed carry law is implemented there will be an associated reduction in the rates of violent crimes (both locally and in neighboring areas).  The statistics seem to uphold this theory and provide especial insight into the relationships between these same laws and the protections afforded to women and minorities.

I think folks on either side of this issue (as well as anyone on the fence) will benefit from reading this book.  I make no bones: he is writing (even if from the compulsion of reason) in support of the laws he finds protect us best.  Whether you are swayed by the power of reason is up to you, but you will find much within the pages to respect.

Of course the Starbucks issue is really a non-issue.  It is both opposing groups attempting to get a corporation to sponsor their petty debate.  This is not an issue for a corporate board room decision.  This is an issue for legislation.

I think we have great legislation in Washington state (very much in line with what Lott suggests provides the safest social sphere), so I’m not going to get all up in arms (what?) if cowboys start spinning their spurs while waiting on their capuccini.

I’d rather see Starbucks fix their grammar in whatever language they are under the impression they use.

Lock and load, baby-doll.

  • Share/Bookmark

Update to My Renaming Script

March 3rd, 2010

A while back I wrote a post on renaming FLAC files to include their associated disc numbers. For example, if you have a file from disc 1 named “01 – Track Name.flac” my script would change it to “01.01 – Track Name.flac”.

This updated version of the script allows the user to enter the path to the folder needing files renamed and the associated disc number.

I think this is a slightly simpler method than my previous method for using this script. You can read about the original script here.

Here is the current script:


# Prepend album number before track numbers
# 01 - Track Name.flac becomes 01.01 - Track Name.flac

echo
echo "This script will change FLAC file names based on a containing folder and a disc number which you supply."
echo "Example:  \"01 - Track Name.flac\" becomes \"01.01 - Track Name.flac\""

read -p "I will require the path to the containing folder: "
if [ -d "$REPLY" ]; then
printf "I have confirmed this is a directory.\n\n"
directory="$REPLY"
else
printf "I cannot find this directory.\n\n"
exit 1
fi

read -p "Which disc number, please (01 through 99): "
# add test for 01-99
printf "%b\n\n" "I will prepend $REPLY to all FLAC files in: $directory\n\n"
newname=$REPLY

read -p "Press <ENTER> to continue (ctrl-c will abort)."
echo

cd "$directory"

rename "s/^/$newname./" *.[Ff][Ll][Aa][Cc]

This version also handles FLAC extensions in any case (flac=FLAC=FlAc &c).

If I make any updates, I’ll likely just change this post. As such, I should say that this current version is current as of 8 March 2010.

Have fun with that.

  • Share/Bookmark

Ce n’est pas ma faute

March 1st, 2010

I am not a magical mind.  I am not a unique and beautiful snowflake.  I’m just another drone.  And I had the same drone thought that all you other drones had.  “You named your new gizmo after a feminine hygiene product?”

I remember running through a list of possible iObject names while I was thinking about the upcoming announcement from Apple.  I must admit that iPad never crossed my mind.  We have to at least credit them for being original in this sense.

Regardless, this is the iDevice naming scheme jumping the shark.  They cannot continue with this naming scheme after this clear if bazaar foible.  Any new product following that naming scheme will be subject to “oh, it’s from those iPad people”.  Impressive.

I can’t even be bothered to post a link to a clever response.  There are just too many excellent responses.

Hang tough, you crazy caterpillars.

Time Wastes Us

  • Share/Bookmark

if you would

March 1st, 2010

if you would
be so good
as to touch
me so much
that my head
which is said
to be full
of charcoal
should begin
to unwind
like a sack
full of black
onions,
I’d give suns

(up close stars)

in a box
of one lock
for a ring
is a song

  • Share/Bookmark

How Blindness Lets You See

February 19th, 2010

If you have not yet experienced Blindness, either the film or the novel, I encourage you to pick up your preferred version and get to experiencing.

I love and hate recommending this kind of movie.  I love it because it will have such a dramatic impact on your lives.  I hate it because I can’t really tell you anything about it beforehand.

All I can really say is that it is a film about people who suddenly go blind and about the world which this particular and peculiar change creates.  Rest assured it will, like any well crafted piece of art, allow you insights heretofore unobtainable.

Don’t hesitate.  I know a good tale when I see one.

  • Share/Bookmark

NumLock not Locking at Login Screen

February 18th, 2010

I have this old Dell Vectra which I built for a family friend using Ubuntu Desktop 9.10.  I set the NumLock in the BIOS to ON and after I logged into the operating system NumLock was certainly locked.  However, for whatever reason NumLock was not ON at the login screen itself.

I posted an inquiry on the Ubuntu Forums and was pointed to this page.

For those of you seeing this same issue, here is how I fixed this particular machine/OS.

First you’ll want to install numlockx using Synaptic:

System —> Administration —> Synaptic Package Manager

Locate numlockx and mark it for installation then click the Apply button.

Now you just need to add some lines of code to kick that into action at boot time.  You will want to edit your /etc/gdm/Init/Default file:

gksudo gedit /etc/gdm/Init/Default

At the end of that file you should see a line containing only “exit 0″.  Immediately before that line you will add the code to invoke numlockx:


if [ -x /usr/bin/numlockx ]; then
/usr/bin/numlockx on
fi

Be sure to add a comment line like a good programmer (begin a comment line with a #).

So the end of your Default file should look something like this:


# Added by JamesIsIn to enable NumLock at login screen

if [ -x /usr/bin/numlockx ]; then
/usr/bin/numlockx on
fi

exit 0

That’s it.  Save that file and reboot your machine.  NumLock should now be on at your login screen.

Happy Hunting.

  • Share/Bookmark

Storing Errors in the Brain and Creative Sparks

February 17th, 2010

It occurs to me that there could be a connection between those mistakes we make, which we store as truths for even small fractions of time, and the later ability to create or innovate.  As I can at this time conceive of no scientific proof by which this speculation may be either confirmed or denied, it must remain solidly in the realm of philosophy.  First I will outline what I mean and then I will look at the possible consequences should this be true.

The brain stores memories, experiences, and the like as synaptical connections within its neural networks.  Some of these stores data points we can think of as true and others false.  Consider a child who encounters a small furry four-legged animal.  They may, adorably, call that animal a dog.  This experience will become part of their neural matrix relating to dogs and fur and animals &c—complete with many storage points, interrelations, and connections.  When later that child discovers this animal was and is in fact a badger, adjustments will be made across the matrix to allow the child to correctly distinguish between the true dog and the true badger.  However, what is important here is the false badger.

For the duration in which the badger was falsely identified as a dog, pathways were formed and connections were created all of which can be called upon later.  Clearly the person in question will not want to falsely identify the badger as a dog, but these pathways and connections provide alternative routes of thinking along which new ideas and innovations might be prospected.

Consider next that any brain, young or old, will contain thousands upon thousands of these false truths.  They may have been briefly held or long-standing, what matters is that what is false was thought true.  This branching allows for later branching.  It seems to me that this later branching can assist in the creative and innovative processes—branching into new ideas heretofore unthought.

I do not claim that this is the only nor the necessary cause of the creative spark, merely that it can be considered as a partner in the innovative process.

If this is the case, then we might surmise that any brain which was not capable of allowing for false truths of some minimal duration would also be in capable of exploiting those alternate pathways for creation and innovation.  Clearly this would have an impact in the field of Artificial Intelligence.  Such an artificial brain must be able to store indefinitely and use at least occasionally information which is incorrect.

My understanding of the current breed of AI decision making networks is that they are able to learn by adjusting weights over time.  These weights do not store the incorrect pathways; rather, they replace them.  This may well yield positive results in creating brain-like computing devices; however, it may be necessary to allow these artificial brains to maintain databases of false truths, mistakes, and incorrect impulses if we are to see them create and innovate.

This is speculative and probably highly condemnable by stronger philosophers than myself, but here it is anyway, out in the theater of ideas ripe for your consideration.

  • Share/Bookmark

Go Do that Gnome-Do that You Do so Well

February 15th, 2010

Gnome-Do is an application launcher, among other things.  It is the fastest, slickest application launcher I have found for any platform.  It was originally designed after Spotlight from the Mac operating system.  However, it has outclassed its predecessor entirely.

With a couple of key-strokes I can launch any application on my system.  Or I could open a folder location.  Or I could just as easily search for something which came to mind.  Or I could use Gnome-Do to access the inner workings of many different applications on my system through its extensive plugins.   Or I could search the Internet.  Or I could search my del.icio.us bookmarks.

Pretty much anything I could imagine.  Just a few key-strokes.

It’s like magic.  I’m surprised Sarah Silverman doesn’t have a show about it.

If you are running Ubuntu (and you ought to be by now), Gnome-Do is available through Synaptic and the standard Ubuntu repositories.  However, if you would like to latest version of Gnome-Do you can add their repositories directly.

Open your repositories (System —> Administration —> Software Sources) and add these two entries (Third-Party Software tab; Add button):


deb http://ppa.launchpad.net/do-core/ppa/ubuntu [YourVersionHere] main

deb-src http://ppa.launchpad.net/do-core/ppa/ubuntu [YourVersionHere] main

(Substitute your version as appropriate.  I am running 8.10 and 9.10 so I use intrepid and karmic, respectively.)

You’ll also want to add the verification key for this repository.  The simplest way to do that is by running two commands (Applications —> Accessories —> Terminal):


sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 77558DD0

sudo apt-get update

If you are already running Gnome-Do, you can now update your system (System —> Administration —> Update Manager) and you will get the latest version.  If you need to install Gnome-Do, hop into Synaptic (System —> Administration —> Synaptic Package Manager) and look for it by name.

You will have to start Gnome-Do manually before you can use it (Applications —> Accessories —> GNOME Do) and I set it to auto-start (located in its Preferences dialog, which is where you will also find its plugins).

I believe by default you call up Gnome-Do by using cltr-alt-space.  I have a Microsoft keyboard and so set mine to super-space (Windows-space).  You can choose something you like and which is convenient for you.

Have fun with this.  You’ll wonder how you ever got by without it.  And you will sincerely miss it when you are working on other operating systems.

Thanks to this post for the repository information.

  • Share/Bookmark

Stitch Some AVI’s Together

January 21st, 2010

So you have that video of your cat doing that thing and that other video of your brother getting startled by the can of joke peanuts, and now you’re thinking “I’m such a wicked director I’m going to edit these films together and put them on the Interwebz.”  Ok.  That sounds important.

In Ubuntu there is a little utility called avimerge which (wait for it) merges avi files.

avimerge -c -o [WhatYouWantItCalled].avi -i [a].avi [b].avi

I know; you’re thinking “dude, that looks like something you type into the terminal window; how am I supposed to do this?”.  Fear not, little tomato.  You just want to replace the stuff in the square brackets with your stuff.  A and B are the two files you are wanting to merge and WhatYouWantItCalled is, well, I think you can manage that one.  Yours might look like this:

avimerge -c -o ScorseseMe.avi -i CuteKitty.avi BroJumps.avi

If your file names have spaces you’ll have to tell the shell (the terminal) how to interpret them:

avimerge -c -o Scorsese\ Me.avi -i Cute\ Kitty.avi Bro\ Jumps.avi

Could it be any easier?

Have fun with that.

  • Share/Bookmark

Little Apes to FLAC files

January 18th, 2010

You may come across individual APE files which you would like to convert to FLAC files.  This can be especially useful if you have an album FLAC and an accompanying CUE file and you are having trouble getting the APE to burn correctly.

There is a fairly simple tool for dealing with this conversion.  As fortune would have it this tool will also manage conversions to and from ALAC, SHN, TTN, and WAVE files.  How can they pack so much fun into such a small package?  Now it’ll be that much easier to clean your collection up and keep everything tidy: flacflacflac.

Ok, so you’ll need—and if you’ve been following along here you already have—the MAC (Monkey Audio Codec).

Next you’ll need to get something called apeinfo.   There exist both 32 and 64 bit versions so be sure you get the proper version for whichever Ubuntu you are running.  You will find them here.  You will want to change the name of the file you download to merely apeinfo (so remove the _32 or _64) or it won’t work when called up by the next tool.

The next tool being known as convtoflac.  You may find that here.

Download both of your files and they all gets stuck into /usr/local/bin.

I downloaded each of these to my desktop and then used sudo to copy them into /usr/local/bin.  Make certain you have given them execute permissions (set the execute bit).  By storing them in /usr/local/bin I am sure they are in my command path (basically those places your system looks when you type a command) and they are ready to use.  Here is the command you need to move the apeinfo file from the Desktop to /usr/local/bin:

sudo mv /home/[usename]/Desktop/apeinfo /usr/local/bin/apeinfo

You can copy and paste that line and make the necessary substitutions for your system, download location, and specific file.

Once you have these installed correctly you are ready to use the tools to make conversions.  I have written a small simple script for making all of this work together.  If you make my script executable and place it  in your /usr/local/bin you can merely call the whole thing up by typing the name of the command (whatever you decide to name your version of my script) in your terminal.  I named my script Ape2Flac.sh.


#  Ape2Flac.sh

#  also requires apeinfo and convtoflac
#  http://www.soundunreason.com/InkWell/?p=1335

for i in *.ape
do convtoflac.sh "$i"
done

This method will preserve any existing tags.

To fire it up, navigate into the folder in which you have the APE files and run my script (by typing its name into the command line).  It’s that easy.

See, nothing to fear from the command line.

Happy hunting.

  • Share/Bookmark