On rewriting software vs. careful planning

A recent post over at the 37signals blog got me thinking about the importance of careful planning in software development. The 37signals folk are quite strongly in favor of agile methodologies in software development, repeatedly pointing out the value of releasing software early without a full set of imaginable features.

The projects they work on are such that the cyclical process in which the software is refined over several iterations of the develop-and-test-cycle (with several steps thrown in) doesn’t cause any problems. In fact, rapid prototyping in these cases gives the testers (internally or the users at large) something to play around with and offer feedback on, often refining the user interaction from what was originally envisaged.

A definition of Agile (or Xtreme) Programming points out that it’s a methodology better suited for situations with unknown or unstable requirements as changes to the requirements are to be expected during the development of a product. More rigorous change management is better suited for those situations in which the requirements are defineable at the projects initial design phase.

While I agree in principle with the separation of when the two different approaches to change management are to be used, I’d like to see more discussion on how to balance the use of agile programming and rigorous change management. I argue that most applications that aren’t limited to trivial input/output data scenarios have areas in which there are initially unknown requirements and well-defined requirements. Especially applications which require user1 interaction have undefined requirements which may change as prototypes are tested by the actual users of the program.

For example, the intranet application that I’m working on at work has quite a bit of well-defined unchanging requirements. After all, we’re using nationwide agreements on how to calculate salaries based on daily and weekly amounts of hours worked and how the date and time affect the modifiers of such calculations. But at the same time, the business logic of the application has been very poorly defined. In fact, I’ve found that the choices and decisions I made to establish a prototype from which to start off, have defined the way the organization works.

My biggest problem with an approach to software development that encourages rewrites is that tried and tested code may be deleted and bugs reintroduced. Especially when security is an issue, rewriting tested code shouldn’t be the first approach to refactoring. Or then the rewrite needs to be planned and well-designed to utilize the important parts of the tested code.

Of course this doesn’t solve the issue in which you need to rewrite the tested code because changes over time have made it into a spaghetti-like tangled mess. Ideas on how to solve this dilemma are well appreciated here, I’m in that awful place right now at work.

  1. Yes, I do talk about users. Especially when developing a product that will have a defined set of people using it, users is a term that is actually beneficial. And it doesn’t mean that I’d think of users belonging to a different set from people.

Palovaroittimet ja palokuolemat

Ministeriö (pelastusalalla ministeriö = sisäministeriön pelastusosasto) on taas puhunut ja palovaroittimet ovat nousseet otsikoihin pitkin maata tänään. Jo aamulla YLE uutisoi aiheesta ja tämän päivän Karjalainenkin on aiheeseen puuttunut. Nyt uutisiin on noussut nähtävästi ministeriön lausunto, jossa todetaan palokuolemien määrän kasvun johtuvan vuosituhannen vaihteessa hankittujen palovaroittimien huollon laiminlyönnistä.

Itse intouduin viime vuoden lopulla kirjoittamaan aiheesta, kun valtiontilintarkastajat olivat ehdottaneet palovaroitinratsioiden pitämistä palovaroittimien kunnon tarkastamiseksi. Olin silloin ja olen edelleenkin ratsioita vastaan. Silloin myös vähän purkauduin siitä, mikä on kentän kanta palovaroittimien tehoon palokuolemien vähentämisessä.
Nyt huolena on se, että ihmisten into tarkastaa palovaroittimensa toimintakunto on laantunut ja enää harva tarkistaa palovaroittimen kunnon kuukausittain, toisin kuin vuosituhannen vaihteessa. Ministeriön yli-insinööri on jopa mennyt sanomaan, että palovaroittimien tarkastamattomuus on selvästi kytköksissä palokuolemien määrään. Tosin samalla hän toteaa, että asiaa ei ole millään tavalla tutkittu.

Ongelmana palokuolemien tutkimisessa on se, että sisäministeriön pelastusosasto (jonka pitäisi johtaa ja valvoa pelastustointa) ei itse tilastoi palokuolemia ja niiden syitä millään tavalla. Vuosittain uutisissa esiintyvät palokuolematilastot ovat SPEKin kokoamia mediassa esiintyvistä tiedoista.

Pelastustoimi kerää myös omia tilastojaan sähköiseen tietojärjestelmään. Näissä tilastoissa kuitenkin näkyvät varsin selvästi niin kentän vähäinen mielenkiinto tilastointiin kuin mielekkäiden tilastojen keräämisen vaikeus. Kävin Pohjois-Karjalan osalta kaikki rakennuspalot läpi viimeisen viiden vuoden ajalta. Näistä 18 rakennuspalossa (yhteensä niitä oli 797) on kirjattu ihmisiä kuolleiksi (yhteensä 20 kuollutta). Kun luin tarkemmin läpi onnettomuusselosteita ja arvioita tahallisuudesta niin viidessä palossa oli epäilys tahallisuudesta ja useissa oli maininta tupakoinnista vuoteessa. Palovaroittimen toiminta mainittiin vain yhdessä tapauksessa (naapuri oli kuullut palovaroittimen huudon). Tilastojen puutteellisuudesta kertoo varmasti myös se, että tiedän varmasti ainakin yhden tapauksen ja viiden kuoleman puuttumisen tuosta tilastosta.

