Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: Some of use just want to know the basics

by clemburg (Curate)
on Jan 25, 2001 at 15:55 UTC ( #54245=note: print w/replies, xml ) Need Help??

in reply to Some of use just want to know the basics

1. Is it just a matter of programming self-confidence, to be able to say "this is finished and correct", without a uneasy sense that there may possibly still be a mistake somewhere.

No. You can and should write tests that verify your claims about your software. If your software beats the tests, you can say "this is finished and correct, as far as my tests go", which is quite an achievement over the state where you just have beliefs about the software. Single-stepping your code in a debugger (small pieces!) also helps in assuring yourself that your software does what you think it does. Code reviews by others are another good thing to increase your confidence. Giving your users a chance to give you feedback, and then listening to them, is helpful, too.

2. What would you advice a "I just want to apply the basics correctly" type of monk like me?

To gain confidence? Read a lot of code, write a lot of code. Try things, don't be afraid. Write tests. Debug your programs, even if you think there are no mistakes. Have others review your code. Have others use your code. Reuse your own code.

3. What are the inherent dangers of cut and paste programming?

Putting things in your program that you probably do not understand to any degree. Nasty side-effects. Reinventing the wheel (cut-and-paste-and-cut-and-paste-and-cut-and-paste-and- ... you get the picture). Not learning to write modules. Not learning to think in terms of modular building blocks. Not learning what programming is all about. Aside from that, of course nearly everybody cuts and pastes. The only difference is that the really good programmers do it only once or twice per item.

Christian Lemburg
Brainbench MVP for Perl

  • Comment on Re: Some of use just want to know the basics

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://54245]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2020-10-29 18:14 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (274 votes). Check out past polls.