In this edition: Advice about code reviews, an alternative to Visual Studio, NSubstitute for testing, about the best students, integrity and availability threats and an NDC talk on SOLID principles.
Sharpen the Saw is a somewhat delayed repost of a weekly newsletter of information I publish for the professional development of software developers. While targeted primarily at developers working with the Microsoft technology stack, content will cover a wider range of topics.
To subscribe, send me an email and I’ll put you on the list. Membership is moderated.
Code Reviews - Just do it
Getting into the consistent habit of having a peer review of your code is arguably the single best step you can take for your own professional development. Code Review also helps reduce defect \ rates significantly.
As blogger Jeff Atwood writes:
… peer code reviews are the single biggest thing you can do to improve your code. If you’re not doing code reviews right now with another developer, you’re missing a lot of bugs in your code and cheating yourself out of some key professional development opportunities.
Software and Updates
Project Rider: A C# IDE Alternative
New from JetBrains, a cross plaftorm IDE for C#/.NET development. JetBrains are the people behind tools such as Resharper, dotCover, dotMemory and a variety of other well reguarded tools. This is an innovation for web developers in the .NET space to watch closely.
Project Rider is in early stages of development … an early access preview will be made available to a private group via signup.
NSubstitute is an open source framework that lets you easily create test doubles (aka mocks, stubs or fakes) to enable you to isolate a piece of code for testing.
To illustrate, imagine you have the code for a window and that it needs to show the user a confirmation dialog. You don’t need to check that the dialog itself works, but you do need to test that the window code triggers the dialog at the right time.
Create a seam between the window and the dialog by introducing the interface
At runtime, use a
MessageDialog instance; at test time use a
The Best Students Are Often the Ones Who Make the Most Mistakes
Fear of making mistakes can easily lead to paralysis. There’s undoubtable value to be gained by doing the right research in advance, but at some point you need to stop reading and start doing.
This is true whether you want to learn to skateboard, sing an opera or use test driven development.
Have a go. Make a mistake. Learn from it. Repeat.
Integrity and Availability Threats
Noted security specialist Bruce Schneier wrote an article for CNN about the security challenges of the upcoming internet of things.
It’s one thing if your smart door lock can be eavesdropped to know who is home. It’s another thing entirely if it can be hacked to prevent you from opening your door or allowing a burglar to open the door.
Video of the week
NDC talk on SOLID in slices not layers video online
An interesting talk from Jimmy Bogard about a different approach to architecture, based on features instead of layers.