Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Apr 1996 13:03:18 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        Brett_Glass@ccgate.infoworld.com, msmith@atrad.adelaide.edu.au
Cc:        hardware@FreeBSD.org, jkh@time.cdrom.com
Subject:   Re: Some solutions to disk problems.... I think.
Message-ID:  <199604050303.NAA13354@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> Here's a suggestion.  Write a function that performs simple string
>> matching using a table of ten IDs.  Write ten functions which each parse
>> for these ID's.  Compare the size of the two.  Repeat the process for
>> twenty, and so on.

>I hope you are jesting! Only the most abysmal programmer would have to
>write ten functions to replace ten table entries.

You'll need the 10 entries at least in comments for checking.

>Seagate alone has several HUNDRED model numbers. In my hard disk guide,
>they go on for PAGES in fine print. And that's just one brand.  Recognizing
>substrings of different lengths, and knowing when to look for suffixes as
>well as the corresponding CDC and Conner model numbers, will be key to
>identifying drives efficiently.

An interesting problem! :-) Given a telephone book sized list of model
numbers, write an is_in_telephone_book(char const *s) function that is
significantly smaller than the strings for the model numbers.  If you
don't want to simply use a (compressed) table of the entries, then you'd
better start by writing test code to prove that there are no false
positive or false negative matches.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604050303.NAA13354>