Render PDFs on the browser using JavaScript

Most browsers these days support PDF rendering. In some cases, you may also need a PDF plugin to be installed. But what happens if you need to render PDFs on a closed system with no access to 3rd party plugins? How do you ensure that your solution can work consistently cross-browser? I recently worked on a project where we had to integrate a PDF viewer on a “closed” web application and this presented a new challenge. And who doesn’t love a good challenge? The requirements for the PDF viewer were as follows: Should work cross-browser Should support modern(ish) …[read more]


Joining Microsoft - a new beginning

If the title isn't clear enough, then let me clarify. On March 7th, I'll be joining Microsoft as a Senior Premier Field Engineer on the Azure team! The news couldn't be more exciting, exhilarating and scary at the same time. But let's rewind a little bit. A bit of history I've been working as a software developer for over 12 years. During these years, I was in a permanent role for 7 of them, before becoming a contractor/consultant/one-man band. The first part of my career was all about building my knowledge and experience. I've worked with some really …[read more]


Finding out Angular.js Form validation errors the easy way

Today I was having an issue with one of my forms misbehaving (or so I thought) while validating errors. The Submit button is disabled by default if there are any vaidation errors. But where are these errors coming from? Then I asked help from a friend (thanks [Jon MacInnes](https://twitter.com/jon_mac_1374" target="_blank)) who showed me a very clever code snippet for figuring out what validation is doing on my form. If you, like me, have similar issues, just inject the following piece of code in your form and debug away Make sure you …[read more]


Using environment variables for application configuration settings

Configuration settings is always a thorny subject. That's because different developers have different preferences on how to do this. In the .NET world, you have the app.config and web.config depending on the project type. Then you can also use [ConfigR](GHOST_URL/introduction-to-configr-the-solution-to-all-your-application-configuration-problems/" target="_blank) or even static XML/JSON files. Another option is to store these settings in the database. There's is no right or wrong answer and you should use whatever works best. However, I recently started working with a new team, where things are not as straightforward when it comes to configuration settings. …[read more]


On software complexity

Ok, I'm probably just thick. Or, after writing code for so many years, I'm still not good at it. Or am I? Today's post is the result of esoteric thinking. Thoughts that go through your mind when faced with really complex code or, in other words: "what the hell does this thing even do" questions. Complex code should not be confused with complex business logic and complicated workflows. There are a lot of smart developers out there. A lot smarter than me. You may be one of them. How you write you code says a lot about you …[read more]


Get URL parameters using JavaScript

This one will be quick and easy. I'm currently working on an Angular.js/MVC application and I need to grab the URL parameters from the current page. Simple right? Well not so much. Firstly, I'm not using ngRoute and, secondly, I don't want to use any other external library/utility. Just plain, old, vanilla JavaScript. How did I do it then? Parsing URLs with JavaScript I've created a simple method to manage this. The method is pretty straightforward. It takes a URL, parses the parameters with a bit of RegEx 'magic' and then returns an object with our parameters. …[read more]


Solve "A network related..." connection error for SQL2000

What? Did I read this right? Did he say SQL2000? Well, my friends, you're absolutely right. I jumped into a wormhole back to 2001, did some work and jumped back to the present time. Unfortunately, it's nothing as glamorous as that. Instead, I recently moved to a new project where we're migrating an old/legacy application to a new MVC/Angular implementation. The only thing that's not moving is the SQL server. And this brings me to the reason why I'm writing this blog post. On my dev box I had SQL2014 running without any problems for months. 2 different …[read more]


OzCode - my favourite Visual Studio tool

If you've never seen [OzCode](http://www.oz-code.com/" target="_blank) in action, then brace yourselves for the most awesome tool in Visual Studio. Yes, even more awesome than Resharper and everything else you have to throw at me. What is OzCode? OzCode is a debugging tool that you install as an extension and it can totally transform the way you debug and work with your code within Visual Studio. It overtakes from the built-in debugger to give you so many more features to simplify your work and allow you to focus on what really matters, fixing the …[read more]