![]() ![]() |
| |||||||||
| Hotspots: Slides and Code TA Corner Comments? Announcements FAQ Static Webspace | ||||||||||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| But even going 1 to 1000 wouldn't really require a program, would it? Isn't it just a one-liner? Move up a level of abstraction in your thinking: WHEN do you write a program, and when don't you? We've talked about it in class on drawing complicated graphics and making specific sounds. Give me the general rule for when you need a program, and when you can just use something like Photoshop. Mark Guzdial |
| Yes, but in general, Red is too common a dominant component in a color. Mark Guzdial |
| That's all true, Summer, but the specific rules we gave in class were that you write a program (a) when you want to communicate the PROCESS (how you got to the result) to someone else and (b) when you want the process to be REPLICABLE by others. People do pretty complex things in Photoshop without writing a program. You OUGHT to write a program if you want to communicate the process or help others to replicate it. Mark Guzdial |
| Very nice! Mark Guzdial |
| Yup. Mark Guzdial |
| But why use a tree rather than an array? Why do we have many directories instead of just one? Mark Guzdial |
| Exactly right – different words than I used before, but this is the same idea. Mark Guzdial |
| A complete path describes a journey down the tree from the root. Mark Guzdial |
| Complexity does suggest writing a program, but people do do complex things in Photoshop, so mere complexity won't get people to do something other than applications software. Mark Guzdial |
| A path is just a journey through the tree. The question is about tree vs. array vs. matrix. Mark Guzdial |
| Objects and modules. Mark Guzdial |
| I didn't get that first sentence. The last sentence is right, but doesn't really explain the difference. Here's a hint: We've just been writing functions in class, right? We used no dot notation. Do you think that writing a method looks much different than writing a function? How so? Mark Guzdial |
| Rebecca, would you like to have ALL your files (I'll bet you have 5,000 or more files on your hard disk) in ONE directory? Why or why not? If you said no, what's the advantage of having a tree structure on your disk? Mark Guzdial |
| No, directories don't have anything to do with processing all the files in a movie. But making things easier to locate is the right idea. Mark Guzdial |
| Try it that way, Brittany. Use a simple definition of functions like "a recipe that tells the computer how to do something," but then explain how methods are special. Mark Guzdial |
| Nice answer on the functions/methods, Sarah, but files aren't actually inside of other files. Mark Guzdial |
| VERY NICE! Yes, trees allow for faster access under some conditions, and are useful for organizing. Mark Guzdial |
| Kelly, you got it. Methods aren't just built into JES. We'll be defining our own methods in just a few weeks. Mark Guzdial |