Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Programming block!

Options
  • 13-08-2002 6:42pm
    #1
    Posts: 0


    Can anyone relate to this?

    I'm fairly comfortable with Java, to the extent I can write and debug functional programs.

    Also, I'm getting to grips with C++, using objects and all the new keywords...as far as I can grasp, the hard part is not learning the language, it's being able to do something actually useful.

    I'm either trying to do too many things at once, or I'm trying to run before i can walk...the problem is that I don't seem to be able to program anything useful and I can't seem to figure out what to try and do next.

    I think a problem is that I'm looking at existing programs and trying to create something like, maybe too ambitious.

    Is this programming frustration? Has anyone come up against this?

    Feedback would be great, thanks all.


Comments

  • Registered Users Posts: 2,660 ✭✭✭Baz_


    Just write a short program to take over the world, its worth the effort and should get you back on track ;)

    I've suffered with this in the past too, my solution was to drink lots of beer, and funny as that sounds it actually worked, I no longer worry about such things, as I'm safe in the knowledge that someday someone will be waving a carrot (wages) in front of my face to motivate me.

    I'm sure others will have better and more sensible answers, like write a small program, finish it, debug it, and then do another small program, and in no time at all you will be astonished to find that a small program is now actually ten times the size of what you started with. But I just went with the beer and its done me no harm.

    What was the question again?


  • Closed Accounts Posts: 3,859 ✭✭✭logic1


    Originally posted by MoonHawk
    Can anyone relate to this?

    I think a problem is that I'm looking at existing programs and trying to create something like, maybe too ambitious.

    Is this programming frustration? Has anyone come up against this?

    Feedback would be great, thanks all.

    What kind of programs are you trying to write?

    I think the sensible thing to do would be to look into the type of programs you're asked to write while learning C++ in college.

    We had to write an airport booking/tracking system and a cinema ticket booking system. Fairly simple - set of menus, one to book a ticket checks if seat is already taken etc.. one prints out a layout of the cinema using ascii showing an R for each seat that's reserved. Stuff like that. Once you get into it it's pretty simple.

    If you're not up to that level yet below that anything we wrote was pretty useless. Really just learning how to use functions and loops and stuff like that.

    .logic.


  • Registered Users Posts: 1,481 ✭✭✭satchmo


    Originally posted by Baz_
    Just write a short program to take over the world, its worth the effort and should get you back on track ;)

    I've suffered with this in the past too, my solution was to drink lots of beer, and funny as that sounds it actually worked, I no longer worry about such things, as I'm safe in the knowledge that someday someone will be waving a carrot (wages) in front of my face to motivate me.

    I'm sure others will have better and more sensible answers, like write a small program, finish it, debug it, and then do another small program, and in no time at all you will be astonished to find that a small program is now actually ten times the size of what you started with. But I just went with the beer and its done me no harm.

    What was the question again?

    LOL! :D
    Well at least you've got your priorities in order!


  • Posts: 0 [Deleted User]


    We had to write an airport booking/tracking system and a cinema ticket booking system

    Yeah, that's what worries me, does the ability to program larger programs come with experience or do people have it just "click" in their minds on how to do it?

    My worry is that I won't improve as I go on, that if i can't do moderately complex programs now, will i discover in time?


    my solution was to drink lots of beer

    Ah touché! :D Must try that one.

    Thanks for your replies, at least i'm not the only one who feels like this.


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    This sort of question should go in the FAQ as I'm sure at least one other person has asked it before.

    Answers.

    1. Scratch an itch.

    It doesn't even have to be a big one. Think of something that you do that could be done better or you want to work on to learn something.

    2. plan.

    It doesn't have to be a full spec doc but you should at least write out what your program should do. If you have a written plan it's easier to get something completed.

    Don't add anything until you have completed what you have written.


  • Advertisement
  • Registered Users Posts: 15,443 ✭✭✭✭bonkey


    Originally posted by Hobbes
    2. plan.
    Y'know, it might sound silly, but this is the most important step which far too many people skip.

    Look at your task. Break it into smaller tasks, written or even mentally. Choose one of these. Break it into smaller tasks. Repeat.

    When you get to a certain level of granularity, you're now dealing with a manageable / simple problem. All you do then is continue dealing with the hundreds of simple problems, rather than the one large one.

    For example :

    I want to build a notepad-ish application.
    One of the tasks I will have is loading a file to the editor.
    Loading a file requires :

    1) Menu item : File/Open. runs some code on click, which does the following steps :
    2) Pop up the dialog box
    3) Get the returned value from this
    4) Check if the file exists
    5) Open file, and read in data
    6) Add read-in data to the actual on-screen editor.

    7) Review code and add error handling if needed, where needed.

    None of these tasks is more than 5 lines of code. It sounds simple, but youd be amazed at how many people think "I dont know how to load a file from disk into my application", but if you presented them the 7 "break-down" steps above, they would fly through it.

    Plan. Design. Break it down. Break it down more. If you're still confused, you havent broken it down enough. If you cant juggle all that breakdown in your head, then write it down.

    Hope that helps a little....

    jc


  • Posts: 0 [Deleted User]


    :D

    bonkey, you diabolical genius!

    That makes so much sense, I think that's my problem, I'm thinking about the whole problem rather than trying to do simpler parts...cheers.

    And hobbes, I was thinking of playing around with sample programs (simple input/output), in order to get to grips with the way c++ does things in contrast to java. It's sounds like a good idea to try and learn aspects of the language before I go and make a big program. thanks for the tip.

    I'll go and try the stages of planning, maybe i'll come up with something half decent.
    :p

    The feedback was great, thanks all.


Advertisement