Spiritual IT–Words and Progra...

At this end of year I would like to mix a little bit IT and some Christian teachings. It is not unusual, Donald Knuth on the book Things a Computer Sc...


dynamic and ExpandoObject

The dynamic and ExpandoObject have a relation of love and hate with .NET developers. One side defends strongly typed objects to handle data, so it's p...


Office Games – The Leverage

Office games is a thing in all jobs. All the time, intentionally or not, it is something being played. If you are in a game, and you don't know the ru...

quality attributes

Why non-requirements are “mor...

When I was studying more deeply software architectures, I learned about the most important thing to consider in an architecture (after stakeholders), ...

Spiritual IT–Words and Programs

spiritual_mindAt this end of year I would like to mix a little bit IT and some Christian teachings. It is not unusual, Donald Knuth on the book Things a Computer Scientist Rarely Talks About do an experience on the 3:16 versicle of the Bible.

Christian Bible talks about how God created the world using only His Words.

As humans, we use words too, of course, to talk, to transmit ideas and sometimes to change others behavior.

As IT People we develop programs with specific objectives that will run inside a computer.(or more)

If we create a metaphor and suppose we are like computers (in some way we are organic computers), we are somehow running code in our mind (in a different programming language in another paradigm). Code that can change itself or develop new code taking current statements. (Yes, this is possible now in several languages, like prolog, list, and even popular languages like C# where it is possible to “emit” code).

When we, as people, are talking to each other, we are “putting” code inside the other person, hoping it will change something inside him/her.

If she is a girl that we are trying to conquer, we create a program that will try to create a sense of good impression inside her, and try to hacker her in a way we touch the right place so she can start to be in love with us. There are books, tips, friends, all of it trying to teach us how to create a program like that.

A salesman tries to create programs to convince the others to accept his arguments, and buy his products. There are a lot of hacks about this, books, courses, seminars, etc., about hacking “persons” to force them to say yes!

Every day we are trying to hack the other person with our language.

Politicians are master hackers, with great programs, to hack several people at same time, with statements that can unify a group of people and push them to the same idea!

There are even NLP, the discipline that teaches to hack ourselves and hack the others! And, look to the name “Neuro-Linguistic Programming

You got the picture!

Moral of this

One of the most important things a person should be careful is the tongue in our mouth because it is the keyboard that writes the program that will be inserted on the other person, and is capable of great and wonderful things and capable of really bad things, as we all know.

Every time you will be talking to someone, remember, you are inserting a program on the other person. Try to be constructive, something that brings value, and not something destructive, because there are people that have great security measures and knows how to defend from hacking, but others don’t, and this can be very destructive for their lives. Depressions, bad decisions, and others, very well know consequences of this.

Likewise, the tongue is a small part of the body, but it makes great boasts. Consider what a great forest is set on fire by a small spark.” James 3:5

Have a great new year!

dynamic and ExpandoObject

tree_volteretaThe dynamic and ExpandoObject have a relation of love and hate with .NET developers. One side defends strongly typed objects to handle data, so it’s possible to handle a lot of issues at compile time. The other side, are developers used to develop scripts, python, and in other similar languages. They defend the dynamic nature of the current projects, with a lot of Xml, Json and unstructured data, so they prefer to use the more dynamic and functional structures of C#. Both are right! Some like to live strong typed and predictable, others like to live on the edge!

Personally, I am a hybrid developer, I like the strong type of languages, but love python and dynamic freedom, like C# provides. So it’s usual for me to use strongly typed objects on my projects, but every time I have to deal with unstructured data, I use the dynamic word and other constructs like Tuple class.

Because sometimes there are too many DTOs on the project!

ExpandoObject Basic Usage

dynamic myGuessObject = new ExpandoObject();

myGuessObject.Name = "Pepe Ribas";
myGuessObject.Address = new ExpandoObject();
myGuessObject.Address.Line1 = "Horizon Street";
myGuessObject.Address.Number = 23;
myGuessObject.Country = new ExpandoObject();
myGuessObject.Country.Code = "PT";
myGuessObject.Country.Name = "Portugal";

// Basic Stuff
Console.WriteLine($"{myGuessObject.Address.Line1}, {myGuessObject.Address.Number}");
Console.WriteLine($"{myGuessObject.Country.Code} - {myGuessObject.Country.Name}");

ExpandoObject with methods

dynamic dynamicCalculator = new ExpandoObject();

dynamicCalculator.Add = new Func((v1, v2) => v1 + v2);
dynamicCalculator.Sub = new Func((v1, v2) => v1 - v2);
dynamicCalculator.Mul = new Func((v1, v2) => v1 * v2);
dynamicCalculator.Div = new Func((v1, v2) => v1 / v2);
dynamicCalculator.Mod = new Func((v1, v2) => v1 % v2);

Console.WriteLine($"7 + 8 = {dynamicCalculator.Add(7,8)}");
Console.WriteLine($"7 - 8 = {dynamicCalculator.Sub(7, 8)}");
Console.WriteLine($"7 * 8 = {dynamicCalculator.Mul(7, 8)}");
Console.WriteLine($"7 / 8 = {dynamicCalculator.Div(7, 8)}");
Console.WriteLine($"7 % 8 = {dynamicCalculator.Mod(7, 8)}");

Reflection on the ExpandoObject

dynamic dynamicReflection = new ExpandoObject();
dynamicReflection.Name = "Pepe Ribas";
dynamicReflection.Address = new ExpandoObject();
dynamicReflection.Address.Line1 = "Horizon Street";
dynamicReflection.Address.Number = 23;
dynamicReflection.Country = new ExpandoObject();
dynamicReflection.Country.Code = "PT";
dynamicReflection.Country.Name = "Portugal";
var typedDynamic = (IDictionary) dynamicReflection;
Console.WriteLine($"Name = {typedDynamic["Name"]}");
var addressEO = (IDictionary)(IDictionary)dynamicReflection.Address;
Console.WriteLine($"Address Line1 = {addressEO["Line1"]}");

Office Games – The Leverage

leverageOffice games is a thing in all jobs. All the time, intentionally or not, it is something being played. If you are in a game, and you don’t know the rules or even that you are playing it, you will loose it for sure.

The most important think in every office games it’s the leverage. Many people think its fairness, but it’s not. Life isn’t fair, maybe the “time” will make it fair in the long term, but for the job, most of the times it’s too late.

People aren’t on the job to be fair, they are for their personal reasons, money, success, satisfaction, recognition, power, etc. If you are an obstacle for them, they will defend their goals as they can, and usually not being fair.

The excellent Netflix series “House of Cards” is an example of managing “leverage”. There is a passage from Frank Underwood, the master of creating leverage when he is talking with the president:

“Do I think she oversteps sometimes? Yes. Does she wrongly equate her advice with mine? Often. But the question that occurs to me is not about Linda. Let’s say you refuse her resignation if this gets out, and it could, won’t you be sending a signal to anyone who works for you that you can be leveraged? “

So, learn the game, learn the rules, play it!

Here some tips to get leverage:

  • Have something the other person needs
  • Have more authority.
  • Try to have a positive attitude
  • Try to be “cold”. Don’t be too emotional.
  • Have skills hard to be replaced
  • Have a good reputation
  • Try to have something that only you can provide
  • Build a network of empathy and cooperative attitude with the others.

Yes, these are things we all know from working, but are we developing them as much as we are developing our hard skills?

One of the definitions of Leverage
“The ability to influence a system, or an environment, in a way that multiplies the outcome of one’s efforts without a corresponding increase in the consumption of resources.” (from the BusinessDictionary)

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.

The explosion of outsourcing companies – Part 3


In this last part of the article, I will explain the relation between the growing of outsourcing companies and the age of consultants.

Let me ask you a question. If you are IT consultant around 40 years old and you work for an outsourcing company and you don’t belong to the managers or sales group, what do you think it will be your future?

The business of an outsourcing company is putting consultants in customers, where soon or later they will return to the office and going to another customer, and that’s it. What kind of career is this one? Maybe you expect to climb the ladder until you reach the manager position? Well, probably a few dozen more consultants like you, in the company dream about the same, and as you may guess, there is no place to everybody.

What to do? You can try some office maneuvers closely to the managers and expect a promotion. You can wait for the future to tell you if you will be a manager or not, until one day, you find out that people with a less curriculum and experience climb the ladder faster than you, and you don’t even understand the reason. Or you can try other options, like trying to be hired by a customer, or the most logical one, open an outsourcing company. You already have know-how, maybe you never stop to think about it. (See previous parts of this article)

If you observe the ages of the managers in recent outsourcing companies, they are people around 35-45 years old who opened their eyes to this reality, that being an outsourcing consultant is like a professional sports player of high competition, their career end around 35-40 years old, and people expect them to be managers or similar.

You don’t agree? Let’s face the reality. How many outsourcing consultants you have with 50 years old as developers or team leaders? How many customers will hire them? You can read on job descriptions, ignoring the possible illegality, searching for people between 23-35 years old. Sometimes, they just mask this reality, asking for things like “junior project manager”, “junior manager”, and related. How a project manager can be junior? Or a manager be junior? They just want fresh and young people.

There are exceptions. IT professionals with skills for project manager, architectures, or very advanced technical team leaders, can be great assets in big companies. But those, are exceptions, and these companies are real big, with big projects who need real experienced IT consultants. These are the top consultants, probably the 1-3% or less of all IT consultants.

This is a generation of IT consultants around 40 years old, that are becoming owners of outsourcing companies. Why? What else to do?

The explosion of outsourcing companies – Part 2

goldfish jumping out of the water

On the first part of this article, I introduced why is easy to create an outsourcing company. In this second part, I will approach how the crisis was a good thing to the creation of new outsourcing companies and an opportunity for others to grow.

The crisis brought some cleaning to the market. I remember a technique to make a company grow, where every year 10% of the employees are invited to quit and new ones are hired to occupy the places left empty. The idea, a little cold, is to remove people considered weak links, and bring new blood, fresh ideas and motivated people to the company. The idea is as good as any other, a bit cold for the human view but companies are not created for charity (well some of them are, but I hope with a different human management strategy).

This behavior happened to the companies, instead of employees. Small outsourcing companies, the bottom of the market, didn’t resist and they were bought by bigger ones or just closed the doors. Others were created, because it was easy (see the first part of this article), and occupied the place of the “fired” ones. The number of created companies was bigger than the number of the closed ones.

The main reason for the failure of some outsourcing companies was because the majority of its consultants were in a few big customers, that due to the crisis they had to dispense them to cut the costs. Now these outsourcing companies had dozens or hundreds of consultants returning to the main office without any customer to go. Some of them were invited to find another outsourcing company, others just saw an opportunity to open an outsourcing company, and a few stayed.

Other companies saw the crisis as an impulse to try new markets, outside their comfort zone, in other countries. They have created partnerships with international outsourcing companies or opened new international offices, and the crisis was just replaced with new needs for consultants. The consultants, they had to adapt, and even going against some of his family values, they started to accept international positions. They started to visit their family weekly, monthly, or they just moved to other countries with or without the family.

Some consultants and managers with no will to go to other countries saw here as interesting opportunity to open outsourcing companies. The big companies put their focus on outside markets and left the low-cost opportunities for other small companies. Sometimes, they just invite these companies to belong to their enterprise group, or they just buy these companies. This, I observe frequently.

Other mid-size companies, they didn’t try outside markets, consequently they only find small positions for the consultants, because the now international companies have a more strong brand in the outsourcing market.
Now the number of international outsourcing companies has grown, ironically because of the crisis, and the other ones, are fighting to survive in the local market, still in crisis. The weakest ones, they have a big challenge here, the low positions available on customers, make them loosing their best assets, to the big companies. They try to fight this, creating the concept of “cultural niches”, which I said before is not the solution, but it’s a way to go.

And a new explosion of small outsourcing companies is still happening, created by the free consultants, managers without a place after his consultants were fired, and others just taking the space left by the big companies that went international. Why? It is easy to create an outsourcing company.

The explosion of outsourcing companies – Part 1


In the last 20 years, there was a grow in the number of outsourcing companies, but in the last 5 years this number has increased substantially. Why? I think there are 3 main reasons I will discuss in these three part post. On the first part, I will show why this is an easy business to create. On the second part I will talk why the crisis was, ironically, a great thing for some of these companies, and on the part 3, for me the most important, the age of the consultants.

I would like to make this thing clear, I am not against outsourcing companies, they are necessary. In the time this post is written, I work in one of these companies. Computer market, for me, is the new construction business, and companies don’t need developers after the project is done, so it is easier to “rent” developers and delegate the responsibility to train (sometimes) and manage them in outsourcing companies.

Outsourcing companies are an easy business to create. To have a good durable company, you just need some money to handle the monthly gap between salaries and customers paying date (an outside investor/partner, for instance), someone to manage the resources and good sales people, usually called managers.

The blood of these companies, they aren’t the consultants. (I accept discordance at this point) but the CVs. They negotiate with customers with CVs. The consultants they are only needed when the probability of the customer wants the consultant be very high. Usually when they call you for a job interview, even if they have knowledge of your profile, they ask for your CV, unless you are a very useful resource, they will insist in a CV before the interview, strangely in their CV company layout. There are several ways to get CVs, the main ones are, having job descriptions from customers, and just put some “ghost” needs on the internet to get CVs from several IT areas, and consequently interviews.

It is necessary for customers know about the company, so the managers do this work and expect to follow with the customers on a regular basis or wait for them calling when they need some resource with a specific profile. This is the common cycle of development of a company.

Why is this an easy business to create? There are no materials, no stock, low risks. The major of companies appear as the result of some consultants or managers who have quit and started their own company because it is easy. They already know how this works! They already have contacts in customers, they already have colleagues or friends consultants and they bring some of them to the new company.

Probably it is not very discussed in public, but there are some mechanisms to try to avoid this leak in the system. In the job contracts, the outsourcing companies have clauses to forbid a consultant to have any kind of business with the customers, for as long as 6 months to 2 years. There are some “illegalities” here. First, at least in Portugal the Constitution has “the right to work” has something inviolable, for clear reasons, of course. So, these kind of clauses, are somehow against the worker rights. However, some companies started, and for me with some fair equilibrium to give something in return. Something like:

– After you quit the company, if the first 15 days after quitting, the company can forbid you, for 6 months, to work for the customer. But, it will give you in return 50-60% of average salary, for the 6 months. Even if you work in another place you will receive this money as a compensation and avoidance of the illegality.

– I have seen too, 10-20% for 1 year

– I have seen the inverse, for 1-2 year you can’t work in any of the customers, and if you go you can be punished some thousand euros plus more money the company could be losing from your moving.

I understand these restrictions in contracts. This is an easy business to create, and after some time in a customer I can easily open a company like this one and probably taking advantage of all the investment the outsourcing company had with me, and I just steal the customer and some consultants.

I call this an easy business, this doesn’t mean I think it is easy to have a company like this. I think with some grow it is very difficult to manage the consultants, their motivation, careers, make them stay even when other outsourcing companies have better projects or salaries. To avoid a big rotation of resources between companies, there is a current growing trend about the concept of culture in outsourcing companies. A way of the consultants to live the company as a family, or a great place to work. At the end of day the consultant works with a customer, and the company earns the money from the consultant in the customer, not “in the place to work”, so this culture is welcome, but I don’t think is the solution. That the reason on average a resourceful consultant stays for 1-2 years in an outsourcing company. It is not the only reason, but this is a theme I will discuss in future posts.

It is a tricky business having an outsourcing company, and somehow a very volatile business. I think it is the price to pay for an easy business to create, and with some irony because they try to restrict how themselves were created!

Cross arms on professional photos – avoid


I love the body language “science”. It is worldwide accepted it represents about 55% of our communication language. Our silence is more loudly than our words!
There are several positions of the body from what we can infer with some confidence the intentions of a person. For instance, the direction of the feet is one of the most honest parts of our body. They always point our intentions. If someone is talking to you, but his/her feet is pointing in another direction, to the door, for example, you know your conversation should end. Or you want to participate in a conversation between a group of people, and start a talk but no one directs to you, they are just listening but they are not inviting you to the group. This is not infallible science, but most of the body language is spontaneous and automatic, so, when we do it is most certainly sincere unless you practice to control it.
LinkedIn has a lot of posts from human resources companies, where we can observe a lot of professional photos where people stand with crossed arms. I am not a specialist in body language, but from what I know about the subject, this position is associated with a barrier, where the person closes the contact, she/he says is not open to you, she/he is not invite you. Remember the kids, they always cross their arms when they want to silently saying “I don’t want to talk to anyone and don’t anyone near me!”.
I wanted to be sure of this, so I searched more specialized places about professional image related to body language.I was right, this position IS the position to avoid in professional photos. This position indicates closed defensive shield, sometimes anxiety, like you have something to hide, is it sometimes called negative body language. One of the main tasks of sales people is when a potential client has the arms crossed, giving him an object as a gift so he could be “open” to the talk.
You can try a more professional position, with a picture where the arms don’t appear on the photo, or if they appear, you should try to show them doing something related to work, like pointing to a board, writing, etc.
If you belong to human resources you should be aware of this. I think it is not the message you want to pass.

Architecture – Its all about stakeholders – Part III


In the part I of these series it was introduced the importance of the stakeholders in the architecture. In Part II we have learned how to communicate with them, using views and viewpoints. We will now focus on the concept of perspectives, the non-functional requirements in our architecture but usually the most important, like security, audit, logging.


In the previous parts, we have talked about architecture elements, and how to show them to stakeholders in a way understandable for all the parties. By now, we have an initial structure of the whole system, but it misses the most important things in the architecture, and usually the more challenge to include, the quality attributes, or sometimes called cross-cutting concerns, like security, performance, logging, audit, scalability, etc.
These attributes of the architecture are always very challenge to include because they are orthogonal in the architecture. For instance, logging is something we want all over the architecture, probably in all modules, tiers, layers, etc, which implies changing all views already developed.
The name was given to these attributes in the context of an architecture its a little bit controversial, because there are entities that consider these attributes additional views of the architecture, and other entities consider something that change the views, orthogonal in the views, something that complements and can change an entire viewpoint. So it is natural to find these cross-cutting concerns named as views or perspectives. I, personally, like the term perspective, because these attributes are not another kind of views in the architecture, but the application of “quality” in the architecture, the insertion of elements that enrich the system. Like in a house, besides the construction we can improve the whole house with a better light system, internet all over the house, better walls, toilets with material that don’t get rusty, etc.
Why is this important for stakeholders and why we need them? Because they are usually the most important concerns! For instance, in a Bank, security is probably the attribute most important, and I bet almost every requirement includes security, explicitly or implicitly. The people who give support surely they want logging and audit to help them finding the origin of issues or someone who tried to access a resource illegally. In a website like amazon, the end users surely they want a very performant website, and so amazon wants a scalable system, for the system to grow big and in a smooth way.
The quality requirements, are the core of the requirements. They give color and form to the functional requirements. You can create a web page to register a user, but you will want to include audit, logging, security (like HTTPS) and manage the load balancing and scalability, not forgetting about sticky sessions or another architecture tactic (different from patterns).
With all these views, viewpoints and perspectives, you can think the architect will have a fragmented view of the whole architecture, which is true, but someone who wants to be an architect must be prepared for this challenge, find the best way to build a system with all these pieces, that’s why he/she will be an architect. It is not about the technical skills, only, but about choices and stakeholders.

Architecture – Its all about Stakeholders – Part II

<">viewpoints views

In the previous post, we have seen the importance of the stakeholders in the development of an architecture. Because stakeholders aren’t all fluent in technical language we must find a common ground to communicate.

Views and Viewpoints

An architecture is a very complex system. If you try to create one big diagram to show all the elements of the architecture and its relations, it will be a big document, only useful for the ego boost of the architect. The stakeholders don’t need do know everything about the architecture, just the parts with interest to them. For instance, users of a bank application, they are more concerned with the user interface, performance, available information and in many cases with security. They don’t care how the database server exists or how is it connected with web services, integration tiers, etc. The architect should create a set of views of the system, for each set of concerns of the stakeholders. To this set of views, we call it Viewpoint, a part of the architecture. One view always belongs to a Viewpoint, and a Viewpoint can have multiple views. Examples of viewpoints are information, development, concurrency, functional, deployment and so on. We can observe there is a set of stakeholders with an interest in each of these viewpoints.

Let’s see an example. When building a house, you don’t want a unique blueprint with every element of the house, the exterior, the interior, the materials, the flow of the light, water, electricity, streets around, halls, etc. You expect to have several views of the house. You will have some views for the exterior like front view, side view on the afternoon, or if you want to see how the interior will look, you have a view of the living room, another for the kitchen, rooms, toilets, and so on. Other concerns could be how you circulate inside the house, and you expect to see views from the entrance, hall, the accesses between rooms and living room and toilets, etc.
The views about the accesses are a viewpoint related to the circulation of people inside the house. The other views are more related to the context, how the house is presented from outside, for instance.
The house is the same, but the views are different, and directed to specific concerns and different persons (stakeholders). When the architect talks to you, shows how the house will be at the end, but when he talks to the company that builds the house, the concerns will be completely different, they are interested in exact measures, materials, ground, time. These diagrams will have information you don’t care because they are too technical.

Again, the stakeholders are the fundamental piece of the architecture, besides the project being developed for them, even the management activities are around them and depend on them. Your strategy as an architect should have the stakeholders as the main actor on the scene, and all the tactics should include them in every decision.

Now, we know how to talk with stakeholders during the development process of the architecture, it is time to include in these views quality attributes, or sometimes called cross-cutting concerns, like security, performance, cache, etc. We call them perspectives (it is not a consensual term in the architecture community, but the main idea exists and is shared). We will see more about this in Part III of this article.

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

Hyper Smash