SPEKin tilastot tämän vuoden ensimmäisen viiden kuukauden osalta eivät paljoakaan paremmin anna tilastotietoja palovaroittimien huollon laiminlyönnistä: 53 tapauksessa, 45 ei lehtitiedoissa ollut mainintaa palovaroittimista. SPEK ei myöskään näytä tilastoivan tahallisuuden vaikutusta palokuolemiin.

Ainakaan näiden tietojen perusteella on mielestäni varsin perusteetonta edes heittää, että palokuolemien määrällä ja palovaroittimien hoidon laiminlyönnillä olisi jokin yhteys. Mielestäni pitäisi paljon enemmän kiinnittää huomiota siihen, kuinka monessa tapauksessa palovaroittimesta on ollut hyötyä. Näin voitaisiin ehkä saavuttaa juuri ne ihmiset, jotka ovat kinnostuneita omasta turvallisuudestaan ja palovaroittimen kunnossapidosta.

Vaikka olenkin kriittisesti kirjoittanut palovaroittimiin liittyvästä uutisoinnista, pidän kyllä huolen kotonamme olevista palovaroittimista. Meillä on reilun 60 neliön asunnossa kolme toisiinsa kytkettyä palovaroitinta, joiden toimintakunnon tarkistamme aina ajoittain. Mutta emme todellakaan kuukauden välein. Olen myös käytännön tehtävissä huomannut, miten palovaroittimesta on hyötyä – etenkin silloin jos naapurit ovat valppaina ja reagoivat huutavaan palovaroittimeen. Palovaroitin (tai mieluummin palovaroittimet) kannattaa siis ehdottomasti pitää toimintakuntoisena ja sille kuuluvalla paikalla eikä patterittomana kaapin hyllyllä. Toimintakuntoinen palovaroitin kun ei ylimääräistä meteliä itsestään pidä.

News half-life

PhysicsWeb reports about a study done on how the number of people reading a news story decreases over time (via). The studies results are interesting, if fairly logical, results. Naturally, my mind went immediately into overdrive in thinking on how the results affect website design.
At least based on the PhysicsWeb article, the researcher have come to the conclusion that the average half-life of a news item is 36 hours. This

…implies that people could miss a significant fraction of news by not visiting the portal when a new document is first displayed, which is why publishers like to provide e-mail news alerts. The results also show that people read a particular web page not just because it looks interesting but because it can be accessed easily.

Of course this assumes that we\’re talking about a site with very requently updating news content and not a site with a fairly slow update cycle. Most sites with a fast cycle of publishing updated news are sites that deal specifically with news items, i.e. journalistic sites (be they professional or not), or sites that aggregate news from multiple sources (e.g. Newsvine or Ampparit).

In journalistic news sites, I\’d expect (and require) differentiating content that is deemed important enough to stay in the headlines to be highly visible on the front page and easily accessed even when looking back at the archives. For example, our local newspaper Karjalainen differentiates the online content of that days newspaper from the smaller daily newsitems that are updated during the day by separating the online only news into a sidebar. This approach works quite well, especially for someone like me who doesn\’t often read the dead-tree version.

A quick look at CNN and the New York Times didn\’t offer a clear distinction on how they differentiate highlighted news items from the smaller, constantly updated stream of news. In these cases I\’d think more IA is needed to highlight the content the journalists think is important. After all, that\’s what is done in the paper and broadcasts. At a professionally produced, journalistic site I am not interested so much on what other readers are interested in as what is important.

My lack of interest in knowing what newsitems others have liked comes from following the listings of the most popular news items in Ampparit (Ampparit is a Finnish site that aggregates news items from many different sites). Currently the most popular items are Angelina Jolie becoming a Kung-Fu instructor and Montoya leaving McLaren. Meanwhile, there are news items up on the memorials in Srebrenica, the situation in Somalia, and an accident in Bangladesh. While Ampparit is a great source of news and I follow it actively, my ability to catch noteworthy news items is very much dependent on how actively I visit the site, since items older than an hour or two drop quickly off the frontpage during the day. Here, the half-life of news items is brutally fast.

Newsvine is a fairly recent entry to the world of online news and reporting. It mixes news from professional (commercial) journalistic sources and news from citizen journalists, e.g. bloggers. What Newsvine enables is a way to follow how news is reported in various sources and how various sources have commented on the news. As such, it is a way to get an in-depth and multi-faceted picture of events. Of course, this all depends on the activities of the users and as such is vulnerable.

Whatever the half-life of news items is and however you decide to consum it, the internet is changing the way news is reported and consumed. A recent interview of media influencers in Finland by Helsingin Sanomat (as reported by Verkkouutiset) shows that even the leaders in media in Finland have finally realised that the Internet has an effect, in fact is changing, how people consume news. Now news publishers can’t rely on the fact that news will be consumed at predetermined times.

The ease of using multiple sources also means that publishers have to compete even more for their audiences. While some have voiced the concern that increased competition means less journalism and more tabloid-press, Helsingin Sanomat has chosen to compete by adding more background information and follow-up to their reporting. Which is exactly the kind of journalism that I want in addition to the reporting of breaking news.

As an active consumer of news from various sources, I can only be grateful of all the new tools that help me consume news – and not only the news that I’ve pre-determined an interest in. It’ll also be interesting to see how Newsvine affects news publishing. Unfortunately I’m not in a position to evaluate how Newsvine influences reporting, since Finnish news isn’t very actively reported or discussed there.