I use this blog as a soap box to preach (ahem... to talk :-) about subjects that interest me.

Wednesday, December 22, 2010

Silence

For a month now I haven’t written any new posts. The problem is that I have been working at two books and haven’t found time for blogging. I know: if I stop making new posts, I will lose the few readers I have, but...

Monday, November 22, 2010

Marriage for all

This post describes my position concerning gay marriages.

Wednesday, November 17, 2010

Sudoku - Programming the XY-chain strategy

XY-chain is a generalisation of Y-wing. Essentially, instead of looking for a chain of three pairs, you look for longer chains in which the intersection cell of the Y-wing is expanded to a chain. The chain can be surprisingly long (one day, I might try to find out how long...), as shown in the following examples (only the relevant cells are shown).



Friday, November 12, 2010

Sudoku - Programming the Y-wing strategy

On the web there are many explanations of the Y-wing strategy, but none seems to go to the core of the issue. The only clear statement I found was that Y-wing doesn’t solve cells, but only eliminates possible candidates.

Strategy

Look for cells that contain only two candidates each. Among those cells, look for three cells that satisfy the following two conditions:
  1. The arrangement of candidates in the cells is AB, AC, and BC. That is, no two cells have the same pair of candidates.
  1. The cells are in two intersecting groups. This is equivalent to say that the two wing cells cannot share any group and can only happen in two ways: row+column (one of the cells shares the row with one of the other two cells and the column with the third one) and line+square, where ‘line’ stands for either ‘column’ or ‘row’ (one of the cells shares the line (row or column) with one of the other two cells and the square with the third one).

Sunday, November 7, 2010

Sudoku - Programming the rectangle strategy

Every now and then I like to solve a sudoku puzzle. There are three things that interest me in sudoku: how to measure the difficulty of puzzles, how to write a program to solve puzzles, and how to write a program to create puzzles.

A program able to create puzzles must first of all be able to solve them, and to grade puzzles it is necessary to have a large number of solved puzzles. Therefore, the first step is to write a sudoku solver. There are many around, but for me part of the fun is to write the program. Years ago, I already wrote at least two sudoku-solving programs in Java. They were OO programs, but I was never particularly happy with the implementation. For this latest attempt, I have decided to ditch OO and use plain old “C” as a programming language.

In this post, I will describe a strategy that I call ‘rectangle’. It is sometimes called ‘hollow rectangle’ (you will later understand why). I intend to describe the strategy and then provide some development notes. To display the examples, I shall use snapshots of the program “Sudoku Training Software 1.1”, which runs under Windows. You can freely download it by clicking here. This is the first program I found on the Web for generating the snapshots. I use it only for that and I have no idea whether its other functions are good or bad. If you would like to suggest some other application, perhaps for the Mac, please tell me.

Sunday, October 31, 2010

The day I was arrested

This post is about what happened to me one early morning of 1977.

Monday, October 25, 2010

I am an apostate

Yesterday, I stumbled onto the blog danein.blog.kataweb.it/2009/07/31/scomuniche/ (warning: it is in Italian). The author, a declared atheist, said (my translation): “Is there anybody who can help me to get a serious excommunication, possibly signed by the Pope?” This motivated me to write this post, because I did get an official letter of excommunication from the Catholic Church, albeit not from the Pope himself. Perhaps, others will be inspired by my action and do the same.

Thursday, October 21, 2010

The Catholic Church

Reading “The Case of the Pope” by Geoffrey Robertson QC I am discovering a lot of interesting facts concerning the current pope and the way in which the Vatican operates. It was written in a somewhat boring way and contains several repetitions, but I recommend it to both catholics and non-catholics.



Tuesday, October 19, 2010

Mussolini's Racism

While researching for the historical novel I am writing, I stumbled onto the so called “Manifesto of Race”, signed by ten Italian scientists and published in the magazine “La difesa della razza” (“The Defence of the Race”) on August 5, 1938. It provides a glimpse into the Fascist ideology concerning an area that, I believe, is poorly known. Somehow, I feel compelled to translate the document into English for those who don’t understand Italian.

Tuesday, October 12, 2010

Is this true about Islam?

Earlier today, I viewed a YouTube video that makes statements about Islam.  I confess that I found it a bit disconcerting.  Unless somebody managed to get it removed, you will find it at www.youtube.com/watch?v=Ib9rofXQl6w&f.

Tuesday, October 5, 2010

Photovoltaic Panels Update

At the end of the post titled “Photovoltaic Panels” of September 8th, I talked about my intention to extend my PV system. I did, and here is a new picture of my roof showing the new array.


Monday, October 4, 2010

The responsibility of the pope

I just finished watching the Australian talk show Q&A (Questions and Answers), in which a panel of five well known people (politicians, intellectuals, journalists, etc.) answers questions asked by the public. One of the panelists, Geoffrey Robertson QC, is known to have suggested that the Pope should be formally held responsible for the abuses of catholic priests against children. During the programme, he was asked to explain why the pope should be held accountable for what he clearly condemns. Obviously, being a lawyer, he answered in a very articulate manner, but one sentence stroke me as being central to his argument, and I feel compelled to report it here. He said: “If you have got the power to stop a crime, you have the duty to do it.”

This is a very compelling statement and, in my opinion, at the heart of the issue. For years the catholic church has been transferring to other dioceses priests who had been accused of abusing children. The fact that the pope recently apologised for the abuses doesn’t cut it. If he really wanted to stop them, he could, right now. He would only need to tell the bishops that any case of suspected abuse should be transferred to the local police. Easy. As long as he will fail to do so, he will make himself a potential accomplice of the crime after the fact.
 

Writing timelines

This post is for fiction writers, and especially for those who are not particularly IT-savvy. Obviously, most authors of fiction are familiar with word processing programs like Microsoft Word and OpenOffice Writer, but not with spreadsheets like Microsoft Excel and OpenOffice Calc. It turns out that the programs designed to process tables of numbers are the perfect tool for writing and maintaining the timeline of a novel.

Tuesday, September 28, 2010

A message from the FBI?

This post is about somebody impersonating the Director of the FBI on Facebook.

Yesterday, I received the following request from Facebook:


Saturday, September 25, 2010

Australian peculiarities

To start off, I feel I have to explain why I haven’t been posting much lately. I have begun working at an historical novel. The subject is: “The struggle of an Italian sailor to make a family, on the background of his ten years of war, from 1935 to 1945”. It will be based on my father’s life, which was more adventurous than most. And now, to the actual post.

My wife and I like Australia, and have decided to spend the rest of our lives in Canberra, its capital. Of all the places we lived in (Hamburg, Rome, Melbourne, Canberra, Perth, Stuttgart, Zurich, and Paris), and of all the places we visited (London, New York, Washington DC, Sydney, Milan, Venice, and Cairo, to name some), we found that Canberra was for us the best city to settle in. And yet, for central and southern Europeans, Australia has got some peculiarities that require getting used to.

Friday, September 17, 2010

SW processes

At the end of 1998 I became Software Engineering Process Group Leader of the Swiss branch of a large multinational group.  It was my responsibility to ensure that software was developed in accordance with the corporate standard processes.  Some of the developers had very little knowledge of Software Process Improvement (SPI).  To “break them in”, I developed “ab initio” presentations with some basic SPI concepts explained in very simple terms.  I just discovered some of the slides in an almost forgotten folder and, given the fact that:
1.    My presentations were never officially registered in the corporate archives;
2.    the business division I was attached to no longer exists;
3.    more than ten years have passed;
I believe I can share them with you without infringing any copyright.

Monday, September 13, 2010

I am what I am

