-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code decomposition question #882
Comments
The idea is that most of these were simple single file programs to start with, so breaking them apart, unless it's only 2 files instead of 1, seems to run counter to the original philosphy behind the books. |
I really disagree strongly with this point. The programs in the book were written the way they were due to the constraints of the time, not some overriding philosophy. And in many cases, they were written by amateurs and weren't even quality examples of BASIC programs. There are so very many resources on the internet to learn the basics of programming. I just can't imagine someone coming here to learn how to write for loops and function calls. If we aren't teaching something useful--something people can actually take away and use in their own projects or at their jobs--then what's the point? |
You can, just keep it as minimal as possible. E.g. don't create a super complex Enterprise Edition implementation that's overengineered. Whatever feels appropriate to the size and scope of these tiny programs.. keep it simple, but certainly, keep it clean too! |
That was kind of what I was driving at. Standard practices of the language without decomposing the code to within an inch of its life. There's a sweet spot to be aimed for, say 3-4 classes/files, not 20-30. As a side note, I tip my hat to @pgruderman who didn't split his infinitive in his opening sentence :) |
I've been looking through some of the csharp versions and some lump all the code into a single
Program.cs
file. While this works, and indeed, is how the originals are organized, it doesn't quite fit the "modern practices" principle for the language.I'm a little conflicted as to which is the 'best' approach for this project. Would anyone object to having separate files for each class, etc.?
The text was updated successfully, but these errors were encountered: