Algorithms on Strings

I was first exposed to string matching by given to read “Algorithms for Finding Patterns in Strings” back in 1990, when I naively asked Prof. Stathis Zachos something like “How does grep work?”.

Time passed, I became a system administrator and most of my exposure to string matching was through scripts and sysadmin stuff automation. Automata are nice, but Perl and shell brought food to the table.

These memories surfaced because I got to read “Algorithms on Strings” in January thanks to Bill Gasarch. Complete, self-contained and with plain and well understood English, the book covers the subject fulfilling simultaneously the needs of those who want to just read the theory, those who want to see the proofs and those who just want to write code.

The pseudocode in the book is understood by anyone who has ever written a single program in C or Java. It either introduces new functions or makes use of others previously defined. This may make it a little difficult at first for people who need to write something described in, for example, chapter six and may find themselves reading from chapter one up to six. In this process the book manages to educate even the programmer who does not care about theory not only about how to do certain functions, but why they are done the way they are. As a plus, references to appropriate Unix shell tools (e.g. diff) are given when appropriate.

A really impressive book, definitely worth your time! A book that you can use both to learn about stuff and as a reference.

The Kirsch postulate

In “An undetected error“†, Russell A. Kirsch states “the Kirsch postulate”:

All computers are always, in some sense, “broken.”

How he reached to that assertion is an interesting story that includes moving the SEAC, a logic (wiring) error found out during the move and a lot of debugging that really missed the error.


[†] – “Letters,” Computer, Vol. 42, 04, pp. 6-7, April, 2009.

log

Ήθελα να σχολιάσω το άρθρο αυτό καιρό τώρα:

“Ανάμεσα σε άλλους λόγους, γιατί οι άνθρωποι φέρουν τη γνώση του οργανισμού η οποία είναι πολύτιμη, σπάνια, και άρα, αναντικατάστατη. Μάλιστα πολλές φορές, η γνώση υπάρχει σε μια επιχείρηση σε τόσο αφηρημένη μορφή που δεν μπορεί να κωδικοποιηθεί και να αποθηκευτεί σε μια βάση δεδομένων και άρα να ξαναχρησιμοποιηθεί στο μέλλον.”

Κι όμως, υπάρχουν χώροι (π.χ. Αρχαιολόγοι) που το πρόβλημα αυτό έχει μια, μερική έστω, λύση. Τη λένε ημερολόγιο. Και πράγματι μια τέτοια λύση είναι μερική γιατί ένας άνθρωπος μπορεί να γράφει 10 σελίδες το μήνα και άλλος 10 την εβδομάδα και ταυτόχρονα και η ποιότητα να διαφέρει από γραπτό σε γραπτό, αλλά το ημερολόγιο εξασφαλίζει την παραμονή κάποιας πληροφορίας. Και εάν έχει φροντίσει ο οργανισμός να διαμορφωθεί η κατάλληλη κουλτούρα (ανάγνωση από συναδέλφους, αναφορά σε αυτά εάν υπάρχει κάποιο πρόβλημα προς επίλυση, κ.λπ.) αυτά είναι διαχειρίσιμα προβλήματα.

Το πραγματικό πρόβλημα είναι όμως πως οι information workers δεν έχουν μάθει να δουλεύουν έτσι:

  • Θα γράψουμε documentation αργότερα
  • Θα γράψουμε τα σχόλια στον κώδικα αργότερα
  • Ο κώδικάς μου είναι self-documented, δε χρειάζεται σχόλια

Αργότερα. Όλα αργότερα. Όταν θα έχουμε χρόνο. Μόνο που χρόνο δεν έχουμε ποτέ, γιατί το επόμενο project χτυπάει την πόρτα (ή τη χτυπάμε εμείς φεύγοντας).

blank Subject:

Subject: line occurrences

The graph above (click it to see the full image) displays the occurrences of Subject: lines within a week, for emails that went through an auxiliary outgoing / filtering mail server, set up specifically to deal with a spam outbreak that affected our customers. They were all about pain-killers and other “enhancements”, making it easy to write quick filters on the spot, with the exception of #66, the blank Subject: line.

[ Update: The above means that for that week the most common non-spam outgoing email subject was the blank subject. Some more numbers: 196493 messages passed through that system. The most common spam subject appeared 3588 times. 679 messages had blank subjects. 5 had “(no subject)” as subject. 6707 messages had subjects that appeared less than 100 times each. 5628 of them I would not classify as spam based on the subject line. So 10.7% of the messages that could not be considered as spam based on their subject’s content had empty subject lines. ]

It seems that people are still sending emails without a Subject: line. Although this seems weird to me, to a lot of others it is perfectly natural. Am I alone in believing that one should not send subject-less emails?

1981/02/09

Χτες ήταν η θλιβερή επέτειος. Χάρη στο ψηφιακό αρχείο της Αθλητικής Ηχούς είναι εύκολο να δει κανείς πως καλύφθηκε η τραγωδία από τις πρώτες κιόλας στιγμές. “Η μεγαλύτερη αθλητική τραγωδία του τόπου μας”, Αθλητική Ηχώ, 1981/02/09, σελίδες 1 και 8. Χρειάζεται DjVu.

nslookup

Από το INBOX μου:

Γιώργο,
Μπορώ να κάνω nslookup χρησιμοποιώντας άλλον dns π.χ. dns1.ΧΧΧΧ.gr ;

Παλιά μπορούσα αλλά τώρα δεν μπορώ από κανέναν άλλο να δω πλην από ΥΥΥΥ. Γνωρίζεις κάτι;

Οι περισσότεροι ISP δεν επιτρέπουν recursive queries στους DNS servers τους “έξω” από το δίκτυό τους. Το (φιλικό) Internet όπως το μάθαμε έχει τελειώσει. Οπότε η αμέσως καλύτερη επιλογή είναι οι server του Google:

– 8.8.8.8 και
– 8.8.4.4

και όχι μόνο για DNS lookups, αλλά και για traceroute και ping.

The need for discipline

A major point of David Greer‘s talk at AIFS was the hyper-connectedness of people. Most computing professionals are already hyper-connected and most connected people will be in less than five years. Hyper-connectedness here is used in the context that people use a lot of different devices to connect to the Internet, their home computer, their work, access resources and do whatever they want to do by using these facilities remotely. They have many interfaces to the Cyberspace.

So now the attack vector expands: “you or your child uses your home computer to share information through social networks or email and through this process may infect the computer with a virus. You then could use this computer to “work from home” and indirectly infect a work related file or through network connections, infect your corporate workstation”. Interestingly (inspired by a friend who advocates “people get hacked and not machines”) I had blogged about such a possibility back in 2007.

@gkoutep tells me, for quite some time now, that we are to expect “single target” attacks. The need for discipline for us who use different devices to connect to networks that we manage and/or the Internet is more than pressing: Shall we connect to our corporate network using a friend’s computer in case of an emergency? Although most systems now boot from USB drives (which avoids the possibility of an infected host system) what about our friend’s home network? Will “proper procedures” for exceptions be followed, or should one wait until being in front of a better controlled terminal?

While in the “old days” we could relax temporarily some restrictions in favor of convenience, friendship (being friends with the BOFH could result in exceptions) or emergency, this is no more. (Digital) Trust is not what it used to be (or what we believed we could get away with when bending the rules).

We live in a hyper-connected world aiming to facilitate everybody’s daily stuff, but will the need for discipline and caution lead system administrators (and other computing professionals) to start de-hyper-connecting?