Wednesday, June 18, 2014

How To Mount a Dicksmith MP3/Video Player (Coby A 87051) in Ubuntu/Linux



If you purchased a simple MP3/Video player from Dick Smith and would like to use it on Ubuntu or any other Linux distribution, you will probably find that the system does not mount the drive when you connect it via USB, which renders it useless.

In order to get access to the device via USB on Ubuntu/Linux follow these steps:

  1. Turn the device off by pulling the power button towards the power symbol on the side of the device, which means pulling the button away from the word "HOLD" until the screen turns off.  You should see a Dick Smith logo as the device shuts down.
  2. Connect the device via mini-USB-to-USB.  If a file browser windows opens your device is working just fine.  If a file browser window does not open and you have no option of mounting the device, you will need get the system to recognise it as a mountable USB device.
  3. Open a terminal either through the application launcher or with the system shortcut CTRL+ALT+T.
  4. Run "lsusb" in order to detect the device.
  5. Locate the line that includes the words Coby Electronics Corporation A8705 MP3/Video Player 
  6. Write down the device ID number containing two sets of four alphanumeric characters separated by a colon.  My system gives it as 1e74:4641, but yours might give a different number.
  7. Create a configuration file in the /etc/modprobe.d/ folder by typing the following command: sudo gedit /etc/modprobe.d/coby-option.conf
    Strictly speaking it doesn't matter what you call this file, but seeing as it is a Coby device, this is an apt name.
    If you use a different text editor such as Leafpad, amend the command to sudo leafpad /etc/modprobe.d/coby-option.conf
    Either way, this will create an empty text file.
  8. Type the following line in the empty file, using the device ID you recorded in Step #5:
    options usb-storage quirks=1e74:4641:mw
    This add a configuration line to the Linux kernel that alerts it to the existence of this device and will result in it being mounted automatically upon connection via USB the next time you start the computer.
  9. Save the file and close it.
  10. Reboot your computer.  Logging out will not suffice because you need to reload the kernel and the easiest way of doing so is simply to reboot.
  11. Repeat Steps #1-2.
You should now have access to the MP3/Video player via USB and be able to transfer files to and from the device.

Tuesday, August 23, 2011

Frame-by-frame Analysis of the Famous Socialnomics Video

One of the most impressive promotional videos I have seen is Eric Qualman's "Socialnomics" 2009 video:


I believe there are newer versions of this video, but the key points of the following analysis hold for this and other such videos.

The target audience = business owners

This is, without a doubt, a 2:35 expostulation of advertising through social media.  It is filled with facts that are of most interest to business owners who meet the following descriptions:

  • Aged 40+
  • Owners / seniors in business
  • Not computer experts
  • Not avid users of social media

Viewers who are younger, do not have a controlling stake in the business, or are already comfortable with social networking and the prominent websites mentioned will either be unimpressed or will not need much convincing.

Let's have a look at the main argument:  (Click to see a full sized map)

It's not the most incisive analysis, but it gives a good overview.


As we can see, the argument is not cogent: it is an assemblage of unconnected facts that are cleverly worked appeals to fear.  Here is a great resource on fallacies of reasoning.

But it is nevertheless very compelling viewing.

Why?

Presentation.

Every statistic, every assertion, every description is presented in snappy, engaging animated text and images to well selected music.

Here is a frame-by-frame analysis of the holds (static text or image on screen) and transitions, performed using OpenShot Video Editor:

A few key points:

  • Longest Transition = 100 frames = 3.3 seconds
  • Longest Hold = 175 frames = 5.83 seconds
  • Average Transition = 9 frames = just under 1/3 of a second
  • Average Hold = 31.16 = just over one second
  • Number of Cuts = 19 = a cut every eight seconds on average

Note the following distributions:



What this means is that for most of the video the text and images are moving almost continuously .  And when they're not in motion, they're only dead still for 1-3 seconds.
Likewise, transitions are almost too fast to follow -- over half of them occur in less than a third of a second!

However, it is also worth noting:
  • The screen goes blank 15 times
  • There are very few instances of more than one item moving on screen

What does this mean for your video?

  1. Keep it brief, 
  2. Keep it coming, 
  3. Don't change more than one thing on screen at a time.
Oh, and have fun ;-)

I Didn't Think I Could Love OpenShot Any More Than I Do, But I Was Wrong

Over the last couple of years, I have supported the OpenShot project in every way I could, and have been inspired by its evolution under the guidance of Jonathan Thomas -- the guy deserves a medal.

One feature that I needed was a keyboard shortcut for adding a marker.  So with a little bit of grep I managed to find the information I needed in the MainGTK.py file.

Here is what my change looks like in code:

if self.is_edit_mode == False:
            if keyname == "c":
                # Cut all tracks at this point (whereever the playhead is)
                self.cut_at_playhead()
                return True
           
            if keyname == "m":
                # Experimental, trying to add a keyboard shortcut for adding a marker
                self.on_tlbAddMarker_clicked(widget)
                return True   


Here is what my change looks like on screen:




And here is what my change looks like on face:




Thank you, JT and the OpenShot community, for this magnificent software :D

Wednesday, July 27, 2011

Working Out My Desired Income in Haskell

  1. desiredIncome x = x > $3000 per month after tax and superannuation contributions
  2. Tax = $4650 + 30% of per-annum income between $37,000 and $80,000
Eventually I'd like something that takes all of my expenses into account and calculates the desired income as well, so it's for general use not just personal.  For now, this is a good start.

Monday, July 25, 2011

Floor Mats and Haskell

This is a problem that I'd like to solve in Haskell.

The other day I went to Clark's Rubber to purchase some carpet vinyl. I'm also interested in mats for doing rolls and handstands on a danceFloorArea.

There are two sizes:

smallMatLength = (600mm)
smallMatArea = smallMatLength^2
smallMatUnitPrice = $30

largeMatLength = (1000mm ^2)
largeMatArea = largeMatLength^2
largeMatUnitPrice = $50

I have a danceFloorArea in mind:

danceFloorWidth = 2200mm
danceFloorLength = 3200mm
danceFloorArea = danceFloorWidth * danceFloorLength

I want to cover as much danceFloorArea as possible for the lowest possible price, i.e. I want the highest possible possible danceFloorArea/[small/large]MatUnitPrice ratio:

Should I use smallMats, largeMats, or a combination of both?

1) How do I calculate (danceFloorArea / smallMatArea) without a remainder?
2) How I calculate (danceFloorArea / largeMatArea) without a remainder?
3) How do I calculate danceFloorCoverage = (a * smallMatArea) + (b * largeMatArea) without a remainder OR with the smallest possible remainder

Other questions, I guess...

1) How many smallMats can I fit into the area?
2) How much would (1) cost?
3) How much of the area would I cover?
4) How many largeMats can I fit into the area?
5) How much would (4) cost?
6) How much of the area would I cover?

Saturday, July 23, 2011

Haskell Notes 2011-07-23

This is a note about Haskell

Haskell Notes

I tried to write the Douglas Adams joke but got an error.

*Main> let "The Answer" = 42

:1:20:
    No instance for (Num [Char])
      arising from the literal `42'
    Possible fix: add an instance declaration for (Num [Char])
    In the expression: 42
    In a pattern binding: "The Answer" = 42