Pre-code planning?
-
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
-
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.
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
-
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
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.
-
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
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.
-
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.
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
-
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
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.
-
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
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
-
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
I never go anywhere without my trusty mechanical pencil - those aren't leads in there, they're my last remaining neurons:laugh: And I usually have a notebook with me, as well. My usual routine includes ordering a pitcher, practicing darts for a while, then sitting in a booth doing the things I can't do at work (ie - anything requiring thought and concentration). I pay a few bills, design an occasional program or electronic widget I need for something, review materials for a couple of charities whose boards I'm on, layout out a database or two, sketch a few web pages. Simple stuff... Dull, but without it I'd go stark raving mad* *There's another school of thought that maintains this has already happenned!
-
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.
But you called me a heathen :-) Just joking, The more advanced and bigger my code base is the more likely that debugging skills will be required I guess, And AfxMessageBoxes can get painful if you accendly put one in a big loop. :-) Tim Smith wrote: I was just arguing that the debugger isn't inherently a bad thing. That is all. Actually as you can guess I agree, but I think it is the way the education system has implimented it now-days. It's in everybodys best interests that we have less buggy code circulating. Best Wishes Tim :-) Regardz Colin J Davies
Sonork ID 100.9197:Colin
I live in Bob's HungOut now
-
But you called me a heathen :-) Just joking, The more advanced and bigger my code base is the more likely that debugging skills will be required I guess, And AfxMessageBoxes can get painful if you accendly put one in a big loop. :-) Tim Smith wrote: I was just arguing that the debugger isn't inherently a bad thing. That is all. Actually as you can guess I agree, but I think it is the way the education system has implimented it now-days. It's in everybodys best interests that we have less buggy code circulating. Best Wishes Tim :-) Regardz Colin J Davies
Sonork ID 100.9197:Colin
I live in Bob's HungOut now
Hi Colin, in our company we use a class comparable to Writing trace messages in multi-threaded C++ applications. Several debug levels, warnings and so on, and they either are directed to a file or w/
OutputDebugString
to DevStudio, DebugView, or similar. IMHO that's a very comfortable way for debugging. Regards Thomas Finally with Sonork id: 100.10453 Thömmi
Disclaimer:
Because of heavy processing requirements, we are currently using some of your unused brain capacity for backup processing. Please ignore any hallucinations, voices or unusual dreams you may experience. Please avoid concentration-intensive tasks until further notice. Thank you. -
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
That depends on the type of project I'm working on: it's size, importancy, language etc. Mostly I plan ahead when I code something big in VC++. However, I never sketch or anything while coding in VB. Actually I believe this low-level language is just for that - instant coding! You don't need to define anything serious, you can just insert variables whenever you want without prototypes. I use VB mostly for tools I do for myself - I need them to work and I need them fast! When I don't plan I just get lousy messed-up code which none the less works (and pretty quickly), but isn't very nice to update or alter later. So I guess it's a question of how important the current project is and what's it's purpose. Isaac Sasson, Small time programmer - complainer at large.
-
But you called me a heathen :-) Just joking, The more advanced and bigger my code base is the more likely that debugging skills will be required I guess, And AfxMessageBoxes can get painful if you accendly put one in a big loop. :-) Tim Smith wrote: I was just arguing that the debugger isn't inherently a bad thing. That is all. Actually as you can guess I agree, but I think it is the way the education system has implimented it now-days. It's in everybodys best interests that we have less buggy code circulating. Best Wishes Tim :-) Regardz Colin J Davies
Sonork ID 100.9197:Colin
I live in Bob's HungOut now
-
But you called me a heathen :-) Just joking, The more advanced and bigger my code base is the more likely that debugging skills will be required I guess, And AfxMessageBoxes can get painful if you accendly put one in a big loop. :-) Tim Smith wrote: I was just arguing that the debugger isn't inherently a bad thing. That is all. Actually as you can guess I agree, but I think it is the way the education system has implimented it now-days. It's in everybodys best interests that we have less buggy code circulating. Best Wishes Tim :-) Regardz Colin J Davies
Sonork ID 100.9197:Colin
I live in Bob's HungOut now
The LogDriver is another good class. Regards Thomas Finally with Sonork id: 100.10453 Thömmi
Disclaimer:
Because of heavy processing requirements, we are currently using some of your unused brain capacity for backup processing. Please ignore any hallucinations, voices or unusual dreams you may experience. Please avoid concentration-intensive tasks until further notice. Thank you.