Wednesday, April 30, 2014

How to Solve Programming Problems if you're learning Programming

Things can and will go wrong when you first start dabbling in programming. As with all new skills, you are going to get frustrated. Here are a few tips that may help you work through the frustration and solve many of your own problems.

 

Language Learning

Do not forget you are effectively learning a new language, or even languages. You will not be fluent in twenty minutes. But you can expect to start building your skills to the point where you can complete simple tasks, progressing into more difficult situations. When you are presented with new code, it's important that you take the time to really understand it. If you whip through a tutorial or cut and paste code snippets you find online, you may end up with a program that runs, but you will not understand it, nor will you be able to generalize the skills and write your own programs. Once you've got something that works, try making a backup copy and then changing things in your code one at a time. If you can predict the effect that your changes will have, you have a good understanding of what is going on. When you are surprised by the effect of a change, you have an opportunity to learn something new. When you've got something that doesn't work, make a backup copy and then try eliminating things that you don't understand. What is the simplest version that you can get to work? Once you have that version, you can try adding in new code, one thing at a time.

 

Search Engines

If you run into difficulties when writing computer code the great news is that the answer to almost any problem can be found online. Computer programmers constantly seek and give help on forums and mailing lists, and the questions and subsequent answers are readily available. This means the Internet is usually your best resource for finding help. If you run into a problem, the first thing you should do is type your problem into a search engine. More often than not someone has already asked your exact question, and other people have provided a range of answers. You might even find entire websites dedicated to solving your particular problem. When you are just starting out, it is very unlikely that you will come across a problem that no one has encountered before. Likewise, if you encounter an error message that you don't understand, cut and paste that error message into a search engine and surround it with quotation marks. Typically you will find dozens of explanations for why this error appeared and how to fix it. The more specific that you can be about your problem, the better the results you will find. Don't be discouraged if you don’t find the answer on your first search. Rephrase the search terms and try again.

 

Forums

If you’ve Googled it, Yahoo’d it, and tried various combinations of teas, coffees and energy drinks to no avail, you're going to need to ask for help. There are many Internet forums and mailing lists to which you can turn. At the time of writing, my favourite forum for general programming questions is Stack Overflow. There is also Tutor, a mailing list where people who are learning Python can ask questions, and people who are interested in teaching Python can answer them. At any given time there are swarms of friendly, knowledgeable people just waiting to answer your question. If you post your problem in a courteous manner, with a little bit of luck you will have a solution within a couple of hours. Keep in mind that it is bad form to post a question in more than one place in quick succession. It may not be the instant gratification we’ve come to expect, but don't forget, these people are volunteering to help you, and most probably if you're desperate enough to ask for help, you could use a few hours away from the keyboard anyway. Go for a walk, take a nap, or do something else to clear your mind and some new ideas will come to you.

 

Asking Good Questions

Clarity and specificity are your friends when it comes to asking for help on a forum. The FAQ page on Stack Overflow's website is great reading for anyone looking to ask a question about programming online. Even if you do not use the Stack Overflow forums, the messages here are essential. Remember, the people who read forums and offer their expertise are busy; make it easy for them by carefully thinking out your problem before you ask. Likewise, make sure you are asking a specific question to a narrowly defined problem. For example, don’t post something like: "Why won't my code work?" Instead, try: "Why am I getting a syntax error when I try to Push a value into an Object?" Always post the relevant section of your code (and only the relevant section of your code) along with your question. If possible, remove any unnecessary bits that are not immediately relevant to the question to make it easier for experts to help you solve your problem. If the answer you get does not do the trick and you are still stuck, be polite and try rephrasing the question. Remember, don’t bite the hand that feeds you; these are volunteers and they’re trying to help you!

 

 Debugging

When fixing problem code, systematically change one thing at a time and retry your program after each change. Often if you make three or four changes before retrying the program, you will solve one issue, but cause another one. This is frustrating and confusing. By changing one thing at a time and making sure it works before moving on, you will prevent a lot of confusion. It also helps to make notes of the things that you have tried, and of the solution when you find one. The more time that you spend programming and debugging, the more familiar various kinds of errors will become.

