Category: Book Reviews

Book Review: C# Smorgasbord by Filip Ekberg

smorgasbord

Book Review: C# Smorgasbord by Filip Ekberg

About the Author:
Filip is a Software Engineer working with various techniques such as C#, WPF, WCF, ASP.NET MVC, ASP.NET and much more. Currently working at Star Republic in Sweden as a Software Engineer working with both newer and older technologies in a Windows environment, mainly focusing on ASP.NET MVC development.

During his years of Programming, Filip has managed to accomplish some of the following:
• Software Engineering Degree @ Blekinge Institute of Technology
• Managing the Software Development Company SmartIT eSolutions Sweden which focused mainly on developing software and web solutions.
• Working as an Amanuensis ( Teacher ) @ Blekinge Institute of Technology teaching Java, C++, Sql and Network-programming.

You can read more on his blog here.

I saw a tweet from @daniellangnet who said this book was fantastic and if your looking for something to read over the holidays then give this a go, I actually ordered the book without even reading anything about it, unusual but glad i did!

Chapter 1: Introduction to Parallel Extensions :- Learn the basics of paralleization, use basic Linq, and how to optimize code by introducing parallelization.
Chapter 2: Productivity and Quality with Unit Testing :- Understand why tests are import, create a test project and improve code quality.
Chapter 3: Is upgrading your code a productive step? :- How to find bugs faster, How to use Resharper to get a more manageable project and to get things done faster.
Chapter 4: Creating a challenge out of the trivial tasks :- Challenge yourself to create understandable and higher quality software.
Chapter 5: Asynchronous programming with async and await :- Identify where yo might need asynchronous processing, refactor a synchronous app into becoming more responsive.
Chapter 6: Dynamic program :- Create and extend a dynamic object by using the ExpandObject, also understand why introducing dynamic objects might cause problems long-term.
Chapter 7: Increase readability with anonymous types and methods :identify where you might have single purpose methods that you can replace with anonymous methods for increased readability and lucidity.
Chapter 8: Exploring Reflection :- User reflection to get information about types at runtime and understand more about properties and methods.
Chapter 9: Creating things at runtime :- Create your own method at runtime using Reflection, be able to read IL and understand portions of it.
Chapter 10: Introducing Roslyn :- Create a basic code analysis that suggest issues in your code, run code snippets on entire code files.
Chapter 11: Adapting to Inversion of Control :- Understand the basics of Inversion of Control, introduce a Dependency Injector into your application.
Chapter 12: Are you Mocking me? :- Create a mock of any interface and write tests that introduce

This book as you can see has something for everyone, i have thoroughly enjoyed reading it from cover to cover and will be reading a good few of the chapters again, it’s a very handy reference book and covers a number of topics that as a developer can help you explore, improve and be inspired – just as it says on the front cover.

I picked this book up on Amazon for £19 and its well worth it – recommended reading for 2013.



Book Review: Practical Performance Improving the efficiency of .NET code

Practical Performance Improving the efficiency of .NET code is written by MVP Jean-Philippe Gouigoux.

About the Author:
JP Gouigoux is a MCTS/MCPD Enterprise Architect, and MVP “Connected System Developer,” with an Engineering degree in Mechanical Systems from the Université de Technologie de Compiègne (France) and a Master of Science in Advanced Automation and Design from Cranfield University (UK). JP works as a software architect, and is a board member at MGDIS, an innovative software company based in Vannes (France). His role includes responsibility for platform architecture for a customer base of ~850, as well as R&D, internal and external training, and expertise in .NET.

You can read more on his blog here.

Chapter 1: Profiling Principles: :- Chapter 1 discusses the ideas and principles behind profiling your application and talks about goal setting and making measurable improvements, with real world examples.

Chapter 2: Profiling an Asp.Net Application :- Chapter 2 goes covers the unpredictability with garbage collection, how .net helps us, memory leaks, disk usage, network bandwidth and more.

Chapter 3: Sample Application :- Covers how to set up the example application which is a very bad example of how to write an application which is perfect for pointing out mistakes made and how to go about recognising them and then fixing them.

Chapter 4: Profilers :- This chapter covers how to use the profiler of choice and covers Ants Performance Profiler, JetBrains dotTrace performance, Eqatec Profiler as well as Open Source profilers.

Chapter 5: Profiling the Sample Application – Client Side:- This chapter covers some scenarios where we are shown how to
profile the application and study the output, we identify the slow parts of the application aka bottlenecks.

Chapter 6: Profiling the Sample Application – Server Side :- This chapter covers profiling the server-side, the service layer basically and in the sample application layer its a web service. It covers memory profiling, analysing the results and working out where the bottlenecks are occurring.

Chapter 7: Beyond Profling :- This Chapter covers performance analysis without using profilers including verbose logging, duplicate sql calls and even over architecting an application.

Chapter 8: Conclusion :- The last chapter reminds us that everything can be a performance problem, reminds us of the root causes of errors as well as the important part profilers lay in improving application performance.

My review is quite brief but the books covers a lot of ground, its well written , very detailed and with the sample application the structure of the chapters make sense. If your interested in learning more about profiling an application to improve its performance then this book is for you.




Book Review:- Dependency Injection in .Net

Dependency Injection in .Net written by Mark Seesman @ploeh on twitter

This book is one of the best books I have read regarding .Net development due to its style – it covers misconceptions, what not to do, and then shows you step by step what to do and why. If you’re looking for the definitive guide to dependency injection as a subject matter within the .net world then buy this book – don’t bother with anything else.

