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?
Quote:
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?
Quote:
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?
Quote:
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?
Quote:
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?
Quote:
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?
Quote:
mine: yes (special cases are not included here ofcourse)
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.
Re: Steps in solving a programming problem?
Quote:
Originally Posted by
wysota
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
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
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)?
Re: Steps in solving a programming problem?
Quote:
Originally Posted by
triperzonak
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.
Quote:
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.
Quote:
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.
Quote:
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.
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... :D
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?
Re: Steps in solving a programming problem?
Quote:
Originally Posted by
triperzonak
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.
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?
Re: Steps in solving a programming problem?
Quote:
Originally Posted by
triperzonak
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.