---
This post was originally published as part of the Programming Historian, and was co-authored by William J. Turkel. It has been reposted here without permission because all work on the Programming Historian is licensed under a CC-BY license. Photo credit: Peter Alfred Hess

65 comments:

Unknown said...
This comment has been removed by a blog administrator.
seravina danniella said...


In my opinion, great content is above all. So focusing on creating good quality of content is the solution.

regards,

Melbourne web developer

Irfan sarkar said...

Often make beginners feel that JavaScript and Java are related. Java is an object-oriented, concurrent, and class-based, general purpose programming language, whereas JavaScript is an interpreted programming language. java programming homework help

Jessy Ryder said...

thanks

Unknown said...

thanks

Unknown said...

Good working i like it Thank you so much for helping me out.Acuity software Provide the services of web development. software development.App development graphic design & digital marketing.
http://www.aqtsoft.com/

Baker Axton said...

This blog is really helpful regarding all educational knowledge I earned. It covered a great area of subject which can assist a lot of needy people.Easy Accounting Software Everything mentioned here is clear and very useful.

Anonymouse said...

Today’s it is so difficult to find most trusted and useful writing services through via internet. But we are providing Ph.D. writer and up-to-date academic and scientific source for your academic work. You should to visit our summarize an article

brindhaajay said...

Great post!I am actually getting ready to across this information,
I am very happy to this commands.
Selenium Training in Chennai
JAVA Course in Chennai
Java training institute in chennai
Selenium Training
Selenium Course in Chennai
Java training in velachery
selenium training in OMR

shivani said...

A befuddling web diary I visit this blog, it's incredibly grand. Strangely, in this present blog's substance made motivation behind fact and sensible. The substance of information is instructive
Oracle Fusion Financials Online Training
Oracle Fusion HCM Online Training
Oracle Fusion SCM Online Training

Anbarasan14 said...

I believe that your blog will surely help the readers who are really in need of this vital piece of information. Waiting for your updates.

Spoken English Classes in Velachery
Spoken English Class in Tambaram
Spoken English Classes in OMR Chennai
Spoken English Class in Ambattur
Spoken English Classes in Chennai
Best Spoken English Classes in Chennai
English Speaking Classes in Mumbai
IELTS Coaching in Chennai
IELTS Classes in Mumbai

Aravind said...

Great info. The content you wrote is very interesting to read. This will loved by all age groups.
ReactJS Training in Chennai
ReactJS Training
ReactJS Training Institutes in Chennai
ccna Training in Chennai
gst classes in chennai
ux ui design course in chennai
Salesforce Training in Chennai
Angularjs Training in Chennai
Tally Training in Chennai

Riya Raj said...

Great Blog!!! it is more informative for us.. Thanks for sharing with us...
Big Data Course in Coimbatore
Big Data Training in Coimbatore
hadoop training in bangalore
big data training in bangalore
AWS Training in Bangalore
data analytics courses in bangalore
Hadoop Certification in Coimbatore
Android Training in Coimbatore
CCNA Course in Coimbatore

Gautam krish said...

Thanks for sharing such a most informative blog.... Waiting for the new updates...
software testing course in coimbatore with placement
Software Testing Course in Coimbatore
Java Course in Bangalore
Digital Marketing Courses in Bangalore
Cloud Computing Courses in Coimbatore
Embedded course in Coimbatore

Riya Raj said...

Good Blog!!! The way you have conveyed your blog is more impressive...
JAVA Training in Chennai
Best JAVA Training institute in Chennai
best java course in chennai
JAVA J2EE Training in Chennai
Best JAVA Training in Chennai
java training in OMR
JAVA Training in Annanagar
Big data training in chennai
Selenium Training in Chennai
Android Training in Chennai

Olivia Lua said...

outsourcingall.com "Usually I never comment on blogs but your article is so convincing that I never stop myself to say something about it.
This paragraph gives clear idea for the new viewers of blogging, Thanks you. You’re doing a great job Man, Keep it up.
web hosting service in bangladesh

Jagna Co Kalani said...

Great Article. Thank you for sharing! Really an awesome post for every one.
Project Centers in Chennai

JavaScript Training in Chennai

Final Year Project Domains for IT

JavaScript Training in Chennai

sasi said...

Very nice post with lots of information. Thanks for sharing this updates.
Angular Training in hyderabad
Angularjs Training in Bangalore
Angularjs Training institutes in hyderabad
Angularjs course in Chennai
angular course in bangalore
Angular 4 Training in Chennai
salesforce course in bangalore
Big Data Training in Coimbatore

sindhuvarun said...

Keep sharing this blog. it look like very attractive content ....
DevOps Training in Chennai
DevOps Training in Bangalore
DevOps Training in Coimbatore
Data Science Courses in Bangalore
DOT NET Training in Bangalore
PHP Training in bangalore
DevOps Training in Marathahalli
Best DevOps Training in Marathahalli
DevOps Training Institutes in Marathahalli
DevOps Institute in Marathahalli

Ravi said...


You write this post very carefully I think, which is easily understandable to me. Not only this, but another post is also good. As a newbie, this info is really helpful for me. Thanks to you.
Tally ERP 9 Training
tally classes
Tally Training institute in Chennai
Tally course in Chennai

Unknown said...

python course in coimbatore
java course in coimbatore
python training in coimbatore
java training in coimbatore
php course in coimbatore
php training in coimbatore
android course in coimbatore
android training in coimbatore
datascience course in coimbatore
datascience training in coimbatore
ethical hacking course in coimbatore
ethical hacking training in coimbatore
artificial intelligence course in coimbatore
artificial intelligence training in coimbatore
digital marketing course in coimbatore
digital marketing training in coimbatore
embedded system course in coimbatore
embedded system training in coimbatore

Anand Shankar said...

Great info! I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have.


digital marketing course in chennai, digital marketing training in chennai, online digital marketing courses, best digital marketing course, digital marketing classes, digital marketing institute, digital marketing training institute, best digital marketing course in chennai, online marketing courses, digital marketing institute in chennai, learn digital marketing,best online marketing courses, best online digital marketing courses, digital marketing training in hyderabad, digital marketing course in delhi, digital marketing institute in delhi, digital marketing training in bangalore, digital marketing in india, digital marketing course fees, digital marketing course fees in chennai, seo training, seo training in chennai, seo course in chennai, digital marketing blog, best seo service in chennai, best-seo-services in chennai, skartec digital marketing academy, skartec digital marketing

Unknown said...

python course in coimbatore
java course in coimbatore
python training in coimbatore
java training in coimbatore
php course in coimbatore
php training in coimbatore
android course in coimbatore
android training in coimbatore
datascience course in coimbatore
datascience training in coimbatore
ethical hacking course in coimbatore
ethical hacking training in coimbatore
artificial intelligence course in coimbatore
artificial intelligence training in coimbatore
digital marketing course in coimbatore
digital marketing training in coimbatore
embedded system course in coimbatore
embeddedsystem training in coimbatore




Indhu said...

Thanks for sharing this nice informations.
python course in coimbatore

data science course in coimbatore

android training institutes in coimbatore

amazon web services training in coimbatore

big data training in coimbatore

RPA Course in coimbatore

artificial intelligence training in coimbatore

interiorworld said...

I absolutely love your site.. Very nice colors & theme. Did you develop this amazing site yourself? Please reply back as I’m wanting to create my own personal technology website and would love to know where you got this from or what the theme is named. Thanks!

Indhu said...

Nice post. thank you so much for sharing this Informations.
android training institutes in coimbatore

data science training in coimbatore

data science course in coimbatore

python course in coimbatore

python training institute in coimbatore

Software Testing Course in Coimbatore

Java training in coimbatore

riyaz said...

Existing without the answers to the difficulties you’ve sorted out through this guide is a critical case, as well as the kind which could have badly affected my entire career if I had not discovered your website.
Android Training Institute in Chennai | Android Training Institute in anna nagar | Android Training Institute in omr | Android Training Institute in porur | Android Training Institute in tambaram | Android Training Institute in velachery

