Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Pre-code planning?

Pre-code planning?

Scheduled Pinned Locked Moved The Lounge
collaborationquestion
30 Posts 16 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q qomi

    Of those of you who code on your own (as in not in a team), for money, pleasure or both: Do you chart out your work before you start coding? "No one knows what power lies yet undevelopped in that wiry system of mine." Ada Lovelace 1815-1852

    G Offline
    G Offline
    Giles
    wrote on last edited by
    #5

    Chart where I'm going? You must be kidding. Its a big ocean and I want to follow the currents, and be blown by the wind, and see where it takes me. Usually not very far. Giles

    1 Reply Last reply
    0
    • Q qomi

      Of those of you who code on your own (as in not in a team), for money, pleasure or both: Do you chart out your work before you start coding? "No one knows what power lies yet undevelopped in that wiry system of mine." Ada Lovelace 1815-1852

      M Offline
      M Offline
      Michael P Butler
      wrote on last edited by
      #6

      I didn't used to but as I've got older (more experienced?) I do a lot more planning and designing first. I find if I do too much though, when I get to writing the code I get bored easily. :-D Michael :-)

      C 1 Reply Last reply
      0
      • Q qomi

        Of those of you who code on your own (as in not in a team), for money, pleasure or both: Do you chart out your work before you start coding? "No one knows what power lies yet undevelopped in that wiry system of mine." Ada Lovelace 1815-1852

        S Offline
        S Offline
        Simon Walton
        wrote on last edited by
        #7

        Until yesterday, I didn't. After a conversation with Colin though, and a bit of experience today, I've come to realise that mapping out complex routines in the form of a flow diagram saves a lot of time and effort. Plus it makes me look cool when my mother walks in. Simon Hey, it looks like you're writing a letter! Sonork ID 100.10024

        1 Reply Last reply
        0
        • M Michael P Butler

          I didn't used to but as I've got older (more experienced?) I do a lot more planning and designing first. I find if I do too much though, when I get to writing the code I get bored easily. :-D Michael :-)

          C Offline
          C Offline
          ColinDavies
          wrote on last edited by
          #8

          Michael P Butler wrote: I didn't used to but as I've got older (more experienced?) I do a lot more planning and designing first. I find if I do too much though, when I get to writing the code I get bored easily That is really similar to me, when I code I mouse-click and type as fast as possible to get it over and done with. I have proved on paper and in my head that the code will work, So all I have to do is the mechanical operation of entering the code into my PC. I think Debuggers should be "banned" and then coders would learn to plan their code better. Regardz Colin J Davies

          Sonork ID 100.9197:Colin

          I live in Bob's HungOut now

          A good example of "Fully Managed" coding

          J T 2 Replies Last reply
          0
          • Q qomi

            Of those of you who code on your own (as in not in a team), for money, pleasure or both: Do you chart out your work before you start coding? "No one knows what power lies yet undevelopped in that wiry system of mine." Ada Lovelace 1815-1852

            R Offline
            R Offline
            Roger Wright new
            wrote on last edited by
            #9

            Always! Though I'm a lot less fromal about it than I used to be, I still start with a clear plan, even if it's only on a bar napkin.

            R 1 Reply Last reply
            0
            • Q qomi

              Of those of you who code on your own (as in not in a team), for money, pleasure or both: Do you chart out your work before you start coding? "No one knows what power lies yet undevelopped in that wiry system of mine." Ada Lovelace 1815-1852

              R Offline
              R Offline
              Richard Stringer
              wrote on last edited by
              #10

              All the time. I have proven to myself and others that the time taken to plan is more than made up for in the actual coding. I pay partiuclar attention to the API portion of the program to make sure I am getting all the information passed to me that I need and also try to plan to return all relevant information that may be needed eslewhere ( error codes, structs, pointers etc... ) Richard If you pick up a starving dog and make him prosperous, he will not bite you. This is the principal difference between a dog and a man. - Pudd'nhead Wilson's Calendar

              1 Reply Last reply
              0
              • Q qomi

                Of those of you who code on your own (as in not in a team), for money, pleasure or both: Do you chart out your work before you start coding? "No one knows what power lies yet undevelopped in that wiry system of mine." Ada Lovelace 1815-1852

                N Offline
                N Offline
                Navin
                wrote on last edited by
                #11

                qomi wrote: Do you chart out your work before you start coding? Depends on what it is I'm coding. If it's a one shot deal or some other "throw-away code", or something really simple, then I don't. The more complicated it is, the more likely I am to chart out at least something. Granted, no matter how much planning you do, there's always something unexpected that crops up... like realizing that a CEditView won't hold more than 64K worth of text if you're running on Windows 98. X| The early bird may get the worm, but the second mouse gets the cheese.

                1 Reply Last reply
                0
                • C ColinDavies

                  Michael P Butler wrote: I didn't used to but as I've got older (more experienced?) I do a lot more planning and designing first. I find if I do too much though, when I get to writing the code I get bored easily That is really similar to me, when I code I mouse-click and type as fast as possible to get it over and done with. I have proved on paper and in my head that the code will work, So all I have to do is the mechanical operation of entering the code into my PC. I think Debuggers should be "banned" and then coders would learn to plan their code better. Regardz Colin J Davies

                  Sonork ID 100.9197:Colin

                  I live in Bob's HungOut now

                  A good example of "Fully Managed" coding

                  J Offline
                  J Offline
                  jkgh
                  wrote on last edited by
                  #12

                  I knew a guy who could code like that, bloody brilliant - He used to code against his own work without having locally installed at home, bring it into work on a disk or e-mail and it would almost always compile and work as intended. The only errors tended to be the odd spelling mistakes in calls etc.

                  C 1 Reply Last reply
                  0
                  • J jkgh

                    I knew a guy who could code like that, bloody brilliant - He used to code against his own work without having locally installed at home, bring it into work on a disk or e-mail and it would almost always compile and work as intended. The only errors tended to be the odd spelling mistakes in calls etc.

                    C Offline
                    C Offline
                    ColinDavies
                    wrote on last edited by
                    #13

                    Well I wouldn't call myself "bloody brilliant" It's more a case of having learnt to code on Punchcards and snail mail to the Mini that read them. And snail mail back home with the results. So I learnt to plan my code from the start and then stick to the plans like a drone carpenter would. When I find a "bug" I normally find it myself first in my charts and maps and scribbles rather than actually running the app. My biggest syntax errors are "puncuation marks" as they skip my eyesight quite often. But can you imagine a very large project that a builder would start and then finish with only an idea and no paper plans or even plans in his head? Regardz Colin J Davies

                    Sonork ID 100.9197:Colin

                    I live in Bob's HungOut now

                    A good example of "Fully Managed" coding

                    J 1 Reply Last reply
                    0
                    • C ColinDavies

                      Michael P Butler wrote: I didn't used to but as I've got older (more experienced?) I do a lot more planning and designing first. I find if I do too much though, when I get to writing the code I get bored easily That is really similar to me, when I code I mouse-click and type as fast as possible to get it over and done with. I have proved on paper and in my head that the code will work, So all I have to do is the mechanical operation of entering the code into my PC. I think Debuggers should be "banned" and then coders would learn to plan their code better. Regardz Colin J Davies

                      Sonork ID 100.9197:Colin

                      I live in Bob's HungOut now

                      A good example of "Fully Managed" coding

                      T Offline
                      T Offline
                      Tim Smith
                      wrote on last edited by
                      #14

                      I think Debuggers should be "banned" and then coders would learn to plan their code better. YOU HEATHEN!!! :) I really don't see the correlation between well planned code and debugger use. I use the debugger as a code quality tool. Even when the code has been well thought out. I practically live in the debugger making sure routines work as required. I have never understood the concept of run it, and fix it if it fails. I am always testing small core routines via the debugger and test routines. I am always making sure that the code paths are executing as I expect. I have done my time on embedded systems and older junk systems where you didn't have debuggers. I see no point to go back to self flogging. Tim Smith Descartes Systems Sciences, Inc.

                      C 1 Reply Last reply
                      0
                      • Q qomi

                        Of those of you who code on your own (as in not in a team), for money, pleasure or both: Do you chart out your work before you start coding? "No one knows what power lies yet undevelopped in that wiry system of mine." Ada Lovelace 1815-1852

                        E Offline
                        E Offline
                        Erik Westermann
                        wrote on last edited by
                        #15

                        If I feel that it will take longer than 8 hours to implement the solution, or if I think someone else (other than me and my immediate peers) will be interested in the code. I usually use UML to flesh out parts of the system - state charts for systems that have a memory, sequence diagrams for behaviors, and class diagrams for the static structure. I also draw out the user interface - if there is one. Once I have all that in place I start coding based on the diagrams. I find that is saves a lot of time since the exercise of drawing the diagrams gets me closer to the problem (I gain a better understanding of the problem), so that I'm in a better position to provide a solution for it. I also prototype using HTML or even Visual Basic before I start coding the solution since prototyping makes parts of the application's look and feel visible to the client. I use prototypes to start discussions and get specific with domain experts when I'm working in a field that I'm not familiar with - it's amazing what details you can get into when you're working with a simple prototype with a domain expert! Once the solution is in place, I use the drawings to write the documentation. If I'm not writing the documentation, I pass on the drawings (which I do by hand on paper) to the person writing the documentation to reduce or eliminate my involvement in the documentation process - based on the feedback I get, the diagrams seem to help. Essam ___________________________________________ Author - JScript .NET Programming ...and a bunch of articles around the Web

                        1 Reply Last reply
                        0
                        • T Tim Smith

                          I think Debuggers should be "banned" and then coders would learn to plan their code better. YOU HEATHEN!!! :) I really don't see the correlation between well planned code and debugger use. I use the debugger as a code quality tool. Even when the code has been well thought out. I practically live in the debugger making sure routines work as required. I have never understood the concept of run it, and fix it if it fails. I am always testing small core routines via the debugger and test routines. I am always making sure that the code paths are executing as I expect. I have done my time on embedded systems and older junk systems where you didn't have debuggers. I see no point to go back to self flogging. Tim Smith Descartes Systems Sciences, Inc.

                          C Offline
                          C Offline
                          ColinDavies
                          wrote on last edited by
                          #16

                          Tim Smith wrote: I am always testing small core routines via the debugger and test routines. I am always making sure that the code paths are executing as I expect. Hmm, I suppose that is OK, But I believe a lot of coders use it to solve problems in badly written code. Tim Smith wrote: I really don't see the correlation between well planned code and debugger use. Ok, My basic belief is if you plan your code well and know your OS and Subject well, you will not write buggy code. So I have never needed to learn how to use the debugger environment yet. "I have had a play with it. And just for safety sake , I do actually build a debug version before final release and manually test it also. So I'm not a total Heathen :-) Regardz Colin J Davies

                          Sonork ID 100.9197:Colin

                          I live in Bob's HungOut now

                          A good example of "Fully Managed" coding

                          T 1 Reply Last reply
                          0
                          • C ColinDavies

                            Well I wouldn't call myself "bloody brilliant" It's more a case of having learnt to code on Punchcards and snail mail to the Mini that read them. And snail mail back home with the results. So I learnt to plan my code from the start and then stick to the plans like a drone carpenter would. When I find a "bug" I normally find it myself first in my charts and maps and scribbles rather than actually running the app. My biggest syntax errors are "puncuation marks" as they skip my eyesight quite often. But can you imagine a very large project that a builder would start and then finish with only an idea and no paper plans or even plans in his head? Regardz Colin J Davies

                            Sonork ID 100.9197:Colin

                            I live in Bob's HungOut now

                            A good example of "Fully Managed" coding

                            J Offline
                            J Offline
                            jkgh
                            wrote on last edited by
                            #17

                            .. I take it you've never had any building work done in England.

                            C 1 Reply Last reply
                            0
                            • J jkgh

                              .. I take it you've never had any building work done in England.

                              C Offline
                              C Offline
                              ColinDavies
                              wrote on last edited by
                              #18

                              Alex wrote: I take it you've never had any building work done in England. Sorry, forgive me for my ignorance. :-) Regardz Colin J Davies

                              Sonork ID 100.9197:Colin

                              I live in Bob's HungOut now

                              A good example of "Fully Managed" coding

                              1 Reply Last reply
                              0
                              • R Roger Wright new

                                Always! Though I'm a lot less fromal about it than I used to be, I still start with a clear plan, even if it's only on a bar napkin.

                                R Offline
                                R Offline
                                Reno Tiko
                                wrote on last edited by
                                #19

                                Roger Wright wrote: on a bar napkin I hear this all the time, people scribbling some brilliant architecture onto a napkin at a bar or restauruant. Do people always bring their pencil and/or pen along with them when they go out to eat and just forget to bring along a pad of paper or something? Pencils in a pocket pokes you when you sit down and forget about it, and that hurts. And sometimes pens in a pocket leaks destroying your clothes. But I guess one could keep it in their breast shirt pocket, but then that would be too geeky and I haven't seen anyone do that in a while. Maybe this only really happens to women whom I could conceive carrying a writing utensil in their purses, but guys is another matter since there's no practical place to carry those things besides perhaps behind the ear or in the hair ;P

                                S R 2 Replies Last reply
                                0
                                • Q qomi

                                  Of those of you who code on your own (as in not in a team), for money, pleasure or both: Do you chart out your work before you start coding? "No one knows what power lies yet undevelopped in that wiry system of mine." Ada Lovelace 1815-1852

                                  R Offline
                                  R Offline
                                  Reno Tiko
                                  wrote on last edited by
                                  #20

                                  For small projects where the design can easily fit into my head or if it's a small-medium sized project where I've done something very similar before then I don't do too much designing. For non-trivial products, it's usually essential unless you don't care about spaghetti code that is hard to maintain and extend. However, I almost always at the very least usually write down some candidate classes, pick which ones I think I'll be using, and write down their responsibilites and collaborators to keep my head straight. If I want to do another level of design then I'd probably take the selected candidated classes and draw the major UML architecture diagrams.

                                  1 Reply Last reply
                                  0
                                  • C ColinDavies

                                    Tim Smith wrote: I am always testing small core routines via the debugger and test routines. I am always making sure that the code paths are executing as I expect. Hmm, I suppose that is OK, But I believe a lot of coders use it to solve problems in badly written code. Tim Smith wrote: I really don't see the correlation between well planned code and debugger use. Ok, My basic belief is if you plan your code well and know your OS and Subject well, you will not write buggy code. So I have never needed to learn how to use the debugger environment yet. "I have had a play with it. And just for safety sake , I do actually build a debug version before final release and manually test it also. So I'm not a total Heathen :-) Regardz Colin J Davies

                                    Sonork ID 100.9197:Colin

                                    I live in Bob's HungOut now

                                    A good example of "Fully Managed" coding

                                    T Offline
                                    T Offline
                                    Tim Smith
                                    wrote on last edited by
                                    #21

                                    But I believe a lot of coders use it to solve problems in badly written code. A lot of bad programmers program in C++. That doesn't mean that C++ is bad. Ok, My basic belief is if you plan your code well and know your OS and Subject well, you will not write buggy code. So I have never needed to learn how to use the debugger environment yet. "I have had a play with it. So what do you do when the program doesn't work? Give up and start a new project? Using print statements or desk checks are different forms of debugging. Some of us just like to use tools specifically designed for helping us find problems. It is the same concept as using a memory checking package such as Rational Purify to help find memory leaks. No programmer writes perfect code the first time. The question is how efficiently do you find the imperfections and get them corrected. You might like to use print statements. I like to use the debugger. Tim Smith Descartes Systems Sciences, Inc.

                                    C 1 Reply Last reply
                                    0
                                    • T Tim Smith

                                      But I believe a lot of coders use it to solve problems in badly written code. A lot of bad programmers program in C++. That doesn't mean that C++ is bad. Ok, My basic belief is if you plan your code well and know your OS and Subject well, you will not write buggy code. So I have never needed to learn how to use the debugger environment yet. "I have had a play with it. So what do you do when the program doesn't work? Give up and start a new project? Using print statements or desk checks are different forms of debugging. Some of us just like to use tools specifically designed for helping us find problems. It is the same concept as using a memory checking package such as Rational Purify to help find memory leaks. No programmer writes perfect code the first time. The question is how efficiently do you find the imperfections and get them corrected. You might like to use print statements. I like to use the debugger. Tim Smith Descartes Systems Sciences, Inc.

                                      C Offline
                                      C Offline
                                      ColinDavies
                                      wrote on last edited by
                                      #22

                                      Tim Smith wrote: A lot of bad programmers program in C++. That doesn't mean that C++ is bad. I hadn't thought about that, Tim Smith wrote: So what do you do when the program doesn't work? Ok, I Admit first time arround I use lots of AfxMessageBoxes to make sure it runs as planned. Then I comment them out. But the more experienced I get in C++ the less times I find I have to check stuff. After a while you write stuff and just expect it to run, quite arrogantly. I admit I should change habbits and start using the debugger output instead, but I guess I have fallen into a habit. But, I assure you that I still belive planning well and researching cuts down dramatically on bugs. Many coders seem to be employed "maintaining code" this to me means it was not well written in the first instance. Sure new features arrise that need to be implimneted, and plans change. :-) Regardz Colin J Davies

                                      Sonork ID 100.9197:Colin

                                      I live in Bob's HungOut now

                                      A good example of "Fully Managed" coding

                                      T 1 Reply Last reply
                                      0
                                      • C ColinDavies

                                        Tim Smith wrote: A lot of bad programmers program in C++. That doesn't mean that C++ is bad. I hadn't thought about that, Tim Smith wrote: So what do you do when the program doesn't work? Ok, I Admit first time arround I use lots of AfxMessageBoxes to make sure it runs as planned. Then I comment them out. But the more experienced I get in C++ the less times I find I have to check stuff. After a while you write stuff and just expect it to run, quite arrogantly. I admit I should change habbits and start using the debugger output instead, but I guess I have fallen into a habit. But, I assure you that I still belive planning well and researching cuts down dramatically on bugs. Many coders seem to be employed "maintaining code" this to me means it was not well written in the first instance. Sure new features arrise that need to be implimneted, and plans change. :-) Regardz Colin J Davies

                                        Sonork ID 100.9197:Colin

                                        I live in Bob's HungOut now

                                        A good example of "Fully Managed" coding

                                        T Offline
                                        T Offline
                                        Tim Smith
                                        wrote on last edited by
                                        #23

                                        I actually agree with you that many people use the debugger as a crutch. I also agree that the better you plan, the less debugging you will have to do. As far you should start using the debugger, I really don't see why if what you currently do is working well for you. What ever works in my book. I was just arguing that the debugger isn't inherently a bad thing. That is all. Tim Smith Descartes Systems Sciences, Inc.

                                        C 1 Reply Last reply
                                        0
                                        • R Reno Tiko

                                          Roger Wright wrote: on a bar napkin I hear this all the time, people scribbling some brilliant architecture onto a napkin at a bar or restauruant. Do people always bring their pencil and/or pen along with them when they go out to eat and just forget to bring along a pad of paper or something? Pencils in a pocket pokes you when you sit down and forget about it, and that hurts. And sometimes pens in a pocket leaks destroying your clothes. But I guess one could keep it in their breast shirt pocket, but then that would be too geeky and I haven't seen anyone do that in a while. Maybe this only really happens to women whom I could conceive carrying a writing utensil in their purses, but guys is another matter since there's no practical place to carry those things besides perhaps behind the ear or in the hair ;P

                                          S Offline
                                          S Offline
                                          Simon Walton
                                          wrote on last edited by
                                          #24

                                          Reno Tiko wrote: I hear this all the time, people scribbling some brilliant architecture onto a napkin at a bar or restauruant. That would go down well on a date. "Oh darling, are you writing me a poem on that napkin to express your love for me?" "No, i'm writing some pseudo code for a cool algorithm I just thought of." Simon Hey, it looks like you're writing a letter! Sonork ID 100.10024

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups