July 2011
1 post
97 Things
I came across this link to the wiki for contributions made to the book “97 Things Every Programmer Should Know”. It’s well worth a read as there are some real nuggets in here. I would recommend reading one a day and trying to apply it to your workplace. http://programmer.97things.oreilly.com/wiki/index.php/Contributions_Appearing_in_the_Book
Jul 1st
May 2011
8 posts
Joining the Apple band-wagon
I got an iPad (not an iPad 2, but an iPad 1). A good deal came up that I couldn’t resist. I knew someone that had bought an iPad 2 and wanted to recoup som of the cost so I got it for less than half the price of a new one and in pristine condition. Aside from using it for general browsing, reading comics and, of course, wasting time playing Angry Birds, I’d like to start looking into...
May 11th
Progressive Postponed
Well it looks like I won’t be going on the Progressive .Net course until September as it has been postponed. The irritating thing is - I was only officially informed yesterday (the day I would have been booking into a hotel in London). It was only because we chased for the full agenda and joining instructions for the course that we found out. Shame - I was looking forward to some advanced...
May 11th
jQuery.extend()
jQuery extend is designed to merge objects together, so in a simple example, you could merge the following objects. var customer={    firstname:”Bob”,    lastname:”Smith”,    favouriteColour: “Blue” }; var customerAddress={     street:”long street”,     county: “sussex” }; var customerWithAddress = $.extend({}, customer,...
May 5th
jQuery.map()
jQuery’s map method is usefull for manipulating entire arrays. For example, let’s say you have an array of prices and you want to add VAT to them all, you could do that easily with jQuery map. An example: var VAT=0.20; var pricesExVAT = [ 10.50, 1.00, 3.00, 5.99 ];  var pricesIncVAT =     jQuery.map(pricesExVAT , function(item, index){          return (item * VAT);      }); 
May 4th
jQuery.grep()
Recently I needed to search a array of javascript objects and one of the ways I found to do this was using jQuery’s grep method. Grep was originally a unix command line function for searching for text in files. It’s very powerful. The jQuery method obviously has little to do with it’s namesake, but the core idea is there - for identify matches (searching). Like all jQuery...
May 3rd
Progressive Net
Only a few days now till I’m off to the Progressive .Net course in London with a couple of collegues. I still haven’t received a full agenda yet, but I do know Ayende is going to do a couple of sessions on Advanced NHibernate so I look forward to those. I have also noticed that they’ve scheduled another course this year in September, so if it’s any good, some other...
May 2nd
No cream tea.
Just a quick note that DDD South West is going to be on Saturday 11th June, but it looks like I’m going to miss out this time round due to other commitments. A shame as it’s a really good event and has always been well organised. Luckily I did attend DDD 9 @ Reading earlier this year and often there are similarities in some of the sessions, so hopefully I wont miss too much ...
May 1st
Manic Month
It’s been really busy the last few weeks as I’ve been taking on additional tasks as well as keeping up (for the most part) with my dev work. I’ve been taking a lead role for a project for one of our less experienced developers, performing telephone and first interviews with a collegue and starting to pick up some slack in an application that’s overdue for having legacy...
May 1st
March 2011
5 posts
Lightcycles for breakfast?
Yesterday the team had an early start (I’m not going to say we were all bright at 8am!). The reason? Another part of our workshop on learning F#. My collegue Mark took the helm and what awsome job he did of it. This session put the goal of developing a Tron-style lightcycles game in F# and using Silverlight as the presentation layer. So, in an hour we hadn’t quite managed to pull it...
Mar 16th
To the code
Creating queues isn’t something I’ll be need to be coding too often, but as I managed to uninstall MSMQ earlier today as I installed NServiceBus, I think it’s wise choice to add these few lines of code to my test app. const string QueueName = @”.\Private$\MyNewQueue”; MessageQueue queue; if(!MessageQueue.Exists(QueueName)) {     queue =...
Mar 13th
Configuring MSMQ
MSMQ can be installed from Windows Components in Add/Remove Programs. Once installed you can access the queues from Computer Managment and selecting Message Queuing from Services and Applications. You’ll find the queues are divided into several categories. Private Queues are only available on the local machine, whereas Public queues are published in Active Directory and are therefore...
Mar 12th
MSMQ Overview
I haven’t been able to find anything in the way of books on MSMQ and to be honest I don’t think I’d want to read a whole book on the subject - chances are it’d be focused on configuration and other things a Network Admin would be interested in and I’d be lucky to find a single line of code. If anyone knows any differently, then please let me know. So, all I currently...
Mar 11th
Messaging, please wait.
For a while now I’ve been meaning to look at messaging platforms. I was intending to download MassTransit, figure out how it works and then start using it but making a decision on frameworks before trying out some alternatives seems a very narrow minded approach. Before I delve into the messaging frameworks themselves I took a bit of time to take a quick look at MSMQ itself. I’m...
Mar 10th
February 2011
8 posts
F# and .Net libraries
I thought I’d take a slight detour from the purely functional stuff we’ve been doing of late - sometimes as developers we need to write code that does something other than just algorithms and computations. So it’s time to take note that F# isn’t a purely functional language like some of it’s forebearers, such as Haskell. That’s probably a good thing, otherwise...
Feb 23rd
Functions within functions
F# allows you to define functions within functions. let myouterfunction x =     let myinnerfunction k =         printf “%i” k So, myinnerfunction is defined within the scope of myouterfunction so it can’t be seen by other functions. F# also allows you to return functions. let myouterfunction x =     let myinnerfunction k =         printf “%i” k     let...
Feb 22nd
Whitespace and the lightweight syntax
F# is based on Objective Caml (OCaml), but unlike it’s predecessor it’s white-space sensitive by default. The advantage of this is that it allows the language to be more terse and free from noise of unnecessary wrapper code (although they are still accepted). This is the lightweight syntax. It also means you need to be careful with white-space -in the wrong place this could cause the...
Feb 21st
F# basics
It’s time to look at some basics of F# syntax. First up, there’s the let keyword. let message=”hello” let a=34 I know what you’re thinking - it looks like variable assignment, but you’d be wrong. Apparently purely functional languages don’t have variables, they have identifiers. So, what’s the difference between a variable and an...
Feb 20th
Getting F#
After scanning through the first chapter of “Beginning F#” it seems that F# is probably already installed on your machine if you’ve got Visual Studio 2010 and if it isn’t, all you need to do is go to add/remove programs and install it :D If you’ve got VS2008 you can always download F# separately. Aside from the Visual Studio templates and tooling, the important...
Feb 19th
Seven Languages
Another book has arrived! This time it’s “Seven Languages in Seven Weeks” I read about it in another blog post although I can’t remember where. It contains just enough to give you an insight into several different languages and focuses on their strengths without getting bogged down with the dull bits, like installation, security, etc. That seems like a really good idea...
Feb 18th
Preparing to be Functional
So as part of our new functional workshop I’ve agreed to take on the mantel of preparing the first session. Although I want the workshop to be more hands on and less presentation, someone will need to provide some direction for the session as well as preparing content to be discussed For the first session I suspect it will be a little more presentation than, hopefully, the rest will be as...
Feb 17th
Functional Workshop
Today I was greeted with the book “Beginning F#” by Robert Pickering on my desk. This marks the start of my journey into F#, but I won’t be alone - most of my colleagues have agreed to join on this voyage of discovery. The idea presented itself a couple of weeks ago during an ad-hoc conversation about how we could do something a bit more productive with our lunch time at...
Feb 17th
January 2011
4 posts
DDD9
Had a great day at DDD9 on Saturday. Five of us went from our dev team and we met lots of friends while there. There were six slots this time instead of the usual 5, with a choice of 4 sessions per slot. Even then some of the decisions on what to see were a bit difficult. Below is a quick summary of my top highlights for the day. .Net Collections Deep dive by Gary Short This was pretty...
Jan 30th
Using JQuery Validate on forms with multiple...
Recently I had the need to use JQuery Validate on a form with multiple fields (such a list of customers). It was a bit trickier than I thought because normal practise involves using the name of the element in the “rules” section of the options passed into the validate method to identify the item. Unfortunately that means that JQuery Validate will only apply the events, error elements and so...
Jan 7th
SQL Server Sparse Columns
I was asked about sparse columns in SQL Server and as I’m currently stuck working with SQL Server 2000 and therefore haven’t used them (sparse columns are a 2008 feature), I’d forgotten what they were for. Anyway, a quick google found this MSDN article which explains them http://msdn.microsoft.com/en-us/library/cc280604(SQL.100).aspx “Sparse columns are ordinary columns...
Jan 5th
DDD9 Registration Opens
Developer Day 9 registration will open at 13.37 on Tuesday 4th, so I must remember to get my login details ready as on previous occasions the site has failed due to more traffic than it’s capable of handling (Denial Of Service anyone :P) Anyway, session details can be found here There are quite a few sessions I’m interested in - C#5.0 Async is the first of these. I do hope Liam...
Jan 2nd
October 2010
5 posts
Tech Briefing
Yesterday we had our “Tech Briefing” at work. It’s our monthly grok talk session which covers a range of topics, from recently complete projects, new technology or something seen at a conference or online. Part of the idea was to keep the options open on what can be presented on the basis that devs who are open to new ideas are learning and progressing. In order that there are...
Oct 29th
The Factory Pattern with a Generics Dictionary
Yesterday I came across this article on refactoring switch case statements using a Dictionary. Although this can be used for any switch case statement where logic needs to be executed (using a Func or Action in the form of a lambda) it feels most natural when used to implement the factory pattern as done in the example above. This is something I’d also started doing for my factories, but...
Oct 28th
From TekPub to PluralSight?
My Tekpub subscription is coming to an end - I’d taken advantage of the christmas buy one get one free offer with a collegue last year - and I’ve decide not to renew. Although it was well worth the £63 ($99.50) I’d paid for my half, I feel I’ve got what I can out of it - for now. So I thought I’d take a look at PluralSight. It offers similar, but different...
Oct 26th
The Seven Deadly Sins of Web Security
“… a chain is only as strong as its weakest link.” DISCLAIMER: I am not a security expert and this is only meant to be used as a guide to some common security issues and some of the ways in which the surface area of attack can be reduced. Now that’s said, here goes… XSS - Cross Site Scripting WHAT IS IT Injecting client-side code onto your site via vulnerabilities...
Oct 25th
Modern .Net Day
Yesterday I went to Microsoft Campus in Reading for Modern .Net Day It was a supplementary Developer Day as Julia Lerman and Kathleen Dollard were in the neighbourhood, and the event was put together as an excuse to have them speak. There were only two tracks on offer, but it was an enjoyable and beneficial day. Julia was speaking in the first session on Entity Framework, which was actually...
Oct 24th
September 2010
5 posts
Why I don't have an iPhone
I don’t have an iPhone. It’s because I don’t need one and they cost a lot of money which I feel is needed elsewhere. After all I don’t need one as a fashion accessory and I do own a phone, which is surely the primary reason for the device? Well, it’s actually got more to do with the fact that I’m not an early adopter. I’m not an early adopter because as a...
Sep 30th
Developer Day Reading
The next developer day (DDD) has been announced and will take place in Reading on 29th Jan 2011. It’s a great event (I’ve been to the two previous South West variants) with five tracks and five sessions per track. Last time included a park bench track (smaller groups, less formal, more discussion) and a beginners track. It looks like registration opens on new years eve @ 12pm - maybe...
Sep 29th
Is the Builder pattern the same as a Factory...
The story so far… The Simple Factory Pattern The simple factory pattern creates objects of a particular type. i.e. CarFactory creates Car objects var myCar=CarFactory.GetCarInstance(); The Factory Pattern The factory pattern creates similar objects that implement an interface. i.e. VehicleFactory creates Car objects and Lorry objects. var myCar =...
Sep 29th
Beers in Brighton
Last night was a good night at the alt.Net beers in Brighton. I mentioned that I was going, but failed to explain the format of the event, so here goes… Around a dozen .Net (and sometimes non .Net) geeks gather at the skiff in Brighton at around 7pm on the 2nd Thursday of the month. That makes it quite difficult for me to attend sometimes as my wife works shifts at the local hospital, but...
Sep 8th
Brighton ALT.Net Beers
Am off to the Skiff tonight in Brighton for the ALT.Net Beers to chat with other .Net developers and have a bevvy. http://brightonalt.net/
Sep 7th
August 2010
1 post
A software developer's reading guide
Pro C# 2010 And The .NET 4.0 Platform 5th Edition by Andrew Troelsen Great book for noobs and verterans alike. Most coverage is for C#, with a few chapters about .Net framework and ASP.Net Webforms (although I must admit to skipping the last section). Some very heavy topics in here such as CIL, Reflection etc, so it *CAN* be a dry read (but very worth it!) Pro ASP.NET MVC Framework by Steve...
Aug 28th