in reply to A Love/Hate Relationship - A Long Time Newbie's Current Block
At this point I don't clutter the design with implementation details, like when do I open or close files. Since the design is not too complex, I'd start to think about how to implement parts of this. Things like "lookup id in a list" bring to mind using hashes since they are designed for fast lookup of single items (see Abigail-IIs example). You could of course use arrays or "if" statements for the "list", and if you have learned other progamming languages before, this might be your first inclination. This is why when learning a new language, I try to examine examples of (good) code written in that language. It just makes understanding this kind of mental association much easier when it comes time to implement code.read in each user record (first,last,id) lookup id in a list of id's to determine output file print user record to correct output file end read loop
|
|---|