As a drummer, Chris Adler of Lamb of God has always been an idol of mine (his signature sticks are my go to), and I’ve been a huge Lamb of God Fan for a number of years now. The story of their front man, Randy Blythe getting arrested on Manslaughter charges on landing in Prague Airport, Czech Republic two years after the alleged incident was truly shocking. His book, Dark Days, recounts the ordeal and offers an insight into his incredibly strong outlook on life and how he made it through the other side.
There’s a famous quote in the world of Software Development:
“We can solve any problem by introducing an extra level of indirection.”
In my experience, this is almost certainly correct, this post will see us adding in an additional layer of Abstraction to allow us to simplify our Controller(s) and manage our Dependencies in a more straightforward manner.
Last post saw us implement our Translation PCL into our Web API using Dependency Injection. The problem is that our ITranslator Interface only handles a single Translator Implementation, such that when we inject from our Container we can’t currently translate more than one direction. We’ll look into the why’s shortly, but by the end of the post we will have created :
- ITranslatorService Interface;
- TranslatorService Implementation and Unit Tests.
Portable Class Libraries afford great benefit when it comes to sharing code across platforms/usages. We can share a single library across our UWP App where it’ll run locally and on our Web API where it’ll execute behind our endpoint. Dependency Injection has been made very accessible with the latest ASP.NET MVC Web API.
The current MorseCoder.PCL targets only Windows 8.1 as it’s point of API Reference. We’ll need to change that to extend it to the wider .NET Framework (we’re not doing anything prohibitive, so this isn’t a problem). By the end of the post we’ll have updated our PCL to target what we require, and integrated it into the Web API Project using Dependency Injection to pull in an instance of our Translator from the IServiceCollection container.
ASP.Net MVC Web API provides a straight forward controller based approach to creating RESTful HTTP based web services. It should be quite familiar to anyone with an ASP.NET MVC background. This tutorial won’t be focussing on what is and what is not RESTful, (there’s plenty of that already, and can get a little religious!).
By the end of this post we’ll have created an ASP.Net MVC 5 Web API Project, and a new Controller ready for implementation.
Despite what your boss might like to think, Bugs are a fact of Software. There’s a number of things you can do to minimise the occurrence, the severity and the impact bugs might have, mostly centring around having a reliable set of Unit Tests. Regardless of your best efforts, they will still find a way through the net, it’s how you handle them that matters.
My first piece of advice would be to be honest about them, and the root cause, however embarrassing to you or your team it might be. It’ll be too late to cover it up, so don’t waste your time thinking of excuses. Get to the root cause and come up with a plan to resolve it. If it’s a major problem in Production it’ll be on your shoulders to come up with a strategy to expedite a resolution. Continue reading “Development Team Leadership First Steps : Part 12”
I recently read The Software Craftsman, as mentioned in the review, one of the areas that struck a chord with me was the viewpoint on Legacy Code. I deal with a lot of Legacy Code in my day job, I’ll share a few of my own thoughts and experiences on the matter.
Legacy Code – Respect
It’s important to treat Legacy Code with Respect, from all angles. Treat it with respect regardless of how poorly some of the code may have been written, or how antiquated the technology may now be.
The term Software Craftsmanship seems to be rather divisive in its support, with, as mentioned in the book numerous times (along with retorts) the fact that the movement can come across as elitist. At it’s core it’s another manifesto, a fairly open-ended one at that, but having read the book it extends far beyond this.
In much the same way as Agile, in the pure sense, is more of a mindset than a prescriptive set of rules, the ideas behind Software Craftsmanship conveyed in the book really lean towards achieving excellence, building on and complementing a lot of the practices outlined under XP and Agile.
A bit left field with this post, I’m going to review a set of Vic Firth SIH1 Headphones and share my (positive) experience with Vic Firth Customer Service.
First off, a bit of a disclaimer, I’m no headphone aficionado so don’t expect an in depth analysis of the quality against any other headphones on the market!
Vic Firth predominantly make drum sticks, so inevitably these headsets are aimed at drummers. I play both acoustic and electric drums, so ideally I needed a set of headphones to use with both…
Don’t take requirements on Face Value
Often your requirements can overstep outlining the business need and into murky waters of business users defining technical solutions; which are rarely the way we would choose to do it, or in some cases even technically feasible.
“Has the world gone mad; or is it me?” – Ben Howard
As professionals it’s our obligation to probe these requirements until we’re left with something that makes sense that all parties are happy with. It’s always worth asking why, sometimes a requirement can disappear altogether as a result.
This isn’t doing yourself out of work, it’s enabling you to do the “right” work, this is mutually beneficial; we’re paid not only to write software but to provide a service, probing will prove your understanding of the business and ultimately build trust.
Make sure you understand how the component you are writing fits in with the architecture as a whole. As the Development Lead you’ll be expected to be capable of participating in conversation with all areas of your team and all levels of the business, from those with a vested interest in a particular piece of functionality, all the way up to those who aren’t interested in the minutiae, just the fact that the system works.
If you don’t understand how your software fits in with the wider Organisation you won’t be able to fulfil this. Again, if you can prove your understanding you’ll gain trust, but it’ll also enable you to more conclusively understand requirements if you understand for example what impact your validation (or lack of!) may have on downstream systems.
Are we there yet?
You’ll inevitably be asked (“probably” by Project Managers, and “probably” numerous times) whether you’ve finished a Task, it’s nice to have an answer to hand about not only your own work, but that of the team. Having a visible board to track progress on is really part of the Agile process, having one of these can ease the pressure, (but that doesn’t mean you won’t be asked!).
Not only is it good to have an answer to questions, but if you have an idea of whether your team is likely to finish all of the tasks on your current sprint then it will allow you to raise the alarm early, or re-prioritise workload within the team.
UWP apps, like the Windows Phone 7 and 8 platforms before them can have Background Tasks, while a background task for the Morse Coder app might not be enormously useful at this stage, let’s take a look at how to create one. In a further post we will look at updating the Live Tile from our Background Task.
By the end of this post we’ll have a Background Task running on a schedule. It won’t do anything, but we will have set up the permission in the manifest, created the project, and our task class and registered it with the application. We will then be ready to implement the task.