TIL / by James Heywood

So today (actually yesterday, but I didn't get round to posting until today and YIL just isn't a thing right?) was the penultimate day of the first sprint on our current project, (which I'll detail in a separate post at a later date) and as such was a busy day as we prepare for the end of sprint demo to the client. 

As has been the case a few times in my new role I was faced with a bit of a learning curve to get a piece of work done for the demo, briefly this was JavaScript based UI validation and integration with our .NET Web API, so not a new concept as such, however there is enough new technology in play to present a few challenges. On top of this the deadline of one afternoon to get the work done was a nice challenge, luckily I work best with a bit of pressure as long as there is support if/when needed, which thankfully there is.

Anyway, rather than bore on I wrote a list of the things I learnt today whilst doing my bit; 


  • how to install and use grunt
  • that grunt and live reload, via ruby and compass, makes for quicker development of JavaScript, and is < 100 lines of config to set up!
  • a little bit of coffeescript, and that I have a bit of a tech crush on coffeescript <swoon/>
  • that function returns are implicit in coffeescript syntax - I think we just had our first lover's tiff
  • that notepad++ screws your coffeescript outdents up (grrr!), but sublime text doesn't (yay!) +1 for sublime text
  • that all good things come to those who node
  • that fiddler is your friend, especially when working in JavaScript to hit end points in your API or Web project. Getting the request right and validating this in Fiddler means that you can concentrate on writing the best script knowing that you have your .ajax or .post requests correct, which is nice
  • that when sending Json objects from your JavaScript to Asp.Net API controller actions that bind Json to a model and then validate this model using (HttpActionResult.ModelState.IsValid), the properties of said model in .net may be name cased but Model.IsValid returns false unless you send up the properties in your anonymous JavaScript object camel cased! I think that this is due to our use of AutoMapper to map DTOs to Domain Models by convention, either that or it's the way we deserialize the Json to a .NET object using Newtonsoft.Json, both of which are excellent packages by the way.

So there you have it, a few little things for me to remember, posting this article should help in that respect. Also it's a good way to document the variety of technology used in my day to day role, I think it's fair to say I am a developer (technology agnostic) rather than a .NET developer, which has been the case for a while in both this and my last role, today just helps to remind me of that. 

One final thought, taking the time to list out, or just think about, what you learnt on a particularly busy day at work is a good way to boost your confidence in your own abilities, plus it helps to remind me that what I most enjoy is learning new things and that I'm glad to have a role that allows me to do that.

Right that's all folks, bye for now,