|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I seem to be having a mentally bad period lately . My code is beginning
to be terrible convoluted mess, and I shudder to think what it will be like to go back in a couple months and try to follow it, so I'm going back to basics. I need to flowchart what I'm doing. The problem is I can't seem to find anything that works well,and doesn't cost an arm and leg. I have an old copy of Smart Draw, but it's out dated and does not work right on WinXP. I seem to remember Nassi-Shneiderman Diagrams were intended to be implemented via word processors, but I haven't done one in 30 years. So, does anyone flowchart anymore? If so what do you use/suggest? |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
William Gill wrote:
> I seem to be having a mentally bad period lately . My code is beginning > to be terrible convoluted mess, and I shudder to think what it will be > like to go back in a couple months and try to follow it, so I'm going > back to basics. I need to flowchart what I'm doing. The problem is I > can't seem to find anything that works well,and doesn't cost an arm and > leg. I have an old copy of Smart Draw, but it's out dated and does not > work right on WinXP. I seem to remember Nassi-Shneiderman Diagrams were > intended to be implemented via word processors, but I haven't done one > in 30 years. > > So, does anyone flowchart anymore? If so what do you use/suggest? No. flowcharts and Nassi diagrams were meant for procedural programming. They come from the time that a program was a "recipe", starting at line 1 and going all the way to line 3456821. I never understood Nassi diagrams: they are extremely hard to read and even harder to draw. I can make a program in 1% of the time it would cost me to make the corresponding Nassi diagram. And afterwards, only the program can be corrected... I draw UML diagrams for the parts that need them and put them in my unit tests (along with other documentation). So every time you run the tests, you see that the code is documented. The rest of my documentation accompanies the code or is in the code itself. My code should be self-explanatory, and if not, the documentation is in the appropriate section of the module in subversion. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Sun, 15 Jun 2008 12:58:33 -0400, William Gill wrote:
> I seem to be having a mentally bad period lately . My code is > beginning to be terrible convoluted mess, and I shudder to think > what it will be like to go back in a couple months and try to follow > it, so I'm going back to basics. I need to flowchart what I'm doing. > The problem is I can't seem to find anything that works well,and > doesn't cost an arm and leg. I have an old copy of Smart Draw, but > it's out dated and does not work right on WinXP. I seem to remember > Nassi-Shneiderman Diagrams were intended to be implemented via word > processors, but I haven't done one in 30 years. > > So, does anyone flowchart anymore? If so what do you use/suggest? I do. I have a nice plastic template that says it was made in 1975, and a box of cheap mechanical pencils. Two or three redraws and I've usually got things well enough organized to move on to writing code. Flowcharting software just mades it too easy to amend the chart to match the code, and then end up with spagetti programs and spagetti charts to match. -- _ o |/) |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
Peter H. Coffin wrote:
> > I do. I have a nice plastic template that says it was made in 1975, > and a box of cheap mechanical pencils. Two or three redraws and I've > usually got things well enough organized to move on to writing code. > Flowcharting software just mades it too easy to amend the chart to match > the code, and then end up with spagetti programs and spagetti charts to > match. > How old school! I've got a couple of those around somewhere, if I can just remember where I used them last. Ah! Here they are. What's this about punched tape and punched cards? Talk about old school. |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
William Gill wrote:
> I seem to be having a mentally bad period lately . My code is beginning > to be terrible convoluted mess, and I shudder to think what it will be > like to go back in a couple months and try to follow it, so I'm going > back to basics. I need to flowchart what I'm doing. The problem is I > can't seem to find anything that works well,and doesn't cost an arm and > leg. I have an old copy of Smart Draw, but it's out dated and does not > work right on WinXP. I seem to remember Nassi-Shneiderman Diagrams were > intended to be implemented via word processors, but I haven't done one > in 30 years. > > So, does anyone flowchart anymore? If so what do you use/suggest? I'm with Dikkie. I design and document the design before writing code. But I do it using OO methodologies. I may not have a complete detailed spec for every single class - i.e. database-related classes may have some shortcuts. But I still document first, code later. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
on 06/15/2008 01:58 PM William Gill said the following:
> I seem to be having a mentally bad period lately . My code is beginning > to be terrible convoluted mess, and I shudder to think what it will be > like to go back in a couple months and try to follow it, so I'm going > back to basics. I need to flowchart what I'm doing. The problem is I > can't seem to find anything that works well,and doesn't cost an arm and > leg. I have an old copy of Smart Draw, but it's out dated and does not > work right on WinXP. I seem to remember Nassi-Shneiderman Diagrams were > intended to be implemented via word processors, but I haven't done one > in 30 years. > > So, does anyone flowchart anymore? If so what do you use/suggest? I think the problem is that you are focusing in code rather than in the project. -- Regards, Manuel Lemos PHP professionals looking for PHP jobs http://www.phpclasses.org/professionals/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
Manuel Lemos wrote:
> on 06/15/2008 01:58 PM William Gill said the following: >> I seem to be having a mentally bad period lately . My code is beginning >> to be terrible convoluted mess, and I shudder to think what it will be >> like to go back in a couple months and try to follow it, so I'm going >> back to basics. I need to flowchart what I'm doing. The problem is I >> can't seem to find anything that works well,and doesn't cost an arm and >> leg. I have an old copy of Smart Draw, but it's out dated and does not >> work right on WinXP. I seem to remember Nassi-Shneiderman Diagrams were >> intended to be implemented via word processors, but I haven't done one >> in 30 years. >> >> So, does anyone flowchart anymore? If so what do you use/suggest? > > I think the problem is that you are focusing in code rather than in the > project. > > The design is the way you ensure the code matches the requirements of the project. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
Hello,
on 06/15/2008 01:58 PM William Gill said the following: > I seem to be having a mentally bad period lately . My code is beginning > to be terrible convoluted mess, and I shudder to think what it will be > like to go back in a couple months and try to follow it, so I'm going > back to basics. I need to flowchart what I'm doing. The problem is I > can't seem to find anything that works well,and doesn't cost an arm and > leg. I have an old copy of Smart Draw, but it's out dated and does not > work right on WinXP. I seem to remember Nassi-Shneiderman Diagrams were > intended to be implemented via word processors, but I haven't done one > in 30 years. > > So, does anyone flowchart anymore? If so what do you use/suggest? I think the problem is that you are focusing in code rather than in the project. Flow charts may be OK for trivial projects, but for larger projects you need to specify and plan the implementation before you start or else you will stumble into many needs that were not anticipated, and may make you take a different approach. Traditional good practices are proposed by RUP (Rational Unified Project) on which you can plan your project in implementation in terms of use cases. Before you ever get to the code, it is useful to draw some use case diagrams or sequence diagrams. Then you can narrow the details by documenting the use case steps, exceptional situations that you need to handle, pre-conditions, post-conditions, etc. Then you finally can start modeling you application data objects and write code to implement the use cases. Personally I use a methodology named Use Case Mapping to depart from use case documentation to a PHP project implementation. You may want to read this article about the subject. If you are not familiar with concepts such as UML, Use Cases, RUP, etc., this document gives you a good overview on the subject as well describes a practical implementation. http://www.meta-language.net/metastorage-example.html As for modeling tools, I recommend any good UML tool. UML defines a set of visual artifacts to describe your application diagrams, such as use case diagrams, sequence diagrams, class diagrams, entity-relationship diagrams, etc.. Under Linux I use Umbrello. Umbrello can also run on Windows and Mac using a KDE installation for those systems. http://uml.sourceforge.net/index.php I think there are other free UML tools for Windows and Mac based in Java like Poseidon. http://www.gentleware.com/products.html -- Regards, Manuel Lemos PHP professionals looking for PHP jobs http://www.phpclasses.org/professionals/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ |
|
![]() |
| Outils de la discussion | |
|
|