Question:

Why don't I have a good logic in writing programs??

by  |  earlier

0 LIKES UnLike

Whenever I try to write programs I simply am not unable to develop the logic ; I don't have that thinking power ; plz help me or I will get screwed ; & even if I write down all the logic after hours of toiling there are errors in the program ;

help plz??

 Tags:

   Report

4 ANSWERS


  1. I'm a professional programmer who has written software for more than decade. There are still tons of errors in every program I make. Most professional programmers spend a significant fraction of their time just fixing mistakes they themselves have made. That's how programming goes.

    Over time, you will learn how to write programs so that they are clear and easy to follow. This won't so much reduce the number of mistakes you make as make them easier to find and fix.


  2. You have to figure out which style is best for you.   It doesn't come overnight, you have to teach yourself how to think.  I struggle with just seeing things in abstracts.  Usually I have to draw things out on a page and follow what the program does to really get a good overview of what happens.  Mostly Seeing it, works better then just talking about.  

  3. Reductionism helps.  That is, break down your problem into smaller problems, and break those down too, until all your problems are trivial.  Then code the trivial solutions first, and work back up the the overall program.  Use subroutines (sometimes called methods).

    There will be errors.  You'll need debugging skills.

    How do you get to Carnegie Hall?  Practice, practice practice.

    It also helps to like what you're doing.  It takes a long time.  If you're constantly interested in how to approach new problems, you'll eventually be very good.  If you don't do this, well, you can always flip burgers.

    There do seem to be people for which this seems to come natural. It's easy to think that they don't struggle through it, and never did.

    Unfortunately, the literature does say that some people are seven times faster than everyone else.  I've met many in this class.  And i've not figured out what makes one person good at it, and another not so much. There doesn't seem to be much in common.  But i've only been doing this for 35 years.  I may yet stumble on the answer one day.

    <edit>

    I don't use flow charts or ERDs.  I concentrate on requirements. Maybe i just don't draw flow charts or ERDs.  Maybe i visualize them - a real time saver.

    "It doesn't come overnight".  It seems to take four or five years.

    My son has been playing violin for 6 years.  He's much better than i am.  He can pick up a new piece by ear, just hearing it once or twice.  It's tempting to say it's easy for him.  But i have perfect pitch too. He has just worked harder.

  4. I agree completely with airdog; I too almost always have to draw things out before I can fully understand them. I have heard some people say they are outdated, but I still find flowcharts EXTREMELY helpful, especially for complicated looping and decision structures. For database stuff, I like to use an ERD to get a feel for the table structures, and the relationships between them.

    The important thing to remember is that you don't have to create perfect ones like when in school - just create something that helps you to visualize what is happening in the program. Perhaps you can even find a way to represent things that works for you that noone else has ever event thought of. Get yourself a whiteboard with some markers, and you will be on your way.'

    Good luck to you. Hang in there - it's gets easier... it really does.

Question Stats

Latest activity: earlier.
This question has 4 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions