flat assembler
Message board for the users of flat assembler.
Index
> Projects and Ideas > Principles for creating multi-developer programs with fasm Goto page Previous 1, 2 |
Author |
|
revolution 28 Dec 2009, 14:42
The idea if self compilation does not stop one also having whatever hierarchy you want. Each file still has its own includes that it must have. If it doesn't compile then you have forgotten to include something.
|
|||
28 Dec 2009, 14:42 |
|
booter 29 Dec 2009, 01:12
revolution wrote: The idea if self compilation does not stop one also having whatever hierarchy you want. Each file still has its own includes that it must have. If it doesn't compile then you have forgotten to include something. Suppose you have modules A,B,C,D. B, C, D depend on A. C and D depend on B, but not on each other. Test programs would be TestA includes A TestB includes A and B TestC includes A,B,C TestD includes A,B,D Application that needs functionality from all modules includes A,B,C,D or A,B,D,C One can also create TestAll testing program that includes all existing modules in proper order to detect incompatibilities. "Test"-programs are very important because they demonstrate functionality of the modulees and provide a reference for usage. Usually I develop new module along with writing corresponding "Test"-program. That allows me to test and debug module functionality during its development. I create a batch that compiles the test program and runs it if it compiles with no errors. I guess you start with writing module in full (though compile it during development) and only then write a test program and begin debugging. That's different development style, which of course is a personal preference. However, I would say that compilation without execution doesn't make much sense in assembly because it provides virtually no assurance the code would work (wich is not the case with hi-level languages). BTW, talking about modularity. Do you think it's hard to create macros to hide module internals? I mean something like this Code: MODULE ModuleName, list of exported names ; module body ENDM |
|||
29 Dec 2009, 01:12 |
|
revolution 29 Dec 2009, 01:59
booter wrote: However, I would say that compilation without execution doesn't make much sense in assembly because it provides virtually no assurance the code would work (wich is not the case with hi-level languages). A needs B, and B needs C. So A includes B and should not have to know that B needs C. Because if B then changes and now needs D and not C then you don't want to have to go back and edit A to remove C and include D. Changing module B should not affect other code that needs to include B. What if you forgot that module X also includes B and fail to edit module X also to change from C to D? What if you come back 6 months later and wonder why A includes C (or D) when A doesn't use C? It gets messy when you require other code to include stuff that your module needs. |
|||
29 Dec 2009, 01:59 |
|
revolution 29 Dec 2009, 02:08
booter wrote: Do you think it's hard to create macros to hide module internals? |
|||
29 Dec 2009, 02:08 |
|
booter 01 Jan 2010, 00:44
revolution wrote:
You suppose that choise of which modules can/should be used is up to developer of the moule. Though that's common practice, I highly discorage it. In my opinion, program/system structure (modules, their functions and dependences) should be definned by the system architect (may be se same person, though). With this approach discovery that ("B then changes and now needs D and not C") means faulty design of the system and most probably would require massive changes anyway. I require all dependences of the modules to be well defined beforehead and that makes it natural to have all "include" statements in one place and ordered properly. With my approach the module itself does not care about the structure of dependences. If this module is included in a "wrong" place (i.e. includes are not ordered properly) you get compilation error. |
|||
01 Jan 2010, 00:44 |
|
revolution 01 Jan 2010, 01:38
For a multi-developer project (which is what these principles were meant to cover) the communication overhead needs to be kept small else errors will easily creep in. booter, in your scenario, If module B (developed by person B) is changed to be more efficient (or something) then person B then has to communicate that to person A to change things in another module not controlled be person B. And what if person B is not aware that module X also needs changing? Things start to get confusing.
When I include 'gdi32.dll" in a windows program I don't have to care that gdi32 also needs user32 and kernel32 etc. I just only include gdi32 and never need to concern myself with how gdi32 does its job. You have to trust the people you assign jobs to else why assign the job at all. |
|||
01 Jan 2010, 01:38 |
|
Borsuc 02 Jan 2010, 20:02
yeah revolution, but if they take more time to be more organized, then the project would attract more newcomers (to code) which otherwise would get terribly confused at the code without knowing the details.
|
|||
02 Jan 2010, 20:02 |
|
booter 03 Jan 2010, 09:23
revolution wrote: For a multi-developer project (which is what these principles were meant to cover) the communication overhead needs to be kept small else errors will easily creep in. booter, in your scenario, If module B (developed by person B) is changed to be more efficient (or something) then person B then has to communicate that to person A to change things in another module not controlled be person B. And what if person B is not aware that module X also needs changing? Things start to get confusing. Things start to get confusing when you introduce changes without providing backward compatibility. Changes inside the module should never require changes anywhere else. Freedom to include whatever you want/need leads to progressively less manageable system (as it happened with MS Windows), see http://www.windows-now.com/blogs/robert/mark-russinovich-explains-minwin-once-and-for-all.aspx |
|||
03 Jan 2010, 09:23 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.