quarta-feira, 27 de junho de 2012

Exceptions as gotos

try
{
    Client client = getClientByName(name);
    throw new ExistsClientNameException(name);
}
catch (DoesNotExistClientNameException e)
{
    addClient(new Client(name));
}

sábado, 26 de maio de 2012

Interesting times

Yesterday evening, while chatting with a colleague over dinner, he mentioned this sentence by someone, whose name I cannot recall now: may you live in interesting times

Definitely, we live in interesting times. We cannot have a logical, and meaningful, grasp of the future. Of course, we can look at the past and try to foresee the future, but, though the future will for sure repeat something that already happened in the past, we have no idea about what it will be. These times are interesting and risky. 

During the DESRIST conference, there were discussions about innovation and design, and it occurred to me that there is some kind of paradox between design and innovation. For instance, when we design the software architecture for a system, first, we try to build a common understanding among all stakeholders on what is the problem and what are the requirements for the solution. Then, the architect designs an "elegant" solution that fulfills the stakeholders needs and, hopefully, he expects to come out with something that contains some innovation. However, if the result is innovative most of the stakeholders would have disagreed beforehand with it. When there is innovation, consensus is a result of innovation and not its source.

Life is not by design and we live in interesting times.

sábado, 19 de maio de 2012

Science and Enginering

This week I presented an article at the DESRIST Conference in Las Vegas on the integration of IT and organizational design. This conference is the forum for Design Science research, which focus on the IT artefact and its process of construction. This community has its conceptual roots on Herbert Simon's work on the Sciences of the Artificial (1969).

I'm writing this post because I was struck by two different issues, a recurring discussion and an elegant formulation.

First the recurring discussion. During the two conference panels, it was referred the resistance of the academia to accept research on design. Fifteen years ago I remember being involved in similar debates in the context of the design patterns community. The design patterns community had a huge impact on software engineering. Today software developers use design pattern jargon to communicate their designs, the design patterns knowledge is part of the experts language. However, the design patterns community impact on academia is small and its publication outlets, the PLOPs conferences, are not the best forums to publish if you aim to get a PhD degree. Why this happen? An interesting article by Davenport and Markus (Rigor vs. Relevance Revisited: Response to Banbasat and Zmud, 1999) make it clear. Academia pursuit rigor (science) but has some difficult in accepting relevance (engineering) because of its "lack of rigor". Designing and building a system is a clumsy task which is difficult to assess. However, Davenport and Markus argue that the academia must find the means to reward the research on best practices. How? Well, the recurring discussions show that this is not an easy task.

On the elegant formulation, I was positively surprised by Alan R. Hevner formulation of design science research which integrates relevance and rigor in three feedback cycles (A Three Cycle View of Design Science Research, 2007).


Design Science Research Cycles (Hevner, 2007)

From a software engineering perspective, Hevner formulation covers from empirical software engineering, in the relevance cycle, to fundamentals of programming languages, in the rigor cycle. Besides, it gives design science a central role on bridging the gap between rigor an relevance.

I would not say that this perspective is the ultimate solution for the recurring discussions, but it provides  the lens through which we can view software engineering research, and design research in general.

domingo, 19 de fevereiro de 2012

A história universal dos impostos

A história da humanidade poderia ser escrita em função da história dos impostos. Impostos em sentido lato, ou seja, a forma como cada indivíduo, quer seja de livre vontade, quer seja coagido, contribui com parte dos seus recursos materiais para o bem comum. Desde o tempo da escravatura e do Robin dos Bosques até aos dias hoje o processo das contribuições individuais e da sua redistribuição pela comunidade tem procurado ser cada vez mais transparente e equitativo.

A atual crise democrática está ligada a um desfasamento, pelo menos ao nível da perceção de cada indivíduo, entre o que contribui para a comunidade e o que recebe em troca. E o que recebe em troca não necessita de ser de forma direta, pode ser através de estabilidade e diversidade social que podem ser a fonte da geração de mais riqueza. O nível de educação de uma comunidade ou o cultivar da diversidade de opiniões dentro da comunidade são disso exemplos.

Em torno deste desfasamento geram-se duas interpretações ligadas quer à direita quer à esquerda. Segundo a direita existe um esbanjamento dos recursos que são redistribuídos, quer porque a máquina de redistribuição é ineficiente, quer porque os beneficiários da redistribuição não a merecem e acomodam-se. Já a esquerda é muito cautelosa em colocar em causa a máquina de redistribuição e enfatiza a importância social da redistribuição, mas encontra-se atualmente na mó de baixo do senso comum sobre este problema.

Contudo, o processo de redistribuição é mais complexo e a ineficiência não está apenas ligada ao funcionamento da máquina mas também à decisão. Ou seja, a decisão de como e onde se gastam os recursos partilhados está longe das pessoas. E esses valores não são desprezáveis. São valores muito significativos que fazem mover uma parte significativa da economia. Por exemplo, a guerra no Iraque foi paga com o dinheiro dos impostos dos Norte-Americanos e houve muitas empresas privadas envolvidas, quer diretamente na utilização desse dinheiro, quer indiretamente nos negócios gerados em consequência da guerra. Este aspeto da ineficiência da distribuição não é muito referido pela direita e provavelmente origina um maior esbanjamento do que o da ineficiência da máquina do estado. Mas, como disse, não é esse hoje em dia o senso comum.

Considera-se que a invenção da imprensa marca o fim da idade média e o início do período moderno. O seu impacto foi enorme. O acesso e a divulgação do conhecimento ficou mais fácil, aumentou a diversidade, deixou de ser necessário pertencer a uma classe social, o Clero, para ter acesso ao conhecimento, e teve até influência no sucesso da cisão religiosa de Lutero e Calvino pela facilidade e relativo baixo custo com que as traduções da bíblia puderam ser divulgadas. Não obstante o seu impacto, a invenção de Gutemberg resultou da adequada combinação de um conjunto de técnicas conhecidas na altura. Um exemplo da construção de um produto de engenharia.

Também para os impostos é necessário um produto de engenharia. Este produto caracteriza-se por separar a decisão sobre quais são os objetivos da comunidade da forma como eles são concretizados. Os primeiros são definidos conjuntamente pela comunidade quando elege os seus governantes, já os segundos devem ser concretizados por cada indivíduo de acordo com o contributo que a comunidade decidiu lhe atribuir. Os governos definem os objetivos sociais e as pessoas gerem a aplicação da sua contribuição. Os governos são avaliados pelos objetivos sociais que definem, as pessoas são avaliadas pelo sucesso com que gerem a sua contribuição.

Sobre este mecanismo esbocei algumas ideias num post sobre a Gestão dos Impostos, mas agora interessa perceber da viabilidade desta solução. Sim, porque facilmente se alegará que é impossível. Esse argumento terá provavelmente duas facetas, uma técnica e outra social.

A impossibilidade técnica versará sobre a complexidade do problema. Sobre ser impossível medir o sucesso de como as pessoas gerem a sua contribuição. Sobre não ser possível tratar toda a informação ou categorizá-la. Creio que tal como a invenção da imprensa, também aqui as técnicas já existem hoje em dia, é apenas necessária combiná-las de forma adequada.

Já a impossibilidade social é mais subtil, pois está ligada ao poder. Mas o principal argumento terá a ver com as pessoas poderem não ser capazes de tomar as decisões certas. Também aí, o exemplo da imprensa de Gutenberg pode ajudar, pois muito provavelmente um dos argumentos contra a tradução da bíblia seria a sua má interpretação pelos leigos. Mas a história encarregou-se de mostrar precisamente o contrário.

domingo, 2 de outubro de 2011

Social Mirror - Some Challenges

In a previous post I stated that the SocialMirror should be a software application that allow people to steer their own public image, and ensure some fairness among all concerned. Now, it is necessary to detail the application goals and features. To keep focus on the relevant issues, I start to identify the challenges SocialMirror has to face, and to do so I'll follow different strategies.

In this post I analyse some software applications and games where the concept of social mirror is built-in. By identifying similarities and differences between them and SocialMirror, I aim to raise some questions which will help me in the design of the solution. On the other hand, these questions will help me stick to what is important.

I have chosen one software applications and two games, actually, one of the games is also a software application.

