Entries from February 1, 2013 - February 28, 2013

Sunday
Feb242013

Interlude: Crystal Timelapses + Deus Ex: HR  

A beautiful macro lens video using part of the Deus EX: HR Soundtrack. 

Crystal Timelapses from Mark Svoboda on Vimeo.

http://vimeo.com/58951491

Sunday
Feb172013

Reliable Path Navigation in PowerShell based on Script Location  

I've forgotten and re-learned this several times in the past month few months –  that's means it's time for a blog post.

Summary: I'm going to show how to make your scripts more resilient to common issues with your current directory.

Let's start with my scenario as shown below. I need my PowerShell script Deploy.PS1 one to copy MyProject.DLL somewhere else.

Our first attempt at this will be to use relative paths like this in Deploy.PS!

copy ..\Bin\Debug\MyProject.DLL D:\outputfolder

The weakness of this approach is that the “current directory” is sensitive to where your PowerShell host is started from. For example if you launch PowerShell.exe by default your location will look something like “C:\users\username”

Also, in the course of your PowerShell session, you may have changed your current directory to some other location.

We need a more reliable way of traversing from where the Deploy.PS1 script exists –  regardless of the current path.

Fortunately this is not very hard!

First, let's figure out the absolute filename for the script. We simply get this from the value of $myinvocation.mycommand.path

    $script_path = $myinvocation.mycommand.path

Now, we find the location of the “Scripts” folder

    $script_folder = Split-Path $script_path -Parent

We go up once more to get to “MyProject”

    $project_path = Split-Path $script_folder -Parent

Navigate down into “bin/Debug”

    $bindebug_path = Join-Path $project_path "bin/Debug"

And finally get the location of the DLL

    $localdll = Join-Path $bindebug_path "MyProject.dll"

Here's the complete script

$script_path = $myinvocation.mycommand.path
$script_folder = Split-Path $script_path -Parent
$project_path = Split-Path $script_folder -Parent
$bindebug_path = Join-Path $project_path "bin/Debug"
$localdll = Join-Path $bindebug_path "MyProject.dll"

So now we've seen three things in action:

  • How to find where the currently runing script is located –  by using the value of $myinvocation.mycommand.path
  • Given a path, how to to get the parent folder –  by using the Split-Path cmdlet
  • How to append paths –  by using the Join-Path cmdlet

If you want to condense this even further, you can get it done in one line:

$localdll = Join-Path $MyInvocation.MyCommand.Path "../../bin/Debug"

 

 

Saturday
Feb162013

Improve Your Podcast and Screencast Audio with Auphonic  

I hadn't watched or listened to FLOSS Weekly in a while and so I checked out FLOSS Weekly 240 which focused on a service called Auphonic.

Here's the one sentence summary: Auphonic fixes your crappy audio automatically and for free.

Try it yourself:

  • Go to Auphonic
  • Create an account
  • Create a new “Production”
  • Upload a decent length of audio and select your production options (for example example Noise and Hum Reduction)
  • Very shortly you'll get back your automatically fixed audio

 

Audio Algorithms and my experiences

I created a new Production using the audio from one of my screencasts. I enabled “Noise and Hum Reduction” (see below) and submitted the production.

Afterwards I was pleased to find that (1) it only took about 10 seconds and (2) the audio sounded great. The irritating ambient hissing in the audio disappeared completely without compromising the sound of my voice.

Do check out the Floss Weekly 240 Episode. There's much more technical detail about what Auphonic is doing to make all this work automagically.

 

Saturday
Feb162013

Interlude: How To Draw Really Good - Spiderman

“being a professional is always about taking shortcuts”

 

Saturday
Feb092013

My Audiobook Recommendations for 2013  

It was a great for me and Audible. Below are a list of my favorites from 2012 that I recommend if you are looking for something to listen to in 2013.


 

Jacqueline Kennedy: Historic Conversations on Life with John F. Kennedy

  • by Caroline Kennedy (foreword) , Michael Beschloss (introduction)
  • Narrated by Jacqueline Kennedy, Arthur M. Schlesinger, Jr., Caroline Kennedy, Michael Beschloss

 

Snap00357

 

Mother Night

  • by Kurt Vonnegut
  • Narrated by Victor Bevine

Snap00356

 

Ex-Heroes

  • by Peter Clines
  • Narrated by Jay Snyder, Khristine Hvam

Snap00355

 

Ex-Patriots

  • by Peter Clines
  • Narrated by Jay Snyder, Khristine Hvam

Snap00354

 

Soon I Will Be Invincible

  • by Austin Grossman
  • Narrated by Coleen Marlo, Paul Boehmer

Snap00353

 

Pushing Ice

  • by Alastair Reynolds
  • Narrated by John Lee

Snap00352

 

Cat's Cradle

  • by Kirt Vonnegut
  • Narrated by Tony Roberts

Snap00351

 

Century Rain

  • By Alastair Reynolds
  • Narrated by John Lee

Snap00350

 

Daemon

  • by Daniel Suarez
  • Narrated by Jeff Gurner

Snap00348

 

Freedom

  • by Daniel Suarez
  • Narrated by Jeff Gurner

 Snap00349

 

Have Space Suit, Will Travel

  • by Robert Heinlein
  • Narrated by Will McAuliffe and the Full Cast Family

Snap00347

 

Kim

  • by Rudyard Kipling
  • Narrated by Sam Dastor

Snap00346

 

 

Declare

  • by Tim Powers
  • narrated by Simon Prebble

Snap00345