From 50116a633cae5d1cd9a6ee1057e29db3ca114275 Mon Sep 17 00:00:00 2001 From: jmallett Date: Mon, 29 Apr 2002 06:26:12 +0000 Subject: Add something absurd I used one night as an example of CS overcomplication of things most hackers take for granted. --- games/fortune/datfiles/fortunes2 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'games') diff --git a/games/fortune/datfiles/fortunes2 b/games/fortune/datfiles/fortunes2 index e9c39f8..9401a9b 100644 --- a/games/fortune/datfiles/fortunes2 +++ b/games/fortune/datfiles/fortunes2 @@ -6056,6 +6056,25 @@ President: "Hah!! The computer is wrong. My father died over twenty Computer: Your mother's husband died 22 years ago. Your father just landed a twelve pound bass. % +A computer science student and a practical hacker are discussing problems +the computer science student has run in to. + +CS Student: I have this singularly linked tail-queued list and I'm trying + to make it O(1) to go backwards an item, instead of O(n)... + What's the best way to go about that? Should I just use a + cached hash of each item and put it into a sorted lookup + table, and cache the hash of the last item in the current + queue entry and then go to its place in the hash table and + get the pointer value from there? +Hacker: No, you should add an item to the structure named 'prev' and + make it point to the previous item. +CS Student: But we already have a structure element with that identifier + and structure elements must have unique names within that + scope! +Hacker: So call it 'previous'. + +And then the CS Student was enlightened. +% A computer scientist is someone who fixes things that aren't broken. % A computer without COBOL and Fortran is like a piece of chocolate -- cgit v1.1