duckduckgo/zeroclickinfo-goodies — pull request #657 by tommytommytommy (2014-09-28 03:26:57+00:00)
Title: Added CUSIP Check Digit Validation Goodie

**What does your Instant Answer do?**
Validates the check digit for a CUSIP ID, which is a unique 9-digit number associated with various stock market tickers.

**What problem does your Instant Answer solve (Why is it better than organic links)?**
CUSIP IDs are not generally available by search. Another user suggested that a check tool could be useful in the instant answer ideas forum.

**What is the data source for your Instant Answer? (Provide a link if possible)**
No data source required. The algorithm/pseudo-code that this IA uses is described in Wikipedia:
https://en.wikipedia.org/wiki/CUSIP

**Why did you choose this data source?**
This Instant Answer does not use an external data source.

**Are there any other alternative (better) data sources?**
This Instant Answer does not use an external data source.

**What are some example queries that trigger this Instant Answer?**
To validate Apple's CUSIP ID, use cusip 037833100
To validate one of Google's CUSIP IDs, use cusip 38259P706

**Which communities will this Instant Answer be especially useful for? (gamers, book lovers, etc)**
Finance/business

**Is this Instant Answer connected to a DuckDuckHack [Instant Answer idea](https://duck.co/ideas)?**
Yes; this pull request addresses the suggestion at https://duck.co/ideas/idea/611/cusip-check-digit-calculator

**Which existing Instant Answers will this one supercede/overlap with?**
None that I am aware of, although there is another "CUSIP" branch that features a solution based on the Business CPAN library

**Are you having any problems? Do you need our help with anything?**
It would be great to hear your feedback on any coding practices that I could change to better fit DuckDuckGo's coding style; in particular, I am curious if you prefer to handle constants, "switch"-style statements, and the declaration of indices for iterative loops in a different manner than what I have done.

**Where did you hear about DuckDuckHack? (For first time contributors)**
I subscribe to your newsletter and learned about your open source project after following the P.P.S. about hiring in newsletter #54.

**What does the Instant Answer look like? (Provide a screenshot for new or updated Instant Answers)**
![Screenshot of CUSIP query](https://cloud.githubusercontent.com/assets/5326740/4433107/b87c63fe-46be-11e4-9e2d-cd7891853bc1.png)

## Checklist
Please place an 'X' where appropriate.
(I developed on the Ubuntu virtual machine and was only able to test on that singular platform; additionally, I did not format the answer with any HTML/CSS/Javascript.)

```
[X] Added metadata and attribution information
[X] Wrote test file and added to t/ directory
[] Verified that instant answer adheres to design guidelines (https://duck.co/duckduckhack/design_styleguide)
[X] Verified that instant answer adheres to code styleguide (https://duck.co/duckduckhack/code_styleguide)
[] Tested cross-browser compatibility

Please let us know which browsers/devices you've tested on:
- Windows 8
[] Google Chrome
[] Firefox
[] Opera
[] IE 10

- Windows 7
[] Google Chrome
[] Firefox
[] Opera
[] IE 8
[] IE 9
[] IE 10

- Windows XP
[] IE 7
[] IE 8

- Mac OSX
[] Google Chrome
[] Firefox
[] Opera
[] Safari

- iOS (iPhone)
[] Safari Mobile
[] Google Chrome
[] Opera

- iOS (iPad)
[] Safari Mobile
[] Google Chrome
[] Opera

- Android
[] Firefox
[] Native Browser
[] Google Chrome
[] Opera
```