This is a very short story that I wrote for the Canberra Speculative Fiction Guild.  To be honest, I don't know whether they used it.  I include it here to show that it is possible to write micro-fiction in 124 words.

      When I was first switched on, people often asked me “How does it feel being a robot?”
      My answer was always “When my operational parameters are close to their optimal values, I could say I feel good.”
      They didn’t seem to be entirely satisfied by my answer, and kept asking questions like “Are you happy to be a robot?”
      Bios are very much interested in what they call feelings. Robots are not. When I do what I have been built to do, the potentials in my positronic brain are in balance. Whether this condition could be called happiness is irrelevant.
      Now that they have become used to me, the bios have stopped wasting time with useless questions. It is better so.

Wednesday, September 8, 2010

Photovoltaic Panels

Advertisements for solar panels have begun appearing on Australian television. At least, they have become frequent enough that I noticed them. Obviously, the purpose of the ads is to encourage the viewer to buy solar panels, but they tend to be misleading. By selling the electricity you generate, you eventually repay the acquisition price of the photovoltaic system. That’s true. It is also true that your electricity bill is reduced and can even go negative (which means that you get money from the utility). But you shouldn’t consider the two facts simultaneously true. After all, the utility pays you only once!

In this post, I will describe what I think is the financially correct way to look at the photovoltaic panels. But to start, I will first tell you what system my wife and I have bought.

We have on the roof eighteen panels manufactured by Sharp (model NT-N5E3E), as shown in Figure 1.
Figure 1: Our panels.

Each panel can nominally generate up to 175 W of power. Therefore, our maximum generating capacity is 3,150 W.

Monday, September 6, 2010

OO - UML Behavior Diagrams

This is the last post on Object-Oriented Technology. I know, there is so much that remains unsaid... Perhaps one day I’ll write more about it. But don’t hold your breath!

Behavior Diagrams
There are six different types of behaviour diagrams. They are: activity diagrams, state machine diagrams, use case diagrams, communication diagrams, interaction overview diagrams, sequence diagrams, and UML timing diagrams. The last four are also collectively called interaction diagrams because they concentrate on control and data flow among the system components.

Sunday, September 5, 2010

OO - UML Structure Diagrams

In the previous post, I described a basic method suitable for designing simple OO applications. Obviously, as the applications grow in complexity and the teams grow in size, making lists of properties and methods quickly becomes insufficient to support the development process.

A widely used (and very powerful) software development process is the Unified Process, of which IBM's RUP (Rational Unified Process) is currently the best example. But describing RUP would be too much.

What I can do is to introduce you to a formalised and standardised way of describing OO systems, suitable for applications of any complexity and with all possible development processes. This is the Unified Modeling(1) Language (UML).

Saturday, September 4, 2010

OO Development

A lot has been written about how to develop software. In this post I want to summarise the basic concepts. That is, those concepts that many drown in rivers of jargon and buzz-words.

Friday, September 3, 2010

OO basics and Java

Inheritance
In relative terms, some classes are very general, others very specialised. We use the term subclass to indicate a class which is a more specialised version of another class. For example, the class Convertible is a subclass of the class Car, because a convertible is a special type of car. The reverse is obviously not true, because not all cars have a retracting or folding roof. It would be incorrect to say for example that the class Bike is a subclass of Car, although both are subclasses of Vehicle.

Thursday, September 2, 2010

OO does it with Class[es]

This post begins a small series of postings on Object Oriented Technology.

In our everyday's life, we deal with objects all the time. Some are so small that they fit in the palm of our hand, and some are so large that we can walk into them and then even get lost in their interior.
In its basic meaning, an object is a material thing that falls under our senses. Notwithstanding the obviousness of this definition, objects have revolutionised the way in which we write computer programs.

Saturday, August 28, 2010

Writing the beginning of a story

What follows is my summary of the first two chapters of the book “Beginning, Middles & Ends” written by Nancy Kress. It is a book that I recommend to everyone who is interested in writing fiction.



Thursday, August 26, 2010

Network of Feedbacks on eBay

A network is a collection of nodes connected by links. Railway tracks, roads, blood vessels in our bodies, neurons in our brains, tunnels in ant nests, cables in electricity grids, airways, and sewer and water pipes are all examples of physical networks we are familiar with. The study of physical networks was first formalised during the first half of the 18th century by Leonhard Euler, who invented graph theory. Two hundred years later, to study complex networks and how they were formed, Paul ErdÅ‘s and Alfréd Rényi studied fictitious networks in which the links were created at random. Random network theory dominated the study of networks for decades, but it had a critical flaw: all nodes had the same number of links. That’s not how most real networks are.

Sunday, August 22, 2010

My back

During this month of August I haven’t been writing much. In particular, during the past week, I haven’t written at all. Now, for somebody who calls himself a writer, this is pretty bad. But when you have back problems and your doctor tells you that you shouldn’t be sitting, it’s kind of difficult to write. I do have a laptop and could have written while lying in bed, but it is easier said than done. The inspiration is just not there. Besides, I also have problems lying in bed.

With my back, it all started some decades ago, with crises of severe pain in the lumbar region. Initially, the crises resolved themselves after a few days of rest. Sometimes they were so bad that I couldn’t walk, but it only happened every few years... Then, about one and a half decades ago, I started taking medication to get back onto my feet more quickly. Till 2004, I only needed to take some Ibuprofen, available over the counter, for a week or so. In 2003, I started needing anti-inflammatory tablets, like Celebrex, to make the pain disappear. Then, in 2004, the pain lingered on, and I could only walk curved.

Saturday, August 14, 2010

I.Q.

I had known of the existence of Mensa for longer than four decades and had considered trying their admission test since my university years but, for one reason or another, I only did it last year. As it happened, it was precisely on my sixtieth birthday. When I was told that it would take up to two months to know the result of the test, I explored the Web and discovered that there were many other High-IQ societies. And many of them had stricter criteria than Mensa. Now, Mensa (at least in Australia) only tells whether the candidates have an I.Q. within the top 2% of the population or not. That’s one of the reasons why I started answering some of the many I.Q. tests available online.

Tuesday, August 10, 2010

There are 10 types of people

Those who understand binary...
...and those who don't. http://www.planetsmilies.com/smilies/winking/winking0008.gif

Friday, August 6, 2010

A ban on full veils?

I believe that everybody, as long as they don’t disadvantage or damage other people, should be able to say and do what they want. That’s why I am in favour of reforms like those aimed at legalising drugs and at extending the validity of marriage contracts to homosexual couples. On the other hand, in what might be considered a sign of intolerance, I am in favour of preventing women from wearing in public full islamic veils.

Tuesday, August 3, 2010

Web Development for All

What follows is the presentation of my book "Beginning JSP™, JSF™ and Tomcat™ Web Development: From Novice to Professional" (see sidebar) that I wrote for the website of the Italian Scientific Attaché in Canberra. I don't give you the link of the website because it no longer exists.

Web Development for All!

What makes the Web really useful is its interactivity. By interacting with some remote server, you can find the information you need, do your banking, or buy online. And every time you type something into a web form, a web site "out there" interprets the request generated by your web browser and sends back a response containing a web page with the requested information. But how do you develop such dynamic web pages?

Saturday, July 31, 2010

Technology that gets under your skin

For the Merriam-Webster dictionary, Bionics is “a science concerned with the application of data about the functioning of biological systems to the solution of engineering problems”(1). Similarly, Wikipedia defines Bionics as “the application of biological methods and systems found in nature to the study and design of engineering systems and modern technology”(2). Bionics has many applications, but what interests me is that it helps develop devices that support, enhance, or even completely replace functions of the human body. And to do their job, such devices must become part of the people who carry them. They represent the first steps of man-machine integration.

Wednesday, July 28, 2010

From chipped stones to wearable computers

A couple of million years ago we learnt how to walk on our two hind limbs. Natural evolution selected it into our genes because it improved our chances of survival. We could see above the toll grasses of the Eastern African plains and detect approaching predators before it was too late. And once detected the danger, we could escape at a higher speed. But that evolutionary step also had another profound effect on our ancestors: it freed their hands(1).

Tuesday, July 27, 2010

Toilet paper woes

