diff options
author | jmallett <jmallett@FreeBSD.org> | 2002-04-29 06:26:12 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2002-04-29 06:26:12 +0000 |
commit | 50116a633cae5d1cd9a6ee1057e29db3ca114275 (patch) | |
tree | faea4f5ce0095ff3271507d1aaad444c2ad0c4b4 /games/fortune | |
parent | d6fb98dc451080d8516b824d9264bdc0540c30ca (diff) | |
download | FreeBSD-src-50116a633cae5d1cd9a6ee1057e29db3ca114275.zip FreeBSD-src-50116a633cae5d1cd9a6ee1057e29db3ca114275.tar.gz |
Add something absurd I used one night as an example of CS overcomplication
of things most hackers take for granted.
Diffstat (limited to 'games/fortune')
-rw-r--r-- | games/fortune/datfiles/fortunes2 | 19 |
1 files changed, 19 insertions, 0 deletions
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 |