Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Make a plan

by Anonymous Monk
on Jun 09, 2005 at 19:22 UTC ( [id://465278]=note: print w/replies, xml ) Need Help??


in reply to How to start. || Ramblings of a confused mind.

When you write an essay, you don't just "dive in and write". You make a plan, called an outline, figure out what your major themes will be, how they'll prove your thesis, and how they'll link. You design an introduction and a conclusion, and then you put all the pieces together.

Coding is the same. Build an outline. Figure out what the job is. Break that job into smaller concepts. Figure out how those concepts relate, and what the inter-dependancies are. That will tell you something about the data you need to pass between them. Work top-down and bottom up towards the middle, and know what the plan for each section is before you start. Draw block diagrams, and see how each block fits together with the others.

Document your design: both in your code, and outside of it. Six months from now, you'll forget what you were trying to do. Write comments first, then write code that matches what the comments say. Make sure the comments explain what you're trying to do, and not just how. Keep them up to date.

Example.

# Bad comment example # get characters 5-14 of DIALED into $y $y = substr($DIALED,4,10); # Good comment example # Extract the destination phone number from the dialed # digits field. # Skip over the speed dial digits. $dest_phone = substr($DIALED,4,10);
Sure, by all means, do small scale, proof of concept experiments, try stuff, and learn what you can "by doing". But don't forget to practice designing your code: it's an important part of the craft of programming..

Finish reading the chapter on subroutines! Subroutines are arguably the most important idea in programming. Learning to break a big problem into sub-problems, and carefully solve each piece one bit at a time is an imporant life skill; and not just when it comes to programming.

Good luck, and keep learning! Keep asking questions; of yourself, and of others. The most important part of the learning process is to keep learning. :-)

--
Ytreq Q. Uiop

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-03-29 14:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found