Friday, November 13, 2009

The Simplest Possible Ninject log4net Binding

I’ve been using Ninject more and more. I also use log4net for logging. But how to do I get my log4net peanut butter into my Ninject chocolate? Like this:

Bind<ILog>().ToMethod(x => LogManager.GetLogger(x.Request.ParentContext.Plan.Type)); 

As far as I can tell, this is the simplest possible way to get Ninject to build an ILog object for dependency injection. NOTE! This is only valid for dependency injection! If you just call:


kernel.Get<ILog>();

You will be less than satisfied with the results… However, this works brilliantly:


public class Notifier : INotifier
{
private readonly ILog _log;

public Notifier(ILog log)
{
_log = log;
}
}

No wrappers, static classes or helper objects! If I ever meet Nate Kohari, I’m going to give him a big ol' hug. I may even tear up a little bit…

Wednesday, April 22, 2009

Installing Contribute Publishing Services on Windows Server 2008

We use Adobe Contribute to edit/manage our web site at work. We’re also steadily moving to Windows Server 2008. I was thus a bit disappointed to see that when I tried to install CPS on Windows Server 2008, it just sat there – trying to install, but in fact doing nothing at all. Being a) stubborn and b) probably stupid (let’s face it, Contribute is dead), I was able to bring it up by copying an existing installation from Windows Server 2003 and then registering the services appropriately. Here’s what I did (your paths and server names will vary). In this example, WEBSTAGE is the old Windows Server 2003 box and WEBSTAGE08 is the new Windows Server 2008 box.

  1. Copied C:\Program Files\Macromedia\Contribute Publishing Services from WEBSTAGE to WEBSTAGE08.
  2. From the Command Prompt, created the CPS service (note space after “binPath=” – important and annoying to miss)
    sc.exe create CPS binPath= ”C:\Program Files\Macromedia\Contribute Publishing Services\jrun4\bin\jrunsvc.exe”
  3. Exported HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\Macromedia Contribute Publishing Server from WEBSTAGE to CPS1.reg.
  4. Exported HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CPS from WEBSTAGE to CPS2.reg.
  5. Edited CPS2.reg and removed the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CPS\Security and HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CPS\Enum sections.
  6. Imported CPS1.reg and CPS2.reg on WEBSTAGE08.
  7. Started the Macromedia Contribute Publishing Server service on WEBSTAGE08.
  8. Added firewall exception to allow access to all ports opened by C:\Program Files\Macromedia\Contribute Publishing Services\jrun4\bin\jrun.exe.
  9. Opened https://webstage08:8900/contribute/admin/server.cfm.
  10. Logged in with old admin password and changed to new admin password.
  11. Switched to Website Settings panel and deleted webstage website.
  12. Launched Contribute CS3, created a new connection to WEBSTAGE08 and added https://webstage08:8900/contribute as the publishing server.

That’s it. Can’t believe it worked, really.

Monday, April 13, 2009

A DSL for IoC Configuration

Just kind of thinking out loud here... Seems like a fantastic use for an M grammar! Hmm...

// Include file from assembly resource
include res://CWS.SoCHelp.NHibernate/Basic.config

// Include file from C: drive
include file:///C:/Users/sherwooda/Documents/Visual%20Studio%202008/Projects/CWS.SoCHelp.Tests/Extended.config

// Include file relative to executable
include file://~/Fluent.config

// Declare aliases for namespaces and assemblies
alias SoCHelp (CWS.SoCHelp, CWS.SoCHelp);
alias NHibernate (CWS.SoCHelp, CWS.SoCHelp.NHibernate);
alias Tests (CWS.SoCHelp.Tests, CWS.SoCHelp.Tests);

// Basic configuration, map service to type, default to "singleton" with no name
SoCHelp:IUnitOfWorkFactory -> NHibernate:NHibernateUnitOfWorkFactory;

// Map open generic with transient instance and no name
SoCHelp:IRepository`1 -> NHibernate:NHibernateRepository`1 transient;

// Don't use aliases, map exact type specified
"CWS.SoCHelp.IUnitOfWorkFactory, CWS.SoCHelp" ->
"CWS.SoCHelp.NHibernate.NHibernateUnitOfWorkFactory, CWS.SoCHelp.NHibernate" singleton;

// Specify an identifier for a service
$Command = Tests:ICommand -> Tests:Command singleton;

// Map specialized generic
$UserRepo = SoCHelp:IRepository`1[[Tests:User]] -> Tests:UserRepository transient;

// Parameters specified
$RedBookFinanceRetriever = Tests:IRetriever -> Tests:HttpRetriever singleton
{
url = "http://www.megacorp.com/financials/redbook.csv";
timeout = 3000;
}

$BlueBookFinanceRetriever = Tests:IRetriever -> Tests:HttpRetriever singleton
{
url = "http://www.megacorp.com/financials/bluebook.csv";
timeout = 3000;
}

// Refer a dependency to a previously created component
$ExternalFinancialProcessor = Tests:IProcessor -> Tests:AuditProcessor
{
retriever = $BlueBookFinanceRetriever;
}

$InternalFinancialProcessor = Tests:IProcessor -> Tests:AuditProcessor
{
retriever = $RedBookFinanceRetriever;
}

// Declare a bunch of commands
$JumpRope = Tests:ICommand -> Tests:JumpRope;
$PickUpSticks = Tests:ICommand -> Tests:PickUpSticks;
$Honk = Tests:ICommand -> Tests:Honk;

// Pass an array of components to a dependency
Tests:IProcessor -> Tests:CommandProcessor
{
commands = [$JumpRope, $PickUpSticks, $Honk];
}


Wednesday, January 28, 2009

Kelvin's First Playlist

Someone was VERY upset this morning. We believe he may have been pleading for Child Protective Services based on the volume of his cries.. I put together a little playlist for him and we danced and danced and he LOVED IT! He calmed right down! Went from 60 to 0 in like 1.4 seconds. It was amazing! Daddy is very tired though. That was a lot of dancing and singing for someone as out of shape as I am..

Here's the playlist:

I Love Beans - Cartoon Planet BBQ
I'm On Standby - Grandaddy
Secret Monorail - Parker Paul
I'm A Believer - The Monkees
Day O - Harry Belafonte
Particle Man - They Might Be Giants
Swinging On A Star - Bing Crosby
Jump In The Line - Harry Bellafonte
If I Wasn't Shy - They Might Be Giants
Stand - R.E.M.
Across The Universe - Fiona Apple (Pleasantville Soundtrack)
You Ruined Everything - Jonathan Coulton
Pork And Beans - Weezer
A Knife And A Fork - Information Society
With A Little Help From My Friends - The Beatles
A Fable With No Moral - Quasi
Stroller Town - Jonathan Coulton
Foux Du Fafa - Flight Of The Conchords
Manta Ray - Nan Vernon
Mr. Blue Sky - Electric Light Orchestra
Put A Lid On It - Squirrel Nut Zippers
Fearless - Pink Floyd

Tuesday, January 20, 2009

Understanding The Scale of Kelvin

My son, Kelvin was born 1/16/2009 at 09:14PST, measuring 7.5lbs and 20.5 inches. Some people may have trouble visualizing the scale of our new bambino, so I've provided this handy guide...

1G iPod Touch, 8GB



XBox 360 Wireless Controller




1G Playstation Portable




80GB 2.5" 5400RPM Serial ATA Hard Disk Drive




WALL-E Blu-Ray Disc



Now if you'll excuse me, I need to go analyze some poop for color and consistency...

Sunday, January 4, 2009

How I Spent My Winter Vacation : Two weeks with the Azure Services Platform

I've had the past two weeks off of work and spent the time really digging into the Azure Services Platform from Microsoft. I'll spare everyone the descriptions and assume you know how to use Google if you're unfamiliar with it. My goal, I thought, was quite simple. I would create a small web application that would serve a small number of customers (dozens, perhaps). I decided on a pet licensing application, as the data model would be fairly simple. I looked at some of the paperwork from our cat adoption, poked around a few county sites for pet licensing and came up with a simple domain model. Great! Now to build an Azure application around it!

Getting Started
The first step was to sign up for the CTP. Read my blog post about that here. It was initially a bit confusing. Mostly due to the massive number of things Microsoft unleashed on the world all at once. While waiting for my magic tokens, I prepped my machine by installing the Azure SDK, Visual Studio Tools for Azure and Azure Management Tools. Lucky for me, a good Samaritan from Microsoft was listening to my tweets and helped me get my tokens right away. It sounds like if you didn't go to the 2008 PDC, you're going to be waiting awhile for access to Azure's Hosted Services (where you run ASP.NET applications). I ended up with two storage accounts and one hosted service, plus access to SQL Data Services, Service Bus, Workflow Service and Access Control Services. Sweet!

Hello Cloud!
Like all software developers, I started off by writing "Hello World". First, I got it working on my machine using the Development Fabric, then I created a new Hosted Service and stepped my way through the prompts to deploy my application. It was relatively straight forward, but I wasn't always sure if I was doing the right thing. There are a lot of status codes like "Initializing..." and "Allocating...", but nothing to indicate how long I should twiddle my thumbs for. Speaking of thumbs, here's a rule of thumb for all things Azure: be patient. Just walk away - go get a cup of tea or harass some people in the marketing department. By the time you get back, there will probably be green lights waiting for you and you can proceed. What you have to do is usually fairly obvious, how long it will take, is not. Anyway, after some navel gazing, I had "Hello World" published to the cloud. Woohoo!

Running ASP.NET MVC on Azure
I'm a glutton for punishment. As such, I decided to cram as many new technologies into my skull as possible. I had read a few blog posts about people running ASP.NET MVC on Azure, so I thought I would give it a shot. Aaron Lerch has a fantastic piece up on how to get it up and running on the Development Fabric. Just follow the instructions! One thing to note, this ate one of my two Storage Accounts. ASP.NET MVC needs cloud-based providers for membership, role management, profiles and sessions. The samples included with the Azure SDK include everything you need and Aaron walks you through the process of setting up your application to use the appropriate providers. You should also read through the Cloudy in Seattle posts (here and here) on ASP.NET MVC and check out Maarten Balliauw's CarTrackr.

All of those posts are great and they'll definitely help you get ASP.NET MVC up and running on your local machine, but they all kind of gloss over how to deploy your application as a Hosted Service. As luck would have it, there's an excellent MSDN article that covers this very topic. By following the instructions there, I was able get ASP.NET MVC app hosted in the cloud with minimal difficulty.

Inversion of Control and Dependency Injection on Azure
One of the great things about ASP.NET MVC is that they've really been listening to the development community and respect the work the ALT.NET/xDD folks have been doing. Fundamental to xDD is the concept of inversion of control and dependency injection for the creation and management of objects. Again, I won't go into the details (your Google finger isn't broken is it?), but there are a myriad of options available: Castle Windsor, StructureMap, Unity, Ninject, Autofac... The list goes on and on. Lots of people like writing IoC containers because they're fun and functional! So my next task was to figure out which IoC container I could use with Azure and ASP.NET MVC. My needs for an IoC container were as follows: run under medium trust, cannot rely on attributes for configuration, support registration of open-ended generics and support constructor argument injection at configuration. Here's the run down:

Castle Windsor
- My preferred IoC container, but it won't run under medium trust. Out!

StructureMap
- My second favorite IoC container. Runs under medium trust locally, but not under Azure. Submitted bug report to Jeremy Miller. Reading through the StructureMap user's group, it looks like he's going to try to fix that early this year.

Ninject
- I didn't really monkey around with Ninject much. The sample code I saw was riddled with [Inject] attributes, which kinda turned me off. Apologies to @nkohari if I dismissed it too early.

Autofac
- Works great in medium trust under Azure, easy to configure, but doesn't support registering arguments for constructor injection at configuration time. You have to specify them when you resolve the service.

Unity
- No problems at all! Worked great in medium trust on Azure, easy to configure, supports everything I need! I gotta say I'm really impressed by how far Unity has come in such a short time.

Persistence, Perpetually
This is where things started to go awry. I'm an NHibernate guy. It's ridiculously easy for me to create a domain model, write up some mappings to the database and bam - persistence is done. The Entity Framework lets me do essentially the same thing, but I prefer the way NHibernate works with POCOs. I also like LINQ - a LOT. I mean seriously, I could kiss Anders Hejlsberg square on the lips. You can perhaps imagine my disappointment when I looked at the sample data access methods for Azure Table Services and SQL Data Services and saw pages and pages of infrastructure code to store even the simplest entity. Here's what I want to do:
_container.Resolve<IRepository<Contact>>().Save(new Contact { Id = Guid.NewGuid(), Name = "Fred" });
Bam! Entity in database. StorageClient (for Azure Table Services) offers something like this functionality, although you have to derive your domain objects from TableStorageEntity. Unfortunately, Azure Table Services is fairly limited at the moment - tables are non-relational and there are no joins. There's also this warning in the documentation: "The StorageClient sample library is not optimized for performance and is not intended to be used for building robust services, but only as an example of a working client library." Ouch.

At this point, SQL Data Services was starting to look a little more desirable. When I import a service reference to the SQL Data Service into a .NET project, I'm basically staring at the repository pattern. That coupled with the fact that it supports intra-container joins made me jump ship to SQL Data Services. Plus, this is about learning! I wanted to touch as much of the platform as possible. Out of the box, the only thing missing from SDS is LINQ. So after poking around for awhile and not finding anything of consequence about LINQ to SDS, I set about implementing the repository pattern and with IQueryable support. I worked on it for about two days and was probably about 80% done when I found this: SSDS REST Library. I was more than a little upset. It was buried in the noise of Google's search results and I didn't happen upon it until I was looking for some help implementing IQueryable. Sigh.

It was around this time that I thought to myself, "Self, you might be missing the forest for the trees here. What about Astoria?" Astoria is/was the code name for ADO.NET Data Services - a way of exposing access to data stores via RESTful web services. It even supports LINQ right out of the box (well, mostly)! Unfortunately, Microsoft hasn't issued a CTP for ADO.NET Data Services over SQL Data Services yet. In fact, it seems like there are some "issues" aligning the two (three, if you count Azure Table Services) offerings.

At this point, I'm a bit frustrated with the persistence picture for Azure. Yes, it's very service-oriented. There are REST APIs through the wazoo - but I don't want to spend my time building and dissecting magic strings for queries and entities. I want to type repo.Save(entity) or repo.Delete(entity) and be done with it. I will say that both Azure Table Services and SQL Data Services both seem to have nailed the data set extension problem. It's VERY easy for a multi-tenant application to extend the schema per-client. Kudos to Microsoft for that!

Ironically, the biggest problem with persistence in Azure applications is that there are so many choices. Microsoft seems to be attacking the problem from multiple directions and I'm unsure which battalion I should join up with.

Future Directions
Unfortunately, I've run out of time and I wasn't able to finish my application, but I have learned a ton about Azure and I'm fairly comfortable moving around the platform now. However, there is still so much more to learn. I didn't even scratch the surface of queues, workflow, the service bus or live ID. These are all areas I intend to investigate - but at a much slower pace. I also BARELY touched on some of the major architectural issues with building Azure applications. I had a great conversation with David Chou, Joseph Healy, Shan McArthur, Roger Jennings and others on multi-tenant Azure applications over on the Windows Azure MSDN Forums.
In the end, I'm probably going to switch to Azure Table Services and StorageClient because I can work with it offline using the Development Storage. Any future work I do with Azure will probably be done on the MAX (Portland's mass transit system), so this is more out of necessity than preference.

Overall, I gotta say I had a BLAST working with Azure! Yes, there were a few frustrating moments and plenty of rough edges, but when I look at what the blue badges are putting together, I see the future. These guys are really thinking hard about what it's going to take to build gigantic, accessible, scalable applications. This isn't just "let me host your CPU for you" - it's truly an internet-scale operating system in the making. Right now I think the two best players on the field are Microsoft and Amazon. It may seem odd that I've left Google off that list, but they don't even rate compared to what Microsoft and Amazon are offering right now. There are a handful of others out there: RightScale, Yahoo, VMWare, etc - but I think Azure is the platform to beat.


Tuesday, December 23, 2008

How To Sign Up for Windows Azure

There are three services to sign up for: Windows Azure, .NET Services and SQL Data Services. You sign-up for all of these services here: http://go.microsoft.com/fwlink/?LinkID=129453

You will NOT receive your tokens immediately. It make take awhile. Also, there are different tokens for different services and they may arrive at different times. This can be confusing, but basically you just need to be patient. You will need TWO invitation tokens to receive access to all three services.

Windows Azure - provides computation services, hosting for ASP.NET applications and access to Azure Storage (blob, queue & table). Requires invitation token with the form XXXXX-XXXXX-XXXXX-XXXXX-XXXXX, where 'X' is [0-9A-F]. Access via the following URL: http://lx.azure.microsoft.com/fs

.NET Services & SQL Data Services - provides access to Service Bus, Access Control Service, Workflow Service and SQL Data Services. Requires invitation token with the form: XXX-XXXX-XXXX, where 'X' is [0-9A-Z]. Access via the following URL: http://portal.ex.azure.microsoft.com/

Please note, Azure Storage != SQL Data Services. Azure Storage provides rudimentary database support via the table storage. SQL Data Services provides more conventional database concepts.

Saturday, December 20, 2008

Windows Azure for Powershell

The Azure SDK includes a setenv.cmd batch file for an Azure Command Prompt. But I haven't used the Command Prompt in ages! Powershell or bust! So.. Here's my Azure PowerShell Prompt script. Add it to the end of your profile.ps1 in the %USERPROFILE%\Documents\WindowsPowerShell folder and go make something cloudy!


##############################################################################################
# AzureCmdPrompt.ps1
##############################################################################################

function SetupAzure($installPath, $netPath)
{
$curPath = $env:path;
$binPath = $installPath + "bin";

$env:PATH = $binPath + ";" + $curPath + ";" + $netPath;
$env:ServiceHostingSDKInstallPath = $installPath;

echo "Windows Azure SDK PowerShell";
$host.ui.RawUI.WindowTitle = "Windows Azure SDK Environment"
}

if (!$env:ServiceHostingSDKInstallPath)
{
if (test-path "hklm:\software\microsoft\microsoft sdks\servicehosting\v1.0")
{
$installPath = $(gp "HKLM:\Software\Microsoft\Microsoft SDKs\ServiceHosting\v1.0").InstallPath
$net64Path = "$env:SystemRoot\Microsoft.NET\Framework64\v3.5";
$net32Path = "$env:SystemRoot\Microsoft.NET\Framework\v3.5";

if (test-path $net64Path)
{ SetupAzure $installPath $net64Path }
elseif (test-path $net32Path)
{ SetupAzure $installPath $net32Path }
else
{ echo "Please install the .NET 3.5 Framework."; }
}
else
{ echo "Please install the Windows Azure SDK."; }
}

Tuesday, June 17, 2008

Using C# 3.0 in ASP.NET 2.0

C# 3.0 has a lot of great features to help with ASP.NET 3.5 web projects. However, you can also use SOME C# 3.0 features in SOME .NET 3.0 and 2.0 projects if you're using Visual Studio 2008. The gist of it is, if you create a new "ASP.NET Web Application" solution (File -> New -> Project... -> Web -> ASP.NET Web Application) you can use most C# 3.0 features (lambdas, vars, anonymous types, etc.) The exception being LINQ, expression trees and extension methods, which require additional classes/attributes that are only present in the 3.5 base class library. This works because the compiler is generating all of the code for your site into DLLs which have to be deployed along with your pages, and .NET 2.0, 3.0 and 3.5 all target the .NET 2.0 CLR.

However, if you are creating an "ASP.NET Web Site" solution (File -> New -> Web Site... -> ASP.NET Web Site), all bets are off. With this type of solution, you are relying on the framework to compile your application at run time. Thus, the target framework's C# compiler will be used. Because the C# 3.0 compiler is only available in .NET 3.5, you can not use C# 3.0 features with this feature of ASP.NET prior to v3.5.

There are a few ways around these limitations. First, you can use LinqBridge. LinqBridge recreates several of the classes from the 3.5 framework in the 2.0 framework, effectively letting you use nearly all C# 3.0 features in your .NET 2.0 projects. Expression trees are the only feature you won't be able to use. Extension methods, LINQ to Objects and query expressions all work just fine. However, you must be using the C# 3.0 compiler to use LinqBridge, so ASP.NET Web Site solutions are still left out in the cold.

Almost.

It turns out there is a sort of work around to compile an ASP.NET Web Site solution with C# 3.0, as long as you don't mind sacarificing dynamic compilation. From the Website menu, select "Start Options". Click on "Build". Change the Target Framework to 3.5 and clear the "Build Web site as part of solution" checkbox and click OK. Now click on "MSBuild Options" and set "Output Folder" to a path outside of your solution's source tree. I'd like to say I know why you have to do that, but I don't. You'll get an error from MSBUild if you specify an output folder within your solution's source tree. Boo. Hiss. Moving on. At this point, you will no longer be able to build your project in Visual Studio. However, you can build it with MSBuild. If you fire up a VS2008 command prompt, change to your web site solution's folder and type "msbuild", your project will compile with the C# 3.0 compiler. Please note that you are compiling your web site to DLLs, so you will not be able to make code updates. Still, it's potentially a nice interim solution until you can move your web projects over.

Here's a feature capability table:

Solution TypeProjectWeb Site
.NET Framework Version3.53.02.02.0 with LinqBridge3.53.02.0
Expression TreesYNNNYNN
LINQ/Query ExpressionsYNNYYNN
Extension MethodsYNNYYNN
LambdasYYYYYNN
"var" keywordYYYYYNN
Anonymous TypesYYYYYNN
Automatic PropertiesYYYYYNN
Object InitializersYYYYYNN
Collection InitializersYYYYYNN

Sunday, May 25, 2008

This is for Sally

Where to put the screwdriver. Lefty loosey!

Tuesday, May 20, 2008

How do you *know* it's a witch?

Wow.. The ALT.NET blogs have been downright hostile to the Entity Framework. Admittedly, I'm a total noob in this arena. I've done some work with IoC containers, but I haven't done much with the various and sundry ORM frameworks. I played around with Hibernate quite awhile ago and was very impressed (yes, I've written Java; no, it's not contagious), but NHibernate was in very early beta at the time.

Anyway. I think it's a bit premature to call for the pitchforks and torches with respect to the Entity Framework. From what I've read, the EF appears to force you to weld your code to it, which is annoying. But remember, this is 1.0 product and Microsoft has never, ever released a decent 1.0. I think it might be best to sit out this first version, but I wouldn't be surprised to see some interesting things coming from the mothership in the coming years.

What kinds of things? I'm glad you asked! The Entity Framework requires numerous XML files to work. Those XML files integrate seamlessly into C# and VB projects. In fact, Microsoft has a quite bit of history blending XML with their projects. So much so, that VB9 allows you to write XML directly in your code. C# doesn't have that feature (yet), but it does have LINQ. While LINQ isn't XML, it is a language in its own right. Then we have WPF, which comes in both XML and API flavors. Windows Workflow - same story. All of these things lead me to one conclusion:

Visual Studio will become a polyglot programming environment. I believe Microsoft is thinking beyond source code (the horror!) to an environment that allows us to write some code and literally draw other bits of code. Right now, it looks pretty ugly, but it should get better. The biggest flaw in my crystal ball is the fact that you can't mix .NET languages in a single project right now. Maybe multi-language source files are something we can expect in CLR 3.0? Imagine drawing data entities, writing utility classes in C#, contracts in IronRuby and orchestrating the whole thing with F#!

What a long, strange trip it will be.

Friday, May 9, 2008

The Best SATA/IDE-USB Adapter Ever

The Vantec CB-ISATAU2 adapter is marvelous! 99% of the time, I just want to hook up a drive and copy some data off of it. This normally means finding an appropriate enclosure, taking it apart, swapping out a drive, putting it together again and finally plugging it in and getting the data off of it. This adapter eliminates all but the last step. It has 2.5", 3.5" IDE and SATA connectors, a power connector and a USB connector. Plug in drive, plug in USB connector - done.

Buy one!

Sunday, May 4, 2008

Undermount sinks - awesome and sucky

All at the same time. It looks fantastic, but it's an unbelievable bear to install. It's no wonder people end up paying 30k-40k to have their kitchens updated - IT SUCKS! As nice as this sink is, I don't think I'd do it again. It's a sink. It doesn't need to look like a masterpiece, it needs to hold dirty dishes until I get them into the dishwasher. So next time, over-mount sink. I think that makes more sense anyway, with weight-loading and what-not.

Also, I got black caulk in my hair, which really pisses me off. Don't get me wrong - I'm sure a lot of people love black caulk, I'm just not one of them.

Oh well.. I'm just impressed I managed to drill 14 holes into the bottom of the countertop WITHOUT popping through the other side.

Here's a lovely piccy. Weekend over. Who needs a drink?

Tuesday, April 29, 2008

Public Transit FTW

Today is the first day that I'm taking public transportation to/from work. It takes longer than driving, but it's LOADS cheaper. I'm leaving my car at work during the week so if I need it for anything while I'm at work, I'll have it. It takes about an hour on the train, so I'm going to try working, reading and blogging.

But right now, I'm listening to This American Life, which has me thoroughly distracted. It's about cryonics, which is both fascinating and frightening. It seems the first cryonics group was run by "some guy" and all of his scientific advisors quit early on. Quite an auspicious start...

Saturday, April 26, 2008

Countertops are looking good!

We're using a product called Paperstone, which is an eco-friendly material made from recycled paper and a resin. It cuts like wood, but it's incredibly strong and non-porous... If you nick it, you can just break out some sandpaper and sand it out.

This doesn't really show it, but we have an egregious amount of counter space - which is awesome. I can't wait to cook again!

Thursday, April 24, 2008

Powershell Prompt

With my recent re-dedication to working with UAC, I find myself constantly wondering if I'm running Powershell in Admin mode not. After a little poking around, I found that the "SESSIONNAME" environment variable is missing when running as an administrator. Odd, but whatever. The upside of this is, I can now tell if I'm running in Admin mode and throw up a different prompt. So! Here is my new, revised Prompt function for Powershell:


function Prompt
{
  if (($env:SESSIONNAME).Length -gt 0)
  {
    $host.ui.RawUI.WindowTitle = $(get-location)
    "$>"
  }
  else
  {
    $host.ui.RawUI.WindowTitle = '[Admin] ' + $(get-location)
    "#>"
  }
}

Thursday, April 17, 2008

The gift of music

If you were going to rickroll a mix CD for someone, would you do it at the beginning, middle or end of the CD? Assuming, of course, that you don't put the song on the track list. I see merits to all three, but I suppose middle makes the most sense.

This is completely hypothetical, obviously...

Sunday, April 13, 2008

The front yard

Looking good! This is before the application of bark dust. I took the pic now because the sun will soon disappear for God knows how long. Ahh Portland!

Mobile blog test

Trying to send a mobile blog entry with a pic..

I'll be damned.. It worked - and without signing up for MMS from Sprint. This is our cat Celeste and some of our new bamboo floor. Not terribly exciting, but unspectacular test results are sometimes the best kind, eh?

Saturday, April 12, 2008

Big Day Out!

With the sun a'shining as it is, it's time to get outside and start deweeding our insanely overgrown front yard. I'll try to take some pics and post them when I'm through - if it looks reasonable. Before that, I'll probably work on a logo or something for ze blog. I've got an idea - I'm just not sure how it's going to pan out... Then tonight - it's bookstore and Fry's time! Woooo!

Oh, and the cat has stopped coughing, which is great. But she's taken to shedding, which is not. We're going to be able to build another cat with all of this fur...