Facebook is the largest social network in the world. It is mainly used for socialising, though the number of satellite applications which intend to take advantage of the large users base is increasing. By and large, Facebook allows people to interact in a number of ways, but socialisation around content has become viral. Contents, such as pictures, videos, and news, trigger endless interactions, eventually stopped by fresh contents that drag people to another context. However, because socialisation is a confirmation process, are you there?, do you still feel the same?, are you the same?, people move but they keep on socialising. The relation to social mirrors is obvious. In the tender mirrors post I exploit a found-art technique, I anonymised a thread where teenagers where commenting a picture and I did some random reshuffling as well, to illustrate how in Facebook self-awareness comes out from among others mirrors. Therefore, SocialMirror should also take advantage of contents to trigger interaction, but it should avoid that people easily converge for the sake of its fairness quality.

Truth or Dare is a game where the players have to choose between answering to a question or performing a task, both usually embarrassing. Similarly to the Facebook case, by answering others questions or performing tasks they propose, a public image is being built. However, contrarily to Facebook, in the Truth and Dare game is not so easy to converge because, due to the game rules, tasks and questions should be embarrassing. SocialMirror may follow some the the Truth and Dare rules to achieve some fairness, though it is not clear how to bring players to the game if they are not willing to.

FearNot! is a very interesting application that uses role-playing to create emotional self-awareness on bullying situations. It provides the player with a set of scenarios where he advices a victime of bullying. By doing so, the player becomes affectively engaged and create the right behaviour that will help him as either a victime or a bully. FearNot! addresses the Truth and Dare open question, how can we engage people in SocialMirror? In this case, people are engaged in the game by accepting to do a good deed. However, the context is pre-defined and form a closed world. For instance, FearNot! ignores that the bullies are also interacting to create their own public image, and very often the victime works as a catalyst. SocialMirror should have a wider scope,  it should support an open world closer to Facebook.

domingo, 25 de setembro de 2011

Social Mirror - The Context

According to the social mirror theory, people's self-awareness depends on how they see themselves through others's eyes: "we cannot have mirrors in the mind unless there are mirrors in society". Therefore, self-awareness is a social construction where everyone is committed.

The article, although short, is not easy to read. Nevertheless, I would suggest you to give it a try. It is inline with some of the ideas on social construction I have been discussing on both this blob and curtas. I am particularly fond of the role-play mechanism in the mirrors construction. The author goes a little bit further and argue that it is role-playing which distinguishes humans from other animals. However, this aspect is not relevant for what I have in mind.

Why am I bringing up this issue on social mirrors to a blog on technology and people?

I have been thinking for a while on how can technology be used to enhance the human condition. Of course, technology has already done a lot in both economical and social terms; evolution of human societies cannot be dissociated from technology. However, there is place for improvement, in particular in a world where people is overwhelmed by information that they cannot master. In this world it is becoming increasingly difficult to get answers for some question. How are my taxes being used? How can I take control of my information on the internet? And so on and so forth.

While I was thinking on a name for a software application that would allow people to steer their own public image, and ensure some fairness among all concerned, the name SocialMirror came up.

Then I googled for "social mirror" to know whether the name was already taken by another application. Curiously, and in life very often meaning comes after action, I found the social mirror theory.

I envisage an endless game of mirrors where awareness is being continuously reshaped. Mirrors reflect each other and each one adds a bias (see post on a young girl). This bias occurs due to some some new element, either a new external (real) fact or new social construction.

In another post I will address the challenges for the design of a SocialMirror software application.

terça-feira, 20 de setembro de 2011

O software como uma construção social

Por vezes, ao preparar as aulas, volta-se a reler os mesmos artigos, e há frases, ou palavras, que sempre lá estiveram e parece que não tínhamos reparado. No artigo Who Needs an Architect?, Martin Fowler, diz que a arquitectura de software, assim como o software é um social construct. Quando desta vez voltei a ler o artigo fiquei com curiosidade de ver com detalhe qual a definição de construção social.


Ignorando o aspecto de negar a essência do produto, que algumas teorias sócio-técnicas mais recentes levam em consideração, o que é ressalta desta definição é que de facto o desenvolvimento de software não é, nem nunca poderá ser, rocket science.

Assim, Martin Fowler termina o artigo dizendo que: "Software is not limited by physics, like buildings are. It is limited by imagination, by design, by organization. In short, it is limited by properties of people, not by properties of the world. “We have met the enemy, and he is us.”"

Com base nesta frase pergunto aos alunos se não será o frustrante fazer engenharia de software? Ao que um aluno me diz que não, antes pelo contrário, esta é uma oportunidade para se poder ser mais criativo.