My main reason for reading this book was to basically make sure my understanding of the subject matter wasnt distorted from what dependency injection and IoC is. It’s quite easy to good articles on the subject but I wanted a point of reference I can pick up or go to when I need to refresh my memory on the subject.

I am willing to bet there are a lot of developers who don’t actually understand what dependency injection is used for and what it brings to the table.

Part 1 Putting Dependency injection on he map

  • Chapter 1 – Covers misconceptions about dependency injection and what its purpose and the benefits if it are.
  • Chapter 2 – Explores a comprehensive example, starting by showing you not to do and then discussing why not and then shows you how it should be done properly.
  • Chapter 3 – Explores Dependency Injection containers and DI containers.

Part 2 DI Catalog

  • Chapter 4 – DI Patterns, including constructor injection, property injection, method injection and ambient context, of which I really only understood one before reading this part of the book. Each is taken in turn and described, has a code example, and discusses the advantages and disadvantages of each.
  • Chapter 5 – DI AntiPatterns, covers all the different wrong ways to do dependency injection some of them named by Mark who admits to having done all of them, having read through this chapter I recognised a few.
  • Chapter 6 – DI Refactorings, how to spot issues and basically ways to fix the code so that its using proper dependency injection methods.

Part 3 DIY DI

  • Chapter 7 – Object Composition, how to correctly use and setup object composition in different types of .net applications.
  • Chapter 8 – Object Lifetime, managing dependency lifetime disposable dependencies and more.
  • Chapter 9 – Interception, cross cutting concerns, AOP and dynamic interceptions.

Part 4 DI Containers

  • Chapter 10 – Covers Castle Windsor.
  • Chapter 11 – Covers StructureMap.
  • Chapter 12 – Covers Spring.Net.
  • Chapter 13 – Covers Autofac.
  • Chapter 14 – Covers Unity.
  • Chapter 15 – Covers MEF.

This book was enjoyable to read and is all you need to know about DI in once place – go get it now.



Book Shelve – list of my more recent books

Through the years I have bought numerous books, I just love to read and here are just some of my favourite books, in no particular order.



Book Review: The Clean Coder

The Clean Coder – A Code of Conduct for Professional Programmers is the latest book I have just finished and is the follow-up to Uncle Bob’s Clean Code.

First of all Clean Code is one of my favourite books and when I saw the follow-up I ordered it straight away – for those of you who havent read it, Clean Code covers how professionals program and discusses the do’s and dont’s when writing code.

The Clean Coder discusses how to be a professional programmer, how to deal with conflict, unreasonable managers and how a professional deals with work pressures and so on. The thing to remember for me is that we are professionals and should always try to act as one and do a professional job.

I am currently working as a consultant and have found myself reading the book and finding it very helpful in a number of ways. The chapters on dealing with pressure and working with unreasonable managers did stick out somewhat and also the chapters on estimation and estimating how long something will take has some very interesting ideas.

Like Clean Code this book shares some ideas which not everyone will agree with but the author acknowledges this and never tries to enforce any particular ideas upon the reader.

I like the idea of team building where you have programmers who thrive and bounce ideas of each other, I also think the idea of learing when to say No to management is particularly relevant in our line of work.

The book covers attitude, self-respect and pride in your work and again that sometimes is thrown aside in order to get the job done and that’s fine too as long as you handle it professionally.

Again I recommend this book but I would suggest you read Clean Code first if you havent.

This book can be found here on amazon.com:- The Clean Coder



Book Review – Professional Asp.Net Design Patterns



Book Review – Clean Code by Robert C. Martin

Clean Code by Robert C Martin

Let me start by saying that I highly recommend this book to anyone writing code who wants to learn to write better, cleaner code.

What the Book Covers

Chapter 1 Clean Code – Different authors of programming books give their take on what their idea of clean code is as they try to help you become a good programmer.

Chapter 2 Meaningful Names – Gives you a break down of what to try to avoid calling method names, variables, and such like and helps you to try to use meaningful names as is the chapter name.

Chapter 3 Functions – Hints that functions should be small and that they should only do one thing and do that one thing well and gives examples of poor functions and how to refactor them in to new functions which have one function. Again I think this is a particularly good idea even though sometimes not always practical.

Chapter 4 Comments – Before I read this book I would normally add a comment the code I was working on but after reading this chapter I realised that comments in your code can be bad. It’s better to try to write self documenting code and try not to litter your code with comments, how many times have you changed code and then changed the comment of the author who wrote the code in the first place (hats off if you always do that everytime, including stored procs?), so code with the wrong comments can lead to issues themselves.

Chapter 5 Formatting – Covers different types of formatting your code as well as indentation and is pretty irrelevant with Visual Studio and such editors.

Chapter 7 Error Handling – Returning Null is bad but passing Null into a method is worse – code with endless checks for Null should be refactored – yep have to agree.

Chapter 9 Unit Tests – Covers the concepts of how to write good unit tests.

These are just a few hand-picked chapters which I thought were very good indeed.

Summary
This book is my favourite book, even ahead of Code Complete which I thought was an excellent book in its own right. Keep your code simple, use meaningful names and don’t use comments when there is no need to.

It’s the kind of book you will go back to again and again and there aren’t that many books which you don’t mind reading cover to cover again.

I’m sure you will enjoy this book and definitely learn something.