Monday, May 18, 2009

Software development as mapping

I started writing this post quite a while ago and now stumbled across it. Seems like it deserves publishing.... and an ending!

I have always been a bit disturbed about that we use architecture as the one and only metaphor for software development. Originally it was thought that building software was somewhat similar to building houses. Most people nowadays realize that this is not the case. The word architecture has gained a meaning of its own when used in the system development context. It is essentially useless to try to change it. We have to accept it and use the metaphor whenever we speak of the structure and subdivision of a software system. (Which also means that I have to accept the title "software architect" when being the person that makes decisions about the structure of a software system. Well, well - with great titles come great powers and sometimes a bit of reward.) It is nevertheless refreshing to think in other ways occasionally and this post is about software development as mapping.

I was happy to - yet again - read a brilliant a list apart article somewhat related to this issue. At least it made me start thinking about it again. The article is called Mapping Memory : Web Designer as Information Cartographer and is written by Aaron Rester. He makes the case that instead of thinking about web design as information architecture - we should think about it as cartography - providing maps for the user. Listen:
I suggest, therefore, that the art of cartography might fruitfully be used alongside architecture. This might sound like an odd suggestion, since at first glance, cartography appears to be nearly the opposite of architecture. Common sense tells us that an architect begins with an abstraction—a blueprint—and creates from that abstraction a concrete structure existing in physical space. The cartographer, on the other hand, starts with concrete structures existing in physical space and creates from that an abstraction: a map.
Now I think that this is valid also for system architecture. A software system is - in the end (believe it or not) - built for its users and they often need a map or a mental model to safely navigate the system. But what is this map really?

My experience is that a system architecture should be as close a resemblance of the users real world as possible. There are things that are core to the users - these things may be written in stone throughout the system. A word processing system shouldn't lack a document object - paragraphs, chapters, words and letters are core to the system. These concepts should be in the midst of the map.

Sometimes it can even be used as the tool for changing the users real world. If a business wants to head in a certain direction its software can be used to redraw the map. Most important in this case is the visual structure that Aaron Rester is talking about but underneath there is another structure that needs to be in sync. If the system behaves contrary to the experienced map the user will be confused and will think about the system as a magic artifact. It is possible to think of different kind of maps. A surface map that is what Aaron writes about and a infrastructure map that also explains the inner workings of the system.

Some things that I do when creating a system architecture:
  • Treat the business map and the software map as one and the same.
  • The software map might describe things that are invisible to the user. The degree of "invisible" things is a measure of complexity.
  • Introduce abstractions that are useful for the user. (And hide abstractions that confuses.)
  • Ask visionaries about the future. Can the software map guide the user though the next busines development?
  • Question any architectural elements that does not enhance the user. Remove them from the map.

All this thinking about mapping led me way back to the programmers stone. A very long time ago I read the original talks and being rather new to the business they helped increase my understanding of the strange organisation I worked in then. It was initially hard to accept that software was deemed good once it worked regardless of the inside quality. The stone helped me grasp that different kinds of persons have different kinds of outlooks on this matter. It introduced the rather simplistic notion of mappers and packers as a way of grouping people. Programmers (at least good ones) are mappers - they understand a problem domain and draw a map that is useful in software construction. A mapper knows how to organize a domain. Other people are mostly packers. They don't know how to organize a domain but are instead rather big on particulars. Listen to this part from thinking about thinking:

To understand what programmers really do, an alternative strategy of thinking (called mapping) is necessary, because programming is essentially a process of internalising the capabilities of the system, the nature of the problem, and the desire, and capturing the insight in a programming language. It is all about exploring the details of our desires, and understanding them in such a way that we can keep track of all the complexity. Mapper problem collapse can produce beautiful, tiny, elegant programs with no room for bugs in them. Mapping can do programming, but how it does it cannot be explained in packer,
action-based language.

I hope this quote got you started. Read the whole thing when you have a couple of hours to spend!

To sum things up - I truly believe that we - system architects - are in deep need of other analogies than "architecture" and we need to think more about what we do. Mapping is one way to look at things but there are surely other ways too.

Sunday, May 10, 2009

EC2

