Tag: quality

Why non-requirements are “more” important than requirements

quality attributesWhen I was studying more deeply software architectures, I learned about the most important thing to consider in an architecture (after stakeholders), the non-functional requirements. Yes! Not the functional requirements, but the non-functional requirements.
Before I explain this more careful, let me say what “I” call requirements and non-requirements. (I will use requirements from now on, meaning functional requirements and the same applies for non-requirements)
Requirements are the features the final customer wants. Something like, I want an intranet portal where all the enterprise information is presented, where the users can consult news about the company and where the users can request material, etc. Preference, very detailed, the project manager and all the developers thank you for that.
Non-requirements are the “features”/attributes not related with the business, but very important, like performance, reliability, modifiability, security, auditing, transactional, availability, interoperability, testability, usability and others.
Sometimes people mix requirements with non-requirements, and sometimes they are right. If I want to build a race car, probably performance is a requirement.
The non-requirements are also called quality attributes because they give quality to the architecture. You can build an ugly/raw intranet portal with all the requirements in there. You will have all the information and all the requirements you requested to be implemented, but as soon you present the final product to the end users you will find why the non-requirements are so important. Probably you will call soon a designer to bring some quality to the web pages, Usability. Then you will start to hear some complaints about the performance, a user opens a page and all that information takes a long time to appear. It is time to for the non-requirement, Performance. The users they need important information available on the portal, to do their work along the day, so you will want Availability. The portal should access information available in other systems, and then again, Interoperability, and we can go on and on about this.
Why is this important, and really important? These non-requirements or quality attributes change the way something is built. They should be considered before the development, for many reasons: technical, time, resources and financial, to say at least. Technical, because the architect should consider them in the design and development process. Time, because it will take more time to implement them that just code the raw functionality. Resources, because you will need to consider people expert in some areas, like designers, integration, etc. Financial, as a consequence of the others.
For instance, for usability you should consider experts in that area, like designers. For security, one of the most intrusive quality attributes, you probably need an expert in that difficult area, or consider what blocks of code or modules should be protected and how. It can be a demanding task. For interoperability, you will have to consider what information to consume and provide, protocols, security, etc. If you work in financial software, you will surely want to test deeply the software, so the code and the architecture should be testable, the code will be organized for testability, and a lot of extra code will be implemented for testing purposes.
When you buy a house, the attributes you will take into your decision are more about quality than the living ones. If you follow only the living ones, any space with some blocks adjacent to each other will be enough for living! But, you will consider the access (security), how easy is to move around the house (usability), how strong are the house, like walls, material, etc. (reliability), and if the house is custom build for you, most of the time you will be speaking to the architect to consider this and that quality attribute, you will not be telling him that the house if just for living there, sleep, being and eat. You will want more, you will want quality, you will want a house based, above all, in non-requirements, responsible for making your expected requirements richer.
Curiously, the acceptance of any project, will be based on how the requirements were implemented served by the richness brought by the non-requirements. At least if you want a customer happy.
Without the non-requirements, the requirements will, paradoxically, not be “acceptable” by the final customer.

NDepend – You must have this tool!

 

I’m a .NET developer since v1.0 at 2002, and as you may guess, I’ve used a lot of tools to help me doing my job. How many times you realize that you are always doing the same thing over and over, in the same way, and sometimes you don’t even notice that you are letting some “little” bugs or “little” bad practices that in the long run will damage your code? And, how about projects with lots of assemblies, methods, complex behaviors, is this familiar to you? If it is, you want to check this tool NDepend

The first thing you probably note it’s the name, which lead us to think that this tool its about dependencies between components, assemblies, methods. Well, its true! But its much more than that! How many of us don’t need to visualize the dependencies from all angles in our project? How much do you value seeing the relations between your classes, assemblies, methods? How great its to know which method it’s the more complex, or more used, or more critical? Probably this “.net method” should be the more unit tested and optimized! In a team, a tool like this has great value, either for developers either for team leaders who want to know how the technical aspects of the project are going.

But this tool, its not only about dependencies, its about code complexity, metrics and very good warnings and advices to improve your code quality, too. In some tests I’ve made with this tool in one of my projects, I discovered that some of my code should be improved (almost saying fixed!), NDepend has show where there was some source code problems and why they were problems! I’m learning from this tool, besides my senior professional experience as a team leader, developer and Certified Trainer!

In NDepend you will find a lot of interactive visual graphs, matrix, trees of your code and its relationships, but besides the visual features of this tool, which are great, you have access to an advanced tool CQLinq(Code Query Linq) which allows you to build Linq queries to query YOUR CODE! Yes, querying your code!

I think it’s a beautiful feature, and a pertinent add-on to any tool which aspires to analyze code.

An example:

A Linq query to return all my public methods with more than 30 lines of code!

You can use all the Linq operators, such as Take, Except, and have access to a very rich API to query your code by a lot of different metrics, such as:

What are the 10 most complex methods?

As a first experience with this tool, I was very impressed, it’s a very productive tool, improves the quality of my code and of my team developers too. This tools its used by a lot of great companies like: ThoughtWorks, Microsoft, HP, Siemens, Google, Redgate and hundreds of others, they are not wrong about choosing it!

I’ will keep exploring this tool for my projects, my first impressions were great, so, why stop? If you are a professional developer I think you should give yourself an opportunity to improve the quality of your projects trying this wonderful tool! You can use it as either a Visual Studio Extension or as an Application outside Visual Studio.

For now I’m really enjoying what I have seen so far. In the future, I will certainly dig more deeply in specific features of this tool and post about my experiences,

Bad Behavior has blocked 162 access attempts in the last 7 days.

Hyper Smash