Like Tree8Likes

How to plan code, like blueprints or a storyboard for C

This is a discussion on How to plan code, like blueprints or a storyboard for C within the C Programming forums, part of the General Programming Boards category; I have yet another question for these forums, what is the best way to plan/organize a program, like blueprints or ...

  1. #1
    Registered User
    Join Date
    Sep 2012
    Posts
    28

    How to plan code, like blueprints or a storyboard for C

    I have yet another question for these forums, what is the best way to plan/organize a program, like blueprints or a storyboard, only for programming? Right now I've just been using Wunderlist to keep track of what I've done and am going to do.

  2. #2
    Registered User
    Join Date
    Sep 2012
    Posts
    28
    Preferably I'd like some kind of software that will help me organize my code, but also, I'm not even sure what this would be called, is it a blueprint? Roadmap?

  3. #3
    Registered User
    Join Date
    Jan 2013
    Location
    UK
    Posts
    19
    I currently use this... but my flowcharts don't usually end up that complicated.

    Flowchart software | Diagram software | Flowchart diagram

  4. #4
    Registered User
    Join Date
    Nov 2012
    Posts
    981
    For a todo list, there is the program Task Coach which I like - Task Coach
    For diagrams I mentioned before the Diagram Designer - Diagram Designer and Dia - Dia draws your structured diagrams: Free Windows, Mac OS X and Linux version of the popular open source program
    There are also UML tools like StarUML - StarUML - The Open Source UML/MDA Platform

    Such tools also have code generation in addition to diagramming features.

    Also an essential tool during serious development is a source control versioning system. Svn and Git are both popular free tools.

  5. #5
    Stoned Witch Barney McGrew's Avatar
    Join Date
    Oct 2012
    Location
    astaylea
    Posts
    420
    I've never really needed to plan any programs like that. Usually I start by planning out the structure of the main code, then I start building small 'modules' that will be used by the main code (usually multiple translation units with one header file containing the identifiers that will be exported from the 'module'.) Then I'll usually write a small test case for the module, to verify that everything's working correctly. I sometimes keep lists of ideas and bugs in text files, and draw pictures (with a pen) of FSM diagrams, packet structures, or user interfaces depending on how complicated they are and whether the program uses them or not. Usually those things can be thrown out after you've figured them out and implemented them.

  6. #6
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    Quote Originally Posted by Barney McGrew View Post
    I've never really needed to plan any programs like that.
    It becomes exponentially more important as the size of a project grows and/or when the number of people working on the project exceeds one.
    Salem and Crossfire like this.
    My best code is written with the delete key.

  7. #7
    Registered User
    Join Date
    Nov 2012
    Posts
    981
    Quote Originally Posted by Barney McGrew View Post
    I've never really needed to plan any programs like that.
    I wonder why this sentence sounds negative, even though the rest of the response is filled with good tool suggestions. Making and using test cases is often overlooked even though it is so useful.

    Maybe the point here is that planning need not be done with a particular tool or in some special way. Indeed, there is sometimes this idea that using X, Y or Z is a magic formula to get quality software. Obviously that's not true.

  8. #8
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    Quote Originally Posted by c99tutorial View Post
    I wonder why this sentence sounds negative, even though the rest of the response is filled with good tool suggestions. Making and using test cases is often overlooked even though it is so useful.

    Maybe the point here is that planning need not be done with a particular tool or in some special way. Indeed, there is sometimes this idea that using X, Y or Z is a magic formula to get quality software. Obviously that's not true.
    I think it has more to do with the implication that the design of an application is something that's done as you go instead of prior to cranking out code. I won't deny that the vast majority of my code is "shooting from the hip", as it were, but I also recognize that those designs suffer noticeably from impromptu decisions as opposed to concerted forethought. When I include an explicit planning and design step to projects (regardless of which tools or methods are involved), the resulting designs are consistently cleaner and contain fewer unnecessaries.
    My best code is written with the delete key.

  9. #9
    Registered User
    Join Date
    Jun 2005
    Posts
    5,857
    Prelude, you might trigger cries of horror from "Extreme Programming" fans
    Crossfire likes this.
    Right 98% of the time, and don't care about the other 3%.

  10. #10
    Stoned Witch Barney McGrew's Avatar
    Join Date
    Oct 2012
    Location
    astaylea
    Posts
    420
    I've found that writing programs in a modular way works well for programs of varying sizes, since at any given time you're really only focusing on one small part of the codebase. I'm not sure how well it works with teams since I've never tried it, but I assume you could allocate different modules to each person, then providing the interfaces are well documented, a single person could tie them together quite efficiently. You don't really need to think about the overall design of the program while you're writing each module, you're just getting that single component to work well with a clean interface.

    I don't think UML is applicable when you're using languages like C which have poor support for object oriented programming, but I wouldn't know for sure since I haven't looked into it much. I can certainly see how flowcharts and story boards would be useful for communicating ideas, but I've personally never found them useful as an individual programmer. Task lists, I think, are also only really useful for groups of people, where you're allocating specific tasks to people to avoid them stepping over each other, also to meet deadlines. That's never really seemed practical for me since my general attitude is “it will be done when it's done”.

  11. #11
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    Quote Originally Posted by grumpy View Post
    Prelude, you might trigger cries of horror from "Extreme Programming" fans
    Even the most...well...extreme variant of extreme programming involves a certain measure of preliminary design. I think anyone who takes agile principles and concludes "make it up as you go" is an acceptable methodology simply didn't understand the concept.
    My best code is written with the delete key.

  12. #12
    Registered User
    Join Date
    Jun 2005
    Posts
    5,857
    Quote Originally Posted by Prelude View Post
    Even the most...well...extreme variant of extreme programming involves a certain measure of preliminary design. I think anyone who takes agile principles and concludes "make it up as you go" is an acceptable methodology simply didn't understand the concept.
    Well true. But consider how managers, and agile development teams, actually believe that being able to "make it up as you go" and "reducing the amount of time doing design" is an advantage of agile.
    Prelude likes this.
    Right 98% of the time, and don't care about the other 3%.

  13. #13
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,526
    The agile manifesto should talk more about what agile programming actually is. That might help the concept be easier to understand.
    Crossfire likes this.

  14. #14
    Registered User
    Join Date
    Sep 2012
    Posts
    28
    UML actually looks like the type of thing that would help me stay organized, I admit I am getting better at keeping my code organized as just code, and a task list does help, but having a UML type chart would help me a lot more, except from what I'm looking up abou UML it looks like it's mostly meant for classes, where C doesn't have classes, is there anything like UML but meant for organizing function in general? Not just classes?

    I'm a visual person, so having charts like that would help me a lot to stay organized and plan my code.

  15. #15
    Registered User
    Join Date
    Sep 2012
    Posts
    28
    I guess I could always just use UML to plan my code, just pretend the symbols mean something different, of course it would confuse anyone else who tried to contribute to my project...

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. My AI plan, and the code I have so far
    By jeremy duncan in forum C Programming
    Replies: 10
    Last Post: 12-01-2011, 11:42 PM
  2. using UML to plan C programs
    By droseman in forum C Programming
    Replies: 4
    Last Post: 12-08-2009, 04:13 PM
  3. Article about smuggler with nuclear warhead blueprints
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 30
    Last Post: 06-20-2008, 10:42 AM
  4. How to plan a program...
    By o0obruceleeo0o in forum C++ Programming
    Replies: 6
    Last Post: 04-22-2003, 11:51 PM
  5. My plan
    By Nutshell in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 03-28-2002, 01:14 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21