Paper is manufactured by pressing together moist fibres and then drying them. The quality of the paper largely depends on the nature and length of the fibres that are used. In general, better and stronger papers are made with longer fibres. And that is why it is difficult to make good quality recycled papers: the recycling process breaks down the fibres, thereby automatically reducing the tensile strength of the resulting paper. Not surprisingly, given its use, toilet paper is close to the... ahem... bottom of the quality scale. The problem with toilet paper is that it has to be cheap while being strong enough to prevent fingers from “breaking through”. An unpleasant experience that most of us have had to endure at one time or another. Ideally, toilet paper should also be soft rather than scratchy or, worse, slippery. To top it off, toilet paper should also readily dissolve in water in order to minimise the risk of clogging the sewers. And what about the presence of possible allergens? And the colour? And the smell? The list of requirements imposed on such a humble product is almost endless. Modern toilet paper also has the added feature of being perforated, to allow for an easy separation of segments. It doesn’t always work as it should, but it is of great help.

Monday, July 26, 2010

Of Soft Brains and Software Brains

An uninterrupted flood of information constantly bombards our senses: images, sounds, smells, tastes, textures, temperatures. We can only cope with it because our brains only make us aware of a fraction of that information. We blissfully remain unaware of the rest.

Sunday, July 25, 2010

Machines that can think

Only a few decades ago computers filled up entire rooms and only accepted inputs via switches on their front panels or punched cards. The continuing increase in processing power and decrease in size has made possible to fit computers into smaller and smaller packages. In two decades we have gone from the size of a small suitcase to something comparable in size with a pack of cigarettes.

Saturday, July 24, 2010

Homo Novus

We are entering a new phase of human evolution. The next couple of decades will mark the end of humanity as we know it today.

Friday, July 23, 2010

A something/nothing about money

This is something I composed with the name of the currencies of thirty-two countries.  I chose the names on the basis of their last letter and the way they sounded together.  Is it a poem?  I don't think so, but I leave it up to you.

Taka tala pula kina

Real rial quetzal metical

Tenge Leone krone gourde

Won yen yuan kroon

Loti lari dalasi bilangeni

Dollar denar dinar bolivar

Euro peso escudo boliviano

Baht kyat manat ringgit

Wednesday, July 21, 2010

Religion - The Ten Commandments

A lot could be said about the ten commandments, but my purpose here is to talk about the fact that the ten commandments in English, German, Italian, Spanish, and French are not exactly the same. The reason for choosing these languages is that they are the only languages I understand. The ten commandments appear three times in the Bible: in Exodus 20:2–17, Exodus 34:11–27, and Deuteronomy 5:6–21, and they are not identical. The official catholic version of the commandments is available online in the catechism pages published by the Vatican(1).

Monday, July 19, 2010

Management - My Leadership Principles 2

32    You can only see further if you stick your neck out.
  
33    Listen to those who stay quiet and talk to those who speak a lot.
  

Sunday, July 18, 2010

Management - My Leadership Principles 1

  1    Any goal is impossible until you find the way to achieve it.

  2    You only fail when you give up trying.

Saturday, July 17, 2010

Management - Generosity

Keep the others indebted to you.

What do I mean by that? It is simple, really. As long as your collaborators will feel that they owe you something, they will bend over backward with their work to repay you.

Friday, July 16, 2010

Eating Animals - Why I am vegetarian

In this post, I shall try to explain how I came to be vegetarian. I expect that you will find it unreasonable and perhaps even a bit weird. In any case, regardless of of how you find this post, I encourage you to read my next post on vegetarianism, where I will give you at least one valid reason for becoming vegetarian yourself or at least significantly reduce the amount of meat you eat. I assure you that it will have nothing to do with what you will read here.

Thursday, July 15, 2010

Management - Guidelines vs Rules

A lot of people think that guidelines, leaving some leeway and ambiguity, are less restrictive than fixed rules. This is certainly not the case. To convince yourself, try to answer this question: “Who decides whether an action conforms to a guideline or not?”

Wednesday, July 14, 2010

