My First F# App™

I’ve been eyeing up F# for some time after reading that it’s the hot new thing. Unfortunately when it comes to learning new ideas or technologies, I find it difficult to actually learn them unless I’m applying them at the same time – so I was in a vicious cycle of needing an application to write, in order […]

Acceptable Dependencies

Today I attended a talk about mocking in order to facilitate unit testing. The example used was a “UsersService” that accepted a repository as a constructor argument. Essentially it was doing CRUD and forwarding the calls almost straight on to the repository: The interesting part was when we got to testing “Create“. The problem is […]

Repeatedly polling server with ajax

I’ve made a small fiddle that illustrates repeatedly polling a server asynchronously once every second with the ability to pause and resume for posterity. For more advanced functionality, including long-polling then SignalR is your man, but for something simple this does the job. The code is also reproduced here: