[Edu-sig] a non-rhetorical question
kirby urner
kirby.urner at gmail.com
Thu Jul 12 05:49:33 CEST 2007
On 7/11/07, Kevin Driscoll <driscollkevin at gmail.com> wrote:
> Three years ago, I was definitely on the lexical path and would have
> expected students to be able to answer Andy's question after a couple
> class meetings. However, in my most recent course, I used PyGame and
> exposed students to object-oriented data structures first and logic /
> algorithms second.
Hi Kevin --
You latter approach sounds more similar to mine.
On the subject of data structures, I also recommend providing them
with some large pre-populated ones to play with i.e. already filled with
substantial "real world" content.
One might think it makes no difference just going {'foo':'bar'} all
the time i.e. using little "meaningless" constructs so we can just
study the object's API.
But especially for newbies we're trying to recruit for the longer haul,
I think it adds another dimension to get to play with something like this:
cities = {
'Albany, N.Y.': [(42, 40, 'N'), (73, 45, 'W')],
'Albuquerque, N.M.': [(35, 5, 'N'), (106, 39, 'W')],
'Amarillo, Tex.': [(35, 11, 'N'), (101, 50, 'W')],
'Anchorage, Alaska': [(61, 13, 'N'), (149, 54, 'W')],
'Atlanta, Ga.': [(33, 45, 'N'), (84, 23, 'W')],
'Austin, Tex.': [(30, 16, 'N'), (97, 44, 'W')],
'Baker, Ore.': [(44, 47, 'N'), (117, 50, 'W')],
'Baltimore, Md.': [(39, 18, 'N'), (76, 38, 'W')],
'Bangor, Maine': [(44, 48, 'N'), (68, 47, 'W')],
'Birmingham, Ala.': [(33, 30, 'N'), (86, 50, 'W')],
'Bismarck, N.D.': [(46, 48, 'N'), (100, 47, 'W')],
'Boise, Idaho': [(43, 36, 'N'), (116, 13, 'W')],
'Boston, Mass.': [(42, 21, 'N'), (71, 5, 'W')],
'Buffalo, N.Y.': [(42, 55, 'N'), (78, 50, 'W')],
'Calgary, Alba., Can.': [(51, 1, 'N'), (114, 1, 'W')],
'Carlsbad, N.M.': [(32, 26, 'N'), (104, 15, 'W')],
'Charleston, S.C.': [(32, 47, 'N'), (79, 56, 'W')],
'Charleston, W. Va.': [(38, 21, 'N'), (81, 38, 'W')],
'Charlotte, N.C.': [(35, 14, 'N'), (80, 50, 'W')],
'Cheyenne, Wyo.': [(41, 9, 'N'), (104, 52, 'W')],
'Chicago, Ill.': [(41, 50, 'N'), (87, 37, 'W')],
'Cincinnati, Ohio': [(39, 8, 'N'), (84, 30, 'W')],
'Cleveland, Ohio': [(41, 28, 'N'), (81, 37, 'W')],
'Columbia, S.C.': [(34, 0, 'N'), (81, 2, 'W')],
'Columbus, Ohio': [(40, 0, 'N'), (83, 1, 'W')],
'Dallas, Tex.': [(32, 46, 'N'), (96, 46, 'W')],
'Denver, Colo.': [(39, 45, 'N'), (105, 0, 'W')],
'Des Moines, Iowa': [(41, 35, 'N'), (93, 37, 'W')],
'Detroit, Mich.': [(42, 20, 'N'), (83, 3, 'W')],
'Dubuque, Iowa': [(42, 31, 'N'), (90, 40, 'W')],
'Duluth, Minn.': [(46, 49, 'N'), (92, 5, 'W')],
'Eastport, Maine': [(44, 54, 'N'), (67, 0, 'W')],
'Edmonton, Alb., Can.': [(53, 34, 'N'), (113, 28, 'W')],
'El Centro, Calif.': [(32, 38, 'N'), (115, 33, 'W')],
'El Paso, Tex.': [(31, 46, 'N'), (106, 29, 'W')],
'Eugene, Ore.': [(44, 3, 'N'), (123, 5, 'W')],
'Fargo, N.D.': [(46, 52, 'N'), (96, 48, 'W')],
'Flagstaff, Ariz.': [(35, 13, 'N'), (111, 41, 'W')],
'Fort Worth, Tex.': [(32, 43, 'N'), (97, 19, 'W')],
'Fresno, Calif.': [(36, 44, 'N'), (119, 48, 'W')],
'Grand Junction, Colo.': [(39, 5, 'N'), (108, 33, 'W')],
'Grand Rapids, Mich.': [(42, 58, 'N'), (85, 40, 'W')],
'Havre, Mont.': [(48, 33, 'N'), (109, 43, 'W')],
'Helena, Mont.': [(46, 35, 'N'), (112, 2, 'W')],
'Honolulu, Hawaii': [(21, 18, 'N'), (157, 50, 'W')],
'Hot Springs, Ark.': [(34, 31, 'N'), (93, 3, 'W')],
'Houston, Tex.': [(29, 45, 'N'), (95, 21, 'W')],
'Idaho Falls, Idaho': [(43, 30, 'N'), (112, 1, 'W')],
'Indianapolis, Ind.': [(39, 46, 'N'), (86, 10, 'W')],
'Jackson, Miss.': [(32, 20, 'N'), (90, 12, 'W')],
'Jacksonville, Fla.': [(30, 22, 'N'), (81, 40, 'W')],
'Juneau, Alaska': [(58, 18, 'N'), (134, 24, 'W')],
'Kansas City, Mo.': [(39, 6, 'N'), (94, 35, 'W')],
'Key West, Fla.': [(24, 33, 'N'), (81, 48, 'W')],
'Kingston, Ont., Can.': [(44, 15, 'N'), (76, 30, 'W')],
'Klamath Falls, Ore.': [(42, 10, 'N'), (121, 44, 'W')],
'Knoxville, Tenn.': [(35, 57, 'N'), (83, 56, 'W')],
'Las Vegas, Nev.': [(36, 10, 'N'), (115, 12, 'W')],
'Lewiston, Idaho': [(46, 24, 'N'), (117, 2, 'W')],
'Lincoln, Neb.': [(40, 50, 'N'), (96, 40, 'W')],
'London, Ont., Can.': [(43, 2, 'N'), (81, 34, 'W')],
'Long Beach, Calif.': [(33, 46, 'N'), (118, 11, 'W')],
'Los Angeles, Calif.': [(34, 3, 'N'), (118, 15, 'W')],
'Louisville, Ky.': [(38, 15, 'N'), (85, 46, 'W')],
'Manchester, N.H.': [(43, 0, 'N'), (71, 30, 'W')],
'Memphis, Tenn.': [(35, 9, 'N'), (90, 3, 'W')],
'Miami, Fla.': [(25, 46, 'N'), (80, 12, 'W')],
'Milwaukee, Wis.': [(43, 2, 'N'), (87, 55, 'W')],
'Minneapolis, Minn.': [(44, 59, 'N'), (93, 14, 'W')],
'Mobile, Ala.': [(30, 42, 'N'), (88, 3, 'W')],
'Montgomery, Ala.': [(32, 21, 'N'), (86, 18, 'W')],
'Montpelier, Vt.': [(44, 15, 'N'), (72, 32, 'W')],
'Montreal, Que., Can.': [(45, 30, 'N'), (73, 35, 'W')],
'Moose Jaw, Sask., Can.': [(50, 37, 'N'), (105, 31, 'W')],
'Nashville, Tenn.': [(36, 10, 'N'), (86, 47, 'W')],
'Nelson, B.C., Can.': [(49, 30, 'N'), (117, 17, 'W')],
'New Haven, Conn.': [(41, 19, 'N'), (72, 55, 'W')],
'New Orleans, La.': [(29, 57, 'N'), (90, 4, 'W')],
'New York, N.Y.': [(40, 47, 'N'), (73, 58, 'W')],
'Newark, N.J.': [(40, 44, 'N'), (74, 10, 'W')],
'Nome, Alaska': [(64, 25, 'N'), (165, 30, 'W')],
'Oakland, Calif.': [(37, 48, 'N'), (122, 16, 'W')],
'Oklahoma City, Okla.': [(35, 26, 'N'), (97, 28, 'W')],
'Omaha, Neb.': [(41, 15, 'N'), (95, 56, 'W')],
'Ottawa, Ont., Can.': [(45, 24, 'N'), (75, 43, 'W')],
'Philadelphia, Pa.': [(39, 57, 'N'), (75, 10, 'W')],
'Phoenix, Ariz.': [(33, 29, 'N'), (112, 4, 'W')],
'Pierre, S.D.': [(44, 22, 'N'), (100, 21, 'W')],
'Pittsburgh, Pa.': [(40, 27, 'N'), (79, 57, 'W')],
'Portland, Maine': [(43, 40, 'N'), (70, 15, 'W')],
'Portland, Ore.': [(45, 31, 'N'), (122, 41, 'W')],
'Providence, R.I.': [(41, 50, 'N'), (71, 24, 'W')],
'Quebec, Que., Can.': [(46, 49, 'N'), (71, 11, 'W')],
'Raleigh, N.C.': [(35, 46, 'N'), (78, 39, 'W')],
'Reno, Nev.': [(39, 30, 'N'), (119, 49, 'W')],
'Richfield, Utah': [(38, 46, 'N'), (112, 5, 'W')],
'Richmond, Va.': [(37, 33, 'N'), (77, 29, 'W')],
'Roanoke, Va.': [(37, 17, 'N'), (79, 57, 'W')],
'Sacramento, Calif.': [(38, 35, 'N'), (121, 30, 'W')],
'Salt Lake City, Utah': [(40, 46, 'N'), (111, 54, 'W')],
'San Antonio, Tex.': [(29, 23, 'N'), (98, 33, 'W')],
'San Diego, Calif.': [(32, 42, 'N'), (117, 10, 'W')],
'San Francisco, Calif.': [(37, 47, 'N'), (122, 26, 'W')],
'San Jose, Calif.': [(37, 20, 'N'), (121, 53, 'W')],
'San Juan, P.R.': [(18, 30, 'N'), (66, 10, 'W')],
'Santa Fe, N.M.': [(35, 41, 'N'), (105, 57, 'W')],
'Savannah, Ga.': [(32, 5, 'N'), (81, 5, 'W')],
'Seattle, Wash.': [(47, 37, 'N'), (122, 20, 'W')],
'Shreveport, La.': [(32, 28, 'N'), (93, 42, 'W')],
'Sioux Falls, S.D.': [(43, 33, 'N'), (96, 44, 'W')],
'Sitka, Alaska': [(57, 10, 'N'), (135, 15, 'W')],
'Spokane, Wash.': [(47, 40, 'N'), (117, 26, 'W')],
'Springfield, Ill.': [(39, 48, 'N'), (89, 38, 'W')],
'Springfield, Mass.': [(42, 6, 'N'), (72, 34, 'W')],
'Springfield, Mo.': [(37, 13, 'N'), (93, 17, 'W')],
'St. John, N.B., Can.': [(45, 18, 'N'), (66, 10, 'W')],
'St. Louis, Mo.': [(38, 35, 'N'), (90, 12, 'W')],
'Syracuse, N.Y.': [(43, 2, 'N'), (76, 8, 'W')],
'Tampa, Fla.': [(27, 57, 'N'), (82, 27, 'W')],
'Toledo, Ohio': [(41, 39, 'N'), (83, 33, 'W')],
'Toronto, Ont., Can.': [(43, 40, 'N'), (79, 24, 'W')],
'Tulsa, Okla.': [(36, 9, 'N'), (95, 59, 'W')],
'Vancouver, B.C., Can.': [(49, 13, 'N'), (123, 6, 'W')],
'Victoria, B.C., Can.': [(48, 25, 'N'), (123, 21, 'W')],
'Virginia Beach, Va.': [(36, 51, 'N'), (75, 58, 'W')],
'Washington, D.C.': [(38, 53, 'N'), (77, 2, 'W')],
'Wichita, Kan.': [(37, 43, 'N'), (97, 17, 'W')],
'Wilmington, N.C.': [(34, 14, 'N'), (77, 57, 'W')],
'Winnipeg, Man., Can.': [(49, 54, 'N'), (97, 7, 'W')]}
Feel free to use it. It'd be cool to have a large repository
of pre-filled data structures e.g. every bone in the body,
animals paired with their latin names, whatever.
Some could be simple lists, others more nested like above,
which contains lists of tuples in a dictionary with strings
for keys.
One thing I did almost on the first day with the above
structure is convert it to XML, not because I wanted them
to understand the code (even though it's short) but
because I wanted them to start eyeballing XML as yet
another way to store structured data.
Kirby
More information about the Edu-sig
mailing list