Results 1 to 9 of 9

Thread: Steps in solving a programming problem?

  1. #1
    Join Date
    Dec 2007
    Posts
    129
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Steps in solving a programming problem?

    Do you have your own way of solving programming problem?

    scenario: you have a new project. And you have discover that you will going to use new classes that youve never used before.. What are the steps your going to do?

    my first steps will be: im going to look at QT doc/assistant then starts programming like trial and error
    but sadly youve discover that the class is more complicated than you think.. What steps your going to do?

    my step will be: look for examples from demo or search from forum
    but then again that did not solve your problem.. What are the steps your going to do?

    my steps will be: search from forum related to the problem or if none create new post and wait for reply
    but after exchange of messages you found out that what your think that the class could do is not possible.. What are the steps you going to do?

    my steps will be: look for alternative and go back to step #1
    whats your steps in solving programming problem?

    Is their a time when QT designer help you solve the problem?

    mine: actually their are several times QT Designer help me. When i dont know how to add the widget and manipulate it, i will do it in designer and open the UI.h and copy the code..
    Is custom widget in solving your problem is your last option?

    mine: yes (special cases are not included here ofcourse)
    Last edited by triperzonak; 23rd July 2008 at 18:07.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Steps in solving a programming problem?

    In general I tend to first see a running example of the use of a framework or library, then analyze its source code to see if it's easy enough to do something of my own. Then I try to get a tutorial or documentation with examples, browse it and read the most important parts. In the meantime I try to write a simple program of my own. If I manage to make it work I build upon it or begin writing the final component I want the library/framework to be part of. If at some point I have problems, I go back to the working example and try to solve the problem by modifying the example to see what needs to be done for things to work. For that I use regular debugging techniques.

  3. #3
    Join Date
    Dec 2007
    Posts
    129
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Steps in solving a programming problem?

    Quote Originally Posted by wysota View Post
    In general I tend to first see a running example of the use of a framework or library, then analyze its source code to see if it's easy enough to do something of my own.
    but if no examples are available? your first step is to read the doc?

    Quote Originally Posted by wysota View Post
    Then I try to get a tutorial or documentation with examples, browse it and read the most important parts.
    Important parts will be the one that is related to your project right?

    Quote Originally Posted by wysota View Post
    In the meantime I try to write a simple program of my own. If I manage to make it work I build upon it or begin writing the final component I want the library/framework to be part of. If at some point I have problems, I go back to the working example and try to solve the problem by modifying the example to see what needs to be done for things to work. For that I use regular debugging techniques.
    But what if your not getting what you want (or just by reading the docs even without example one will know if the class can posibly get the ouput a user want)?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Steps in solving a programming problem?

    Quote Originally Posted by triperzonak View Post
    but if no examples are available?
    If someone provided a framework or library, there has to be at least one example of use of it somewhere. That's not always the case, especially for closed source/commercial frameworks, unfortunately.

    your first step is to read the doc?
    It depends. If there are some docs available then that's a good try. Recently I had a case when there was practically no docs available, only a java application using the same framework (so an example), but I didn't want to use my time to analyze it, so I skipped that step and started experimenting right away.

    Important parts will be the one that is related to your project right?
    No, that's not the point. The important parts are ones that let you use the framework - architecture, API, etc.

    But what if your not getting what you want (or just by reading the docs even without example one will know if the class can posibly get the ouput a user want)?
    Well, there is no simple answer to that question, it really depends on the case. If you can ask someone who is experienced with the subject then that's certainly a good thing to do. Otherwise you have to explore and learn by yourself.

  5. #5
    Join Date
    Sep 2007
    Location
    Sant'Elpidio a Mare, Italy
    Posts
    194
    Thanks
    54
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Steps in solving a programming problem?

    I think that before jumping in a new project, it is important to get all informations available about the libraries or frameworks that someone is going to use, in order to know if they are able to achieve your targets. Just when all the searches gave no result, then try testing that lone library you have.

    Testing a library for me usually starts scanning docs if available.
    Then trying to build up an extremely simple sample, in order to know that "it works".
    Then again beginning to add more complicated and advanced functions progressively, to get familiar with the library.
    Eventually I try to use that library for my own project.

    But as S.Wysota said, it really depends on case.

    By the way, to S.Wysota, my steps list is very similar to your, I hope this shall mean something...
    --
    raccoon29

    "La mia vita finirà quando non vedrò più la gente ridere...non necessariamente alle mie battute "

  6. #6
    Join Date
    Dec 2007
    Posts
    129
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Steps in solving a programming problem?

    Do you still apply your steps if you have a deadline on the project?

    or do you suggest to skip some part of your steps?

  7. #7
    Join Date
    Sep 2007
    Location
    Sant'Elpidio a Mare, Italy
    Posts
    194
    Thanks
    54
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Steps in solving a programming problem?

    Quote Originally Posted by triperzonak View Post
    Do you still apply your steps if you have a deadline on the project?

    or do you suggest to skip some part of your steps?
    If the question was for me then I ask you:
    exactly what do you mean with "deadline on the project" ?
    Guessing: if you mean that there are no libraries helping for the target, and the project must be done, well, my steps would crash because there is needed a "homemade" library
    Else answer the previous question and I'll say more if I can.
    --
    raccoon29

    "La mia vita finirà quando non vedrò più la gente ridere...non necessariamente alle mie battute "

  8. #8
    Join Date
    Dec 2007
    Posts
    129
    Thanks
    5
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Steps in solving a programming problem?

    deadline i mean a time limit? or you need to do the project in a limited amount of time.

    I think in a Dead end situation you will only need to look for another option and go back to phase 1. ayt?

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Steps in solving a programming problem?

    Quote Originally Posted by triperzonak View Post
    deadline i mean a time limit? or you need to do the project in a limited amount of time.
    Then I don't allow myself to experiment with 3rd party libraries when the deadline is knocking at my door.

Similar Threads

  1. model View programming problem
    By mismael85 in forum Qt Programming
    Replies: 3
    Last Post: 2nd April 2008, 22:44

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.