cmder is my go-to shell for Windows. Up until recently, I was unaware that it could be split into multiple panels. There doesn’t seem to be a menu option to do it, but it’s easily done with these commands (which, yes, I need to look up every time). Split the window horizontally (left/right split): cmd […]
Code
Writing Cleaner AngularJS with TypeScript and ControllerAs
Our team made the move to TypeScript and Angular at the tail end of last year. I’d had a look at Angular a year or so ago but struggled to get my head around the excessive usage of $scope and the nesting of $parent items that needed to be traversed. Since then (with version 1.2.0), […]
Use Karma and Grunt to Run Your Jasmine Tests in Real-Time
As JavaScript applications become more common and more complex, the need for good unit test coverage also increases. Hopefully you’re already writing tests. If not, why not? When I’m doing TDD with C#, I use NCrunch to monitor all tests within the Visual Studio Solution and run them as they change. This saves me having […]
.NET Distance Model
I actually put this together a while ago but have just realised I never put it up here. The Problem As part of some of the work I’ve been doing over the past year or so, we’ve run into issues dealing with units of distance. The most problematic of these being when an app that […]
Adding Business Layer Caching Using Castle Windsor AOP
Aspect Oriented Programming (AOP) is a programming paradigm that allows separation of cross-cutting concerns. But you probably already knew that if you’re reading this. If not, go have a read at the Wikipedia page on AOP or the introduction page on the Castle Project site. The Problem If we have an existing application to which […]
Notes from the Future – The City SDK
Wouldn’t it be great if there was a common data source you could query for all information about an area – bus timetables, ATM locations, cost of housing etc.? I just spent the end of last week and the weekend down in Manchester for the Future Everything conference and Innovation Challenge Hackathon and got to […]
This week’s most horrifying code
And the winner of this week’s most horrifying code goes to this snippet: Dictionary<string, Dictionary<GeoDirection, Dictionary<bool, List<Route>>>> routes = new Dictionary<string, Dictionary<GeoDirection, Dictionary<bool, List<Route>>>>(); Generic, eh.
Fix Visual Studio when templates disappear from your Add New Item dialogue
So, I was trying to add a new class to a project in Visual Studio and the template for it seemed to have disappeared. I still had the “Add Class” option in the dropdown but no “Class” option when I got into the “Add New Item” dialogue. Luckily, it’s pretty easy to fix. Find the […]
Completely disable cache in Google Chrome
I like debugging JavaScript in Chrome. The console is pretty excellent for stepping through code, logging, checking for bounds events etc. The one issue that I kept running into was that of caching. As I was making changes to my JS file, I found myself having to go through a couple of menu settings every […]
Use Ant and Closure Compiler to compress every JavaScript file in a project if you have lots of files
In a previous post, I set out how to use an Ant script to run every JavaScript file in a project through the Closure compiler. For the most part, this has been working fine for me. Then I ran it against a project with some 50-odd JavaScript files and it started to throw PermGen OutOfMemoryError […]