Jump to content
  • Advertisement
Sign in to follow this  
ahayweh

Confidence in programming...

This topic is 4067 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have been reading Code Complete, and other similar books, and have been re-evaluating the habits I've formed over the years. I was wondering what the saving/compilation rates where of the more advanced programmers. Meaning, how often to you find yourself saving source files and compiling them? Do you find yourself compiling after each routine just to verify that it is working as intended? Or are you confident enough in your coding ability to where you don't really compile often? I'm not going to lie, I still find myself compiling/test even after a few blocks ( or even lines!! )at times just to reassure myself--which I've come to understand is the mark of a trial-and-error ( read : juvenile/ineffective ) programmer. Are there any other habits you practice that show the presence ( or lack of ) coding confidence? Thanks, ahayweh

Share this post


Link to post
Share on other sites
Advertisement
I don't compile that often now really. I often write a large number of functions and definitions of structures and then compile, as opposed to all the time. One exception is when Intellisense is confused or confusing me and i compile to see if i am right or not.

Share this post


Link to post
Share on other sites
Lol
Im ctrl+shift+s addicted. Every few lines I tap it so that my code is saved. In fact I tap it often in notepad (where it doenst work!) and other programs just to be shocked when I realise its not working.

as for compiling I do it after each "idea". If I am building an entire class I might write its skeleton until I press compile. If im working on a specific method and rebuilding it as i write it I tend to compile more often.

Usually compiling is just to make sure I got the correct syntax (specilly when I dont have intellisense).

Yours Truly
K

Share this post


Link to post
Share on other sites
When I start a new class I usually wait until i reach a compilable state :-)
Usually I lack of concentration skills (a problem I have in general) and do compile often just to be sure I'm not doing things completely wrong.

I mean, if I'm changing some code that is supposed not to modify the program behaviour, the if the code is not trivial I always compile often to check I'm not doing very bad things (recovering too late is always more hard than Compile & Run :-)

This aside, I have your same feelings, that this habit is an heritage of a wrong coding style...

Share this post


Link to post
Share on other sites
I save often (it marks the transition from a "write code" mental state to a "plan code" one). I often write several hundreds of lines (half a dozen classes and twenty or thirty functions) in-between compiles. Most of the errors my compiler comes up with are petty typing errors (like std::strign), with the occasional missing typename or namespace qualifier someplace or another.

Share this post


Link to post
Share on other sites
Sometimes I'll do a quick build just to see what complains about my changes. Think of it as "breadth-first" code modification. Other times, though, I'll just fully implement whatever I'm working on and chase down errors in the order they come up in the output.

Oh, and I too am a habitual "saver". I regularly hit Cntl-S instead of enter on Google when doing a search. I quickly realize that I didn't intend to save the webpage, though.

Share this post


Link to post
Share on other sites
For me, it varies how often I compile. But I usually find that I compile after a complete chain of thought is coded. I program in a very logical order (still use flow charts before writing the code). As I complete each step in the progression, I compile to make sure that each step is working before I code further. Makes it easier for me to debug as well.

As for how often I save ... let me put this way ... if you were watching me type code, you would think that "; ALT F S" is the correct syntax for ending a C++ statement.

Share this post


Link to post
Share on other sites
I save all the time too, and I compile almost as often. I think I compile so much out of laziness. I let the compiler check my code for me, instead of looking over it and making sure I did it right.

Svenjamin

Share this post


Link to post
Share on other sites
lol. It's good to hear that there are more pathological savers out there. I have decided to start consciously holding off redundant/unnecessary compilations. It just something about seeing 0 warning 0 errors that is reassuring ( like a pat on the back ). My problem is not only do I compile, but I link and run as well ( just to check to syntax errors... )

Share this post


Link to post
Share on other sites
This has little to do with confidence, more with practicality.

When there were terminals and punch cards, you couldn't just randomly punch keys and hope for the best.

- You'd write the algorithm.
- You'd pass it to programmer, who'd punch the keys and drill holes in 200 paper cards
- Then you'd mail that to the computing center
- In 3 days you'd receive a response ( R17=0. R16=5. ERR )

And after going through the punched cards, reading the binary code, you'd realize the programmer mis-read your period for a comma, causing a program error.

This would of course take 3 more days to find, and re-submittal would take another 3 days.

Real-time compilation is great. This makes Java and C# IDEs such great tools. They do make you lazier, but ultimately also more productive.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!