RambleJam

My little rambles in cyberspace …

Entries Comments


SVN Global Ignore Pattern on Win VM in OSX

24 May, 2013 (08:13) | General Jamblings | No comments

I’m slowly building up this default Global Ignore Pattern for my Windows Development on OSX.  Nothing too fancy but I’m going to keep this one up to date so others may find this useful as a default pattern or as a base for their specific requirements.

Not sure if it’s my particular setup but added patterns via the menu didn’t seem to have the same effect as running Windows natively rather than in a VM so I’ve been manually adding patterns to this:

*.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo *.rej *~ #*# .#* .*.swp *.DS_Store *bin *obj *packages *.user *.msi *.exe

OSX & Parallels Visual Studio Debugging - F11 / F12

11 May, 2013 (07:31) | Computing, OSX, Parallels | No comments

If like me your using Parallels on a mac for your development you’ll find that debugging can be a pain in the ass.  Lots of the keyboard shorcuts you use on a regular basis in Windows needs a bit of configuring in OSX in order to get them to work correctly.

I use the function keys a lot so the first task is to get the function keys to work as function keys, this will be applied in OSX as well as any VMs you’re running.

In OSX go Apple -> System Preferences -> Keyboard and select the Keyboard page, make sure the following option is checked:

“Use all F1, F2, etc. keys as standard function keys”

With that option set all the nice little Apple functions need to be accessed using “fn + F8″, the default is great for casual users and pain for anyone else.  Anyway …

Next you need to remove the default functions for the F11 and F12 keys so that OSX doesn’t “intercept” the key press and do it’s function rather than letting that make it’s way to Parallels and then consequently your Windows Vm.  So swith to the “Keyboard shortcuts” page and make sure the following two options are deselected:

“Show Desktop - F11″

“Show Dashboard - F12″

Now you should be able to use these keys as you would F11 and F12 in Windows.  Yay.  I don’t understand why F12 is still mapped by default to show the dashboard in OSX considering it’s fairly unused these days.

Anyway, happy debugging!

MEF, IoC & Visual Studio Suppress Compiler Warnings

10 May, 2013 (18:47) | .NET / C# | No comments

If you’re even slightly like me I’m a bit anal about my build processes and codebase.  I like to switch on “Treat warnings as errors” in my builds.  Yes that can be a pain but like StyleCop it can have it’s advantages as well.  I don’t use StyleCop much as I prefer to use Resharper which can provide a lot of the same benefits without the pain.

Anyway, if you use a lot of dependency injection (IoC) or Managed Extensibility Framework (MEF) kinda trickery then you’ll get lots of 0649 errors like:

Well … NO, it won’t thank you very much.  Anyway, cut to the chase, do this …

Nice.  This works with any error code BTW.  I’ve seen some people just suggest to make the fields public which frankly outrageous, anyone working on my team that wants to design their code around damn compiler warnings can find another job as far as I’m concerned.

OAuth 2.0 - Spec?

30 November, 2012 (09:53) | Computing | No comments

It’s no surprise that Eren left the group.  Reading through the OAuth 2.0 spec I found this paragraph:

“OAuth 2.0 provides a rich authorization framework with well-defined security properties. However, as a rich and highly extensible framework with many optional components, on its own, this specification is likely to produce a wide range of non-interoperable implementations.”

Eh?  A security spec that will produce non-interoperable implementations is not a spec imho …

Test Driven Development or Exception Driven Development?

8 November, 2012 (13:09) | .NET / C# | No comments

I’ve seen a number of discussions kicking around as part of these ongoing debates about development processes.  It’s a non-issue as far as I can tell.  One is “Pre-Use” (Test Driven) and one is “Post-Use” errors encountered by users in the wilds.  One is essentially pro-active the other re-active.

One is much easier to quantify it’s benefits (Exception Driven) the other harder (Test Driven).  Test Driven is massively beneficial but Exception Driven is very interesting in terms of prioritising bug fixing once an application has gone live.

I’m making use of ELMAH in my web apps these days.  Such a neat solution to a cross cutting domain problem of exception recording.  It provies an RSS feed and a wb based view on the yellow screen of death as it would have appeared to the developer running it locally during development.  Amazing …

Now the only issue I have is securing the view onto the exceptions database! :)

SSL MakeCert / pvk2pfx & Client & Server Certificate Generation

19 February, 2011 (14:26) | .NET / C#, Computing, Web Stuff | No comments

Hey All,

Hope we’re all well!  Been a while since I blogged anything as life has been pretty hectic.  Anyway, I’m working on a fairly intense little project at the moment centred around building a complete system infrastucture around the AdventureWorks demo database from Microsoft.

The demo system may well end up being another Code Project article as it’s covering a LOT of terriroty.  WPF, PRISM, WCF, WIF, SQL but mainly focussing on security aspect of the implementation using the Windows Identity Foundation.

In order to make the implementation as real world as possible the idea behind WIF makes use of SSL certificates for authentication purposes.  Whilst not wanting to go buying commercial certificates and seeing this is only development we need to use the makecert tool that is part of the Windows SDK.

To make a test CA (Certificate Authority) you can use the following command:

makecert -r -pe -n “CN=AdventureWorksTestCA” -sr CurrentUser -a sha1 -sky signature -cy authority -sv AdventureWorksTestCA.pvk AdventureWorksTestCA.cer

