Interlude: Crystal Timelapses + Deus Ex: HR
Sunday, February 24, 2013 at 11:52PM A beautiful macro lens video using part of the Deus EX: HR Soundtrack.
Crystal Timelapses from Mark Svoboda on Vimeo.
Sunday, February 24, 2013 at 11:52PM A beautiful macro lens video using part of the Deus EX: HR Soundtrack.
Crystal Timelapses from Mark Svoboda on Vimeo.
Sunday, February 17, 2013 at 11:42AM 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:
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, February 16, 2013 at 11:01PM 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:
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, February 16, 2013 at 9:48AM “being a professional is always about taking shortcuts”
Saturday, February 9, 2013 at 1:29PM 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.

Cat's Cradle
Have Space Suit, Will Travel

Kim