PMP Certification Bangalore said...

This is my first visit to your blog! We are a team of volunteers and new initiatives in the same niche. Blog gave us useful information to work. You have done an amazing job!
PMP Certification Training in Bangalore

sudhan said...

Always so interesting to visit your site.What a great info, thank you for sharing. this will help me so much in my learning
Cyber Security Training Course in Chennai | Certification | Cyber Security Online Training Course | Ethical Hacking Training Course in Chennai | Certification | Ethical Hacking Online Training Course | CCNA Training Course in Chennai | Certification | CCNA Online Training Course | RPA Robotic Process Automation Training Course in Chennai | Certification | RPA Training Course Chennai | SEO Training in Chennai | Certification | SEO Online Training Course

Damien Grant said...

https://digitalweekday.com/
https://digitalweekday.com/
https://digitalweekday.com/
https://digitalweekday.com/
https://digitalweekday.com/
https://digitalweekday.com/
https://digitalweekday.com/
https://digitalweekday.com/

Damien Grant said...

https://digitalweekday.com/
https://digitalweekday.com/
https://digitalweekday.com/
https://digitalweekday.com/
https://digitalweekday.com/
https://digitalweekday.com/
https://digitalweekday.com/
https://digitalweekday.com/

Priya Rathod said...

It is amazing and wonderful to see your blog. Thanks for sharing this information, this is useful to me.
Data Science Training in Hyderabad
Data Science Course in Hyderabad

Priya Rathod said...

Nice blog to read, Thanks for sharing this valuable article.
Python Training in Hyderabad
Python Course in Hyderabad

Satta Matka said...

So is there any true magical matka of numbers that can help you to turn your fortunes around? Are there some unique combinations of numbers that you can learn? Are there some numerology rules that you should know about that can help you win big each time with guaranteed success?

It may sound a bit odd to you but there is no such magical Satta matka of numbers or specific numbers that you can bet on for guaranteed success. Even those websites that promise you to make the winner in each round of the Indian matka are completely vague and absurd, to say the least.

Instead, here we will try to elaborate on some more logical tips that can help you win the matka. Some of these tips may sound very simple and absurd as you know them. But the ground rules in the matka of Indian matka are the same and using some basic principles you can have more chances of success than failure.

Keerthi55 said...

selenium trainings
selenium online trainings from India

Anonymous said...

Nice blog post,
Google Adwords Certification Course

Anand Shankar said...

one funnel away challenge
one funnel away challenge
one funnel away challenge
one funnel away challenge
one funnel away challenge
one funnel away challenge
one funnel away challenge
one funnel away challenge

Shakil ahmad said...

kya aap islamic information zero to hero sikhna chahte hai to www.namazquran.com website ke sath jude jao waha pe apko daily new post islamic knowledge ka milega.

ERSAY KADER said...

pond coin hangi borsada
slp coin hangi borsada
enjin coin hangi borsada
mina coin hangi borsada
sngls coin hangi borsada
win coin hangi borsada
shiba coin hangi borsada
is binance safe
is binance safe

servicenow training and placement in hyderabad said...

Thanks for sharing a valuable information on your blog.keep updating a blog.
Servicenow Training In Hyderabad

Tamil novels said...

Very nice blog.
Tamil romantic novels
Ramanichandran novels PDF
srikala novels PDF
Mallika manivannan novels PDF
muthulakshmi raghavan novels PDF
Infaa Alocious Novels PDF
N Seethalakshmi Novels PDF
Sashi Murali Tamil Novels

IRFAN SHEIKH said...

happy-eid-milad-un-nabi-images
eid-milad-un-nabi-2021-images
Aaqa-Ka-Milad-Aaya-Lyrics
Eid-Milad-Un-Nabi-Mubarak-Images
Eid-Milad-Un-Nabi-Ki-Haqeeqat-In-Hindi
Eid-Milad-Un-Nabi-In-Quran
undefined

Dettifoss IT Solutions said...

It is amazing and wonderful to see your blog. Thanks for sharing this information, this is useful to me.
ServiceNow Training in Pune

totosafeguide said...