It is time to get more technical again. This time I want to write about cloud computing or more specifically about Amazon's EC2. Given the hype around the very hard to define term of cloud computing, it was for a long time on my todo list to check EC2 out. However, I wanted to have a use case. "Luckily" I had to fix a Hibernate Search bug which would only manifest itself against a certain set of databases, including SQLServer. Since I did not have a SQLServer running locally, I decided this might be the opportunity I was looking for. Surely, there must be a virtual machine in EC2 with SQLServer installed.

Turns out there are heaps and it is a piece of cake to get started. All you need is an amazon account. If you ever ordered a book from Amazon chances are you have one. It felt a little wrong to use it though. I still have to associate Amazon to more than just a bookstore. Anyways, logging in worked fine and after answering some initial setup questions, generating a certificate for authentication and watching a 3 minutes tutorial video, you are ready to proceed to the EC2 console. Just press the Launch Instance button, select a virtual machine configuration and off you go. It is all very intuitive and easy to understand (meaning no need for reading any more documentation:). The actual starting up time for the virtual machine was longer than I expected and I started to think something went wrong, but in the end the console reported the machine ready to use. Once running, you have a public DNS name for the machine which you can use to connect to it via ssh or remote desktop. Again very simple.
In my case I just used remote desktop to log onto the machine, create a new SQLServer database to use for running my tests and then I was back debugging my problem. Sweet.

I haven't tried yet any of the other EC2 services like volumes and snapshots, but I will be back. Well done, Amazon!

--Hardy

Saturday, May 09, 2009

Crete

One week Crete lies behind me. A very nice island! Now I can understand why Heinz Kabutz made this island his home. By the way, he recommended me to visit the oldest olive tree in the world in Ano Vouves. I did - very impressive.

Navigating the island is, however, quite hard. Cretans seem to be unable to decide
how to spell city names and instead just alternate spellings, for example Chania, Hania and Xania. All the same and this is a simple example! Throw longer names and the Greek alphabet into the mix and you can quickly get lost. However, my pattern matching skills came in handy. As soon as two different spellings had a similar amount of characters and at least three or four matched I concluded I am on the right way :)

On top of the navigational problems there seem to be no traffic rules on Crete. At least not ones anyone adheres to. You see 50 km/h speed limit signs at the entrance of villages, but 80 km/h was the rule. Maybe 50 is the minimum speed limit? Shoulder lanes also serve a different purpose on Crete. Anyone slower than 80 km/h 'has' to be on the shoulder lane, so that other cars can dangerously overtake while completely ignoring oncoming traffic. Not using the shoulder lane in this way can lead to quite aggressive driving of cars behind you. All this said, it only took me a couple of hours to adopt the wreck-less driving rules and feel like a true Cretan :) Let's hope I can adjust as quickly back to the Swedish lagom way of driving.

During our stay we visited two different ecotourism places. First Milia on the western part of the island



and then then in Aspros Potamos on the eastern part.




Both places are very nice, but I was most impressed by the first. Not so much because of the accommodation, but more because of the food. In fact I had to change my whole attitude towards Greek food. So far it ranked somewhere after the Italian and Spanish cuisine. But there is more to Greek food than Slouvaki and Moussaka and the so called Greek restaurants I have visited here in Sweden are just a shadow of what I tasted on Crete. The traverna in Milia is especially known to only serve fresh local produce and most is even cultivated on the property. And believe me - you can taste it! My mouth is still watering just thinking about the food at this place.

Do get rid of some of the excess calories we also did some hiking on the island, for example in the Polyrinnia Gorge. At this time of the year it was very beautiful with all sort of wild flowers blooming. I must say, the island is much greener than I expected. Of course the hiking was combined with some geocaching as well. I am finally drawing close to my 100th geocache (I know you lead is uncatchable, Fredrik ;-)

Overall it was a beautiful week on Crete. Away from rainy Sweden and away from technology. Have I mentioned that none of the places we stayed had Internet. Not even electricity! In return I had over 1000 unread emails and almost 500 unviewed RSS items. Well, I must admit I applied a quite aggressive skim and delete algorithm to get through things ;-)


Enjoy!

P.S. Thanks for the pictures goes to Anna. When it comes to taking pictures I am still an amateur.