For the most part, dictionaries seem like a stepping stone from lists of lists / tuples towards full databases. The use of keys reminds me of primary and foreign keys from database design, except these are meant to be readable and descriptive. At first I wasn’t sure what I would want to use dictionaries for that I couldn’t do with lists of lists, but as we explored them more in class, their uses for large, sprawling data projects became more apparent to me. For building a deck of cards? Typing out a list of lists would probably take about the same amount of time as typing out a series of nested dictionaries for each card. But, for larger projects where you may have to keep track of much more data, with much more nesting of tuples and lists, using dictionaries would definitely save some headaches in the long run. Once you have to remember the specific indexes of different points of data two or three levels down, the ability to label that data with dictionary keys will be immensely helpful. What else do I know about dictionaries at this point? The issue of them reorganizing the order of their data each time is interesting. Not a problem in the long run, since if you want to pull data from them, you can always target what you want with keys, and if you want to build a table, you can pull the data out of the dictionary and order it yourself as a string separated by tabs. Moving forward, I think what I’d most like to learn more about is the set of functions which can be run on a dictionary. Hopefully the textbook chapter covers some of this, and I will probably just try things out in trinket as well, to see what can be done.
Sam's Dictionary Reflection
by Samuel Robinson
Sam Robinson is a second-year MSLS student at UNC Chapel Hill's School of Information and Library Science. Find Samuel Robinson on Twitter, Github, and on the web.