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...

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.Name}");
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.

Cross arms on professional photos – avoid

cross_arms

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

jigsaw

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.

Perspectives

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.

Architecture – Its all about Stakeholders – Part I

stakeholders

In this three parts article, I will introduce the concept of how the success of an architecture depends on the relation with the Stakeholders. Part I will describe the influence of Stakeholders in the success of an architecture, then Part II e III will describe how to communicate and create a common ground between the architect and the Stakeholders.

Stakeholders

A Stakeholder is: “individual, team, organization, or classes thereof, having an interest in a system” (ISO/IEC 42010).

From the definition, we can observe something all Stakeholders have”…interest in a system”. This interest can be from a perspective of the customer who is buying the system and follows closely all the steps in the creation of the product, until someone, anonymous, who just uses it, like a person or system buying a ticket to a game. So, the objective of an architect should be building a system maximizing the satisfaction of all Stakeholders.

An architecture is, therefore, built around the Stakeholders needs. The majority of the Stakeholders are people, so the human variable enters in scene very strongly in the construction of the system. Things like negotiation, agreements, meetings, communication, expectations management, are skills the architect should dominate.

An architect is not a Project Manager but should work very closely with him. The success of a project from the Project Manager perspective is the satisfaction of the Stakeholders, as so for the architect. That’s the reason, for some many times we see the architect as a project manager too.

The process of developing an architecture evolves thinking, technical skills and a lot of communication with Stakeholders. The Stakeholders, usually are persons who don’t understand technicalities. It is necessary, for the architect, to create a way to expose his/her views to them, to create a common language of understanding. For that, we need Views and ViewPoints, something I will talk about on the Part II of this article.

The culture of dummies

lemingThere is a kind of a popular trend saying for you to win you should lose a lot of times, that all the fails somehow lead you to success. Really? Do you fail to win? I love paradoxes, really, I love them, but I don’t agree with this. It’s like saying if you are in a dark place, you should go against the walls until you find the exit. With luck, you can find the doors, hitting the walls over and over again. This is the plan? I don’t think it is a good plan, a very hurtful one to follow. it makes me remember a game I played when I was young, “Lemmings”, these little creatures, they moved to all kind of obstacles until someone (the player) could guide them to the exit door.

It is normal to “fail” a few times, but only if it is a part of a strategic plan, where the outcome of some tactics didn’t reward us as we though they could, but this is not failing, it is fighting against the uncertainty. Failing is bad, makes us wish to quit the endeavor. But having a mindset about victory and became very upset because something didn’t go as we wanted, makes us trying to improve our strategy, without losing our focus on the goal.

Maybe this is just about semantics, but makes all the difference by saying someone should lose to win, against the mindset that he just have to improve until he wins. In the first case we are saying you are a loser but maybe with luck you can get it, on the second, we are saying, you have the right to fight for what you want, but revise your strategy and the tactics as necessary while you are using them. You are making the person feel he/she is already there, but should adapt better to the environment to keep going.

The true of all of this, is that a lot of people will really fail, there are no space for all the people to be the owners of big companies, managers, leaders or references in their fields. In the end, only some of them will reach the success. Some people will say they are the ones who never quitted (“besides the falls along the way”), I will admit that some of the credit was due to the persistence (of falling and get up again), but the luck, time, the right people at the right time, context, environment, friends, family, money, they had a lot of saying in the final outcome.

I am not trying to steal your dreams, or steal the motivation that leads your life, but I think each people just have to try to find what their natural qualities are, where they can be great, and try, in that space, to fight to be great, not hitting walls until finding the success but enjoying the ride of overcoming the obstacles of improvement, again, not the walls, just obstacles, where your natural skills can help you to overcome them, and the victory is almost certain.

First, find yourself, then find your happiness.

Argumentation tools – Concession

In a period of my life I worked for a big company, my job was at customers site doing some advanced product troubleshooting and configuration. Some customer employees always had this predisposition to gently degrading the image of the company products, referring the quantity and severity of bugs in them. At first I was upset by this, and I tried to defend with all arguments I knew, however, my manager told me to not do it that way. He told me to accept the critic from the customer, and telling them that they were right. Really? What? He said to me: First, the comments are true, you cannot say it is false, its a fact, if you defend this you are creating breaches in your character reputation (more about character in a future post). Second, after telling them this, they don’t have any more arguments to say, it is out of the way, now you could talk about the qualities of the product when compared with the other vendors products. You could focus your argument in the advantages over other products and why the customer chose our products and not the others. So, you conceded, for a while, the “advantage” to your audience, but then you get the upper hand, because the “bad quality” issue was already resolved and there is nothing more to talk about it! A kind of jujitsu in the language! It is like a sports game, you accept an attack from the other team just to open their defense, and then counter-attack.
You can apply this kind of tool to anything in your life. Usually a good salesman never say no to a customer, he hears the customer, accept his arguments (for a while) and then he counter-attacks with his sales tools, and it works quite well! “Yes, the car is expensive, but have you observed all you can get with that price?”
Another angle is, when someone is trying to win some kind of argumentation against you, and you know that its just something that he/she doesn’t really know well, just keep hearing and let them talk, concede the “advantage”, for a while, and you will see how they hang themselves in their own argument.
By curiosity, this tool was used by Gandhi (at least in the movie) when he cites the Christian Bible “If someone forces you to go one mile, go with him two miles.” (the argument is more extensive, but the idea is the same)
In chess, we call this a gambit, sacrificing something for future advantage.

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

Hyper Smash