You are so cool! I do not suppose I have read a single thing like this before. So good to find somebody with some original thoughts on this topic. Seriously.. many thanks for starting this up. Also, check out how to find airpod case. Feel free to visit my website; 먹튀검증

totosafeguide said...

Thank you for this fascinating post, I am happy I observed this website on Google. Not just content, in fact, the whole site is fantastic. Feel free to visit my website; 바카라사이트

totosafeguide said...

I was recommended this blog by my cousin. I’m not sure whether this post is written by him as nobody else know such detailed about my difficulty. You’re wonderful! Thanks! Feel free to visit my website; 바카라사이트

totosafeguide said...

I am interested in this area if you are a great site but know some community forums. I think it should be a good opportunity to get feedback from others who are experienced. Feel free to visit my website; 토토사이트

Dettifoss IT Solutions said...

Well explained, this post has the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.
Mulesoft training in hyderabad

Dettifoss IT Solutions said...

Thank you for your post. This is excellent information. It is amazing and wonderful to visit your site
ServiceNow Training in Chennai

Dettifoss IT Solutions said...

This post is very simple to read and appreciate without leaving any details out. Great work !
Mulesoft training in hyderabad

sportstotohot.com said...

This is also a very good post which I really enjoyed reading. It is not every day that I have the possibility to see something like this. 토토

reelgame.site said...

here are some hyperlinks to web sites that we link to since we assume they are worth visiting
파친코사이트

totosite365.info said...

Hello! This post could not be written any better! 토토사이트

casinosite777.info said...

All your hard work is much appreciated. This content data gives truly quality and unique information. I’m definitely going to look into it. Really very beneficial tips are provided here and, Thank you so much. Keep up the good works.
바카라사이트

baccaratsite.top said...

Such an amazing and helpful post. I really really love it.
온라인카지노

purple said...

When did it start? The day I started surfing the Internet to read articles related to . I've been fond of seeing various sites related to 카지노사이트 around the world for over 10 years. Among them, I saw your site writing articles related to and I am very satisfied.

Jumma Mubarak said...

I used to ask to get this information for a long time, I was not getting it, after reading your post, I have got complete information about it.

Unknown said...

Indir APK
PDF Anytime
The Naat Lyrics
Power of Islam
Choose Tech Special

Jhon Michael said...

PC networks are the premise of correspondence in IT. They are utilized in an immense assortment of ways and can incorporate a wide range of sorts of organization.

computer network

corpac said...

Plastic corrugated roofing sheets is among the top companies involved in manufacturing and exporting Corrugated Plastic Roofing Sheets under the brand name CorpacInd. Established in 1998, the company has its state-of-the-art facility located at Kaharani, Bhiwadi, in Rajasthan. It manufactures Corrugated plastic roofing sheets, Polypropylene Corrugated Sheets, etc., under a roof. The skilled professionals, modern technology and advanced production facility support it's objective most extraordinarily. CorpacInd’s plastic corrugated roofing sheets combine incredible resistance to chemicals, fire and impact, ensuring an excellent durable roofing solution from the corrugated plastic roofing material which withstands extreme chemical environments.

머니상 said...

It was really useful information.
I'm going to study this information a lot.
I will share useful information.
It's my website.
윈조이머니상

Unknown said...

Hey what a brilliant post I have come across and believe me I have been searching out for this similar kind of post for past a week and hardly came across this. Thank you very much and will look for more postings from you. 먹튀검증 and I am very happy to see your post just in time and it was a great help. Thank you ! Leave your blog address below. Please visit me anytime!

chandra shekar said...

Great to become visiting your weblog once more, it has been a very long time for me. Pleasantly this article i've been sat tight for such a long time. I will require this post to add up to my task in the school, and it has identical subject along with your review. Much appreciated, great offer.
Software Testing Tools Training in Hyderabad

Dương Dương said...

It seems like I've never seen an article of a kind like . It literally means the best thorn. It seems to be a fantastic article. It is the best among articles related to 메이저안전놀이터. seems very easy, but it's a difficult kind of article, and it's perfect.

lolyloly said...

CasinoMecca