2008/12/09

Some notes about troubleshooting

From Why Programs Fails: A Guide to Systematic Debugging:

Some terminology: from defects to failures

  1. The programmer creates a defect.
  2. The defect causes an infection (the program state differs from what the programmer intended)
  3. The infection propagates
  4. The infection causes a failure (an externally observable error in the program state).

Debugging can be decomposed into seven steps:
Track the problem in the database
Reproduce the failure
Automate and simplify the test case
Find possible infection origins
Focus on the most likely origins:
Known infections
Causes in state, code, and input
Anomalies
Code smells
Isolate the infection chain
Correct the defect

Note the TRAFFIC mnemonic.

Opinion ON:

That's nice theory. Unfortunately, the complexity of IT has teached us that computers are non-deterministic beasts. The first thing that we do in case of a problem is restart the system, hope that the problem will go away, and be able to keep doing our job. And it often works.

But we, software developers and support technicians, need to un-learn our hide the symptoms urge. If we suspect that there is some defect in the code (and trust this old software developer, you can be confindent that it very likely that there is one), our goal should always be to find the defect, instead of changing things so that the defect is not executed or the infection does not end up causing a failure. Leaving that defect unfixed is very likely to cause pain in a future situation. À la programming by coincidence.

Some advice
  • avoid corrective actions before the issue is understood. Before the failing code is identified, you should only use temporary corrective actions to help you frame the problem. I'm guilty of having neglected this rule lots of times, and requested customers to just upgrade the code to see if the issue goes away.
  • when possible, use tools that minimize the infection propagation (that, crash as soon as possible). On Windows, I was recently introduced to pageheap and I'm in love with. More on it another day.
  • defects come from source code: give support technicians access and knowledge to read the source code. Support people and developers should change seats quite often.

2008/12/07

Present and in awe

From Anne Lamott's Bird by Bird (p100):

Try walking around with a child who's going, "Wow, wow! Look at that dirty dog! Look at that burned-down house! Look at that red sky!" And the child points and you look, and see, and start going "Wow! Look at huge crazy hedge! Look at that teeny little baby! Look at that scary dark cloud!" I think this is how we are supposed to be in the world - present an in awe.
Some times, like when my kids were very young, or when I'm experiencing some special scenery, this view of the world comes naturally. Others, I'm smart enough to remember to put the inner child in control.


I've spent the last few weeks walking in the street as if I were the Little Red Riding Hood on synthetic recreational drugs (smile boing-boing-boing smile), and I realized that it had lots to do with the inner child getting in control without asking for permission. This reminded me about Lamott's quote, and, in turn, to remind myself to keep letting the inner child handle the driving wheel.

2008/12/03

Macacos

Ayer envié esto, en relación a mi actuación como enlace con el equipo de soporte de un producto del que no sé casi nada, en la que últimamente me limito a esperar órdenes de gente que está en una zona horaria equivocada:

Entiendo que el problema está en un punto en el que yo aporto poco más que un macaco al teclado
Si hay suerte, hoy le pasaré los trastos a un chimpancé y podré dedicarme a cosas más interesantes. Deberé enseñarle a Pobre Chimpancé algunas cosas que he aprendido cuando he sido yo el que daba soporte:
  • que hay que ser paciente y no irritarse cuando te preguntan por séptima vez la misma cosa: no es nada personal.
  • que entre lo que digan los logs y lo que digas tú, soporte no dudará en creer lo que dicen los logs. Y te preguntarán una octava vez.
¡Oh, queridos ex-clientes! ¡Estos días he comprendido a qué torturas os he sometido durante tantos años!

2008/12/02

Resum executiu

Dropped ice-cream
Extractes d'un intercanvi de notes sms-iques entre la meva bona amiga O. i jo, durant i després d'un tercer grau:

Xavier:

M., del 71 (...) Amb un punt de chiflada que em mola molt. Seguiremos informando.
Xavier:
>Seguiremos informando.
M'ha plantat.
Dos mesos molt divers. Una pena. Joder, que en sou de complicades!
O.:
La generació dels 70 va abusar massa de les drogues i han quedat tots molt perjudicats.
Carpe diem.
:-)

La petita lluita entre lamentar-me pel cucurutxo que no m'he cruspit i sentir-me afortunat d'haver-ne fet un tastet l'està guanyant l'opció intel·ligent.
Recreation by Chris Glass of a NY subway sign replacement by True

2008/11/30

Exhibición impúdica

Esta semana me han dado varias pastillas de Egolín en forma de cosas agradables sobre mi que alguien le ha dicho a otra persona. Y, con toda la inmodestia, las transcribo

  • Tu padre mola. Se lo ha dicho a G. un compañero de cole, supongo que sorprendido de que un adulto recuerde que tiene piernas y las use para hacer carreras por el parque.
  • Xavier's assistance on this issue was most appreciated, en relación a una actuación de bombero en un cliente.
  • Xavier a fait un excellent travail en décrivant les étapes du project (...) Xavier est un excellent professionnel.
Y como, a pesar de un buen principio, no ha sido una semana brillante en todos los frentes, ¡no me ha ido mal enterarme!

Actualización: aunque esta me la han dicho directamente, también ha sido una deliciosa pastilla de Egolín: Una de las primeras personas a las que acudo cuando tengo problemas de código y me quedo bloqueado. Y una de las más desinteresadas y resolutivas. Gracias.

Pastillas naranjas

2008/11/25

Tweets my friends like

Twitter lets you mark as favorites the tweets you like. Some people doesn't care about this, but others do add stars to tweets that are fun, enlightening, or both. I wanted to be aware of what my twitter friends mark as favorite, and after no obvious google hit, Yahoo! Pipes came again to the rescue.


The pipe creates a feed with the tweets that some one's contacts have marked as a favorite. Keep in mind that it only works for the up to 36 contacts that are shown in a user's page, since I did not want to get into the authentication issues required to get a full list of contacts. If you want, you can add additional users, that don't need to be your contacts.

Customize it with your accounts and grab it at http://pipes.yahoo.com/xverges/friendsfavs.

Credits: Microformat-scrapping the page is the only way I that found to get access to a list of contacts without authentication. I used Duane Cato's Microformats contacts extractor as a starting point, and just copied how he uses http://microformatique.com/optimus/ to grab the info that twitter kindly puts in hCards.

2008/11/21

PAPItastimumoadeuunpato

Letter
La C. ha fet el millor ús del Dymo que s'ha fet mai!

2008/11/19

ABCs of z/OS System Programming

One of the side effects of my recent research has been to learn that the famous ABCs of System Programming redbooks have been updated and have gone from 5 volumes to... 11!!

I've been browsing Volume 6: Security on z/OS, RACF, and LDAP. Kerberos and PKI. Cryptography and EIM. and it has been quite useful (though, in fact, it did not point me where I needed to go). Not all the volumes have been published as today. The pages for all the volumes list them all.

Certificate-based logon to zOS

DCAS (zOS Communications Server's Digital Certificate Access Server) has come to my rescue. From the docs:

The DCAS can be used by providers of logon and single sign-on services where access to z/OS-based applications is needed. The DCAS is a TCP/IP server that enables clients to connect over the network and obtain a passticket and z/OS user ID from RACF.

Clients that connect to DCAS must use the SSL protocol (DCAS supports SSL Version 3). Client authentication is performed.

Clients can request a user ID and passticket for an application. The client sends an x.509 certificate. DCAS converts the x.509 certificate to a valid user ID, which is returned. The x.509 certificate must have been mapped to a valid user ID in RACF
It's the second time in a few months that DCAS is the solution to the problem that I'm working on; unfortunately, I had forgotten about the first time, so it has taken my a while to get rescued. Not a complete waste of time: if learned a few things about PKI and RACF.

The first time it was about a service to generate passtickets (strings that can be used as passwords for a short while). Despite my recommendation, the customer's choice was to not use DCAS and code it from scratch; go figure.

Now it is about authenticating to RACF from a application that uses a smartcard reader. I'm looking forward to code the smartcard-based RACF logon, since working with smartcards has been in my wish list for very long.

And since google and DCAS don't seem to be big friends, I'm posting this.

2008/11/17

Kyrgyzstan existe



Intercambio de mails con un amigo al que he visto sólo una noche en los últimos 15 años. Está en viaje de negocios:

Pue si hijo si, no hay nada mas triste que en Kyrgyzstan y con jet lag...

Kyrgyzstan??!! Kirguistán, Kirguizistán o República Kirguisa??!! De la wikipedia, algunos datos no especialmente relevantes:
  • 5 millones de habitantes
  • la "Suiza de Asia central", no por el chocolate, los bancos o los relojes, sino por no tener mar y porque un 80% de su territorio es montañoso
  • aunque ilegal, aun se practica el rapto de novias. En un principio, en un país donde eran habituales los matrimonios pactados, el novio procedía a un rapto consesuado con la novia con la que quería casarse si no podía pagar el precio del mismo o la familia de ella se oponía a la boda. Por otra parte, algunos de estos raptos ya no son consensuados, sino que se tratan de raptos reales.
  • un amor de clima: el lago Issyk-Kul (el segundo lago de montaña más grande del mundo, tras el Titicaca) tiene gran amplitud térmica, con un mes frío, enero, con medias inferiores a -25ºC, y un mes cálido, julio, con medias superiores a los 45ºC.

Si su bandera no es la más chula del mundo, seguro que está en la final. Los cuarenta rayos de sol representan las cuarenta tribus que se unieron para luchar contra Genghis Khan. La parte central es lo que se ve dentro de una yurta cuando sale el sol.
Y, diga lo que diga el pobre Jose, en flickr he visto cosas que me hacen tenerle envidia.

Jurta - Kyrgyzstan
Jurta - Kyrgyzstan, originally uploaded by zsoolt.