Posts

Showing posts from 2015

Why make things consistent?

Things should be consistent.  When we're talking about I.T. artefacts (how we build databases, how we structure database tables, how we write code, etc etc) we should build them consistently. This ought to be obvious.  But wherever I go, I see quite the opposite.  Many software applications, or I.T. departments, or enterprises, are basically a collection of various artefacts, all of which have been built INCONSISTENTLY.  And then people wonder why it's so hard to manage all this. The reasons things become inconsistent are many.  Here are a few examples: - Many different developers looking at the same application over time, but not paying any attention to existing patterns.  In other words, for whatever reason (maybe they haven't been trained to see in this way), they don't actually SEE the pre-existing patterns. - Developers think they have a better way of doing something so they just start doing things their way, without any regard for pre-existing patterns.  

npm outdated + npm update is your friend

In the last year or two I've been getting my head around the whole world of front-end web development with AngularJS and its associated infrastructure ( nodejs , npm , bower , gulp , etc).  A lot of that has to do with the fact that with my current client, I've been working on projects that use all that technology (where they have Microsoft's  ASP.NET WebApi on the back-end, and all this other stuff on the front-end). It seems to me a lot of .Net developers shy away from really learning all that stuff, or they just learn what they need to know to get the job done, but I think all this stuff is pretty cool and I've been trying to learn it all on a slightly deeper level. So when you get into the whole  npm  thing you quickly learn that development tools, libraries, packages, plug-ins etc. that are required by your project are stored in a file called package.json .  And that the versions of those packages are managed with symbols using a syntax called semver . So,

Recover Azure VM password (Reset Azure VM password)

If you find you've changed your password on your Azure Virtual Machine, but then subsequently forgotten it (and I swear I was entering the correct password, but apparently not), then you google phrases like "recover azure vm password" etc, you may run across blog posts from Microsoft like the one found here . There are two things to note which are not entirely obvious from the steps listed there.  One is, if you don't use PowerShell every day you may launch the PowerShell command prompt and not the ISE as they suggest.  You do in fact want the ISE, not the command prompt.  For example on a Windows 2008 server machine the ISE is under Accessories... Windows PowerShell... Windows PowerShell ISE. The other thing is, if you're trying to reset the password of your VM, the VM actually has to be powered up.  (Duh!)  In retrospect this is obvious; how can you reset the password of your VM if the VM is not actually powered up?  You can't. But if it is powered up

Elmah + ASP.NET WebAPI tip...

I had one of those situations today where you're looking at various blog posts and stack overflow posts and everybody's essentially saying, "it's easy, you just add the NuGet package, issue a couple lines of configuration code, and it works."  But I was scratching my head for awhile until I connected the dots.  So I thought I'd post a small tip here in hopes of saving somebody a minute or two. So, if you want to add ELMAH to your ASP.NET WebAPI project to log unhandled exceptions, a bit of googling will quickly lead you to the elmah-contrib-webapi project, and helpful posts such as this one and this one , as well as various stack overflow posts .  I tried the stuff recommended there but for some reason couldn't get it working.  Having used ELMAH previously on an MVC project, I knew that the basic steps are: Install a NuGet package Tweak your web.config Point to where you want to log to (on my previous project it was logging to SQL Server, but

JavaScript libraries on my current project

I've finally got my foot in the door of the AngularJS world and I'm pretty happy to have this opportunity.  The project I'm on uses an ASP.NET WebAPI back-end, and the development environment is Visual Studio with Resharper, but otherwise it's pretty much a front-end JavaScript based project whose architecture was designed by some pretty smart guys.  They're using AngularJS but also making use of the Flux architectural pattern .  If you're coming from a .Net development background this is a completely different way of thinking and it's quite an eye-opener.  But what I like about it is that it has a very good separation of concerns, it's very modular and decoupled, makes good use of the CQRS pattern, and (if we adhere to the patterns these guys have established, which I hope to write about in a future post), seems to lend itself to best practices in software architecture. I've been reading a few books on it as mentioned in a previous post .  But

Where is Chutzpah installed?

Image
I've been going through Shawn Wildermuth 's Pluralsight course on Bootstrap, AngularJS, ASP.NET, EF and Azure.  There's a point toward the end of module 9, "unit testing", where he installs the Chutzpah test runner .  At the time the videos for the course were recorded, Chutzpah lived on Codeplex , but now it lives on Github . In the video, Shawn installs Chutzpah, then goes into a bit about running Chutzpah from the command prompt.  That all seemed like a bit of magic to me, sort of like when the cooking shows just suddenly show you the cake that's already been baked, and it was not obvious to me where the .exe for Chutzpah actually got installed.  So for what it's worth, although I installed the Visual Studio extension as described in the video (using the Tools... Extensions and Updates... menu option in VS2013), I subsequently installed Chutzpah as shown here , then after some head-scratching, simply did a search of my local drive in Windows and fou