Religion - Child Molestation

I am sure that this will not be my last post on religion but, prompted by the worldwide scandals about catholic priests, I feel I have to start talking about it.

I was born and grew up in Italy, where the catholic religion is in the fabric of society. Even many parents who never go to church feel there compelled to baptise their children. And the prime-time evening news show the pope or talk about him several times a week. In every classroom of every public school, a crucifix hangs beside a picture of the Italian president on the wall behind the teacher’s desk.

Management - Need to know

How can people decide with competence if they don't have all the information they need to do it? In one respect, human beings are like any other machine: to deliver good results they need to have the necessary inputs and be able to process them well enough.

Management - Where the buck stops

I have always entertained very informal relationships with my collaborators and allowed them to decide in as many situations as possible. This was only possible because, beside being friendly and open, I systematically made clear that I had the overall responsibility and that, therefore, could overturn any decision made by a team member.

Management - Decisions

A leader should decide as little as possible.

Many people find it difficult to decide. They agonise on alternatives and keep postponing the moment when they finally must commit themselves to one of them. When I say that a leader should decide as little as possible I certainly don't mean that.

Tuesday, July 13, 2010

Management - Trust

The word trust is for company life what love is for the movie industry: so much used and so often abused that most people develop for it the same self-protecting indifference that nurses and doctors must have for blood.

Monday, July 12, 2010

Management - Foreword

My main reason for writing about management is that I have a vision of a working society in which people are respected as human beings. I hate to see mature and intelligent adults conditioned and blackmailed into subservient roles by arrogant and ruthless bosses. I have to do something about it, even if it is just writing what few people will ever read.

Prohibition

This post is about the prohibition of drugs, but I will tackle that subject by talking about alcohol prohibition first.

wiki.answers.com (1) says that alcohol causes 100,000 deaths worldwide every year. I believe them. But then, why don’t we do something about it? Should we ban alcohol? NO, WE SHOULDN’T, because history has shown that ethanol prohibition doesn’t work.

Sunday, July 11, 2010

Political correctness


Political correctness has gone too far.

I can understand that women resent being excluded by collective terms like mankind and chairman. It makes sense to use humankind and chairperson instead, but to be gender-neutral with the pronouns becomes difficult. All these he or she and his or her are distractive, and the use of they and them when referring to a single individual makes me almost shiver in disgust. I usually use [s]he to replace he/she, but I have no alternative for his/her. The use of hir has not been universally accepted. Some non-fiction authors alternate between the masculine and the feminine pronouns, but it feels awkward. Sometimes I just use the feminine pronouns and leave it at that. After all, we have used the masculine ones for centuries, and it will take a long time before the men feel discriminated against.

But political correctness goes well beyond gender-neutrality.

Blogging is addictive

Blogging is addictive. This is only my second post and I am already hooked. But I am not going to use this blog as a real log. After all, who can possibly care to know what I had for breakfast this morning or how many cups of coffee I have drunk in the past twenty-four hours?

No, no. Nothing of that.


I will use the blog to write about what matters to me. It will be my personal soap box, from which I will harangue the world. I wrote scientific and technical stuff and am now writing Science Fiction, but my most natural way of communicating is preaching, and no publisher would be interested in that. The beauty of having a blog is that, as long as you remain within the limits of the law and don’t libel anyone, you can say what you want.


It would be nice if somebody read my ramblings and commented on them, but if not, then so be it.

Saturday, July 10, 2010

Star Trek and Terrorism

I chose Locutus as display name and “Resistance is futile” as blog title because I am a trekker. I just love Star Trek in all its incarnations. Some stories are better and some are worse, but what I like of ST is the idea that in a century or two humanity will live in peace.

I know that physically we are almost identical to the savages that 70,000 year ago left Africa to populate the world. But I am always amazed to discover how senselessly violent modern humans still can be. On an evolutionary scale, seventy millennia are a comparatively short period of time. Therefore, it is no surprise that our emotions and impulsions haven’t changed. But shouldn’t we have learned to control them?