What to do when stuck with you program!!

We all gets stuck at time while working and don’t get a clue how to solve the problem. I have tried to put the regular steps I usually advice. You should be able to solve 90% of the coding problems using these steps -

  1. It sounds like the most obvious tip but I have seen we always forget it. Google your query. If you are providing proper keywords then usually at least one of the first 5 links will give you the answer. Few tips for effective querying -
    1. Make sure you are using Google for your search and not yahoo or Bing. I have seen google giving better results.
    2. make sure you use only the relevant keywords in your search criteria. eg. iphone string add (and not “how to add string in iphone”). Your search string should have 5 – 6 words max
    3. Always browse the answers faster before you start reading them thoroughly. Reading the answer on first 5 link will take you 30 mins but simple browsing will hardly take 5 mins and then you can read whichever one seems better answer.
    4. If you find no good or relevant answer then modify your query again. Make sure you do not have a keyword which is confusing search engine. eg. no timestamps from logs. its not related to the problem and will only confuse search engine.
  2. Usually you will find it while querying but if not then - Check the official api documentation. This is useful especially if you know what you need to do and know the psuedo code to your problem. Or you have a code but dont know where the things are going wrong. Check the official documentation and understand how the code is working or which api can help you. Your keyword here should be technology/language class task api reference/doc eg. iphone NSString api reference or java String api doc
  3. If not able to fine answer till now, then take help from your team mates or lead. Make sure you explain them the technical problem and not your project. For someone not working on the project, it is very difficult to understand so many details in 5-10 mins. Make sure you ask them first if they are free before just interrupting them. Its always better to ask on chat or email if the person seems to be doing something.
  4. If not able to find answer then take help from forums. Thankfully developer community is very active and you can ask your problem in the forums. If you have explained your problem well, then usually you will start getting answers or hints within few hours. But before you go and ask on forums make sure you do following -
    1. First search on the forum if someone has already answered a similar question.
    2. Make sure you do not share any project specific details. Only ask the technical part of your problem.
    3. Make sure you do not copy paste your code or part of code. If you have to ask for advice on your code, then change the names of variables to generic , put only the relevant piece and make sure all the project specific information is removed. Posting anything related to a project specific information is a very serious matter so be very careful in this.
    4. Do not write a story. Even though developers are very active, they are also very busy. So explain your problem in maximum 4 – 5 lines.
    5. Get it reviewed by someone in your team before posting it to make sure it is clear and you are not posting some project related information.
    6. Make sure you choose some active forum and not something random. Stackoverflow is one of the best forums today for software. I am sure there are similar forums for non IT domains also.
  5. Usually you would have find the answer by now. If nothing is working, then think again on the problem, try all the steps again, do more brain storming, keep checking if someone has posted an answer.
The following two tabs change content below.

saurabh agrawal

Latest posts by saurabh agrawal (see all)

Submit a Comment

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current month ye@r day *