To make a test server authentication certificate:

makecert -pe -n “CN=AdventureWorksTestServer” -a sha1 -sky exchange -eku 1.3.6.1.5.5.7.3.1 -ic AdventureWorksTestCA.cer -iv AdventureWorksTestCA.pvk -sv AdventureWorksTestServer.pvk AdventureWorksTestServer.cer

To make a test client authentication certificate:

makecert -pe -n “CN=AdventureWorksTestClient” -a sha1 -sky exchange -eku 1.3.6.1.5.5.7.3.2 -ic AdventureWorksTestCA.cer -iv AdventureWorksTestCA.pvk -sv AdventureWorksTestClient.pvk AdventureWorksTestClient.cer

Then to export the PFX files for both certificates:

pvk2pfx -pvk AdventureWorksTestServer.pvk -spc AdventureWorksTestServer.cer -pfx AdventureWorksTestServer.pfx

pvk2pfx -pvk AdventureWorksTestClient.pvk -spc AdventureWorksTestClient.cer -pfx AdventureWorksTestClient.pfx

Now once you have your certificates created you need to import them into your certificate store.  Start with the CA certificate, double click the .cer file and click on the [install certificate] button.  Once the dialog box opens make sure you import this certificate into the “Trusted Root Certification Authorities” store.  This is critical to ensure the other certificates are correctly chained up to trusted root.

Once this CA is installed you can simply go through the same process with the client and server certificates and allow them to simply import into their default location (don’t manually specify the store during import).  The client/server certs will import themselves into the Current User - Personal certificate store.

Now you should be all set-up with a CA/Server/Client certs ready for dev work.

Windows 7 & Midisport 8×8 Drivers

26 August, 2010 (16:20) | Music, Tools, Windows 7 64 Bit | No comments

At last it appears that M-Audio has finally released public beta drivers for their older midi units.  I was dreading having to buy a new midi interface considering how many midi devices I have.  I’ve not tried these drivers myself as yet but it appears that many people are having success with them.

Download them from here

Looking for a Free VST Sampler?

12 August, 2010 (11:13) | Music, Tools | No comments

A short while ago I was looking for a free VST sampler that would offer enough flexibility to be useful and stable enough in my SONAR setup to be worth sticking with, as it turns out I’ve found a couple of seriously good products and more importantly, they are free!

I would dearly love to splash the case on a copy of Komplete from Native Instruments but I just don’t have that kind of cash free at the moment.  So, which samplers are we talking about?

Short Circuit

First up is this really neat, lightweight tool from Vember Audio, unfortunately this isn’t actually supported anymore as it has been moved to freeware status.  Having said that I’ve loaded it up into SONAR and imported some NI Battery kits (created with SampleSort) and haven’t any *any* issues whatsoever.  As far as I can tell Short Circuit is rock solid.  It has a great feature set to boot, granted it’s not Kontakt but if you’re looking for a very lightweight solid sampler this is fantastic.

Independence Free

When I found this I was genuinely amazed.  Yello Tools are giving you their main sampler software for free along with a massive 2+Gb sample set.  This is quite a tool and to be honest as far as I can tell (limited use so far) it’s comparable to Kontakt.  Well worth checking out.  The only limitation this has is that it will only load 25 samples so loading up a nice Grand Piano multisample is out of the question … oh well … it is free!!

Now, go forth and sample …

Installing SQL Management Studio Express on Windows 7

13 July, 2010 (22:21) | Computing, Windows 7 64 Bit | No comments

Hmm … developers usually use tools … yes?

Getting this installed on Windows 7 by double clicking the MSI doesn’t appear to work.  No, we have to run cmd.exe as Administrator then use MSIEXEC …

C:\>msiexec /i F:\VS2008Stuff\SQL\SQLServer2005_SSMSEE_x64.msi

Hmm …

WiX UI Not Updating As Expected

6 July, 2010 (10:23) | Computing, Deployment | No comments

During my recent forays into the world of WiX I’ve been slowly hacking away at the steep learning curve. This really is a huge framework that is dealing with an intrisically complicated process. For my own projects I’ve always stuck with Inno Setup and to be honest I don’t have any compelling reason to move them away from Inno at the moment as they are functioning as expected.

Anyway, the last problem I’ve encountered that took a question to the WiX mailing list to answer was regarding showing messages conditionally in the UI based on custom property values changing.  What was confusing was that the log file showed all the custom actions and properties being correctly processed but the UI never actually updated.  Sound familiar?  If you’r having this problem, simply try hitting the back or next button and then go back to the dialog that should have updated?  I bet you now see the updated value in the UI (provided all your WiX source is correct of course!).

This issue is that dialogs are never redrawn.  This is actually a limitation in the MSI UI implementation.  Whilst I haven’t looked into alternatives like replacing the MSI UI (lots of work apparently) there is a hacky solution to this.  Making twin dialogs … basically you create an exact copy of the dialog that should be updated and then once the property changes you simply show this twin dialog and it will appear as though the UI has updated when in fact it’s showing an entirely new dialog.

In the snippet below you can see that the last published event is the call to the current dialogs twin. You will need to give the twin dialog a new Id but all the others can remain the same. Not a nice solution as you now have two dialogs to maintain with any changes but it is a solution none-the-less.

« Older entries